Pessoal,<br><br>Estou precisando testar o seguinte cenário:<br><br><pre>+-----------+       +-----------+           <br>| asterisk 1|       | asterisk 2|   <br>+-----------+       +-----------+  <br>       |                  |<br>
<br>       |                  |<br>_______|__________________|___________                   <br>      |                      |<br>      |                      |<br>      |                      |<br>  +-------+              +-------+         <br>
<br>  | ATA 1 |              | ATA 2 | <br>  +-------+              +-------+            <br>    /  \                   /  \                 <br>   /    \                 /    \ </pre>    21     22                     10        11<br>

<br><br>Ou seja, tenho 2 asterisks interligados via SIP, dois ATAs com
duas linhas, sendo que o ATA1 está registrado no asterisk 1 e o ATA 2
está registrado no asterisk 2 e, todas as chamadas entrantes no
asterisk2 vindas do asterisk 1 (via SIP), são atendidas por um DISA.<br>
<br><pre style="font-family: arial,helvetica,sans-serif;">Consigo fazer ligações do ATA 1 para o ATA 2 sem problemas (a chamada vai até o asterisk1 é roteada para o asterisk 2, cai no DISA e eu chamo um dos telefones do ATA2). Estou tentando agora fazer com que a chamada vinda por exemplo do ramal 21, vá até o asterisk 2, caia no DISA e retorne para o asterisk 1 (no ramal 22).<br>
<br><br>Como sou newbie no assunto, gostaria de saber com os amigos da lista se isto é possível... Ou se existe uma outra forma de fazer isso....<br>Abaixo segue meus arquivos de conf.<br><br>Grande abraço<br><br>César<br>
<br><br>===============================================================================================================================<br><br>Arquivos de conf do asterisk 1<br><br>******<br>sip.conf<br>********<br><br>[21]<br>
type=friend                         <br><br>context=phones                        Where to start in the dialplan when this phone calls<br>secret=21<br>;callerid=John Doe &lt;1234&gt;       ; Full caller ID, to override the phones config<br>
                                ; on incoming calls to Asterisk<br><br>host=dynamic                       we have a static but private IP address<br>                                ; No registration allowed<br>;nat=no                         ; there is not NAT between phone and Asterisk<br>
;canreinvite=yes                ; allow RTP voice traffic to bypass Asterisk<br><br>;dtmfmode=info                  ; either RFC2833 or INFO for the BudgeTone<br>;call-limit=1                   ; permit only 1 outgoing call and 1 incoming call at a time<br>
                                ; from the phone to asterisk<br><br>                                ; 1 for the explicit peer, 1 for the explicit user,<br>                                ; remember that a friend equals 1 peer and 1 user in<br>
                                ; memory<br>                                ; This will affect your subscriptions as well.<br><br>                                ; There is no combined call counter for a &quot;friend&quot;<br>
                                ; so there&#39;s currently no way in sip.conf to limit<br>                                ; to one inbound or outbound call per phone. Use<br><br>                                ; the group counters in the dial plan for that.<br>
                                ;<br>;mailbox=1234@default           ; mailbox 1234 in voicemail context &quot;default&quot;<br>disallow=all                   ; need to disallow=all before we can use allow=<br><br>allow=ulaw                     ; Note: In user sections the order of codecs<br>
                                ; listed with allow= does NOT matter!<br>allow=alaw<br>allow=g723.1                   ; Asterisk only supports g723.1 pass-thru!<br><br>allow=g729                     ; Pass-thru only unless g729 license obtained<br>
;callingpres=allowed_passed_screen        ; Set caller ID presentation<br>                                ; See doc/callingpres.txt for more information<br><br><br>[22]<br>type=friend                         <br>context=phones                        Where to start in the dialplan when this phone calls<br>
secret=22<br>;callerid=John Doe &lt;1234&gt;       ; Full caller ID, to override the phones config<br><br>                                ; on incoming calls to Asterisk<br>host=dynamic                       we have a static but private IP address<br>
                                ; No registration allowed<br>;nat=no                         ; there is not NAT between phone and Asterisk<br><br>;canreinvite=yes                ; allow RTP voice traffic to bypass Asterisk<br>
;dtmfmode=info                  ; either RFC2833 or INFO for the BudgeTone<br>;call-limit=1                   ; permit only 1 outgoing call and 1 incoming call at a time<br><br>                                ; from the phone to asterisk<br>
                                ; 1 for the explicit peer, 1 for the explicit user,<br>                                ; remember that a friend equals 1 peer and 1 user in<br><br>                                ; memory<br>
                                ; This will affect your subscriptions as well.<br>                                ; There is no combined call counter for a &quot;friend&quot;<br><br>                                ; so there&#39;s currently no way in sip.conf to limit<br>
                                ; to one inbound or outbound call per phone. Use<br>                                ; the group counters in the dial plan for that.<br><br>                                ;<br>;mailbox=1234@default           ; mailbox 1234 in voicemail context &quot;default&quot;<br>
disallow=all                   ; need to disallow=all before we can use allow=<br>allow=ulaw                     ; Note: In user sections the order of codecs<br><br>                                ; listed with allow= does NOT matter!<br>
allow=alaw<br>allow=g723.1                   ; Asterisk only supports g723.1 pass-thru!<br>allow=g729                     ; Pass-thru only unless g729 license obtained<br><br>;callingpres=allowed_passed_screen        ; Set caller ID presentation<br>
                                ; See doc/callingpres.txt for more information<br><br>;comunicação entre asterisks<br><br>[asterisk2]<br>type=friend<br><br>secret=welcome<br>context=asterisk2_incoming<br>host=dynamic<br>disallow=all                   ; need to disallow=all before we can use allow=<br>
allow=ulaw                     ; Note: In user sections the order of codecs<br><br>                                ; listed with allow= does NOT matter!<br>allow=alaw<br>allow=g723.1                   ; Asterisk only supports g723.1 pass-thru!<br>
allow=g729                     ; Pass-thru only unless g729 license obtained<br><br><br>****** <br>extensions.conf<br>******<br><br>[phones]<br>include=&gt;internal<br>include=&gt;remote<br><br><br>[internal]<br>exten=&gt;_2x,1,NoOp()<br>
exten=&gt;_2x,n,Dial(SIP/${EXTEN},30)<br>exten=&gt;_2x,n,Hangup()<br><br><br>[remote]<br>;exten=&gt;_1x,1,NoOp()<br>exten=&gt;_1x,1,Dial(SIP/asterisk2/${EXTEN})<br>exten=&gt;_3x,1,Dial(SIP/asterisk2/${EXTEN})<br>exten=&gt;_1x,n+101,Hangup()<br>
exten=&gt;_3x,n+101,Hangup()<br><br>[asterisk2_incoming]<br><br>include=&gt;internal<br><br>**************************************************<br>Arquivos de conf do asterisk 2<br><br>******<br>sip.conf<br>*******<br><br>
[10]<br>type=friend                         <br>context=phones               ; Where to start in the dialplan when this phone calls<br><br>secret=10<br>;callerid=John Doe &lt;1234&gt;       ; Full caller ID, to override the phones config<br>
                                ; on incoming calls to Asterisk<br>host=dynamic                       we have a static but private IP address<br><br>                                ; No registration allowed<br>;nat=no                         ; there is not NAT between phone and Asterisk<br>
;canreinvite=yes                ; allow RTP voice traffic to bypass Asterisk<br><br>;dtmfmode=info                  ; either RFC2833 or INFO for the BudgeTone<br>;call-limit=1                   ; permit only 1 outgoing call and 1 incoming call at a time<br>
                                ; from the phone to asterisk<br><br>                                ; 1 for the explicit peer, 1 for the explicit user,<br>                                ; remember that a friend equals 1 peer and 1 user in<br>
                                ; memory<br>                                ; This will affect your subscriptions as well.<br><br>                                ; There is no combined call counter for a &quot;friend&quot;<br>
                                ; so there&#39;s currently no way in sip.conf to limit<br>                                ; to one inbound or outbound call per phone. Use<br><br>                                ; the group counters in the dial plan for that.<br>
                                ;<br>;mailbox=1234@default           ; mailbox 1234 in voicemail context &quot;default&quot;<br>disallow=all                   ; need to disallow=all before we can use allow=<br><br>allow=ulaw                     ; Note: In user sections the order of codecs<br>
                                ; listed with allow= does NOT matter!<br>allow=alaw<br>allow=g723.1                   ; Asterisk only supports g723.1 pass-thru!<br><br>allow=g729                     ; Pass-thru only unless g729 license obtained<br>
;callingpres=allowed_passed_screen        ; Set caller ID presentation<br>                                ; See doc/callingpres.txt for more information<br><br><br>[11]<br>type=friend                         <br>context=phones               ; Where to start in the dialplan when this phone calls<br>
secret=11<br>;callerid=John Doe &lt;1234&gt;       ; Full caller ID, to override the phones config<br><br>                                ; on incoming calls to Asterisk<br>host=dynamic                       we have a static but private IP address<br>
                                ; No registration allowed<br>;nat=no                         ; there is not NAT between phone and Asterisk<br><br>;canreinvite=yes                ; allow RTP voice traffic to bypass Asterisk<br>
;dtmfmode=info                  ; either RFC2833 or INFO for the BudgeTone<br>;call-limit=1                   ; permit only 1 outgoing call and 1 incoming call at a time<br><br>                                ; from the phone to asterisk<br>
                                ; 1 for the explicit peer, 1 for the explicit user,<br>                                ; remember that a friend equals 1 peer and 1 user in<br><br>                                ; memory<br>
                                ; This will affect your subscriptions as well.<br>                                ; There is no combined call counter for a &quot;friend&quot;<br><br>                                ; so there&#39;s currently no way in sip.conf to limit<br>
                                ; to one inbound or outbound call per phone. Use<br>                                ; the group counters in the dial plan for that.<br><br>                                ;<br>;mailbox=1234@default           ; mailbox 1234 in voicemail context &quot;default&quot;<br>
disallow=all                   ; need to disallow=all before we can use allow=<br>allow=ulaw                     ; Note: In user sections the order of codecs<br><br>                                ; listed with allow= does NOT matter!<br>
allow=alaw<br>allow=g723.1                   ; Asterisk only supports g723.1 pass-thru!<br>allow=g729                     ; Pass-thru only unless g729 license obtained<br><br>;callingpres=allowed_passed_screen        ; Set caller ID presentation<br>
                                ; See doc/callingpres.txt for more information<br><br>;****<br>;**** Comunicação entre asterisks<br>;****<br><br>[asterisk1]<br><br>type=friend<br>secret=welcome<br>context=asterisk1_incoming<br>
host=dynamic<br>disallow=all                   ; need to disallow=all before we can use allow=<br>allow=ulaw                     ; Note: In user sections the order of codecs<br><br>                                ; listed with allow= does NOT matter!<br>
allow=alaw<br>allow=g723.1                   ; Asterisk only supports g723.1 pass-thru!<br>allow=g729                     ; Pass-thru only unless g729 license obtained<br><br><br>*****************************************************************<br>
extensions.conf<br><br>[phones]<br>include=&gt;internal<br>include=&gt;remote<br><br><br>[internal]<br>exten=&gt;_1x,1,NoOp()<br>exten=&gt;_1x,n,Dial(SIP/${EXTEN},30)<br><br>exten=&gt;_1x,n+101,Hangup()<br><br>[remote]<br>
;exten=&gt;_2x,1,NoOp()<br>exten=&gt;_2x,1,Dial(SIP/asterisk1/${EXTEN})<br>exten=&gt;_2x,n+101,Hangup()<br><br>[asterisk1_incoming]<br>exten=&gt;_1x,1,DISA(no-password,internal)<br><br>exten=&gt;_3x,1,DISA(no-password,remote)<br>
exten=&gt;_1x,102,Hangup()<br>exten=&gt;_3x,102,Hangup()<br></pre>