Сообщений: 27
|
pbx1+pbx2
Вот у меня есть собраных 2 pbxа
нужно их объеденить по iax и по заптелу
но вот что я не делаю ни то ни то не получается. вот конфиги
pbx9 extensions.conf
[general]
static=yes
writeprotect=no
clearglobalvars=no
;
[globals]
IAXTRUNKPBXX=IAX2/pbx9:pbx9@pbxx.dacar.lan
;;;;;;;;;;;;;;;;;;;;;;;; Destinations ;;;;;;;;;;;;;;;;;;;;;;;;;;
[emergency]
; Emergency phones
exten => 01,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => 901,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN:1},60)
exten => 02,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => 902,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN:1},60)
exten => 03,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => 903,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN:1},60)
exten => 09,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => 909,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN:1},60)
;
exten => _7XXX,1,Macro(localtrunkdial,${IAXTRUNKPBXX}/${EXTEN},60)
[local]
; Local stuff
exten => 9000,1,Wait(1)
exten => 9000,2,Answer
exten => 9000,3,SetMusicOnHold(default)
exten => 9000,4,WaitMusicOnHold(7000)
exten => 9000,5,Hangup
[longdistance]
; External stuff
;
exten => _9XXXXXXX,1,Macro(setcid,${CALLERID(num)})
exten => _9XXXXXXX,2,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN:1},60)
exten => _XXXXXXX,1,Macro(setcid,${CALLERID(num)})
exten => _XXXXXXX,2,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => _8901XXXXXXX,1,Macro(setcid,${CALLERID(num)})
exten => _8901XXXXXXX,2,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => _8903XXXXXXX,1,Macro(setcid,${CALLERID(num)})
exten => _8903XXXXXXX,2,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => _8904XXXXXXX,1,Macro(setcid,${CALLERID(num)})
exten => _8904XXXXXXX,2,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => _8905XXXXXXX,1,Macro(setcid,${CALLERID(num)})
exten => _8905XXXXXXX,2,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => _8906XXXXXXX,1,Macro(setcid,${CALLERID(num)})
exten => _8906XXXXXXX,2,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => _8909XXXXXXX,1,Macro(setcid,${CALLERID(num)})
exten => _8909XXXXXXX,2,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
;;;;;;;;;;;;;;;;;;;;;;;; End of Destiantions ;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;; Contexts ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[default]
include => emergency
include => local
#include conf-extensions/context.admins.conf
#include conf-extensions/context.gbye.conf
#include conf-extensions/context.callcenter.conf
#include conf-extensions/context.internal.conf
#include conf-extensions/context.zaptel-pet.conf
[gateway]
exten => s,1,Background(ivc)
exten => s,2,Waitexten(10)
include => longdistance
[zaptel-inc]
; from BusinesPhone
; For any extention at first check monitoring
exten => _X.,1,Set(MONITOR=${DB(MONITOR/${EXTEN})})
; If extention monitored, write conversation
exten => _X.,2,GotoIf($["${MONITOR}"="YES"]?3:5)
exten => _X.,3,Set(CALLFILENAME=${CALLERID(num)}-${EXTEN}-${STRFTIME(${EPOCH},M$
exten => _X.,4,Monitor(wav,${CALLFILENAME},m)
; Goto dialplan for internal context
exten => _X.,5,Goto(internal-dialplan,${EXTEN},1)
;;;;;;;;;;;;;;;;;;;;;;;; End of Conexts ;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;; Dialplans ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[internal-dialplan]
; Locally connected Sip and DP phones can dial emergency, local,
; longdistance
include => emergency
include => local
include => longdistance
и pbxx
[general]
static=yes
writeprotect=no
clearglobalvars=no
;
[globals]
;ZAPTRUNKINT=Zap/g1
;ZAPTRUNKOUT=Zap/g3
;H323TRUNK=H323
;H323GW=82.140.82.82
IAXTRUNKPBX9=IAX2/pbxx:pbxx@pbx9.dacar.lan
;IAXTRUNKPBX2=IAX2/pbx3:pbx3@pbx2.dacar.lan
;IAXTRUNKPBX4=IAX2/pbx3:pbx3@pbx4.dacar.lan
;;;;;;;;;;;;;;;;;;;;;;;; Destinations ;;;;;;;;;;;;;;;;;;;;;;;;;;
[emergency]
; Emergency phones
exten => 01,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => 901,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN:1},60)
exten => 02,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => 902,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN:1},60)
exten => 03,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => 903,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN:1},60)
exten => 09,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => 909,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN:1},60)
;
exten => _0XX,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => _90XX,1,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN:1},60)
[local]
; Local stuff
exten => 7000,1,Wait(1)
exten => 7000,2,Answer
exten => 7000,3,SetMusicOnHold(default)
exten => 7000,4,WaitMusicOnHold(7600)
exten => 7000,5,Hangup
; Agents
exten => 7024,1,Dial(SIP/7024,,Tt)
exten => 7025,1,Dial(SIP/7025,,Tt)
exten => 7412,1,Dial(SIP/7412,,Tt)
exten => 7413,1,Dial(SIP/7413,,Tt)
exten => 7449,1,Dial(SIP/7449,,Tt)
;
;dial
exten => _7017,1,Answer
exten => _7017,2,Wait(1)
exten => _7017,3,Dial(Zap/g7,60,Tt)
exten => _7017,4,Hangup()
;
[longdistance]
; External stuff
;
exten => _9XXXXXXX,1,Macro(setcid,${CALLERID(num)})
exten => _9XXXXXXX,2,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN:1},60)
exten => _XXXXXXX,1,Macro(setcid,${CALLERID(num)})
exten => _XXXXXXX,2,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => _8901XXXXXXX,1,Macro(setcid,${CALLERID(num)})
exten => _8901XXXXXXX,2,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => _8903XXXXXXX,1,Macro(setcid,${CALLERID(num)})
exten => _8903XXXXXXX,2,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => _8904XXXXXXX,1,Macro(setcid,${CALLERID(num)})
exten => _8904XXXXXXX,2,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => _8905XXXXXXX,1,Macro(setcid,${CALLERID(num)})
exten => _8905XXXXXXX,2,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => _8906XXXXXXX,1,Macro(setcid,${CALLERID(num)})
exten => _8906XXXXXXX,2,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
exten => _8909XXXXXXX,1,Macro(setcid,${CALLERID(num)})
exten => _8909XXXXXXX,2,Macro(trunkdial,${ZAPTRUNKOUT}/${EXTEN},60)
;;;;;;;;;;;;;;;;;;;;;;;; End of Destiantions ;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;; Contexts ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[default]
include => emergency
include => local
#include conf-extensions/context.admins.conf
#include conf-extensions/context.gbye.conf
#include conf-extensions/context.callcenter.conf
#include conf-extensions/context.internal.conf
#include conf-extensions/context.zaptel-pet.conf
[gateway]
exten => s,1,Background(ivc)
exten => s,2,Waitexten(10)
include => longdistance
[zaptel-inc]
; from BusinesPhone
; For any extention at first check monitoring
exten => _X.,1,Set(MONITOR=${DB(MONITOR/${EXTEN})})
; If extention monitored, write conversation
exten => _X.,2,GotoIf($["${MONITOR}"="YES"]?3:5)
exten => _X.,3,Set(CALLFILENAME=${CALLERID(num)}-${EXTEN}-${STRFTIME(${EPOCH},M$
exten => _X.,4,Monitor(wav,${CALLFILENAME},m)
; Goto dialplan for internal context
exten => _X.,5,Goto(internal-dialplan,${EXTEN},1)
;;;;;;;;;;;;;;;;;;;;;;;; End of Conexts ;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;; Dialplans ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[internal-dialplan]
; Locally connected Sip and DP phones can dial emergency, local,
; longdistance
include => emergency
include => local
include => longdistance
статусы
pbx9*CLI> zap show status
Description Alarms IRQ bpviol CRC4
T4XXP (PCI) Card 0 Span 1 YEL 0 0 0
T4XXP (PCI) Card 0 Span 2 RED 0 0 0
T4XXP (PCI) Card 0 Span 3 RED 0 0 0
T4XXP (PCI) Card 0 Span 4 RED 0 0 0
zap show status
Description Alarms IRQ bpviol CRC4
Wildcard AEX800 Board 1 OK 1 0 0
T2XXP (PCI) Card 0 Span 1 REC 0 0 0
T2XXP (PCI) Card 0 Span 2 RED 0 0 0
pbx9 iax.conf
[general]
;bindaddr=192.168.33.149 ; more than once to bind to multiple
iaxcompat=yes
nochecksums=no
delayreject=yes
amaflags=default
iaxthreadcount=100
iaxmaxthreadcount=500
;bandwidth=high
bandwidth=low
disallow=all
;allow=alaw
allow=ulaw
;jitterbuffer=no
jitterbuffer=yes
forcejitterbuffer=no
autokill=yes
[pbxx]
type=friend
trunk=yes
user=pbxx
secret=pbxx
auth=md5
host=pbxx.dacar.lan
context=internal
trunkfreq=20
trunktimestamps=no
minregexpire = 60
maxregexpire = 60
qualifyfreqok = 60000
qualifyfreqnotok = 10000
pbxx iax.conf
[general]
bindport=4569
bindaddr=192.168.3.211 ; more than once to bind to multiple
iaxcompat=yes
nochecksums=no
delayreject=yes
amaflags=default
iaxthreadcount=100
iaxmaxthreadcount=500
;bandwidth=high
bandwidth=low
disallow=all
;allow=alaw
allow=ulaw
;jitterbuffer=no
jitterbuffer=yes
forcejitterbuffer=no
autokill=yes
[pbx9]
type=friend
trunk=yes
user=pbx9
secret=pbx9
auth=md5
host=pbx9.dacar.lan
context=internal
trunkfreq=20
trunktimestamps=no
minregexpire = 60
maxregexpire = 60
qualifyfreqok = 60000
qualifyfreqnotok = 10000
|