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. Thanks,Nitesh
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@.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. Thanks,Nitesh
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@.sip-router
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
If you need to change R-URI, than modify it in script logic (PV $ru - is read/writable) e.g. (random example, set your new_user, new_domain if want to change them. Play around with it): $ru = "sip:" + $var(new_user) + "@" $var(new_domain) + ":" + $var(new_port) + ";transport=UDP" ;
If you need to route SIP request to destination that differ from R-URI - use route header (as you already tried). Or use Destination URI PV - $du (it is set, it is used for message routing, not R-URI). Both mentioned here does not change R-URI.
Hope this helps. Cheers!
-- View this message in context: http://sip-router.1086192.n5.nabble.com/Kamailio-setting-the-reqeust-URI-tp1... Sent from the Users mailing list archive at Nabble.com.
I got it working using Route header without 'lr' parameter.In the absence of 'lr' parameter, Kamailio treated my requestas 'strict router' and updated the Reqeust-URI too. Nitesh
Date: Mon, 4 Apr 2016 08:24:42 -0700 From: vancecezar@gmail.com To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] Kamailio setting the reqeust URI
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@.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. Thanks,Nitesh
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@.sip-router
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
If you need to change R-URI, than modify it in script logic (PV $ru - is read/writable) e.g. (random example, set your new_user, new_domain if want to change them. Play around with it): $ru = "sip:" + $var(new_user) + "@" $var(new_domain) + ":" + $var(new_port)
- ";transport=UDP" ;
If you need to route SIP request to destination that differ from R-URI - use route header (as you already tried). Or use Destination URI PV - $du (it is set, it is used for message routing, not R-URI). Both mentioned here does not change R-URI.
Hope this helps. Cheers!
-- View this message in context: http://sip-router.1086192.n5.nabble.com/Kamailio-setting-the-reqeust-URI-tp1... Sent from the Users mailing list archive at Nabble.com.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
I just noticed that Kamailio adds a route header of its own when forwarding the call, can't understand why it is doing it?My Jitsi client doesn't like it 'preloaded route set'?Any idea why would Kamailio add a Route header, i'm doing Record-routing, so it should add onlyRecord-Route header? Thanks,Nitesh
From: nitesh.bansal@outlook.com To: sr-users@lists.sip-router.org Date: Tue, 5 Apr 2016 09:53:35 +0200 Subject: Re: [SR-Users] Kamailio setting the reqeust URI
I got it working using Route header without 'lr' parameter.In the absence of 'lr' parameter, Kamailio treated my requestas 'strict router' and updated the Reqeust-URI too. Nitesh
Date: Mon, 4 Apr 2016 08:24:42 -0700 From: vancecezar@gmail.com To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] Kamailio setting the reqeust URI
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@.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. Thanks,Nitesh
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@.sip-router
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
If you need to change R-URI, than modify it in script logic (PV $ru - is read/writable) e.g. (random example, set your new_user, new_domain if want to change them. Play around with it): $ru = "sip:" + $var(new_user) + "@" $var(new_domain) + ":" + $var(new_port)
- ";transport=UDP" ;
If you need to route SIP request to destination that differ from R-URI - use route header (as you already tried). Or use Destination URI PV - $du (it is set, it is used for message routing, not R-URI). Both mentioned here does not change R-URI.
Hope this helps. Cheers!
-- View this message in context: http://sip-router.1086192.n5.nabble.com/Kamailio-setting-the-reqeust-URI-tp1... Sent from the Users mailing list archive at Nabble.com.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
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