Hello Everyone, How is possible add to Contact: received=ip ? Is this should be handled by fix_nated_contact() ? I am using default NATDETECT route, but I see in debug fix_nated_contact() executed, but in SDP Contact: stay Contact: sip:102@private_ip:5065;transport=tcp;audio.
From public side client use TCP inbound to kamailio and on local side to asterisk is use UDP. Kamailio have 2 interfaces one public one private.
Any help thank you.
Mar 28 14:28:28 canlvprx01 kamailio: 14(28868) ERROR: *** cfgtrace:request_route=[NATDETECT] c=[/etc/kamailio/kamailio-asterisk.cfg] l=895 a=55 n=force_rport Mar 28 14:28:28 canlvprx01 kamailio: 14(28868) ERROR: *** cfgtrace:request_route=[NATDETECT] c=[/etc/kamailio/kamailio-asterisk.cfg] l=905 a=16 n=if Mar 28 14:28:28 canlvprx01 kamailio: 14(28868) ERROR: *** cfgtrace:request_route=[NATDETECT] c=[/etc/kamailio/kamailio-asterisk.cfg] l=896 a=25 n=nat_uac_test Mar 28 14:28:28 canlvprx01 kamailio: 14(28868) ERROR: *** cfgtrace:request_route=[NATDETECT] c=[/etc/kamailio/kamailio-asterisk.cfg] l=901 a=16 n=if Mar 28 14:28:28 canlvprx01 kamailio: 14(28868) ERROR: *** cfgtrace:request_route=[NATDETECT] c=[/etc/kamailio/kamailio-asterisk.cfg] l=897 a=25 n=is_method Mar 28 14:28:28 canlvprx01 kamailio: 14(28868) ERROR: *** cfgtrace:request_route=[NATDETECT] c=[/etc/kamailio/kamailio-asterisk.cfg] l=900 a=24 n=fix_nated_contact Mar 28 14:28:28 canlvprx01 kamailio: 14(28868) ERROR: *** cfgtrace:request_route=[NATDETECT] c=[/etc/kamailio/kamailio-asterisk.cfg] l=902 a=39 n=setflag Mar 28 14:28:28 canlvprx01 kamailio: 14(28868) ERROR: *** cfgtrace:request_route=[NATDETECT] c=[/etc/kamailio/kamailio-asterisk.cfg] l=905 a=2 n=return
Hello Slava,
On 03/28/2015 02:26 PM, Slava Bendersky wrote:
How is possible add to Contact: received=ip ? Is this should be handled by fix_nated_contact()
This is not the function of fix_nated_contact(). Have a look at a add_rcv_param():
http://kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper.f.ad...
Someone might correct me if I'm wrong, but I believe the problem with the ;received approach is that it's only useful for registrations, since only the registrar module has a provision that allows it to be used automatically. So, for larger applications outside of registration, you should take a look at the new add_contact_alias() / handle_ruri_alias() facility:
http://kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper.f.ad...
http://kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper.f.ha...
-- Alex