<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
I didn't want to post this because its kind of ugly, but we *did*
actually do it a number of years ago to get around this issue with
chan_sip.<br>
<br>
Our original architecture was based on LXC, and we had large servers
running hundreds of containers, each running asterisk. The "host"
ran asterisk too, as the gateway for all the container instances.<br>
<br>
We once used two of those containers to run asterisk on specific
host interfaces (one instance bridged to one nic, the other to the
other). The host asterisk would route calls out one container or
the other, with the effect you are looking for...<br>
<br>
Cheers,<br>
<br>
Jeff LaCoursiere<br>
StratusTalk, Inc.<br>
<br>
<br>
<div class="moz-cite-prefix">On 10/29/20 7:42 PM, David Cunningham
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAHGbP-9u8GkjcQ=pM1tbw_nfOA9ym9u5DkjfuDs4-_knurcYaw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hello,</div>
<div><br>
</div>
<div>Does anyone know a way with chan_sip to tell Asterisk to
use a specific IP address for its end of the communication for
a specific device? Something like:<br>
</div>
<br>
<div>[device]</div>
<div>type = friend</div>
<div>host = 11.22.11.22<br>
</div>
<div>ouraddress = 33.44.33.44</div>
<div><br>
</div>
<div>This is for use on a server with multiple IP addresses.
There is the "extenip" setting, but it's really designed for
NAT, and can only appear in the [general] section.<br>
</div>
<div><br>
</div>
<div>Any suggestions would be greatly appreciated.</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, 24 Oct 2020 at 09:43,
David Cunningham <<a
href="mailto:dcunningham@voisonics.com"
moz-do-not-send="true">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>OK, thank you George.</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, 24 Oct 2020 at
03:16, George Joseph <<a
href="mailto:gjoseph@digium.com" target="_blank"
moz-do-not-send="true">gjoseph@digium.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 dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Oct 22, 2020
at 4:13 PM David Cunningham <<a
href="mailto:dcunningham@voisonics.com"
target="_blank" moz-do-not-send="true">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>Hi George,</div>
<div><br>
</div>
<div>Thank you for the response. I'm a little
unclear on what you mean by a transport. We're
using chan_sip, not pjsip.</div>
<div><br>
</div>
<div>Do you mean a device in sip.conf, using
bindaddr to set the address to bind for that
device? We've only used bindaddr in the
[general] section before, but if it will work in
a device that could be the answer.</div>
</div>
</blockquote>
<div><br>
</div>
<div>Sorry. I just assume chan_pjsip these days. Not
sure how you'd do it for chan_sip. </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>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, 23 Oct
2020 at 00:13, George Joseph <<a
href="mailto:gjoseph@digium.com"
target="_blank" moz-do-not-send="true">gjoseph@digium.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 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"
target="_blank" moz-do-not-send="true">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"
moz-do-not-send="true">1.1.1.1:5060</a>
-> Asterisk dials <a
href="mailto:destination@termination.com"
target="_blank"
moz-do-not-send="true">destination@termination.com</a>
-> INVITE sent from <a
href="http://1.1.1.1:5060"
target="_blank"
moz-do-not-send="true">1.1.1.1:5060</a>
to <a href="http://termination.com"
target="_blank"
moz-do-not-send="true">termination.com</a><br>
</div>
</div>
<div>INVITE received to <a
href="http://2.2.2.2:5060"
target="_blank"
moz-do-not-send="true">2.2.2.2:5060</a>
-> Asterisk dials <a
href="mailto:destination@pstn.com"
target="_blank"
moz-do-not-send="true">destination@pstn.com</a>
-> INVITE sent from <a
href="http://2.2.2.2:5060"
target="_blank"
moz-do-not-send="true">2.2.2.2:5060</a>
to <a href="http://pstn.com"
target="_blank"
moz-do-not-send="true">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"
target="_blank" moz-do-not-send="true">termination.com</a>
is only on 1.1.1.1 and <a
href="http://pstn.com" target="_blank"
moz-do-not-send="true">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"
target="_blank" moz-do-not-send="true">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"
target="_blank" moz-do-not-send="true">termination.com</a>'s
"transport" parameter to
"transport-1.1.1.1" and <a
href="http://pstn.com" target="_blank"
moz-do-not-send="true">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"
moz-do-not-send="true">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"
moz-do-not-send="true">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"
moz-do-not-send="true">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"
moz-do-not-send="true">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"
moz-do-not-send="true">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<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
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">Check us out
at</font> <a
href="http://www.sangoma.com/"
style="color:rgb(17,85,204)"
target="_blank"
moz-do-not-send="true">www.sangoma.com</a> and <a
href="http://www.asterisk.org" target="_blank" moz-do-not-send="true">www.asterisk.org</a><br>
</div>
<div
style="font-family:tahoma,sans-serif;font-size:small"><img
src="cid:part26.5F5B7559.28027EBC@stratustalk.com" alt="image.png"
style="margin-right: 0px;"
class="" width="184"
height="32"></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"
moz-do-not-send="true">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"
moz-do-not-send="true">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"
moz-do-not-send="true">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"
moz-do-not-send="true">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote>
</div>
<br clear="all">
<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"
moz-do-not-send="true">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>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a
href="http://www.api-digital.com" rel="noreferrer"
target="_blank" moz-do-not-send="true">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"
moz-do-not-send="true">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"
moz-do-not-send="true">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"
moz-do-not-send="true">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<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
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">Check us out at</font> <a
href="http://www.sangoma.com/"
style="color:rgb(17,85,204)"
target="_blank" moz-do-not-send="true">www.sangoma.com</a> and <a
href="http://www.asterisk.org"
target="_blank" moz-do-not-send="true">www.asterisk.org</a><br>
</div>
<div
style="font-family:tahoma,sans-serif;font-size:small"><img
src="cid:part26.5F5B7559.28027EBC@stratustalk.com" alt="image.png"
style="margin-right: 0px;" class=""
width="184" height="32"></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" moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote>
</div>
<br clear="all">
<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" moz-do-not-send="true">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>
</blockquote>
</div>
<br clear="all">
<br>
-- <br>
<div dir="ltr" class="gmail_signature">
<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" moz-do-not-send="true">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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<p style="FONT-SIZE: 10pt; MARGIN-BOTTOM: 5pt; FONT-FAMILY: ARIAL;
MARGIN-TOP: 0pt">
</p>
<table style="width:480px" cellspacing="0" cellpadding="0"
border="0">
<tbody>
<tr>
<td style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; WIDTH:
200px" rowspan="2" valign="top"> <img
src="http://www.stratustalk.com/email/logojeff.gif"
border="0"> </td>
<td style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; WIDTH:
280px; border-left: 1px solid #3d85c6; PADDING-LEFT: 20px"
valign="top"> <strong style="FONT-SIZE: 18pt;
FONT-FAMILY: Arial Black">Jeff LaCoursiere</strong><br>
STRATUSTALK, INC. / CTO<br>
<br>
<table style="WIDTH: 255px" cellspacing="0"
cellpadding="0" border="0">
<tbody>
<tr>
<td style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;
WIDTH: 80px; COLOR: #000000" valign="top">Phone:</td>
<td style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;
WIDTH: 175px; COLOR: #000000" valign="top"><strong>+1
703.496.4990 x108</strong></td>
</tr>
<tr>
<td style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;
WIDTH: 80px; COLOR: #000000" valign="top">Mobile:</td>
<td style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;
WIDTH: 175px; COLOR: #000000" valign="top"><strong>+1
815.546.6599</strong></td>
</tr>
<tr>
<td style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;
WIDTH: 80px; COLOR: #000000" valign="top">Email:</td>
<td style="FONT-SIZE: 10pt; FONT-FAMILY: Arial;
WIDTH: 175px" valign="top"><a style="FONT-SIZE:
9pt; TEXT-DECORATION: none; COLOR: #000000"
href="mailto:jeff@stratustalk.com"><strong>jeff@stratustalk.com</strong></a>
</td>
</tr>
<tr>
<td style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;
WIDTH: 80px; COLOR: #000000" valign="top">Website:</td>
<td style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;
WIDTH: 175px; COLOR: #000000" valign="top"> <a
style="FONT-SIZE: 9pt; TEXT-DECORATION: none;
COLOR: #000000"
href="https://www.stratustalk.com"><strong>https://www.stratustalk.com</strong></a></td>
</tr>
<tr>
<td style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;
WIDTH: 80px; COLOR: #000000" valign="top">Address:</td>
<td style="FONT-SIZE: 9pt; FONT-FAMILY: Arial;
WIDTH: 175px; COLOR: #000000" valign="top"><strong>One
Freedom Square<br>
13th Floor<br>
Reston, VA 20190</strong></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; WIDTH:
280px; PADDING-LEFT: 20px" valign="bottom"> <a
href="https://www.facebook.com/jeff.lacoursiere"><img
src="http://www.stratustalk.com/email/fb.png"
border="0"></a> <a
href="https://linkedin.com/in/jeff-lacoursiere-884361"><img
src="http://www.stratustalk.com/email/ln.png"
border="0"></a> <a
href="https://www.twitter.com/stratustalk"><img
src="http://www.stratustalk.com/email/tt.png"
border="0"></a> </td>
</tr>
</tbody>
</table>
<p><br>
</p>
</div>
</body>
</html>