Route & Record-Route module, loose routing support. More...
#include <string.h>#include "../../mem/mem.h"#include "../../dprint.h"#include "../../parser/parse_uri.h"#include "../../parser/parse_from.h"#include "../../str.h"#include "../../data_lump.h"#include "record.h"#include "rr_mod.h"
Go to the source code of this file.
Definition in file modules_k/rr/record.c.
| #define RR_TRANS_LEN 11 |
Insert manually created Record-Route header, no checks, no restrictions, always adds lr parameter, only fromtag is added automatically when requested. Allocates new private memory for this.
| _m | SIP message | |
| _data | manually created RR header |
Definition at line 463 of file modules_k/rr/record.c.
| msg | SIP message | |
| rr_param | RR parameter |
Definition at line 665 of file modules_k/rr/record.c.
References sip_msg::add_rm, enable_double_rr, get_rr_param_lump(), sip_msg::id, insert_rr_param_lump(), _str::len, root, RR_PARAM_BUF_SIZE, and _str::s.

| static int build_rr | ( | struct lump * | _l, | |
| struct lump * | _l2, | |||
| str * | user, | |||
| str * | tag, | |||
| str * | params, | |||
| int | _inbound | |||
| ) | [inline, static] |
Build a Record-Route header field, allocates new private memory for this.
| _l | first lump | |
| _l2 | second lump | |
| user | user parameter | |
| tag | tag parameter | |
| params | parameter | |
| _inbound | inbound request |
Definition at line 160 of file modules_k/rr/record.c.
References enable_double_rr, enable_full_lr, HDR_RECORDROUTE_T, insert_cond_lump_after(), insert_rr_param_lump(), insert_subst_lump_after(), _str::len, prefix, and _str::s.
Referenced by record_route().


| static struct lump* get_rr_param_lump | ( | struct lump ** | root | ) | [static, read] |
| root | root of the lump list |
Definition at line 640 of file modules_k/rr/record.c.
References HDR_RECORDROUTE_T.
Referenced by add_rr_param().

Extract username from the Request URI. First try to look at the original Request URI and if there is no username use the new Request URI.
| _m | SIP message | |
| _user | username |
Definition at line 88 of file modules_k/rr/record.c.
References sip_msg::first_line, _str::len, sip_msg::new_uri, _str::s, and sip_uri::user.
Referenced by record_route(), record_route_advertised_address(), and record_route_preset().

| static struct lump* insert_rr_param_lump | ( | struct lump * | before, | |
| char * | s, | |||
| int | l | |||
| ) | [static, read] |
| before | lump list | |
| s | parameter string | |
| l | parameter string length |
Definition at line 123 of file modules_k/rr/record.c.
References HDR_RECORDROUTE_T.
Referenced by add_rr_param(), and build_rr().

Insert a new Record-Route header field and also 2nd one if it is enabled and the realm changed so the 2nd record-route header will be necessary.
| _m | SIP message | |
| params | RR parameter |
Definition at line 278 of file modules_k/rr/record.c.
References add_username, anchor_lump(), append_fromtag, sip_msg::buf, build_rr(), enable_double_rr, get_username(), HDR_RECORDROUTE_T, sip_msg::headers, sip_msg::id, INBOUND, insert_cond_lump_after(), _str::len, hdr_field::name, OUTBOUND, parse_from_header(), hdr_field::parsed, and _str::s.
Referenced by sip_msg_shm_clone(), and w_record_route().


Insert manually created Record-Route header, no checks, no restrictions, always adds lr parameter, fromtag is added automatically when requested, Allows addition of rr parameters using add_rr_param. Adds a 2nd header with the same details if the protocol changes and double rr enabled Allocates new private memory for this.
| _m | SIP message | |
| _data | manually created RR header |
Definition at line 576 of file modules_k/rr/record.c.
References add_username, anchor_lump(), append_fromtag, sip_msg::buf, enable_double_rr, get_username(), HDR_RECORDROUTE_T, sip_msg::headers, INBOUND, insert_cond_lump_after(), _str::len, hdr_field::name, OUTBOUND, parse_from_header(), hdr_field::parsed, and _str::s.
Referenced by w_record_route_advertised_address().


Insert manually created Record-Route header, no checks, no restrictions, always adds lr parameter, only fromtag is added automatically when requested. Allocates new private memory for this.
| _m | SIP message | |
| _data | manually created RR header |
Definition at line 357 of file modules_k/rr/record.c.
References add_username, anchor_lump(), append_fromtag, sip_msg::buf, enable_full_lr, get_username(), HDR_RECORDROUTE_T, sip_msg::headers, _str::len, hdr_field::name, parse_from_header(), hdr_field::parsed, and _str::s.

char rr_param_buf_ptr[RR_PARAM_BUF_SIZE] [static] |
Definition at line 74 of file modules_k/rr/record.c.
1.7.1