Сообщений: 19
|
Связать 2 астериска
Есть задача: настроить перевод входящих звонков с одного астера на другой, настроить дозвон по добавочным между астерами. (Возможно, неправильно сформулировал).
Исходные:
астер1 - 192.168.20.27 - рабочий серв.
астер2 - 192.168.50.2 - настраиваемый серв.
Подсети соединены между собой тунелем на цисках 1841.
Оба астера имеют помимо натовских ипов реальные с прямым инетом.
На астер2 возможно позвонить - играет ivr (дальше не лазил). Возможно звонить между добавочными.
Но исходящие наружу не работают. Опыт настройки минимальный, прошу помощи. В правилах дозвона тоже особо не ковырялся
конфиги астера2
sip.conf
general
context=2151251
limitonpeer=yes
;allowguest=no ; Allow or reject guest calls (default is yes, this can also be set to 'osp'
allowguest=yes
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to allndaddr=192.168.20.21 )
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; Note: Asterisk only uses the first host
register => 2151251:pin@sip.serv.ip.aster2/2151251
disallow=all ; First disallow all codecs
allow=g729
allow=gsm ; GSM consumes far less bandwidth than ulaw
allow=ulaw
allow=alaw
mohinterpret=default
mohsuggest=default
promiscredir = yes ; If yes, allows 302 or REDIR to non-local SIP address
; Note that promiscredir when redirects are made to the
; local system will cause loops since Asterisk is incapable
; of performing a "hairpin" call.
dtmfmode = rfc2833
;compactheaders = yes ; send compact sip headers.
notifyhold = yes ; Notify subscriptions on HOLD state (default: no)
ignoreregexpire=yes ; Enabling this setting has two functions:
;relaxdtmf=yes
4000
type = friend
context = vip_user
username = 4000
secret = 4000ab
callerid =
host = dynamic
nat = yes
canreinvite = no
dtmfmode = auto
allow = g729
allow = ulaw
allow = alaw
allow = gsm
qualify=yes
call-limit=99
4011
type = friend
context = vip_user
username = 4011
secret = 4011ab
callerid =
host = dynamic
nat = yes
canreinvite = no
dtmfmode = auto
allow = g729
allow = ulaw
allow = alaw
allow = gsm
qualify=yes
call-limit=99
extensions.conf
general
static=yes
writeprotect=no
autofallthrough=no
clearglobalvars=no
priorityjumping=yes
userscontext=default
globals
2151251
exten => 2151251,1,Answer()
;exten => 2151251,n,Backgroud(demo-instruct)
;exten => 2151251,2,Dial(SIP/84957293545@sip.serv.ip.aster1,60,t)
exten => 2151251,2,Dial(SIP/84957293545@sip.serv.ip.aster2,60,t)
;exten => 4000,1,Dial(SIP/${4000})
====dobavoch=======
exten => 4000,1,Dial(SIP/4000)
exten => 4011,1,Dial(SIP/4011)
dtmf
exten => _1XXX,1,Dial(SIP/${EXTEN}@192.168.20.27,t)
exten => 2XXX,1,Dial(SIP/${exten}@192.168.20.27,t)
exten => 3XXX,1,Dial(SIP/${exten}@192.168.20.27,t)
====pravila_dozvona====
mezhgorod_user
include => agents
include => emergency
include => gorod_external
include => mezhgorod_external
vip_user
include => agents
include => emergency
include => gorod_external
include => mezhgorod_external
include => international
include => parkedcalls
exten => t,1,goto(no_context,s,1)
bespravniy_user
include => agents
include => emergency
no_context
exten => s,1,Hangup()
===Dialplan======
gorod_external ; Zvonok na gorod
exten => _9XXXXXXX,1,Dial(SIP/${EXTEN:1}@sip.serv.ip.aster2,45,t)
exten => _988312XXXXXXX,1,Dial(SIP/${EXTEN:1}@sip.serv.ip.aster2,45,t)
mezhgorod_external ; Isxodyashie zvonki na mezhgorod
exten => _98XXXXXXXXXX,1,Dial(SIP/${EXTEN:1}@sip.serv.ip.aster2,45,t)
international
exten => _9.,1,Dial(SIP/${EXTEN:1}@sip.serv.ip,45,t)
local_mobile
exten => _98915XXXXXXX,1,Dial(SIP/${EXTEN:1}@sip.serv.ip.aster2,45,t)
exten => _98916XXXXXXX,1,Dial(SIP/${EXTEN:1}@sip.serv.ip.aster2,45,t)
exten => _1102,1,Dial(SIP/${1102}@192.168.20.27,45,t)
exten => _2XXX,1,Dial(SIP/${exten}@192.168.20.27,t)
exten => _3XXX,1,Dial(SIP/${exten}@192.168.20.27,t)
При попытке звонка наружу с софтфона через астер2 в консоли выдает
WARNING[10500]: channel.c:3201 ast_channel_make_compatible: No path to translate from SIP/sip.serv.ip.aster2-08eb0550(256) to SIP/4011-b700c150(4)
NOTICE[8837]: chan_sip.c:12412 handle_response_invite: Failed to authenticate on INVITE to '"4011" <sip:4011@real.ip.aster2>;tag=as64467a34'
sip show registry
Host Username Refresh State Reg.Time
sip.serv.ip.aster2:5060 2151251 1185 Registered Thu, 17 Jun 2010 22:38:47
|