[asterisk-users] Connecting two Asterisk together via SIP + DISA
César Davi Avila do Nascimento
cesargxn at gmail.com
Fri Jul 10 07:54:56 CDT 2009
Hi all,
I need to test the following scenario:
+-----------+ +-----------+
| asterisk 1| | asterisk 2|
+-----------+ +-----------+
| |
| |
_______|__________________|___________
| |
| |
| |
+-------+ +-------+
| ATA 1 | | ATA 2 |
+-------+ +-------+
/ \ / \
/ \ / \
21 22 10 11
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.
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.
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 ....
Below is my conf files.
Rgs
Cesar
===============================================================================================================================
asterisk 1
******
sip.conf
********
[21]
type=friend
context=phones ; Where to start in the dialplan when
this phone calls
secret=21
;callerid=John Doe <1234> ; Full caller ID, to override the phones config
; on incoming calls to Asterisk
host=dynamic ; we have a static but private IP address
; No registration allowed
;nat=no ; there is not NAT between phone and Asterisk
;canreinvite=yes ; allow RTP voice traffic to bypass Asterisk
;dtmfmode=info ; either RFC2833 or INFO for the BudgeTone
;call-limit=1 ; permit only 1 outgoing call and 1
incoming call at a time
; from the phone to asterisk
; 1 for the explicit peer, 1 for the
explicit user,
; remember that a friend equals 1 peer
and 1 user in
; memory
; This will affect your subscriptions as well.
; There is no combined call counter
for a "friend"
; so there's currently no way in
sip.conf to limit
; to one inbound or outbound call per phone. Use
; the group counters in the dial plan for that.
;
;mailbox=1234 at default ; mailbox 1234 in voicemail context "default"
disallow=all ; need to disallow=all before we can use allow=
allow=ulaw ; Note: In user sections the order of codecs
; listed with allow= does NOT matter!
allow=alaw
allow=g723.1 ; Asterisk only supports g723.1 pass-thru!
allow=g729 ; Pass-thru only unless g729 license obtained
;callingpres=allowed_passed_screen ; Set caller ID presentation
; See doc/callingpres.txt for more information
[22]
type=friend
context=phones ; Where to start in the dialplan when
this phone calls
secret=22
;callerid=John Doe <1234> ; Full caller ID, to override the phones config
; on incoming calls to Asterisk
host=dynamic ; we have a static but private IP address
; No registration allowed
;nat=no ; there is not NAT between phone and Asterisk
;canreinvite=yes ; allow RTP voice traffic to bypass Asterisk
;dtmfmode=info ; either RFC2833 or INFO for the BudgeTone
;call-limit=1 ; permit only 1 outgoing call and 1
incoming call at a time
; from the phone to asterisk
; 1 for the explicit peer, 1 for the
explicit user,
; remember that a friend equals 1 peer
and 1 user in
; memory
; This will affect your subscriptions as well.
; There is no combined call counter
for a "friend"
; so there's currently no way in
sip.conf to limit
; to one inbound or outbound call per phone. Use
; the group counters in the dial plan for that.
;
;mailbox=1234 at default ; mailbox 1234 in voicemail context "default"
disallow=all ; need to disallow=all before we can use allow=
allow=ulaw ; Note: In user sections the order of codecs
; listed with allow= does NOT matter!
allow=alaw
allow=g723.1 ; Asterisk only supports g723.1 pass-thru!
allow=g729 ; Pass-thru only unless g729 license obtained
;callingpres=allowed_passed_screen ; Set caller ID presentation
; See doc/callingpres.txt for more information
[asterisk2]
type=friend
secret=welcome
context=asterisk2_incoming
host=dynamic
disallow=all ; need to disallow=all before we can use allow=
allow=ulaw ; Note: In user sections the order of codecs
; listed with allow= does NOT matter!
allow=alaw
allow=g723.1 ; Asterisk only supports g723.1 pass-thru!
allow=g729 ; Pass-thru only unless g729 license obtained
******
extensions.conf
******
[phones]
include=>internal
include=>remote
[internal]
exten=>_2x,1,NoOp()
exten=>_2x,n,Dial(SIP/${EXTEN},30)
exten=>_2x,n,Hangup()
[remote]
;exten=>_1x,1,NoOp()
exten=>_1x,1,Dial(SIP/asterisk2/${EXTEN})
exten=>_3x,1,Dial(SIP/asterisk2/${EXTEN})
exten=>_1x,n+101,Hangup()
exten=>_3x,n+101,Hangup()
[asterisk2_incoming]
include=>internal
**************************************************
asterisk 2
****************************************************
******
sip.conf
*******
[10]
type=friend
context=phones ; Where to start in the dialplan when
this phone calls
secret=10
;callerid=John Doe <1234> ; Full caller ID, to override the phones config
; on incoming calls to Asterisk
host=dynamic ; we have a static but private IP address
; No registration allowed
;nat=no ; there is not NAT between phone and Asterisk
;canreinvite=yes ; allow RTP voice traffic to bypass Asterisk
;dtmfmode=info ; either RFC2833 or INFO for the BudgeTone
;call-limit=1 ; permit only 1 outgoing call and 1
incoming call at a time
; from the phone to asterisk
; 1 for the explicit peer, 1 for the
explicit user,
; remember that a friend equals 1 peer
and 1 user in
; memory
; This will affect your subscriptions as well.
; There is no combined call counter
for a "friend"
; so there's currently no way in
sip.conf to limit
; to one inbound or outbound call per phone. Use
; the group counters in the dial plan for that.
;
;mailbox=1234 at default ; mailbox 1234 in voicemail context "default"
disallow=all ; need to disallow=all before we can use allow=
allow=ulaw ; Note: In user sections the order of codecs
; listed with allow= does NOT matter!
allow=alaw
allow=g723.1 ; Asterisk only supports g723.1 pass-thru!
allow=g729 ; Pass-thru only unless g729 license obtained
;callingpres=allowed_passed_screen ; Set caller ID presentation
; See doc/callingpres.txt for more information
[11]
type=friend
context=phones ; Where to start in the dialplan when
this phone calls
secret=11
;callerid=John Doe <1234> ; Full caller ID, to override the phones config
; on incoming calls to Asterisk
host=dynamic ; we have a static but private IP address
; No registration allowed
;nat=no ; there is not NAT between phone and Asterisk
;canreinvite=yes ; allow RTP voice traffic to bypass Asterisk
;dtmfmode=info ; either RFC2833 or INFO for the BudgeTone
;call-limit=1 ; permit only 1 outgoing call and 1
incoming call at a time
; from the phone to asterisk
; 1 for the explicit peer, 1 for the
explicit user,
; remember that a friend equals 1 peer
and 1 user in
; memory
; This will affect your subscriptions as well.
; There is no combined call counter
for a "friend"
; so there's currently no way in
sip.conf to limit
; to one inbound or outbound call per phone. Use
; the group counters in the dial plan for that.
;
;mailbox=1234 at default ; mailbox 1234 in voicemail context "default"
disallow=all ; need to disallow=all before we can use allow=
allow=ulaw ; Note: In user sections the order of codecs
; listed with allow= does NOT matter!
allow=alaw
allow=g723.1 ; Asterisk only supports g723.1 pass-thru!
allow=g729 ; Pass-thru only unless g729 license obtained
;callingpres=allowed_passed_screen ; Set caller ID presentation
; See doc/callingpres.txt for more information
[asterisk1]
type=friend
secret=welcome
context=asterisk1_incoming
host=dynamic
disallow=all ; need to disallow=all before we can use allow=
allow=ulaw ; Note: In user sections the order of codecs
; listed with allow= does NOT matter!
allow=alaw
allow=g723.1 ; Asterisk only supports g723.1 pass-thru!
allow=g729 ; Pass-thru only unless g729 license obtained
*****************************************************************
extensions.conf
[phones]
include=>internal
include=>remote
[internal]
exten=>_1x,1,NoOp()
exten=>_1x,n,Dial(SIP/${EXTEN},30)
exten=>_1x,n+101,Hangup()
[remote]
;exten=>_2x,1,NoOp()
exten=>_2x,1,Dial(SIP/asterisk1/${EXTEN})
exten=>_2x,n+101,Hangup()
[asterisk1_incoming]
exten=>_1x,1,DISA(no-password,internal)
exten=>_3x,1,DISA(no-password,remote)
exten=>_1x,102,Hangup()
exten=>_3x,102,Hangup()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090710/0226c3bb/attachment-0001.htm
More information about the asterisk-users
mailing list