Hi Rodrigo,

After doing the lookup(location), you can do :
    if ( isbflagset("NAT") ) {}

Best regards,

Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html

On 04/20/2017 09:37 PM, Rodrigo Pimenta Carvalho wrote:

Dear OpenSIPS users,


Every time a SIP UAC registers in my OpenSIPS, if such agent is behind a NAT, the location record receives the NAT flag in the Cflags column. My Opensips configuration file is responsible for that.

For example:


AOR:: 1000
    Contact:: sip:1000@192.168.21.5:59047;transport=TLS;ob Q=
        Expires:: 298
        Callid:: ec88647d89564d9b8cf112cb254d0f04
        Cseq:: 34066
        User-agent:: MicroSIP/3.11.0
        Received:: sip:XXXXXXXXXXXX:59047;transport=TLS
        State:: CS_SYNC
        Flags:: 0
        Cflags:: NAT   <<===============  HERE IS THE NAT FLAG.


Now, if a SIP INVITE arrives in my OpenSIPS, from a UAC that is behind a NAT, I need do something like this:

if (Cflags == NAT) {

    fix_nated_sdp("10")

};


What is the correct way to investigate if Cflags is equals to NAT ? I mean, how to program such check in the script file?


Any hint will be very helpful!


Best regards!



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979


_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to