append_hf("P-hint: (1)sequential request/rr-enforced \r\n"); append_hf("P-hint: (2)initial request/usrloc applied\r\n"); append_hf("P-hint: (3)reply thru onreply_route[2]\r\n"); append_hf("P-hint: (4)new request in failure_route[2]\r\n"); 通过对SIP头添加以上四个跟...
is_method("REGISTER")) return; remove_hf("Contact"); append_hf("Contact: <sip:$var(user)@MY_IP4_ADDR:MY_SIP_PORT;transport=udp;lhst=$sut;lm=midreg;bf=$bf>\r\n"); ds_select_dst("1", "4"); t_relay(); exit; } 就是把Contact换成Kamailio自己,同时增加下面三个参数: lhst 就...
xlog("Received $rm to $ru - Forwarding"); append_hf("X-Proxied: You betcha\r\n"); #Forard to new IP forward("192.168.1.110"); } On the wire the packets still come from the requester, to the Proxy (Kamailio) before being forwarded to the forward destination (192.168.1.110): We’...
uri==myself) { append_hf("P-hint: outbound\r\n"); route(RELAY); } } # PSTN GW routing route[PSTN] { #!ifdef WITH_PSTN # check if PSTN GW IP is defined if (strempty($sel(cfg_get.pstn.gw_ip))) { xlog("SCRIPT: PSTN rotuing enabled but pstn.gw_ip not defined\n"); ...
remove_hf("Route"); if (is_method("INVITE|SUBSCRIBE")) record_route(); # account only INVITEs if (is_method("INVITE")) { setflag(1); # do accounting } # handle presence related requests route(PRESENCE); # handle registrations route(REGISTRAR); if ($rU==$null) ...
2.The architecture of the VoIP service Communication between VoIP users (phones) and the server uses the SIP (RFC3261) protocol. The SIP server will communicate with the AAA server via radius client, which is linked to the SIP server. Users' profile can be stored to the local file system...
uri==myself) { append_hf("P-hint: outbound\r\n"); route(RELAY); } } # PSTN GW routing route[PSTN] { #!ifdef WITH_PSTN # check if PSTN GW IP is defined if (strempty($sel(cfg_get.pstn.gw_ip))) { xlog("SCRIPT: PSTN rotuing enabled but pstn.gw_ip not defined\n"); ...
remove_hf("Route"); if (is_method("INVITE|SUBSCRIBE")) record_route(); # account only INVITEs if (is_method("INVITE")) { setflag(1); # do accounting } # handle presence related requests route(PRESENCE); # handle registrations
append_hf("Contact: $ct;$hdr(C-Params)\r\n"); } #!ifdef WITH_IPSEC ipsec_forward("location"); ipsec_forward("location"); #!endif #In case of 1xx and 2xx do NAT if(status=~"[12][0-9][0-9]") Expand DownExpand Up@@ -186,7 +194,7 @@ onreply_route[MO_indialog_rep...
remove_hf("Route"); if (is_method("INVITE|SUBSCRIBE")) #add_rr_param(";nat=yes"); record_route_advertised_address("54.69.159.69:5060"); #record_route(); # account only INVITEs if (is_method("INVITE")) { setflag(1); # do accounting } # handle presence related req...