[SR-Users] Nat Detect does not work with GS Phones

Daniel-Constantin Mierla miconda at gmail.com
Tue Jul 14 12:07:06 CEST 2015


Hello,

the request has public IP address in Via and Contact, matching the
source IP. If you look at the tests you do in the readme of the
nathelper module, then the request appears as not being natted, see:

-
http://kamailio.org/docs/modules/stable/modules/nathelper.html#nathelper.f.nat_uac_test

Test with 3 is 1 + 2 and test with 19 is 1 + 2 + 16

Cheers,
Daniel

On 14/07/15 11:56, Alberto Sagredo wrote:
> I have found an issue detecting NAT of GS 1.4.23 Phones when using
> Stun on this phones
>
> Usual nat_uac_test with numbers 19 and 3 does not seems to detect is
> behind nat so NATMANAGE is not called
>
>
> Here its some trace. ANy clue how to handle this phones if they
> activate STUN for example
>
> U 80.26.x.x:52768 -> 192.168.0.170:8002 <http://192.168.0.170:8002>
>
> INVITE sip:2 at x.x.x.x:8002 SIP/2.0.
>
> Via: SIP/2.0/UDP 80.26.x.x:52768;branch=z9hG4bK358742535;rport.
>
> From: "Anonymous" <sip:anonymous at anonymous.invalid>;tag=1478444456.
>
> To: <sip:2 at x.x.x.x:8002>.
>
> Call-ID: 244257786-52768-56 at IA.CG.BIE.BCH.
>
> CSeq: 550 INVITE.
>
> Contact: "Anonymous" <sip:212 at 80.26.x.x:52768>.
>
> X-Grandstream-PBX: true.
>
> Max-Forwards: 70.
>
> User-Agent: Grandstream GXP2140 1.0.4.23.
>
> Privacy: id.
>
> P-Preferred-Identity: <sip:212 at x.x.x.x:8002>.
>
> Supported: replaces, path, timer.
>
> Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO,
> REFER, UPDATE, MESSAGE.
>
> Content-Type: application/sdp.
>
> Accept: application/sdp, application/dtmf-relay.
>
> Content-Length:   335.
>
> .
>
> v=0.
>
> o=212 8000 8000 IN IP4 80.26.x.x.
>
> s=SIP Call.
>
> c=IN IP4 80.26.x.x.
>
> t=0 0.
>
> m=audio 55422 RTP/AVP 0 8 18 9 2 101.
>
> a=sendrecv.
>
> a=rtpmap:0 PCMU/8000.
>
> a=ptime:20.
>
> a=rtpmap:8 PCMA/8000.
>
> a=rtpmap:18 G729/8000.
>
> a=fmtp:18 annexb=no.
>
> a=rtpmap:9 G722/8000.
>
> a=rtpmap:2 G726-32/8000.
>
> a=rtpmap:101 telephone-event/8000.
>
> a=fmtp:101 0-15.
>
>
> # Caller NAT detection route
>
> route[NATDETECT] {
>
> #!ifdef WITH_NAT
>
>         force_rport();
>
>         if (nat_uac_test("19)) {
>
>                 if (is_method("REGISTER")) {
>
>                         fix_nated_register();
>
>                 } else {
>
>                         fix_nated_contact();
>
>                 }
>
>                 setflag(FLT_NATS);
>
> }
>
> #!endif
>
>         return;
>
> }
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150714/2a08a673/attachment.html>


More information about the sr-users mailing list