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

2020-11-06 Thread Alexey Kazantsev

Hello David,
 
you may start 2 Asterisk instances on the same machine,
one bind to 1.1.1.1 IP-address, the other to 2.2.2.2.
 
Just configure the appropriate settings in each instance asterisk.conf —
you’ll have to set correct directories like astspooldir, agi-bin and so on.
And of course create them in your filesystem.
 
In this case you will achieve what you need even using chan_sip.
 
Then either start Asterisks manually, or create some custom scripts,
or edit/add Systemd settings to start each instance automatically and
be able to use all Systemd functionality, but this is beyound the scope of this 
thread.
 
 
---
BR, Alexey
http://alexeyka.zantsev.com/-- 
_
-- 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

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

2020-11-05 Thread David Cunningham
Thanks for the suggestions. We'd prefer not to complicate the architecture
with additional proxies in front, so will try setting the Linux network
routes to see if that helps.


On Fri, 30 Oct 2020 at 16:24, John Runyon  wrote:

> David, can you play around with the routing table and get the OS to handle
> it for you? So long as asterisk isn’t calling bind() (or is calling with
> 0.0.0.0) I would imagine adding a route for the peer, with your normal
> gateway, and the correct device would work.
>
> On Thu, Oct 29, 2020 at 10:04 PM David Cunningham <
> dcunning...@voisonics.com> wrote:
>
>> Hi Dovid,
>>
>> We can change the SDP in Kamailio, but Asterisk will still send its RTP
>> from its default address. The remote end is strict about accepting RTP from
>> the specified source and won't accept it. Have you any suggestions to solve
>> that problem?
>>
>> Thank you.
>>
>>
>> On Fri, 30 Oct 2020 at 14:49, Dovid Bender  wrote:
>>
>>> Why not use OpenSips/Kamailoo in between? Where you want 1.1.1.1 you
>>> pass it along as is. Where you want 2.2.2.2 change the sdp in
>>> opensips/kamailio
>>>
>>> On Thu, Oct 29, 2020 at 20:44 David Cunningham <
>>> dcunning...@voisonics.com> wrote:
>>>
 Hello,

 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:

 [device]
 type = friend
 host = 11.22.11.22
 ouraddress = 33.44.33.44

 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.

 Any suggestions would be greatly appreciated.


 On Sat, 24 Oct 2020 at 09:43, David Cunningham <
 dcunning...@voisonics.com> wrote:

> OK, thank you George.
>
>
> On Sat, 24 Oct 2020 at 03:16, George Joseph 
> wrote:
>
>>
>>
>> On Thu, Oct 22, 2020 at 4:13 PM David Cunningham <
>> dcunning...@voisonics.com> wrote:
>>
>>> Hi George,
>>>
>>> Thank you for the response. I'm a little unclear on what you mean by
>>> a transport. We're using chan_sip, not pjsip.
>>>
>>> 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.
>>>
>>
>> Sorry.  I just assume chan_pjsip these days.  Not sure how you'd do
>> it for chan_sip.
>>
>>
>>
>>>
>>>
>>> On Fri, 23 Oct 2020 at 00:13, George Joseph 
>>> wrote:
>>>


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

> Hello,
>
> 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.
>
> 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.
>
> For example:
> INVITE received to 1.1.1.1:5060 -> Asterisk dials
> destinat...@termination.com -> INVITE sent from 1.1.1.1:5060 to
> termination.com
> INVITE received to 2.2.2.2:5060 -> Asterisk dials
> destinat...@pstn.com -> INVITE sent from 2.2.2.2:5060 to pstn.com
>
> Does anyone know how this can be achieved?
>

 If termination.com is only on 1.1.1.1 and pstn.com 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 2.2.2.2:
 transport-2.2.2.2.  The names aren't important as long as you can tell 
 the
 difference.  Then explicitly configure endpoint termination.com's
 "transport" parameter to "transport-1.1.1.1" and pstn.com'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.

 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.
>

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

2020-10-30 Thread Jeff LaCoursiere
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.


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.


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...


Cheers,

Jeff LaCoursiere
StratusTalk, Inc.


On 10/29/20 7:42 PM, David Cunningham wrote:

Hello,

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:


[device]
type = friend
host = 11.22.11.22
ouraddress = 33.44.33.44

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.


Any suggestions would be greatly appreciated.


On Sat, 24 Oct 2020 at 09:43, David Cunningham 
mailto:dcunning...@voisonics.com>> wrote:


OK, thank you George.


On Sat, 24 Oct 2020 at 03:16, George Joseph mailto:gjos...@digium.com>> wrote:



On Thu, Oct 22, 2020 at 4:13 PM David Cunningham
mailto:dcunning...@voisonics.com>>
wrote:

Hi George,

Thank you for the response. I'm a little unclear on what
you mean by a transport. We're using chan_sip, not pjsip.

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.


Sorry.  I just assume chan_pjsip these days.  Not sure how
you'd do it for chan_sip.



On Fri, 23 Oct 2020 at 00:13, George Joseph
mailto:gjos...@digium.com>> wrote:



On Wed, Oct 21, 2020 at 9:16 PM David Cunningham
mailto:dcunning...@voisonics.com>> wrote:

Hello,

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.

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.

For example:
INVITE received to 1.1.1.1:5060
 -> Asterisk dials
destinat...@termination.com
 -> INVITE
sent from 1.1.1.1:5060  to
termination.com 
INVITE received to 2.2.2.2:5060
 -> Asterisk dials
destinat...@pstn.com 
-> INVITE sent from 2.2.2.2:5060
 to pstn.com 

Does anyone know how this can be achieved?


If termination.com  is only on
1.1.1.1 and pstn.com  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 2.2.2.2 :
transport-2.2.2.2.  The names aren't important as long
as you can tell the difference.  Then explicitly
configure endpoint termination.com
's "transport" parameter to
"transport-1.1.1.1" and pstn.com '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.

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,

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

2020-10-30 Thread Jeff LaCoursiere
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.


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.


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...


Cheers,

Jeff LaCoursiere
StratusTalk, Inc.


On 10/29/20 7:42 PM, David Cunningham wrote:

Hello,

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:


[device]
type = friend
host = 11.22.11.22
ouraddress = 33.44.33.44

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.


Any suggestions would be greatly appreciated.


On Sat, 24 Oct 2020 at 09:43, David Cunningham 
mailto:dcunning...@voisonics.com>> wrote:


OK, thank you George.


On Sat, 24 Oct 2020 at 03:16, George Joseph mailto:gjos...@digium.com>> wrote:



On Thu, Oct 22, 2020 at 4:13 PM David Cunningham
mailto:dcunning...@voisonics.com>>
wrote:

Hi George,

Thank you for the response. I'm a little unclear on what
you mean by a transport. We're using chan_sip, not pjsip.

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.


Sorry.  I just assume chan_pjsip these days.  Not sure how
you'd do it for chan_sip.



On Fri, 23 Oct 2020 at 00:13, George Joseph
mailto:gjos...@digium.com>> wrote:



On Wed, Oct 21, 2020 at 9:16 PM David Cunningham
mailto:dcunning...@voisonics.com>> wrote:

Hello,

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.

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.

For example:
INVITE received to 1.1.1.1:5060
 -> Asterisk dials
destinat...@termination.com
 -> INVITE
sent from 1.1.1.1:5060  to
termination.com 
INVITE received to 2.2.2.2:5060
 -> Asterisk dials
destinat...@pstn.com 
-> INVITE sent from 2.2.2.2:5060
 to pstn.com 

Does anyone know how this can be achieved?


If termination.com  is only on
1.1.1.1 and pstn.com  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 2.2.2.2 :
transport-2.2.2.2.  The names aren't important as long
as you can tell the difference.  Then explicitly
configure endpoint termination.com
's "transport" parameter to
"transport-1.1.1.1" and pstn.com '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.

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,

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

2020-10-30 Thread Dovid Bender
Run rtp proxy on the asterisk box (not sure if it would work since you
can't use the same ports).

On Thu, Oct 29, 2020 at 11:03 PM David Cunningham 
wrote:

> Hi Dovid,
>
> We can change the SDP in Kamailio, but Asterisk will still send its RTP
> from its default address. The remote end is strict about accepting RTP from
> the specified source and won't accept it. Have you any suggestions to solve
> that problem?
>
> Thank you.
>
>
> On Fri, 30 Oct 2020 at 14:49, Dovid Bender  wrote:
>
>> Why not use OpenSips/Kamailoo in between? Where you want 1.1.1.1 you pass
>> it along as is. Where you want 2.2.2.2 change the sdp in opensips/kamailio
>>
>> On Thu, Oct 29, 2020 at 20:44 David Cunningham 
>> wrote:
>>
>>> Hello,
>>>
>>> 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:
>>>
>>> [device]
>>> type = friend
>>> host = 11.22.11.22
>>> ouraddress = 33.44.33.44
>>>
>>> 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.
>>>
>>> Any suggestions would be greatly appreciated.
>>>
>>>
>>> On Sat, 24 Oct 2020 at 09:43, David Cunningham <
>>> dcunning...@voisonics.com> wrote:
>>>
 OK, thank you George.


 On Sat, 24 Oct 2020 at 03:16, George Joseph  wrote:

>
>
> On Thu, Oct 22, 2020 at 4:13 PM David Cunningham <
> dcunning...@voisonics.com> wrote:
>
>> Hi George,
>>
>> Thank you for the response. I'm a little unclear on what you mean by
>> a transport. We're using chan_sip, not pjsip.
>>
>> 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.
>>
>
> Sorry.  I just assume chan_pjsip these days.  Not sure how you'd do it
> for chan_sip.
>
>
>
>>
>>
>> On Fri, 23 Oct 2020 at 00:13, George Joseph 
>> wrote:
>>
>>>
>>>
>>> On Wed, Oct 21, 2020 at 9:16 PM David Cunningham <
>>> dcunning...@voisonics.com> wrote:
>>>
 Hello,

 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.

 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.

 For example:
 INVITE received to 1.1.1.1:5060 -> Asterisk dials
 destinat...@termination.com -> INVITE sent from 1.1.1.1:5060 to
 termination.com
 INVITE received to 2.2.2.2:5060 -> Asterisk dials
 destinat...@pstn.com -> INVITE sent from 2.2.2.2:5060 to pstn.com

 Does anyone know how this can be achieved?

>>>
>>> If termination.com is only on 1.1.1.1 and pstn.com 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 2.2.2.2:
>>> transport-2.2.2.2.  The names aren't important as long as you can tell 
>>> the
>>> difference.  Then explicitly configure endpoint termination.com's
>>> "transport" parameter to "transport-1.1.1.1" and pstn.com'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.
>>>
>>> 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.
>>>
>>>
>>>
>>>
>>>

 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:

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

2020-10-29 Thread John Runyon
David, can you play around with the routing table and get the OS to handle
it for you? So long as asterisk isn’t calling bind() (or is calling with
0.0.0.0) I would imagine adding a route for the peer, with your normal
gateway, and the correct device would work.

On Thu, Oct 29, 2020 at 10:04 PM David Cunningham 
wrote:

> Hi Dovid,
>
> We can change the SDP in Kamailio, but Asterisk will still send its RTP
> from its default address. The remote end is strict about accepting RTP from
> the specified source and won't accept it. Have you any suggestions to solve
> that problem?
>
> Thank you.
>
>
> On Fri, 30 Oct 2020 at 14:49, Dovid Bender  wrote:
>
>> Why not use OpenSips/Kamailoo in between? Where you want 1.1.1.1 you pass
>> it along as is. Where you want 2.2.2.2 change the sdp in opensips/kamailio
>>
>> On Thu, Oct 29, 2020 at 20:44 David Cunningham 
>> wrote:
>>
>>> Hello,
>>>
>>> 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:
>>>
>>> [device]
>>> type = friend
>>> host = 11.22.11.22
>>> ouraddress = 33.44.33.44
>>>
>>> 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.
>>>
>>> Any suggestions would be greatly appreciated.
>>>
>>>
>>> On Sat, 24 Oct 2020 at 09:43, David Cunningham <
>>> dcunning...@voisonics.com> wrote:
>>>
 OK, thank you George.


 On Sat, 24 Oct 2020 at 03:16, George Joseph  wrote:

>
>
> On Thu, Oct 22, 2020 at 4:13 PM David Cunningham <
> dcunning...@voisonics.com> wrote:
>
>> Hi George,
>>
>> Thank you for the response. I'm a little unclear on what you mean by
>> a transport. We're using chan_sip, not pjsip.
>>
>> 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.
>>
>
> Sorry.  I just assume chan_pjsip these days.  Not sure how you'd do it
> for chan_sip.
>
>
>
>>
>>
>> On Fri, 23 Oct 2020 at 00:13, George Joseph 
>> wrote:
>>
>>>
>>>
>>> On Wed, Oct 21, 2020 at 9:16 PM David Cunningham <
>>> dcunning...@voisonics.com> wrote:
>>>
 Hello,

 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.

 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.

 For example:
 INVITE received to 1.1.1.1:5060 -> Asterisk dials
 destinat...@termination.com -> INVITE sent from 1.1.1.1:5060 to
 termination.com
 INVITE received to 2.2.2.2:5060 -> Asterisk dials
 destinat...@pstn.com -> INVITE sent from 2.2.2.2:5060 to pstn.com

 Does anyone know how this can be achieved?

>>>
>>> If termination.com is only on 1.1.1.1 and pstn.com 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 2.2.2.2:
>>> transport-2.2.2.2.  The names aren't important as long as you can tell 
>>> the
>>> difference.  Then explicitly configure endpoint termination.com's
>>> "transport" parameter to "transport-1.1.1.1" and pstn.com'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.
>>>
>>> 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.
>>>
>>>
>>>
>>>
>>>

 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

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

2020-10-29 Thread Jeff LaCoursiere
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.


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.


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...


Cheers,

Jeff LaCoursiere
StratusTalk, Inc.


On 10/29/20 9:05 PM, David Cunningham wrote:

Hi Dovid,

We can change the SDP in Kamailio, but Asterisk will still send its 
RTP from its default address. The remote end is strict about accepting 
RTP from the specified source and won't accept it. Have you any 
suggestions to solve that problem?


Thank you.


On Fri, 30 Oct 2020 at 14:49, Dovid Bender > wrote:


Why not use OpenSips/Kamailoo in between? Where you want 1.1.1.1
you pass it along as is. Where you want 2.2.2.2 change the sdp in
opensips/kamailio

On Thu, Oct 29, 2020 at 20:44 David Cunningham
mailto:dcunning...@voisonics.com>> wrote:

Hello,

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:

[device]
type = friend
host = 11.22.11.22
ouraddress = 33.44.33.44

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.

Any suggestions would be greatly appreciated.



-- 
_
-- 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

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

2020-10-29 Thread David Cunningham
Hi Dovid,

We can change the SDP in Kamailio, but Asterisk will still send its RTP
from its default address. The remote end is strict about accepting RTP from
the specified source and won't accept it. Have you any suggestions to solve
that problem?

Thank you.


On Fri, 30 Oct 2020 at 14:49, Dovid Bender  wrote:

> Why not use OpenSips/Kamailoo in between? Where you want 1.1.1.1 you pass
> it along as is. Where you want 2.2.2.2 change the sdp in opensips/kamailio
>
> On Thu, Oct 29, 2020 at 20:44 David Cunningham 
> wrote:
>
>> Hello,
>>
>> 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:
>>
>> [device]
>> type = friend
>> host = 11.22.11.22
>> ouraddress = 33.44.33.44
>>
>> 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.
>>
>> Any suggestions would be greatly appreciated.
>>
>>
>> On Sat, 24 Oct 2020 at 09:43, David Cunningham 
>> wrote:
>>
>>> OK, thank you George.
>>>
>>>
>>> On Sat, 24 Oct 2020 at 03:16, George Joseph  wrote:
>>>


 On Thu, Oct 22, 2020 at 4:13 PM David Cunningham <
 dcunning...@voisonics.com> wrote:

> Hi George,
>
> Thank you for the response. I'm a little unclear on what you mean by a
> transport. We're using chan_sip, not pjsip.
>
> 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.
>

 Sorry.  I just assume chan_pjsip these days.  Not sure how you'd do it
 for chan_sip.



>
>
> On Fri, 23 Oct 2020 at 00:13, George Joseph 
> wrote:
>
>>
>>
>> On Wed, Oct 21, 2020 at 9:16 PM David Cunningham <
>> dcunning...@voisonics.com> wrote:
>>
>>> Hello,
>>>
>>> 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.
>>>
>>> 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.
>>>
>>> For example:
>>> INVITE received to 1.1.1.1:5060 -> Asterisk dials
>>> destinat...@termination.com -> INVITE sent from 1.1.1.1:5060 to
>>> termination.com
>>> INVITE received to 2.2.2.2:5060 -> Asterisk dials
>>> destinat...@pstn.com -> INVITE sent from 2.2.2.2:5060 to pstn.com
>>>
>>> Does anyone know how this can be achieved?
>>>
>>
>> If termination.com is only on 1.1.1.1 and pstn.com 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 2.2.2.2:
>> transport-2.2.2.2.  The names aren't important as long as you can tell 
>> the
>> difference.  Then explicitly configure endpoint termination.com's
>> "transport" parameter to "transport-1.1.1.1" and pstn.com'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.
>>
>> 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.
>>
>>
>>
>>
>>
>>>
>>> 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

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

2020-10-29 Thread Dovid Bender
Why not use OpenSips/Kamailoo in between? Where you want 1.1.1.1 you pass
it along as is. Where you want 2.2.2.2 change the sdp in opensips/kamailio

On Thu, Oct 29, 2020 at 20:44 David Cunningham 
wrote:

> Hello,
>
> 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:
>
> [device]
> type = friend
> host = 11.22.11.22
> ouraddress = 33.44.33.44
>
> 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.
>
> Any suggestions would be greatly appreciated.
>
>
> On Sat, 24 Oct 2020 at 09:43, David Cunningham 
> wrote:
>
>> OK, thank you George.
>>
>>
>> On Sat, 24 Oct 2020 at 03:16, George Joseph  wrote:
>>
>>>
>>>
>>> On Thu, Oct 22, 2020 at 4:13 PM David Cunningham <
>>> dcunning...@voisonics.com> wrote:
>>>
 Hi George,

 Thank you for the response. I'm a little unclear on what you mean by a
 transport. We're using chan_sip, not pjsip.

 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.

>>>
>>> Sorry.  I just assume chan_pjsip these days.  Not sure how you'd do it
>>> for chan_sip.
>>>
>>>
>>>


 On Fri, 23 Oct 2020 at 00:13, George Joseph  wrote:

>
>
> On Wed, Oct 21, 2020 at 9:16 PM David Cunningham <
> dcunning...@voisonics.com> wrote:
>
>> Hello,
>>
>> 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.
>>
>> 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.
>>
>> For example:
>> INVITE received to 1.1.1.1:5060 -> Asterisk dials
>> destinat...@termination.com -> INVITE sent from 1.1.1.1:5060 to
>> termination.com
>> INVITE received to 2.2.2.2:5060 -> Asterisk dials
>> destinat...@pstn.com -> INVITE sent from 2.2.2.2:5060 to pstn.com
>>
>> Does anyone know how this can be achieved?
>>
>
> If termination.com is only on 1.1.1.1 and pstn.com 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 2.2.2.2:
> transport-2.2.2.2.  The names aren't important as long as you can tell the
> difference.  Then explicitly configure endpoint termination.com's
> "transport" parameter to "transport-1.1.1.1" and pstn.com'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.
>
> 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.
>
>
>
>
>
>>
>> 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]
> --
> _
> -- 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

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

2020-10-29 Thread David Cunningham
Hello,

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:

[device]
type = friend
host = 11.22.11.22
ouraddress = 33.44.33.44

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.

Any suggestions would be greatly appreciated.


On Sat, 24 Oct 2020 at 09:43, David Cunningham 
wrote:

> OK, thank you George.
>
>
> On Sat, 24 Oct 2020 at 03:16, George Joseph  wrote:
>
>>
>>
>> On Thu, Oct 22, 2020 at 4:13 PM David Cunningham <
>> dcunning...@voisonics.com> wrote:
>>
>>> Hi George,
>>>
>>> Thank you for the response. I'm a little unclear on what you mean by a
>>> transport. We're using chan_sip, not pjsip.
>>>
>>> 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.
>>>
>>
>> Sorry.  I just assume chan_pjsip these days.  Not sure how you'd do it
>> for chan_sip.
>>
>>
>>
>>>
>>>
>>> On Fri, 23 Oct 2020 at 00:13, George Joseph  wrote:
>>>


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

> Hello,
>
> 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.
>
> 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.
>
> For example:
> INVITE received to 1.1.1.1:5060 -> Asterisk dials
> destinat...@termination.com -> INVITE sent from 1.1.1.1:5060 to
> termination.com
> INVITE received to 2.2.2.2:5060 -> Asterisk dials destinat...@pstn.com
> -> INVITE sent from 2.2.2.2:5060 to pstn.com
>
> Does anyone know how this can be achieved?
>

 If termination.com is only on 1.1.1.1 and pstn.com 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 2.2.2.2:  transport-2.2.2.2.  The names
 aren't important as long as you can tell the difference.  Then explicitly
 configure endpoint termination.com's "transport" parameter to
 "transport-1.1.1.1" and pstn.com'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.

 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.





>
> 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]
 --
 _
 -- 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
>>>
>>>
>>>
>>> --
>>> David Cunningham, Voisonics Limited
>>> http://voisonics.com/
>>> USA: +1 213 221 1092
>>> New Zealand: +64 (0)28 2558 3782
>>> --
>>> _
>>> -- Bandwidth and Colocatio

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

2020-10-23 Thread David Cunningham
OK, thank you George.


On Sat, 24 Oct 2020 at 03:16, George Joseph  wrote:

>
>
> On Thu, Oct 22, 2020 at 4:13 PM David Cunningham <
> dcunning...@voisonics.com> wrote:
>
>> Hi George,
>>
>> Thank you for the response. I'm a little unclear on what you mean by a
>> transport. We're using chan_sip, not pjsip.
>>
>> 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.
>>
>
> Sorry.  I just assume chan_pjsip these days.  Not sure how you'd do it for
> chan_sip.
>
>
>
>>
>>
>> On Fri, 23 Oct 2020 at 00:13, George Joseph  wrote:
>>
>>>
>>>
>>> On Wed, Oct 21, 2020 at 9:16 PM David Cunningham <
>>> dcunning...@voisonics.com> wrote:
>>>
 Hello,

 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.

 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.

 For example:
 INVITE received to 1.1.1.1:5060 -> Asterisk dials
 destinat...@termination.com -> INVITE sent from 1.1.1.1:5060 to
 termination.com
 INVITE received to 2.2.2.2:5060 -> Asterisk dials destinat...@pstn.com
 -> INVITE sent from 2.2.2.2:5060 to pstn.com

 Does anyone know how this can be achieved?

>>>
>>> If termination.com is only on 1.1.1.1 and pstn.com 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 2.2.2.2:  transport-2.2.2.2.  The names
>>> aren't important as long as you can tell the difference.  Then explicitly
>>> configure endpoint termination.com's "transport" parameter to
>>> "transport-1.1.1.1" and pstn.com'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.
>>>
>>> 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.
>>>
>>>
>>>
>>>
>>>

 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]
>>> --
>>> _
>>> -- 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
>>
>>
>>
>> --
>> 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]
> --
> _
> -- Bandwidth and Colocation Provided

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

2020-10-23 Thread George Joseph
On Thu, Oct 22, 2020 at 4:13 PM David Cunningham 
wrote:

> Hi George,
>
> Thank you for the response. I'm a little unclear on what you mean by a
> transport. We're using chan_sip, not pjsip.
>
> 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.
>

Sorry.  I just assume chan_pjsip these days.  Not sure how you'd do it for
chan_sip.



>
>
> On Fri, 23 Oct 2020 at 00:13, George Joseph  wrote:
>
>>
>>
>> On Wed, Oct 21, 2020 at 9:16 PM David Cunningham <
>> dcunning...@voisonics.com> wrote:
>>
>>> Hello,
>>>
>>> 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.
>>>
>>> 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.
>>>
>>> For example:
>>> INVITE received to 1.1.1.1:5060 -> Asterisk dials
>>> destinat...@termination.com -> INVITE sent from 1.1.1.1:5060 to
>>> termination.com
>>> INVITE received to 2.2.2.2:5060 -> Asterisk dials destinat...@pstn.com
>>> -> INVITE sent from 2.2.2.2:5060 to pstn.com
>>>
>>> Does anyone know how this can be achieved?
>>>
>>
>> If termination.com is only on 1.1.1.1 and pstn.com 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 2.2.2.2:  transport-2.2.2.2.  The names
>> aren't important as long as you can tell the difference.  Then explicitly
>> configure endpoint termination.com's "transport" parameter to
>> "transport-1.1.1.1" and pstn.com'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.
>>
>> 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.
>>
>>
>>
>>
>>
>>>
>>> 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]
>> --
>> _
>> -- 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
>
>
>
> --
> 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]
-- 
_
-- 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 op

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

2020-10-22 Thread David Cunningham
Hi George,

Thank you for the response. I'm a little unclear on what you mean by a
transport. We're using chan_sip, not pjsip.

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.


On Fri, 23 Oct 2020 at 00:13, George Joseph  wrote:

>
>
> On Wed, Oct 21, 2020 at 9:16 PM David Cunningham <
> dcunning...@voisonics.com> wrote:
>
>> Hello,
>>
>> 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.
>>
>> 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.
>>
>> For example:
>> INVITE received to 1.1.1.1:5060 -> Asterisk dials
>> destinat...@termination.com -> INVITE sent from 1.1.1.1:5060 to
>> termination.com
>> INVITE received to 2.2.2.2:5060 -> Asterisk dials destinat...@pstn.com
>> -> INVITE sent from 2.2.2.2:5060 to pstn.com
>>
>> Does anyone know how this can be achieved?
>>
>
> If termination.com is only on 1.1.1.1 and pstn.com 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 2.2.2.2:  transport-2.2.2.2.  The names
> aren't important as long as you can tell the difference.  Then explicitly
> configure endpoint termination.com's "transport" parameter to
> "transport-1.1.1.1" and pstn.com'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.
>
> 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.
>
>
>
>
>
>>
>> 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]
> --
> _
> -- 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



-- 
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

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

2020-10-22 Thread George Joseph
On Wed, Oct 21, 2020 at 9:16 PM David Cunningham 
wrote:

> Hello,
>
> 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.
>
> 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.
>
> For example:
> INVITE received to 1.1.1.1:5060 -> Asterisk dials
> destinat...@termination.com -> INVITE sent from 1.1.1.1:5060 to
> termination.com
> INVITE received to 2.2.2.2:5060 -> Asterisk dials destinat...@pstn.com ->
> INVITE sent from 2.2.2.2:5060 to pstn.com
>
> Does anyone know how this can be achieved?
>

If termination.com is only on 1.1.1.1 and pstn.com 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 2.2.2.2:  transport-2.2.2.2.  The names aren't
important as long as you can tell the difference.  Then explicitly
configure endpoint termination.com's "transport" parameter to
"transport-1.1.1.1" and pstn.com'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.

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.





>
> 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]
-- 
_
-- 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

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

2020-10-21 Thread David Cunningham
Hello,

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.

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.

For example:
INVITE received to 1.1.1.1:5060 -> Asterisk dials
destinat...@termination.com -> INVITE sent from 1.1.1.1:5060 to
termination.com
INVITE received to 2.2.2.2:5060 -> Asterisk dials destinat...@pstn.com ->
INVITE sent from 2.2.2.2:5060 to pstn.com

Does anyone know how this can be achieved?

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