Заметил баг или особенность работы dialplan (у меня одного такое?)
Код: Выделить всё
[user_defaults](!)
type = wizard
transport = transport-udp
accepts_registrations = yes
sends_registrations = no
accepts_auth = yes
sends_auth = no
has_hint = yes
hint_context = aster-phones
hint_application = Gosub(stdexten,${EXTEN},1(${HINT}))
endpoint/context = aster-phones
endpoint/allow_subscribe = yes
endpoint/allow = !all,alaw
endpoint/direct_media = yes
endpoint/force_rport = yes
endpoint/disable_direct_media_on_nat = yes
endpoint/direct_media_method = invite
endpoint/ice_support = yes
endpoint/moh_suggest = default
endpoint/send_rpid = yes
endpoint/rewrite_contact = yes
endpoint/send_pai = yes
endpoint/allow_transfer = yes
endpoint/trust_id_inbound = yes
endpoint/device_state_busy_at = 1
endpoint/trust_id_outbound = yes
endpoint/send_diversion = yes
aor/qualify_frequency = 30
aor/authenticate_qualify = no
aor/max_contacts = 1
aor/remove_existing = yes
aor/minimum_expiration = 30
aor/support_path = yes
phoneprov/PROFILE = yealink
[2337](user_defaults)
hint_exten = 2337
inbound_auth/username = 2337
inbound_auth/password = 88888888
[2777](user_defaults)
hint_exten = 2777
endpoint/callerid = Alice <2777>
endpoint/allow = !all,alaw
inbound_auth/username = 2777
inbound_auth/password = 88888888
has_phoneprov = yes
phoneprov/MAC = deadbeef4dad
[general]
static=yes
writeprotect=no
[aster-phones]
exten => _8[89]XXXXXXXXX/2777,1,NoOp("ALL: ${CALLERID(all)} NUM: ${CALLERID(num)} EXTEN: ${EXTEN:-4} или ${EXTEN}")
same => n,GoSub(sub-dial-out,${EXTEN},1(485520${CALLERID(num)},4888888))
При попытке набора номера получаем это:
Код: Выделить всё
res_pjsip_session.c:2181 new_invite: Call from '2777' (UDP:10.10.4.223:61259) to extension '89051333333' rejected because extension not found in context 'aster-phones'.
Код: Выделить всё
exten => _8[89]XXXXXXXXX,1,NoOP("ALL: ${CALLERID(all)} NUM: ${CALLERID(num)} EXTEN: ${EXTEN:-4} или ${EXTEN}")
Код: Выделить всё
-- Executing [89051333333@aster-phones:1] NoOp("PJSIP/2777-00000005", ""ALL: "Alice" <2777> NUM: 2777 EXTEN: 3333 или 89051333333"") in new stack
-- Executing [89051333333@aster-phones:2] Gosub("PJSIP/2777-00000005", "sub-dial-out,89051333333,1(4858882777,4888888)") in new stack
[Jan 29 13:01:01] ERROR[3727][C-00000005]: app_stack.c:594 gosub_exec: Attempt to reach a non-existent destination for Gosub: (Context:sub-dial-out, Extension:89051333333, Priority:1)
== Spawn extension (aster-phones, 89051333333, 2) exited non-zero on 'PJSIP/2777-00000005'
Так ведь быть не должно?