[asterisk-users] SIP Trunk with "multiple" remote ip-addresses
Olle E. Johansson
oej at edvina.net
Fri Mar 12 05:25:20 CST 2010
12 mar 2010 kl. 12.01 skrev Klaus Darilion:
>
>
> Am 02.03.2010 13:29, schrieb Magnus Benngård:
>> Hi!
>>
>> Did a setup of 2 peers as Klaus suggested, it worked thx!
>>
>> Has anyone thought about the possibility to add multiple ip/hosts to
>> "host="?
>>
>> I my case: "host=130.244.190.42,130.244.190.46" or
>> "host=sip-corporate1.tele2.se,sip-corporate2.tele2.se"
>>
>> Step 1 could be to send to the first ip/host and accept from both.
>>
>> Step 2 could be "round-robin" send if both are up and alive...
>
> IMO this would be a nice feature.
Check my "peerfailover" branch.
>
>> Btw, did try trunk version, no support for multiple SRV records there.
>
> IIRC correctly there is a patch on the bugtracker for SRV handling, but
> I do not know if that patch would fix this too.
I haven't seen that. Interesting.
/O
>
> regards
> klaus
>
>>
>>
>>
>> Am 02.03.2010 08:50, schrieb Magnus Benngård:
>>> Hi,
>>>
>>> Did order and setup a SIP trunk to a Swedish ITSP named Tele2. No
>>> problem to get outgoing calls to work but i have some problems with
>>> incoming.
>>>
>>> Did set "srvlookup=yes" in sip.conf. "Sending" all outgoing calls to
>>> "sip-corporate.tele2.se" which is either sip-corporate1.tele2.se
>>> (130.244.190.42) or sip-corporate1.tele2.se (130.244.190.46).
>>>
>>> If i do a "sip show peer Tele2", I see that Asterisk has chosen
>> one of
>>> them: ToHost : sip-corporate.tele2.se
>>> Addr->IP : 130.244.190.46 Port 5060
>>>
>>> Now my problems starts, when Tele2 sends a call to my Asterisk,
>> the call
>>> can come frome any of those two ip-adresses. If it comes from
>>> 130.244.190.46 everything if fine, but if it comes from
>> 130.244.190.42:
>>> "[Mar 2 08:46:03] NOTICE[1372]: chan_sip.c:19167
>> handle_request_invite:
>>> Failed to authenticate!"
>>>
>>> I thought "srvlookup=yes" should take care about that, but then i
>> read a
>>> little bit more and found: "Note: Asterisk only uses the first
>> host in
>>> SRV records". :(
>>
>> Hi Magnus!
>>
>> Asterisk does not support multiple SRV records (expcet there were some
>> recent changes which I missed) - it takes one of the most priors and
>> use
>> it all the time.
>>
>> Thus, in your scenario you have to specify the possible inbound sources
>> manually as peers:
>>
>> [tele2-1]
>> type=peer
>> host=130.244.190.42
>> context=fromTele2
>> ...
>> [tele2-2]
>> type=peer
>> host=130.244.190.46
>> context=fromTele2
>> ...
>>
>>
>> regards
>> klaus
>>
>>
>>>
>>> Can anyone plz give me some hint howto solve my problem?
>>>
>>> Regards,
>>>
>>> Magnus
>>>
>>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
---
* Olle E Johansson - oej at edvina.net
* Cell phone +46 70 593 68 51, Office +46 8 96 40 20, Sweden
More information about the asterisk-users
mailing list