Hi serusers!
After setting up an almost working ser with nat, rtpproxy and asterisk ivr, I'm stuck on an hangup problem call if from behind nat. I can't get xlite BYEs to hit ser (ngrep on ser machine gets nothing on hangup pressed on client). The address in SEND>> is ser nat internal address and I'm calling from another nat. This is xlite log on BYE
SEND TIME: 735130 SEND >> 192.168.1.100:5060 BYE sip:asterisk@192.168.1.100:5061 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.5:5060;rport;branch=z9hG4bKE406E7BA9C6E11D98395000272430644 From: gio sip:gio@SER_PUBLIC_IP;tag=1837372280 To: sip:gio@SER_PUBLIC_IP;tag=as0d4fbf68 Contact: sip:gio@192.168.1.5:5060 Route: sip:192.168.1.100;ftag=1837372280;lr=on Call-ID: D6C66B0C-9C6E-11D9-8395-000272430644@192.168.1.5 CSeq: 8745 BYE Max-Forwards: 70 User-Agent: X-Lite release 1103m Content-Length: 0
where 192.168.1.100 is private ip address of ser and asterisk server and 192.168.1.5 is xlite private address from another private network. I'm pretty sure the problem is SEND >> 192.168.1.100 shoul be SEND >> SER_PUBLIC_IP.
Reading past issues I tried fiddling with fix_rport, fix_nated_contact, but no way. Can anyone please explain the correct way to route BYEs thru NAT? Other things work: i can hear sounds, talk to other people and record messages in asterisk boxes.
Please, advice Thanx everyone
In my ser.cfg commands involved in BYE and nat are the following:
if (nat_uac_test("1")) { if (method == "REGISTER" || !search("^Record-Route:")) { fix_nated_contact(); if (method == "INVITE" || method == "BYE" || method == "CANCEL") { # I think I could remove method == BYE and CANCEL with no harm... fix_nated_sdp("1"); }; force_rport(); setflag(6); }; };
record_route(); if (loose_route()) { route(1); };
if (method=="INVITE") { if (lookup("location")) { setflag(1); route(1); break; }; };
route[1] {
if (isflagset(6)){ force_rtp_proxy(); t_on_reply("1"); };
if (method == "BYE" || method == "CANCEL"){ setflag(1); };
if (!t_relay()){ sl_reply_error(); }; break; }
ciao