[OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

Bogdan-Andrei Iancu bogdan at opensips.org
Sat Feb 22 14:19:18 CET 2014


Hello Rudy,

fix_nated_contact() changes the URI in the contact HDR - as any change 
(in OpenSIPS) over the message is not done in realtime (updating the 
message buffer). The changes are recorded (as lumps) and applied to the 
message only when the message is sent out on the network. So you cannot 
"see" your own changes in the script, but you can see them in the 
outbound message.

Regards,

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

On 22.02.2014 10:36, Rudy Eschauzier wrote:
> Bogdan,
>
> One more question about logging. I want to check if the sip message is properly mangled by fix_nated_register() and fix_nated_contact().
>
> I've tried it like this:
>
>    fix_nated_register();
>    xlog("L_INFO","$avp(rcv)");
>    fix_nated_contact();
>    xlog("L_INFO","\n\n$ct, $(ct[1])\n");
>    xlog("L_INFO","\n\n$C(bc)[  Method $rm from $si  ]$C(xx)\n$mb$C(bc)[  End of Request  ]$C(xx)\n");
>
> The $avp(rcv) variable is properly updated by fix_nated_register(), and it correctly logs the public ip address. I cannot get the rewritten contact or sip message to log, however. What is the best way to check what the effect was of fix_nated_contact?
>
> Thanks,
> Rudy.




More information about the Users mailing list