[asterisk-users] SIP Trunk with "multiple" remote ip-addresses

Klaus Darilion klaus.mailinglists at pernau.at
Tue Mar 2 03:03:33 CST 2010



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
>



More information about the asterisk-users mailing list