[SR-Users] Inserting local path into shared USRLOC table.

Daniel Tryba d.tryba at pocos.nl
Wed Oct 11 11:15:06 CEST 2017

On Tue, Oct 10, 2017 at 11:36:56PM +0100, Marrold wrote:
> I've included add_path_received() in my REGISTRAR routing block, however I
> see 'Path: [not set]' in the USRLOC table.
> Is it possible to force the insertion of the local proxy into the path
> field?

Like Daniel already mentioned, add the header and msg_apply_changes()
For example:
> One additional question, in the case of NAT keepalives, is it possible to
> only send these from the proxy the received the register request?

I decided to not use kamailio itself for sending these OPTIONS but to
use a simple script that queries the database and simply opens a
connection to the local kamailio. Mainly because I needed to monitor
some UAC and alert when it wasn't reachable (even though it is present
in location). In your case select the approriate UACs on Path.

OPTIONS {$location['contact']} SIP/2.0\r 
Via: SIP/2.0/UDP$listenport;branch=$branch;rport;alias\r 
Route: {$location['path']}\r 
From: sip:pinger at localhost;tag={$location['ruid']}\r 
To: {$location['contact']}\r 
Call-ID: {$location['id']}-$listenport-$uid at localhost\r 
CSeq: 1 OPTIONS\r 
Content-Length: 0\r 

More information about the sr-users mailing list