[asterisk-users] Multiple IP addresses and using same IP for outbound calls as inbound

George Joseph gjoseph at digium.com
Thu Oct 22 06:12:56 CDT 2020

On Wed, Oct 21, 2020 at 9:16 PM David Cunningham <dcunningham at voisonics.com>

> Hello,
> We have an Asterisk server with two public IP addresses, let's say
> and Normally calls come in to and are bridged with a call
> dialled from Asterisk to an external destination. The external destination
> sees the SIP packet as coming from and the media address in the SDP
> is, which is great.
> However if we receive a call in to then the call dialled from
> Asterisk to an external destination still comes from, whereas we
> want it to come from 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.
> For example:
> INVITE received to -> Asterisk dials
> destination at termination.com -> INVITE sent from to
> termination.com
> INVITE received to -> Asterisk dials destination at pstn.com ->
> INVITE sent from to pstn.com
> Does anyone know how this can be achieved?

If termination.com is only on and pstn.com is only on,
create 2 transports, one specifically bound to, transport-
for instance, and another to  transport-  The names aren't
important as long as you can tell the difference.  Then explicitly
configure endpoint termination.com's "transport" parameter to
"transport-" and pstn.com's "transport" parameter to
"transport-".   In your dialplan, you can see which endpoint the
call came in on, and route it out the same endpoint.

If both providers are available from both interfaces, you can create 2
endpoint for each provider: termination.com-, pstn.com-,
termination.com- and pstn.com-;  Then configure each with the
same transports as above.

> Thanks in advance for your help,
> --
> David Cunningham, Voisonics Limited
> http://voisonics.com/
> USA: +1 213 221 1092
> New Zealand: +64 (0)28 2558 3782
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
> New to Asterisk? Start here:
>       https://wiki.asterisk.org/wiki/display/AST/Getting+Started
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users

George Joseph
Asterisk Software Developer
direct/fax +1 256 428 6012
Check us out at www.sangoma.com and www.asterisk.org
[image: image.png]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20201022/4b8c0563/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 5142 bytes
Desc: not available
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20201022/4b8c0563/attachment.png>

More information about the asterisk-users mailing list