Project

General

Profile

Actions

Asterisk PBX

SIP2SIP service consists of several OpenSIPS servers running in difference data centers using SIP Thor distributed architecture, which is using DNS SRV records to point to the actual servers. Asterisk, is currently unable to handle more that one result for a DNS SRV lookup, and the Asterisk configuration needed for getting it work with the SIP2SIP service is not trivial. This wiki page helps clarify it.

Versions 1.4 and 1.6.x

dnsmgr.conf

[general]
enable=yes

sip.conf

[general]
...
srvlookup=yes
...

register => 2233XXXXX:password@sip2sip.info/2233XXXXX
...

[authentication]

[sip2sip](!)
type=peer
canreinvite=no
nat=yes
qualify=yes
domain=sip2sip.info
fromdomain=sip2sip.info
outboundproxy=proxy.sipthor.net
fromuser=2233XXXXX
username=2233XXXXX
secret=password
insecure=invite
context=from-sip2sip

[sip2sip-0](sip2sip)
host=sip2sip.info

[sip2sip-1](sip2sip)
host=81.23.228.129

[sip2sip-2](sip2sip)
host=81.23.228.150

[sip2sip-3](sip2sip)
host=85.17.186.7

extensions.conf

[from-users]
; Dialing the SIP2SIP echo test
; IMPORTANT: all outbound calls to SIP2SIP need to be done using the 'sip2sip-0' peer
exten => 1234,1,Dial(SIP/3333@sip2sip-0)

[from-sip2sip]
; 2233XXXXX is your SIP2SIP username, NOT a dialplan pattern
exten => 2233XXXXX,1,NoOp(--Incoming call from ${CALLERID(all)})
exten => 2233XXXXX,n,Dial(SIP/phone1, 60)

Version 1.8

dnsmgr.conf

[general]
enable=yes

sip.conf

[general]
...
srvlookup=yes
...

register => 2233XXXXX:password@sip2sip.info/2233XXXXX
...

[authentication]

[sip2sip](!)
type=peer
canreinvite=no
nat=yes
qualify=yes
domain=sip2sip.info
fromdomain=sip2sip.info
outboundproxy=proxy.sipthor.net
fromuser=2233XXXXX
defaultuser=2233XXXXX
secret=password
insecure=invite
context=from-sip2sip

[sip2sip-0](sip2sip)
host=sip2sip.info

[sip2sip-1](sip2sip)
host=81.23.228.129

[sip2sip-2](sip2sip)
host=81.23.228.150

[sip2sip-3](sip2sip)
host=85.17.186.7

extensions.conf

[from-users]
; Dialing the SIP2SIP echo test
; IMPORTANT: all outbound calls to SIP2SIP need to be done using the 'sip2sip-0' peer
exten => 1234,1,Dial(SIP/3333@sip2sip-0)

[from-sip2sip]
; 2233XXXXX is your SIP2SIP username, NOT a dialplan pattern
exten => 2233XXXXX,1,NoOp(--Incoming call from ${CALLERID(all)})
same => n,Dial(SIP/phone1, 60)

Updated by Adrian Georgescu about 13 years ago ยท 4 revisions