SipDevicesAsterisk

Version 4 (Adrian Georgescu, 10/15/2011 05:15 pm)

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