<div dir="ltr">Hi Olle,<div><br></div><div>Redirecting the question to users mailing list.</div><div>Could you point out how can I <b>dynamically</b> pass both the SIP peer and request-URI in the dial command.</div><div>I want be able to use same SIP peer to route to different SIP end points.</div><div>I'm currently doing this 'Dial, SIP/peer/exten)', but this results in Reqeust-URI looking like this sip:exten@ipaddress_of_peer,</div><div>whereas I want to be able to somehow pass the SIP request URI to the Dial command, I tried passing it as part of Route header</div><div>in the Dial command and use Kamailio to do loose_route(), but I suppose this isn't the best solution.</div><div><br></div><div>Many thanks,</div><div>Nitesh</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 13, 2016 at 10:17 PM, Olle E. Johansson <span dir="ltr"><<a href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On 13 Apr 2016, at 22:05, Nitesh Bansal <<a href="mailto:nitesh.bansal@gmail.com" target="_blank">nitesh.bansal@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Hello,<div><br></div><div>I want to use Asterisk to use Kamailio as an outbound proxy for routing calls to remote SIP end points, one option could be to use a default peer, but in my case, my outbound proxy can change </div><div>based on the remote end point, so this option doesn't work.</div><div>And another problem is that I don't know how to configure Asterisk to prepare the Request-URI</div><div>based on the remote end point and not based on the outbound proxy address?</div><div><br></div><div>What is the best way to do it?</div></div></div></blockquote><div><br></div></span>First, you are asking the wrong mailing list. This is not second-level support - this is for development and code questions.</div><div><br></div><div>If you are using chan_sip, there is a setting of outbound proxy per peer. There are settings</div><div>for domain - both in r-uri (host) and from URI domain. </div><div><br></div><div>If you set host=<a href="http://example.com" target="_blank">example.com</a> and outbound proxy to <a href="http://example.net" target="_blank">example.net</a> the SIP request will</div><div>have <a href="http://example.com" target="_blank">example.com</a> in the R-uri and send the request to <a href="http://example.net" target="_blank">example.net</a></div><div><br></div><div>Good luck working with Kamailio!</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>/Olle</div><div><br></div><br></font></span></div><br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br></div>