#include <stdio.h>
#include "../../str.h"
#include "dlg.h"
#include "t_hooks.h"


Go to the source code of this file.
Defines | |
| #define | DEFAULT_CSEQ 10 |
Typedefs | |
| typedef int(* | req_t )(str *m, str *ruri, str *t, str *f, str *h, str *b, str *oburi, transaction_cb c, void *cp) |
| typedef int(* | reqout_t )(str *m, str *t, str *f, str *h, str *b, dlg_t **d, transaction_cb c, void *cp) |
| typedef int(* | reqwith_t )(str *m, str *h, str *b, dlg_t *d, transaction_cb c, void *cp) |
Functions | |
| void | generate_fromtag (str *tag, str *callid) |
| Generate a From tag from the callid. | |
| int | req_outside (str *m, str *t, str *f, str *h, str *b, dlg_t **d, transaction_cb c, void *cp) |
| Send an initial request that will start a dialog. | |
| int | req_within (str *m, str *h, str *b, dlg_t *d, transaction_cb c, void *cp) |
| Send a message within a dialog. | |
| int | request (str *m, str *ruri, str *to, str *from, str *h, str *b, str *oburi, transaction_cb c, void *cp) |
| Send a transactional request, no dialogs involved. | |
| int | t_uac (str *method, str *headers, str *body, dlg_t *dialog, transaction_cb cb, void *cbp) |
| Send a request using data from the dialog structure. | |
| int | uac_init (void) |
| Initialize UAC. | |
Variables | |
| int | pass_provisional_replies |
Definition in file uac.h.
| #define DEFAULT_CSEQ 10 |
Default CSeq number
Definition at line 44 of file uac.h.
Referenced by mi_tm_uac_dlg(), req_outside(), and request().
Generate a From tag from the callid.
| tag | tag generated tag | |
| callid | source callid |
Definition at line 128 of file tm/uac.c.
References crcitt_string_array(), from_tag, FROM_TAG_LEN, _str::len, MD5_LEN, and _str::s.
Referenced by mi_tm_uac_dlg(), req_outside(), and request().
| int req_outside | ( | str * | method, | |
| str * | to, | |||
| str * | from, | |||
| str * | headers, | |||
| str * | body, | |||
| dlg_t ** | dialog, | |||
| transaction_cb | cb, | |||
| void * | cbp | |||
| ) |
Send an initial request that will start a dialog.
| method | SIP method | |
| to | To URI | |
| from | From URI | |
| headers | SIP headers | |
| body | SIP body | |
| dialog | dialog state | |
| cb | transaction callback | |
| cbp | transaction callback parameter |
Definition at line 442 of file tm/uac.c.
References check_params(), DEFAULT_CSEQ, generate_callid(), generate_fromtag(), LM_ERR, new_dlg_uac(), and t_uac().
Referenced by load_tm().
| int req_within | ( | str * | method, | |
| str * | headers, | |||
| str * | body, | |||
| dlg_t * | dialog, | |||
| transaction_cb | completion_cb, | |||
| void * | cbp | |||
| ) |
Send a message within a dialog.
| method | SIP method | |
| headers | SIP header | |
| body | SIP body | |
| dialog | dialog state | |
| completion_cb | transaction callback | |
| cbp | transaction callback parameter |
Definition at line 406 of file tm/uac.c.
References DLG_CONFIRMED, _str::len, LM_ERR, dlg::loc_seq, _str::s, dlg::state, t_uac(), and dlg_seq::value.
Referenced by load_tm().
| int request | ( | str * | m, | |
| str * | ruri, | |||
| str * | to, | |||
| str * | from, | |||
| str * | h, | |||
| str * | b, | |||
| str * | oburi, | |||
| transaction_cb | cb, | |||
| void * | cbp | |||
| ) |
Send a transactional request, no dialogs involved.
| m | SIP method | |
| ruri | Request URI | |
| to | To URI | |
| from | From URI | |
| h | SIP headers | |
| b | SIP body | |
| oburi | outbound URI | |
| cb | transaction callback | |
| cbp | transaction callback parameter |
Definition at line 476 of file tm/uac.c.
References check_params(), DEFAULT_CSEQ, free_dlg(), generate_callid(), generate_fromtag(), dlg::hooks, _str::len, LM_ERR, new_dlg_uac(), dlg_hooks::next_hop, dlg::rem_target, dlg_hooks::request_uri, _str::s, t_uac(), and w_calculate_hooks().
Referenced by __dialog_created(), encode_msg(), end_media_session(), load_tm(), t_uac(), and use_media_proxy().
| int t_uac | ( | str * | method, | |
| str * | headers, | |||
| str * | body, | |||
| dlg_t * | dialog, | |||
| transaction_cb | cb, | |||
| void * | cbp | |||
| ) |
Send a request using data from the dialog structure.
| method | SIP method | |
| headers | SIP header | |
| body | ||
| dialog | dialog state | |
| cb | transaction callback | |
| cbp | transaction callback parameter |
Definition at line 229 of file tm/uac.c.
References sip_msg::add_rm, sip_msg::body_lumps, buf_len, retr_buf::buffer, build_cell(), build_req_buf_from_sip_req(), build_uac_req(), dlg2hash(), retr_buf::dst, sip_msg::dst_uri, E_OUT_OF_MEM, cell::flags, free_cell(), free_sip_msg(), getsflags(), dlg::hooks, insert_into_hash_table_unsafe(), insert_tmcb(), INVITE, INVITE_LEN, _str::len, LM_DBG, LM_ERR, LOCAL_ROUTE, LOCK_HASH, cell::method, MSG_TRANS_NOVIA_FLAG, MSG_TRANS_SHM_FLAG, sip_msg::new_uri, dlg_hooks::next_hop, cell::nr_of_outgoings, NULL, pass_provisional, pass_provisional_replies, pkg_free, dest_info::proto, socket_info::proto, PROTO_NONE, dest_info::proto_reserved1, remove_from_hash_table_unsafe(), ua_client::request, request(), run_top_route(), _str::s, SEND_BUFFER, dest_info::send_sock, dlg::send_sock, ser_error, set_avp_list(), set_route_type, setsflagsval(), shm_free, start_retr(), swap_route_type, dlg::T_flags, T_IS_INVITE_FLAG, T_IS_LOCAL_FLAG, cell::tmcb_hl, TMCB_LOCAL_COMPLETED, TMCB_LOCAL_RESPONSE_OUT, dest_info::to, cell::uac, UNLOCK_HASH, uri2sock(), uri2su(), cell::user_avps, and w_calculate_hooks().
Referenced by mi_tm_uac_dlg(), req_outside(), req_within(), and request().
| int uac_init | ( | void | ) |
Initialize UAC.
Definition at line 92 of file tm/uac.c.
References socket_info::address_str, bind_address, from_tag, get_first_socket(), _str::len, LM_CRIT, LM_WARN, MD5_LEN, MD5StringArray(), socket_info::port_no_str, s, _str::s, and TM_TABLE_ENTRIES.
Referenced by mod_init().
1.5.6