SipDevicesAsterisk

Version 2 (Adrian Georgescu, 05/16/2011 10:21 pm)

1 1
== Asterisk PBX ==
2 1
3 2 Adrian Georgescu
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.
4 1
5 1
=== Versions 1.4 and 1.6.x ===
6 1
7 1
'''dnsmgr.conf'''
8 1
9 1
{{{
10 1
[general]
11 1
enable=yes
12 1
}}}
13 1
14 1
15 1
'''sip.conf'''
16 1
17 1
{{{
18 1
[general]
19 1
...
20 1
srvlookup=yes
21 1
...
22 1
23 1
register => 2233XXXXX:password@sip2sip.info/2233XXXXX
24 1
...
25 1
26 1
[authentication]
27 1
28 1
[sip2sip](!)
29 1
type=peer
30 1
canreinvite=no
31 1
nat=yes
32 1
qualify=yes
33 1
domain=sip2sip.info
34 1
fromdomain=sip2sip.info
35 1
outboundproxy=proxy.sipthor.net
36 1
fromuser=2233XXXXX
37 1
username=2233XXXXX
38 1
secret=password
39 1
insecure=invite
40 1
context=from-sip2sip
41 1
42 1
[sip2sip-0](sip2sip)
43 1
host=sip2sip.info
44 1
45 1
[sip2sip-1](sip2sip)
46 1
host=81.23.228.129
47 1
48 1
[sip2sip-2](sip2sip)
49 1
host=81.23.228.150
50 1
51 1
[sip2sip-3](sip2sip)
52 1
host=85.17.186.7
53 1
}}}
54 1
55 1
56 1
'''extensions.conf'''
57 1
{{{
58 1
[from-users]
59 1
; Dialing the SIP2SIP echo test
60 1
; IMPORTANT: all outbound calls to SIP2SIP need to be done using the 'sip2sip-0' peer
61 1
exten => 1234,1,Dial(SIP/3333@sip2sip-0)
62 1
63 1
[from-sip2sip]
64 1
; 2233XXXXX is your SIP2SIP username, NOT a dialplan pattern
65 1
exten => 2233XXXXX,1,NoOp(--Incoming call from ${CALLERID(all)})
66 1
exten => 2233XXXXX,n,Dial(SIP/phone1, 60)
67 1
}}}
68 1
69 1
70 1
=== Version 1.8 ===
71 1
72 1
'''dnsmgr.conf'''
73 1
74 1
{{{
75 1
[general]
76 1
enable=yes
77 1
}}}
78 1
79 1
80 1
'''sip.conf'''
81 1
82 1
{{{
83 1
[general]
84 1
...
85 1
srvlookup=yes
86 1
...
87 1
88 1
register => 2233XXXXX:password@sip2sip.info/2233XXXXX
89 1
...
90 1
91 1
[authentication]
92 1
93 1
[sip2sip](!)
94 1
type=peer
95 1
canreinvite=no
96 1
nat=yes
97 1
qualify=yes
98 1
domain=sip2sip.info
99 1
fromdomain=sip2sip.info
100 1
outboundproxy=proxy.sipthor.net
101 1
fromuser=2233XXXXX
102 1
defaultuser=2233XXXXX
103 1
secret=password
104 1
insecure=invite
105 1
context=from-sip2sip
106 1
107 1
[sip2sip-0](sip2sip)
108 1
host=sip2sip.info
109 1
110 1
[sip2sip-1](sip2sip)
111 1
host=81.23.228.129
112 1
113 1
[sip2sip-2](sip2sip)
114 1
host=81.23.228.150
115 1
116 1
[sip2sip-3](sip2sip)
117 1
host=85.17.186.7
118 1
}}}
119 1
120 1
121 1
'''extensions.conf'''
122 1
{{{
123 1
[from-users]
124 1
; Dialing the SIP2SIP echo test
125 1
; IMPORTANT: all outbound calls to SIP2SIP need to be done using the 'sip2sip-0' peer
126 1
exten => 1234,1,Dial(SIP/3333@sip2sip-0)
127 1
128 1
[from-sip2sip]
129 1
; 2233XXXXX is your SIP2SIP username, NOT a dialplan pattern
130 1
exten => 2233XXXXX,1,NoOp(--Incoming call from ${CALLERID(all)})
131 1
same => n,Dial(SIP/phone1, 60)
132 1
}}}