<br><div class="gmail_quote"><div class="gmail_quote">Hi all,<br><br><br>I need to test the following scenario:
<br><br><pre>+-----------+ +-----------+ <br>| asterisk 1| | asterisk 2| <br>+-----------+ +-----------+ <br> | |<br>
| |<br>_______|__________________|___________ <br> | |<br> | |<br> | |<br> +-------+ +-------+ <br>
| ATA 1 | | ATA 2 | <br> +-------+ +-------+ <br> / \ / \ <br> / \ / \ </pre> 21 22 10 11<br>
<br>That is, I have 2 asterisks connected via SIP, two ATAs with two lines, and the ATA1 is registered with asterisk1 and ATA2 is registered with asterisk2, and all incoming calls in asterisk2 from the asterisk1 (via SIP), are answered by a DISA.<br>
<br>I can make calls between ATA1 and ATA2 without problems (the call will be routed to the asterisk1 to asterisk2, falls in DISA and I call one of the phones ATA2). I am now trying to make the call coming from,eg, extension 21, go to the asterisk1 - asterisk2, answered by the DISA and go back asterisk1, ringing the branch 22.<br>
<br><br>Since I am newbie in this matter, I wonder with friends from the list if this is possible ... Or is there another way to do this ....<br>Below is my conf files.<pre style="font-family: arial,helvetica,sans-serif;">
<br>Rgs<br><br>Cesar<br><br>
===============================================================================================================================<br><br>asterisk 1<br><br>******<br>sip.conf<br>********<br><br>[21]<br>type=friend <br>
context=phones         Where to start in the dialplan when this phone calls<br>secret=21<br>;callerid=John Doe <1234> ; 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> ; 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>
;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>
; 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>
; There is no combined call counter for a "friend"<br> ; so there'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>;mailbox=1234@default ; mailbox 1234 in voicemail context "default"<br>disallow=all ; need to disallow=all before we can use allow=<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>
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>[22]<br>type=friend <br>context=phones         Where to start in the dialplan when this phone calls<br>secret=22<br>;callerid=John Doe <1234> ; 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> ; 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>;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> ; 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> ; There is no combined call counter for a "friend"<br>
; so there'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>;mailbox=1234@default ; mailbox 1234 in voicemail context "default"<br>disallow=all ; need to disallow=all before we can use allow=<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>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>[asterisk2]<br>type=friend<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>
; 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>extensions.conf<br>******<br><br>[phones]<br>include=>internal<br>include=>remote<br><br><br>[internal]<br>exten=>_2x,1,NoOp()<br>exten=>_2x,n,Dial(SIP/${EXTEN},30)<br>exten=>_2x,n,Hangup()<br>
<br>[remote]<br>;exten=>_1x,1,NoOp()<br>exten=>_1x,1,Dial(SIP/asterisk2/${EXTEN})<br>exten=>_3x,1,Dial(SIP/asterisk2/${EXTEN})<br>exten=>_1x,n+101,Hangup()<br>exten=>_3x,n+101,Hangup()<br><br>[asterisk2_incoming]<br>
include=>internal<br><br>**************************************************<br>asterisk 2<br>****************************************************<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>
secret=10<br>;callerid=John Doe <1234> ; 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>
; 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>
;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>
; 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>
; There is no combined call counter for a "friend"<br> ; so there'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>;mailbox=1234@default ; mailbox 1234 in voicemail context "default"<br>disallow=all ; need to disallow=all before we can use allow=<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>
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>[11]<br>type=friend <br>context=phones ; Where to start in the dialplan when this phone calls<br>secret=11<br>;callerid=John Doe <1234> ; 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> ; 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>;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> ; 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> ; There is no combined call counter for a "friend"<br>
; so there'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>;mailbox=1234@default ; mailbox 1234 in voicemail context "default"<br>disallow=all ; need to disallow=all before we can use allow=<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>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>[asterisk1]<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>
; 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>extensions.conf<br><br>[phones]<br>include=>internal<br>include=>remote<br><br><br>[internal]<br>exten=>_1x,1,NoOp()<br>exten=>_1x,n,Dial(SIP/${EXTEN},30)
exten=>_1x,n+101,Hangup()<br><br>[remote]<br>;exten=>_2x,1,NoOp()<br>exten=>_2x,1,Dial(SIP/asterisk1/${EXTEN})<br>exten=>_2x,n+101,Hangup()<br><br>[asterisk1_incoming]<br>exten=>_1x,1,DISA(no-password,internal)
exten=>_3x,1,DISA(no-password,remote)<br>exten=>_1x,102,Hangup()<br>exten=>_3x,102,Hangup()<br><br></pre><br>
</div><br>
</div><br>