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

Olli Attila attiolli at gmail.com
Fri Mar 20 22:14:42 CET 2015


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



More information about the sr-users mailing list