Functions

t_mi.c File Reference

TM :: MI functions. More...

#include <stdlib.h>
#include "../../parser/parse_from.h"
#include "../../modules/tm/ut.h"
#include "../../lib/kmi/mi.h"
#include "../../str_list.h"
#include "tmx_mod.h"
Include dependency graph for t_mi.c:

Go to the source code of this file.

Functions


Detailed Description

Definition in file t_mi.c.


Function Documentation

static char* get_hfblock ( str uri,
struct hdr_field hf,
int *  l,
struct socket_info **  send_sock 
) [inline, static]

Convert a header field block to char array, allocated in pkg_mem.

Parameters:
uri SIP URI
hf header field
l 
send_sock socket information
Returns:
new allocated char array on success, zero otherwise

Definition at line 164 of file t_mi.c.

References append_str_list(), _str::len, hdr_field::len, hdr_field::name, hdr_field::next, and _str::s.

Here is the call graph for this function:

static struct mi_root* mi_check_msg ( struct sip_msg msg,
str method,
str body,
int *  cseq,
str callid 
) [static, read]

Check if the request pushed via MI is correctly formed. Test if necessary SIP header fileds are included, could be parsed and the CSEQ is correct.

Parameters:
msg SIP message
method SIP method
body SIP body
cseq SIP CSEQ value
callid SIP callid, optional
Returns:
zero on success, or a mi_root with an error message included otherwise

Definition at line 109 of file t_mi.c.

References hdr_field::body, get_cseq, _str::len, parse_from_header(), and _str::s.

Here is the call graph for this function:

static void mi_print_routes ( struct mi_node *  node,
dlg_t *  dlg 
) [inline, static]

Print route to MI node, allocate temporary memory in pkg_mem.

Parameters:
node MI node
dlg route set

Definition at line 274 of file t_mi.c.

References rr::len, name_addr::name, rr::nameaddr, rr::next, and _str::s.

Referenced by mi_print_uris().

Here is the caller graph for this function:

static int mi_print_uris ( struct mi_node *  node,
struct sip_msg reply 
) [inline, static]

Print URIs to MI node, allocate temporary memory in shm_mem.

Parameters:
node MI node
reply SIP reply
Returns:
zero on success, -1 on errors

Definition at line 338 of file t_mi.c.

References mi_print_routes().

Here is the call graph for this function:

static int uri2su ( str uri,
union sockaddr_union *  to_su,
int  proto 
) [inline, static]

Convert a URI into a socket address. Create a temporary proxy.

Parameters:
uri input URI
to_su target structure
proto protocol
Returns:
choosen protocol

Definition at line 55 of file t_mi.c.

References SIP_PORT.