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

Magnus Benngård magnus.b at inputinterior.se
Tue Mar 2 06:29:57 CST 2010



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

Btw, did try trunk version, no support for multiple SRV records there.  

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
> 

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100302/22974ebd/attachment.htm 


More information about the asterisk-users mailing list