Hello guys,
I'm following this guide: https://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
And I have the following schema:
Phone A -----> Kamailio -----> Asterisk -----> Phone B (10.0.8.249) (10.0.6.123) (10.0.3.144) (10.0.13.23)
I think the flow it is like (because when UAC register to Asterisk, the contact points to Kamailio IP):
1. Phone A --> Kamailio --> Asterisk 2. Asterisk --> Kamailio --> Phone B
In attachment is the pcap of the call, kamailio config.
The problem is that I never receive ACK after 200 OK and call drops after 30 seconds?
Kamailio version 5.1 and Asterisk version 15.1
Phones are grandstreams and also tested with microsip soft client and same results... Like "Phone A" never sends ACK back
I tried different approaches to change contact header in 200 OK, because is Asterisk IP. Disable NAT handling. Different "nat_uac_test" flags, but still without success :(
Also tried with this NAT detection and manage routes (again without any success) - source https://github.com/sipwise/kamailio/blob/master/etc/kamailio.cfg
# Caller NAT detection route[NATDETECT] { #!ifdef WITH_NAT force_rport(); if (nat_uac_test("19")) { if (is_method("REGISTER")) { fix_nated_register(); } else { if(is_first_hop()) { set_contact_alias(); } } setflag(FLT_NATS); } #!endif return; }
# RTPProxy control and signaling updates for NAT traversal route[NATMANAGE] { #!ifdef WITH_NAT if (is_request()) { if(has_totag()) { if(check_route_param("nat=yes")) { setbflag(FLB_NATB); } } } if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB))) return;
if(nat_uac_test("8")) { rtpproxy_manage("co"); } else { rtpproxy_manage("cor"); }
if (is_request()) { if (!has_totag()) { if(t_is_branch_route()) { add_rr_param(";nat=yes"); } } } if (is_reply()) { if(isbflagset(FLB_NATB)) { if(is_first_hop()) set_contact_alias(); } } #!endif return; }
Thanks in advance
Denislav Raychev Tsonev | Integration and Infrastructure Engineer | Musala Soft JSC www.musala.com | t: +359 2 969 58 21 | m: +359 878 270 965 | f: +359 2 969 58 22 World Trade Center, 36 Dragan Tsankov blvd., Sofia 1057, Bulgaria