[SR-Users] Kamailio sending NOTIFY messages to private IP

Daniel-Constantin Mierla miconda at gmail.com
Mon Mar 23 09:23:20 CET 2015


Hello,

have you used set_contact_alias() or fix_nated_contact() for SUBSCRIBE?

Cheers,
Daniel

On 20/03/15 22:14, Olli Attila wrote:
> Hello,
>
> Im running kamailio 4.2.3 and I'm having troubles with reporting user
> presence data from Kamailio server to a registered UA behind nat. The
> NOTIFY message is being sent from Kamailio to the UA after receiving
> PUBLISH, but because the UA is behind nat the NOTIFY message is being
> sent to the UAs private (=unroutable) ip and therefor never reaching
> the real UA. My server is using nat helping modules so that REGISTER
> messages and INVITE messages are handled ok even if they are
> originated behind nat.
>
> Any suggestions how to solve this and make the NOTIFY messages to be
> sent via routabe ip addresses?
>
> my kamailio.cfg PRESENCE routing:
>
> #!ifdef WITH_PRESENCE
>     if (!t_newtran())
>     {
>         sl_reply_error();
>         exit;
>     };
>
>     if(is_method("PUBLISH"))
>     {
>         handle_publish();
>         t_release();
>     }
>     else
>     if( is_method("SUBSCRIBE"))
>     {
>         handle_subscribe();
>         t_release();
>     }
>     exit;
> #!endif
>
>     if (is_method("PUBLISH") || $rU==$null)
>     {
>         sl_send_reply("404", "Not here");
>         exit;
>     }
>     return;
> }
>
>
> -- Olli
>
> _______________________________________________
> 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
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com




More information about the sr-users mailing list