[SR-Users] Kamailio setting the reqeust URI

Daniel Tryba d.tryba at pocos.nl
Tue Apr 5 13:34:48 CEST 2016


On Mon, Apr 04, 2016 at 03:21:27PM +0200, NITESH BANSAL wrote:
> Hello,I'm using Asterisk to originate a call via Kamailio.Request-URI
> in SIP INVITE coming from Asterisk looks like
> this<sip:kamailio at x.x.x.x>But my objective is to use Kamailio to
> forward the call to a remote endpoint.  What header should I put in
> the SIP INVITE from Asterisk to Kamailio to conveythat Kamailio should
> use this 'SIP URI' to route the call onwards.I tried 'Route' header,
> but it doesn't seem very clean, as kamailio doesn't updatethe
> Request-URI in the forwarded INVITE if I use the Route header.

I'd change the way you are dialing from asterisk from:
Dial(SIP/kamailio)
to
Dial(SIP/${extension}@kamailio)
That way you only have to change $rd to route the INVITE further (if
${extension} is a valid number) since the R-URI will be something like:
sip:extension at x.x.x.x



More information about the sr-users mailing list