<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 21, 2020 at 9:16 PM David Cunningham <<a href="mailto:dcunningham@voisonics.com">dcunningham@voisonics.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello,</div><div><br></div><div>We have an Asterisk server with two public IP addresses, let's say 1.1.1.1 and 2.2.2.2. Normally calls come in to 1.1.1.1 and are bridged with a call dialled from Asterisk to an external destination. The external destination sees the SIP packet as coming from 1.1.1.1 and the media address in the SDP is 1.1.1.1, which is great.<br></div><div><br></div><div>However if we receive a call in to 2.2.2.2 then the call dialled from Asterisk to an external destination still comes from 1.1.1.1, whereas we want it to come from 2.2.2.2. The source of any dialled call (the IP packet and the SDP media address) should be the same as the address the related inbound call was received to.</div><div><br></div><div>For example:</div><div><div>INVITE received to <a href="http://1.1.1.1:5060" target="_blank">1.1.1.1:5060</a> -> Asterisk dials <a href="mailto:destination@termination.com" target="_blank">destination@termination.com</a> -> INVITE sent from <a href="http://1.1.1.1:5060" target="_blank">1.1.1.1:5060</a> to <a href="http://termination.com" target="_blank">termination.com</a><br></div></div><div>INVITE received to <a href="http://2.2.2.2:5060" target="_blank">2.2.2.2:5060</a> -> Asterisk dials <a href="mailto:destination@pstn.com" target="_blank">destination@pstn.com</a> -> INVITE sent from <a href="http://2.2.2.2:5060" target="_blank">2.2.2.2:5060</a> to <a href="http://pstn.com" target="_blank">pstn.com</a><br></div><div><br></div><div>Does anyone know how this can be achieved?</div></div></blockquote><div><br></div><div>If <a href="http://termination.com">termination.com</a> is only on 1.1.1.1 and <a href="http://pstn.com">pstn.com</a> is only on 2.2.2.2, create 2 transports, one specifically bound to 1.1.1.1, transport-1.1.1.1 for instance, and another to <a href="http://2.2.2.2">2.2.2.2</a>: transport-2.2.2.2. The names aren't important as long as you can tell the difference. Then explicitly configure endpoint <a href="http://termination.com">termination.com</a>'s "transport" parameter to "transport-1.1.1.1" and <a href="http://pstn.com">pstn.com</a>'s "transport" parameter to "transport-2.2.2.2". In your dialplan, you can see which endpoint the call came in on, and route it out the same endpoint.<br></div><div><br></div><div>If both providers are available from both interfaces, you can create 2 endpoint for each provider: termination.com-1.1.1.1, pstn.com-1.1.1.1, termination.com-2.2.2.2 and pstn.com-2.2.2.2; Then configure each with the same transports as above.</div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>Thanks in advance for your help,<br></div><br>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>David Cunningham, Voisonics Limited<br><a href="http://voisonics.com/" target="_blank">http://voisonics.com/</a><br>USA: +1 213 221 1092<br>New Zealand: +64 (0)28 2558 3782</div></div></div></div></div></div></div></div></div></div></div></div>
-- <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>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
<a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr" style="font-size:12.8px"><div dir="ltr" style="font-size:12.8px"><div style="font-family:tahoma,sans-serif;font-size:small"><span style="color:rgb(7,55,99)">George Joseph</span><br></div></div><div dir="ltr" style="font-size:small"></div><div style="font-family:tahoma,sans-serif;font-size:small"><span style="color:rgb(7,55,99)">Asterisk Software Developer</span><br></div><span style="color:rgb(7,55,99);font-family:tahoma,sans-serif;font-size:small">direct/fax +1 256 428 6012</span><br><div style="font-family:tahoma,sans-serif;font-size:small"><font color="#073763" style="--darkreader-inline-color:#94ccf7;">Check us out at</font> <a href="http://www.sangoma.com/" style="color:rgb(17,85,204)" target="_blank">www.sangoma.com</a> and <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a><br></div><div style="font-family:tahoma,sans-serif;font-size:small"><img src="cid:ii_k3abte590" alt="image.png" width="184" height="32" style="margin-right: 0px;"></div></div></div></div></div></div></div></div></div>