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 thissip:kamailio@x.x.x.xBut 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@x.x.x.x