im trying to replace the ip address in c= and o= with force_rtp_proxy.
i tried different flag co,rc,ro,fo,fc,rfco but still doesnt work.
hope some one can help me with this..
below is my noob simple script.
hope someone can help..
thanks you :)
route[RTPPROXY] { #!ifdef WITH_NAT if (is_method("BYE")) { unforce_rtp_proxy(); } else if (is_method("INVITE")){ xlog("L_INFO","force_rtp_proxy!!!! $rm from $fu (IP:$si:$sp)\n"); force_rtp_proxy("rfco","publicip"); } if (!has_totag()) add_rr_param(";nat=yes"); #!endif return; }
Hi list,
can anyone here help me out here?
i also tried putting it in reply_one.
but in the sdp the c= and o= did not change. it stil having the private ip.
onreply_route[REPLY_ONE] { xdbg("incoming reply\n"); #!ifdef WITH_NAT if ((isflagset(FLT_NATS) || isbflagset(FLB_NATB)) && status=~"(183)|(2[0-9][0-9])") { #force_rtp_proxy(); force_rtp_proxy("rfco","publicip"); # } if (isbflagset("6")) { fix_nated_contact(); } #!endif
thanks you..
Are you sure that force_rtp_proxy is invoked?
On Fri, Jul 1, 2011 at 11:00 PM, MingHon gminghon@gmail.com wrote:
Hi list, can anyone here help me out here? i also tried putting it in reply_one. but in the sdp the c= and o= did not change. it stil having the private ip.
onreply_route[REPLY_ONE] { xdbg("incoming reply\n"); #!ifdef WITH_NAT if ((isflagset(FLT_NATS) || isbflagset(FLB_NATB)) && status=~"(183)|(2[0-9][0-9])") { #force_rtp_proxy(); force_rtp_proxy("rfco","publicip"); # } if (isbflagset("6")) { fix_nated_contact(); } #!endif
thanks you..
Regards,
MingHon
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi,
how do i know is it invoked?
i try putting xlog after "force_rtp_proxy("rfco","publicip");" line
xlog("force_rtp");
when i invite i saw "force_rtp" in /var/log/messages
thanks.
Hello,
I also tried rtpproxy_offer/rtpproxy_answer but no luck.
my rtpproxy is running..
rtpproxy -l 192.168.2.3 -l 127.0.0.1:7722 -u user
and kamailio on 192.168.2.3 asterisk on 192.168.2.23
all three in behind same nat 175.136.223.112.
and uac is behind another nat.
below is my wireshark INVITE and 200OK.
route[RTPPROXY] { #!ifdef WITH_NAT if (is_method("BYE")) { unforce_rtp_proxy(); } else if (is_method("INVITE")){ rtpproxy_offer("rco","175.136.223.112"); xlog("offer"); } if (!has_totag()) add_rr_param(";nat=yes"); #!endif
onreply_route[REPLY_ONE] { xdbg("incoming reply\n"); #!ifdef WITH_NAT if ((isflagset(FLT_NATS) || isbflagset(FLB_NATB)) && status=~"(183)|(2[0-9][0-9])") { rtpproxy_answer("rco","175.136.223.112"); xlog("answer"); } if (isbflagset("6")) { fix_nated_contact(); } #!endif
----------------------------------------------
e0 E!;pINVITE sip:102@192.168.2.132:5062 SIP/2.0 Record-Route: sip:192.168.1.3;nat=yes;ftag=as3d4c45ac;lr=on Via: SIP/2.0/UDP 175.136.223.112:5060;branch=z9hG4bK7ed5.6ceec772.0 Via: SIP/2.0/UDP 192.168.1.23:5080;branch=z9hG4bK34b777a3;rport=5080 Max-Forwards: 69 From: "101" sip:102@aextddns.dyndns.info;tag=as3d4c45ac To: < sip:102@192.168.1.3:5060> Contact: sip:102@192.168.1.23:5080 Call-ID: 0bf35cba6b3cb98156b70a3a4db2507a@aextddns.dyndns.info CSeq: 102 INVITE User-Agent: Asterisk PBX 1.6.2.18 Date: Mon, 04 Jul 2011 07:28:08 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces, timer Content-Type: application/sdp Content-Length: 327 v=0 o=root 1789123892 1789123892 IN IP4 192.168.1.3 s=Asterisk PBX 1.6.2.18 c=IN IP4 192.168.1.3 t=0 0 m=audio 13260 RTP/AVP 0 3 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:3 GSM/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - a=ptime:20 a=sendrecv a=nortpproxy:yes
-----------------------------
e90 E|;YphSIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.2.200:5062;rport=2474;received=175.138.21.31;branch=z9hG4bK823351926 Record-Route: sip:192.168.1.3;nat=yes;ftag=1020708120;lr=on From: "101" < sip:101@aextddns.dyndns.info>;tag=1020708120 To: < sip:102@aextddns.dyndns.info>;tag=as199c06be Call-ID: 987641369@192.168.2.200 CSeq: 21 INVITE Server: Asterisk PBX 1.6.2.18 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces, timer Contact: sip:102@192.168.1.23:5080 Content-Type: application/sdp Content-Length: 304 v=0 o=root 1460646028 1460646028 IN IP4 192.168.1.3 s=Asterisk PBX 1.6.2.18 c=IN IP4 192.168.1.3 t=0 0 m=audio 18346 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - a=ptime:20 a=sendrecv a=nortpproxy:yes