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

[asterisk-users] chan_sip and matching the RTP source

2020-10-23 Thread Dovid Bender
All,

I am stuck with a specific install using chan_sip and Asterisk 11.25.3. We
have nat=no which from what I understand means that Asterisk will go by
whatever it see's in the SDP and not look at the source IP+port from where
the traffic is coming from. We have a call flow where we send a carrier a
call and they specify an IP and port in their SDP in a 183 (e.g.
100.100.100.100:36070). As we get that 183 the carrier starts sending RTP
from that IP and port so Asterisk does the same and sends rtp back to that
IP and port. Two seconds later we get RTP from a new IP and port (e.g.
200.200.200.200:21592). Two seconds after that we get an updated 183 with
SDP and then new IP and port. Asterisk keeps sending media to the old IP
(100.100.100.100). We then get a 200 OK and then again in the SDP there is
the new IP and port. Asterisk keeps sending rtp to the old port and IP.
>From what I understand if we have nat=no then we should update where we
send RTP and send it to the IP in the SDP and not look at the source Is
that correct or am I wrong? Is there any other setting that I can be
missing?

TIA.

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