Asterisk 呼叫应该与对等方进行,但被困住并停留在本地

Asterisk 呼叫应该与对等方进行,但被困住并停留在本地

我正在使用 Asterisk 和 Vicidial,尝试通过 SIP“中继”提供商拨打外拨电话。电话始终无法接通,我听到的却是 Asterisk 播放的 demo-instruct.gsm 或 invalid.gsm。

我把电话号码替换成了9876543210。

在日志中我看到:

[Apr  8 23:38:52] VERBOSE[3279] pbx.c: [Apr  8 23:38:52]   == Starting Local/8600051@default-00000000;1 at default,919876543210,1 failed so falling back to exten 's'

那里发生了什么?当它说失败时,是什么失败了,为什么失败?它是通过 SIP“中继”对等方拨号吗?目的是将该电话号码传递给对等方,以便对等方可以在 PSTN 上拨打该号码。

日志:

[Apr  8 23:37:00] NOTICE[2910] chan_iax2.c: Peer 'ASTloop' is now UNREACHABLE! Time: 0
[Apr  8 23:37:00] NOTICE[2950] chan_sip.c: Peer '201' is now UNREACHABLE!  Last qualify: 0
[Apr  8 23:37:00] NOTICE[2950] chan_sip.c: Peer '200' is now UNREACHABLE!  Last qualify: 0
[Apr  8 23:37:02] VERBOSE[2991] manager.c: [Apr  8 23:37:02]   == Manager 'sendcron' logged on from 127.0.0.1
[Apr  8 23:37:02] VERBOSE[2990] manager.c: [Apr  8 23:37:02]   == Manager 'sendcron' logged on from 127.0.0.1
[Apr  8 23:37:02] VERBOSE[2991] manager.c: [Apr  8 23:37:02]   == Manager 'sendcron' logged off from 127.0.0.1
[Apr  8 23:37:02] VERBOSE[2990] manager.c: [Apr  8 23:37:02]   == Manager 'sendcron' logged off from 127.0.0.1
[Apr  8 23:37:05] VERBOSE[3069] manager.c: [Apr  8 23:37:05]   == Manager 'updatecron' logged on from 127.0.0.1
[Apr  8 23:37:05] VERBOSE[3090] manager.c: [Apr  8 23:37:05]   == Manager 'listencron' logged on from 127.0.0.1
[Apr  8 23:37:07] VERBOSE[3106] manager.c: [Apr  8 23:37:07]   == Manager 'sendcron' logged on from 127.0.0.1
[Apr  8 23:37:07] VERBOSE[3106] manager.c: [Apr  8 23:37:07]   == Manager 'sendcron' logged off from 127.0.0.1
[Apr  8 23:37:08] VERBOSE[2931] chan_iax2.c: [Apr  8 23:37:08] -- Registered IAX2 'ASTloop' (AUTHENTICATED) at 127.0.0.1:23289
[Apr  8 23:37:08] VERBOSE[2932] chan_iax2.c: [Apr  8 23:37:08] -- Registered IAX2 to '127.0.0.1', who sees us as 127.0.0.1:23289 with no messages waiting
[Apr  8 23:37:08] VERBOSE[2935] chan_iax2.c: [Apr  8 23:37:08] -- Registered IAX2 'ASTblind' (AUTHENTICATED) at 127.0.0.1:33696
[Apr  8 23:37:08] VERBOSE[2937] chan_iax2.c: [Apr  8 23:37:08] -- Registered IAX2 to '127.0.0.1', who sees us as 127.0.0.1:33696 with no messages waiting
[Apr  8 23:37:08] NOTICE[2941] chan_iax2.c: Peer 'ASTloop' is now REACHABLE! Time: 4
[Apr  8 23:37:08] NOTICE[2944] chan_iax2.c: Peer 'ASTblind' is now REACHABLE! Time: 3
[Apr  8 23:37:08] VERBOSE[2899] chan_iax2.c: [Apr  8 23:37:08] -- Registered IAX2 'ASTplay' (AUTHENTICATED) at 127.0.0.1:62907
[Apr  8 23:37:08] VERBOSE[2900] chan_iax2.c: [Apr  8 23:37:08] -- Registered IAX2 to '127.0.0.1', who sees us as 127.0.0.1:62907 with no messages waiting
[Apr  8 23:37:08] NOTICE[2904] chan_iax2.c: Peer 'ASTplay' is now REACHABLE! Time: 1
[Apr  8 23:37:47] VERBOSE[2950] chan_sip.c: [Apr  8 23:37:47]     -- Registered SIP '200' at 192.168.0.24:5060
[Apr  8 23:37:47] VERBOSE[2950] chan_sip.c: [Apr  8 23:37:47] > Saved useragent "YATE/5.4.2" for peer 200
[Apr  8 23:37:47] NOTICE[2950] chan_sip.c: Peer '200' is now Reachable. (60ms / 2000ms)
[Apr  8 23:38:02] VERBOSE[3198] manager.c: [Apr  8 23:38:02]   == Manager 'sendcron' logged on from 127.0.0.1
[Apr  8 23:38:02] VERBOSE[3199] manager.c: [Apr  8 23:38:02]   == Manager 'sendcron' logged on from 127.0.0.1
[Apr  8 23:38:02] VERBOSE[3199] manager.c: [Apr  8 23:38:02]   == Manager 'sendcron' logged off from 127.0.0.1
[Apr  8 23:38:02] VERBOSE[3198] manager.c: [Apr  8 23:38:02]   == Manager 'sendcron' logged off from 127.0.0.1
[Apr  8 23:38:07] VERBOSE[3212] manager.c: [Apr  8 23:38:07]   == Manager 'sendcron' logged on from 127.0.0.1
[Apr  8 23:38:07] VERBOSE[3212] manager.c: [Apr  8 23:38:07]   == Manager 'sendcron' logged off from 127.0.0.1
[Apr  8 23:38:39] VERBOSE[3256] manager.c: [Apr  8 23:38:39]   == Manager 'sendcron' logged on from 127.0.0.1
[Apr  8 23:38:39] VERBOSE[3256] netsock2.c: [Apr  8 23:38:39]   == Using SIP RTP CoS mark 5
[Apr  8 23:38:41] VERBOSE[3256] pbx.c: [Apr  8 23:38:41]        > Channel SIP/200-00000000 was answered.
[Apr  8 23:38:41] VERBOSE[3260] pbx.c: [Apr  8 23:38:41]     -- Executing [8600051@default:1] MeetMe("SIP/200-00000000", "8600051,F") in new stack
[Apr  8 23:38:41] VERBOSE[3260] config.c: [Apr  8 23:38:41]   == Parsing '/etc/asterisk/meetme.conf': [Apr  8 23:38:41] VERBOSE[3260] config.c: [Apr  8 23:38:41]   == Found
[Apr  8 23:38:41] VERBOSE[3260] config.c: [Apr  8 23:38:41]   == Parsing '/etc/asterisk/meetme-vicidial.conf': [Apr  8 23:38:41] VERBOSE[3260] config.c: [Apr  8 23:38:41]   == Found
[Apr  8 23:38:41] VERBOSE[3260] app_meetme.c: [Apr  8 23:38:41] -- Created MeetMe conference 1023 for conference '8600051'
[Apr  8 23:38:41] VERBOSE[3260] file.c: [Apr  8 23:38:41]     -- <SIP/200-00000000> Playing 'conf-onlyperson.gsm' (language 'en')
[Apr  8 23:38:41] WARNING[3260] res_rtp_asterisk.c: RTP Read too short
[Apr  8 23:38:42] VERBOSE[3256] manager.c: [Apr  8 23:38:42]   == Manager 'sendcron' logged off from 127.0.0.1
[Apr  8 23:38:52] VERBOSE[3277] manager.c: [Apr  8 23:38:52]   == Manager 'sendcron' logged on from 127.0.0.1
[Apr  8 23:38:52] VERBOSE[3278] pbx.c: [Apr  8 23:38:52]     -- Executing [8600051@default:1] MeetMe("Local/8600051@default-00000000;2", "8600051,F") in new stack
[Apr  8 23:38:52] VERBOSE[3277] pbx.c: [Apr  8 23:38:52]        > Channel Local/8600051@default-00000000;1 was answered.
[Apr  8 23:38:52] VERBOSE[3279] pbx.c: [Apr  8 23:38:52]   == Starting Local/8600051@default-00000000;1 at default,919876543210,1 failed so falling back to exten 's'
[Apr  8 23:38:52] VERBOSE[3279] pbx_lua.c: [Apr  8 23:38:52]     -- Executing [s@default:1] wait("Local/8600051@default-00000000;1", "1")
[Apr  8 23:38:53] VERBOSE[3279] pbx_lua.c: [Apr  8 23:38:53]     -- Executing [s@default:1] answer("Local/8600051@default-00000000;1", "")
[Apr  8 23:38:53] VERBOSE[3279] func_timeout.c: [Apr  8 23:38:53]     -- Digit timeout set to 5.000
[Apr  8 23:38:53] VERBOSE[3279] func_timeout.c: [Apr  8 23:38:53]     -- Response timeout set to 10.000
[Apr  8 23:38:53] VERBOSE[3279] pbx_lua.c: [Apr  8 23:38:53]     -- Executing [s@default:1] background("Local/8600051@default-00000000;1", "demo-congrats")
[Apr  8 23:38:53] VERBOSE[3277] manager.c: [Apr  8 23:38:53]   == Manager 'sendcron' logged off from 127.0.0.1
[Apr  8 23:38:53] VERBOSE[3279] file.c: [Apr  8 23:38:53]     -- <Local/8600051@default-00000000;1> Playing 'demo-congrats.gsm' (language 'en')
[Apr  8 23:39:03] VERBOSE[3321] manager.c: [Apr  8 23:39:03]   == Manager 'sendcron' logged on from 127.0.0.1
[Apr  8 23:39:03] VERBOSE[3322] manager.c: [Apr  8 23:39:03]   == Manager 'sendcron' logged on from 127.0.0.1
[Apr  8 23:39:03] VERBOSE[3322] manager.c: [Apr  8 23:39:03]   == Manager 'sendcron' logged off from 127.0.0.1
[Apr  8 23:39:03] VERBOSE[3321] manager.c: [Apr  8 23:39:03]   == Manager 'sendcron' logged off from 127.0.0.1
[Apr  8 23:39:05] VERBOSE[3338] manager.c: [Apr  8 23:39:05]   == Manager 'sendcron' logged on from 127.0.0.1
[Apr  8 23:39:05] VERBOSE[3278] pbx.c: [Apr  8 23:39:05]   == Spawn extension (default, 8600051, 1) exited non-zero on 'Local/8600051@default-00000000;2'
[Apr  8 23:39:05] VERBOSE[3278] pbx.c: [Apr  8 23:39:05]     -- Executing [h@default:1] AGI("Local/8600051@default-00000000;2", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0---------------") in new stack
[Apr  8 23:39:05] VERBOSE[3278] res_agi.c: [Apr  8 23:39:05]     -- <Local/8600051@default-00000000;2>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0--------------- completed, returning 0
[Apr  8 23:39:05] VERBOSE[3279] pbx.c: [Apr  8 23:39:05]   == Spawn extension (default, s, 1) exited non-zero on 'Local/8600051@default-00000000;1'
[Apr  8 23:39:05] VERBOSE[3279] pbx.c: [Apr  8 23:39:05]     -- Executing [h@default:1] AGI("Local/8600051@default-00000000;1", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0---------------") in new stack
[Apr  8 23:39:05] VERBOSE[3340] manager.c: [Apr  8 23:39:05]   == Manager 'sendcron' logged on from 127.0.0.1
[Apr  8 23:39:05] VERBOSE[3279] res_agi.c: [Apr  8 23:39:05]     -- <Local/8600051@default-00000000;1>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0--------------- completed, returning 0
[Apr  8 23:39:06] VERBOSE[3338] manager.c: [Apr  8 23:39:06]   == Manager 'sendcron' logged off from 127.0.0.1
[Apr  8 23:39:06] VERBOSE[3340] manager.c: [Apr  8 23:39:06]   == Manager 'sendcron' logged off from 127.0.0.1
[Apr  8 23:39:08] VERBOSE[3347] manager.c: [Apr  8 23:39:08]   == Manager 'sendcron' logged on from 127.0.0.1
[Apr  8 23:39:08] VERBOSE[3347] manager.c: [Apr  8 23:39:08]   == Manager 'sendcron' logged off from 127.0.0.1
[Apr  8 23:39:11] VERBOSE[3359] manager.c: [Apr  8 23:39:11]   == Manager 'sendcron' logged on from 127.0.0.1
[Apr  8 23:39:11] VERBOSE[3360] pbx.c: [Apr  8 23:39:11]     -- Executing [8600051@default:1] MeetMe("Local/8600051@default-00000001;2", "8600051,F") in new stack
[Apr  8 23:39:11] VERBOSE[3359] pbx.c: [Apr  8 23:39:11]        > Channel Local/8600051@default-00000001;1 was answered.
[Apr  8 23:39:11] VERBOSE[3361] pbx.c: [Apr  8 23:39:11]   == Starting Local/8600051@default-00000001;1 at default,91919876543210,1 failed so falling back to exten 's'
[Apr  8 23:39:11] VERBOSE[3361] pbx_lua.c: [Apr  8 23:39:11]     -- Executing [s@default:1] wait("Local/8600051@default-00000001;1", "1")
[Apr  8 23:39:12] VERBOSE[3359] manager.c: [Apr  8 23:39:12]   == Manager 'sendcron' logged off from 127.0.0.1
[Apr  8 23:39:12] VERBOSE[3361] pbx_lua.c: [Apr  8 23:39:12]     -- Executing [s@default:1] answer("Local/8600051@default-00000001;1", "")
[Apr  8 23:39:12] VERBOSE[3361] func_timeout.c: [Apr  8 23:39:12]     -- Digit timeout set to 5.000
[Apr  8 23:39:12] VERBOSE[3361] func_timeout.c: [Apr  8 23:39:12]     -- Response timeout set to 10.000
[Apr  8 23:39:12] VERBOSE[3361] pbx_lua.c: [Apr  8 23:39:12]     -- Executing [s@default:1] background("Local/8600051@default-00000001;1", "demo-congrats")
[Apr  8 23:39:12] VERBOSE[3361] file.c: [Apr  8 23:39:12]     -- <Local/8600051@default-00000001;1> Playing 'demo-congrats.gsm' (language 'en')
[Apr  8 23:39:40] VERBOSE[3361] pbx_lua.c: [Apr  8 23:39:40]     -- Executing [s@default:1] background("Local/8600051@default-00000001;1", "demo-instruct")
[Apr  8 23:39:40] VERBOSE[3361] file.c: [Apr  8 23:39:40]     -- <Local/8600051@default-00000001;1> Playing 'demo-instruct.gsm' (language 'en')
vici:~ #

peers,其中 babytel_out 的上下文定义为 trunkinbound —— 肯定是错误的。为什么要使用那个上下文?

vici:~ #
vici:~ # asterisk -rx "sip show peers"
Name/username             Host                                    Dyn Forcerport ACL Port     Status    
200/200                   192.168.0.24                             D   N             64965    OK (35 ms)
201/201                   192.168.0.24                             D   N             5060     OK (38 ms)
202/202                   (Unspecified)                            D   N             0        UNKNOWN    
babytel_in                198.38.7.34                                  N             5065     OK (84 ms)
babytel_out/19876543210   198.38.7.34                                  N             5065     OK (85 ms)
gs102/gs102               (Unspecified)                            D   N             0        UNKNOWN    
6 sip peers [Monitored: 4 online, 2 offline Unmonitored: 0 online, 0 offline]
vici:~ #
vici:~ # asterisk -rx "sip show peer babytel_out"


 * Name       : babytel_out
 Secret       : <Set>
 MD5Secret    : <Not set>
 Remote Secret: <Not set>
 Context      : trunkinbound
 Subscr.Cont. : <Not set>
 Language     : en
 AMA flags    : Unknown
 Netborder CPD: No
 Transfer mode: open
 CallingPres  : Presentation Allowed, Not Screened
 Callgroup    :
 Pickupgroup  :
 MOH Suggest  : default
 Mailbox      :
 VM Extension : asterisk
 LastMsgsSent : 32767/65535
 Call limit   : 0
 Max forwards : 0
 Dynamic      : No
 Callerid     : "" <>
 MaxCallBR    : 384 kbps
 Expire       : -1
 Insecure     : invite
 Force rport  : Yes
 ACL          : No
 DirectMedACL : No
 T.38 support : No
 T.38 EC mode : Unknown
 T.38 MaxDtgrm: 4294967295
 DirectMedia  : No
 PromiscRedir : No
 User=Phone   : No
 Video Support: No
 Text Support : No
 Ign SDP ver  : No
 Trust RPID   : No
 Send RPID    : Yes
 TrustIDOutbnd: Legacy
 Subscriptions: Yes
 Overlap dial : No
 Outb. proxy  : nat5.babytel.ca
 DTMFmode     : rfc2833
 Timer T1     : 500
 Timer B      : 32000
 ToHost       : nat5.babytel.ca
 Addr->IP     : 198.38.7.34:5065
 Defaddr->IP  : (null)
 Prim.Transp. : UDP
 Allowed.Trsp : UDP
 Def. Username: 19876543210
 SIP Options  : (none)
 Codecs       : 0x6 (gsm|ulaw)
 Codec Order  : (ulaw:20,gsm:20)
 Auto-Framing : No
 Status       : OK (85 ms)
 Useragent    :
 Reg. Contact :
 Qualify Freq : 60000 ms
 Sess-Timers  : Accept
 Sess-Refresh : uas
 Sess-Expires : 1800 secs
 Min-Sess     : 90 secs
 RTP Engine   : asterisk
 Parkinglot   :
 Use Reason   : No
 Encryption   : No

vici:~ #

上下文:

; WARNING- THIS FILE IS AUTO-GENERATED BY VICIDIAL, ANY EDITS YOU MAKE WILL BE LOST
register => [email protected]:huihylku6786ghjkghjk:[email protected]:5065/19876543210

; VICIDIAL Carrier: BABYTEL - babytel
; Babytel
[babytel_in]
type=peer
qualify=yes
host=nat5.babytel.ca
port=5065
context=inbound-calls


[babytel_out]
type=peer
username=19876543210
host=nat5.babytel.ca
outboundproxy=nat5.babytel.ca:5065
secret=huihylku6786ghjkghjk
canreinvite=no
insecure=invite
qualify=yes



[200]
username=200
secret=password
accountcode=200
callerid="" <200>
mailbox=200
context=default
type=friend
host=dynamic

[201]
username=201
secret=password
accountcode=201
callerid="" <201>
mailbox=201
context=default
type=friend
host=dynamic

[202]
username=202
secret=password
accountcode=202
callerid="" <202>
mailbox=202
context=default
type=friend
host=dynamic

[gs102]
username=gs102
secret=password
accountcode=gs102
callerid="Test Admin Phone" <>
mailbox=102
context=default
type=friend
host=dynamic


; END OF FILE    Last Forced System Reload: 2015-04-03 17:14:22

扩展:

; WARNING- THIS FILE IS AUTO-GENERATED BY VICIDIAL, ANY EDITS YOU MAKE WILL BE LOST
TRUNKloop = IAX2/ASTloop:[email protected]:40569
TRUNKblind = IAX2/ASTblind:[email protected]:41569
TRUNKplay = IAX2/ASTplay:[email protected]:42569
BABY = SIP/babytel_out



; agent phones restricted to only internal extensions
[default---agent]
exten => s,1,Answer
exten => s,n,AGI(agi-VDAD_inbound_calltime_check.agi,-----NO-----default---agent-------------------------NO)
exten => s,n,Set(INVCOUNT=0)
exten => s,n,Background(sip-silence)
exten => s,n,WaitExten(20)


; hangup
exten => t,1,Playback(vm-goodbye)
exten => t,n,Hangup()
exten => i,1,Goto(s,4)
exten => i,n,Hangup()
; hangup
exten => h,1,AGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})

; custom dialplan entries
include => vicidial-auto-internal
include => vicidial-auto-phones




; logging of all outbound calls from agent phones
[defaultlog]
exten => s,1,Answer
exten => s,n,AGI(agi-VDAD_inbound_calltime_check.agi,-----NO-----defaultlog-------------------------NO)
exten => s,n,Set(INVCOUNT=0)
exten => s,n,Background(sip-silence)
exten => s,n,WaitExten(20)


; hangup
exten => t,1,Playback(vm-goodbye)
exten => t,n,Hangup()
exten => i,1,Goto(s,4)
exten => i,n,Hangup()
; hangup
exten => h,1,AGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})

; custom dialplan entries
exten => _X.,1,AGI(agi-NVA_recording.agi,BOTH------Y---Y---Y)
exten => _X.,n,Goto(default,${EXTEN},1)




[vicidial-auto-external]
exten => h,1,AGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})

; Local Server: 192.168.0.19
exten => _192*168*000*019*.,1,Goto(default,${EXTEN:16},1)
exten => _192*168*000*019*.,2,Hangup()
exten => _**192*168*000*019*.,1,Goto(default,${EXTEN:18},1)
exten => _**192*168*000*019*.,2,Hangup()

; Agent session audio playback meetme entry
exten => _473782178600XXX,1,Meetme(${EXTEN:8},q)
exten => _473782178600XXX,n,Hangup()
; Agent session audio playback loop
exten => _473782168600XXX,1,Dial(${TRUNKplay}/47378217${EXTEN:8},5,To)
exten => _473782168600XXX,n,Hangup()
; Agent session audio playback extension
exten => 473782158521111,1,Answer
exten => 473782158521111,n,ControlPlayback(${CALLERID(name)},99999,0,1,2,3,4)
exten => 473782158521111,n,Hangup()
; SendDTMF to playback channel to control it
exten => _473782148521111.,1,Answer
exten => _473782148521111.,n,SendDTMF(${CALLERID(num)},250,250,IAX2/ASTplay-${EXTEN:15})
exten => _473782148521111.,n,Hangup()
; Silent wait channel for DTMFsend
exten => 473782138521111,1,Answer
exten => 473782138521111,n,Wait(5)
exten => 473782138521111,n,Hangup()
; VICIDIAL Carrier: BABYTEL - babytel
; Babytel
[general]
exten => _NXXXNxxxxxx,1,Dial(${BABY}/${EXTEN})
exten => _Nxxxxxx,1,Dial(${BABY}/${EXTEN})
exten => _1NXXNxxxxxx,1,Dial(${BABY}/${EXTEN})
exten => _011.,1,Dial(Dial({TOLL}/${EXTEN})
exten => _9NXXXNxxxxxx,1,Dial(${BABY}/${EXTEN})
exten => _9Nxxxxxx,1,Dial(${BABY}/${EXTEN})
exten => _91NXXNxxxxxx,1,Dial(${BABY}/${EXTEN})
exten => _9011.,1,Dial(Dial({TOLL}/${EXTEN})




[inbound-calls]
exten => 19876543210,1,Dial(SIP/200)

[local_200]
exten => _9x.,1,Set(CALLERID(all)="Ali Baba" <9876543210>)
exten => _9x.,1,Dial(SIP/${EXTEN:1}@babytel_out)
exten => 201,1,Dial(SIP/201)

[local_201]
exten => 200,1,Dial(SIP/200)

[vicidial-auto-internal]
exten => h,1,AGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})
; Voicemail Extensions:
exten => _85026666666666.,1,Wait(1)
exten => _85026666666666.,n,Voicemail(${EXTEN:14},u)
exten => _85026666666666.,n,Hangup()
exten => _85026666666667.,1,Wait(1)
exten => _85026666666667.,n,Voicemail(${EXTEN:14},su)
exten => _85026666666667.,n,Hangup()
exten => 8500,1,VoicemailMain
exten => 8500,2,Goto(s,6)
exten => 8500,3,Hangup()
exten => 8501,1,VoicemailMain(s${CALLERID(num)})
exten => 8501,2,Hangup()

; Prompt Extensions:
exten => 8167,1,Answer
exten => 8167,2,AGI(agi-record_prompts.agi,wav-----720000)
exten => 8167,3,Hangup()
exten => 8168,1,Answer
exten => 8168,2,AGI(agi-record_prompts.agi,gsm-----720000)
exten => 8168,3,Hangup()

; this is used for recording conference calls, the client app sends the filename
;    value as a callerID recordings go to /var/spool/asterisk/monitor (WAV)
;    Recording is limited to 1 hour, to make longer, just change the server
;    setting ViciDial Recording Limit
;     this is the WAV verison, default
exten => 8309,1,Answer
exten => 8309,2,Monitor(wav,${CALLERID(name)})
exten => 8309,3,Wait(3600)
exten => 8309,4,Hangup()
;     this is the GSM verison
exten => 8310,1,Answer
exten => 8310,2,Monitor(gsm,${CALLERID(name)})
exten => 8310,3,Wait(3600)
exten => 8310,4,Hangup()

;     agent alert extension
exten => 83047777777777,1,Answer
exten => 83047777777777,2,Playback(${CALLERID(name)})
exten => 83047777777777,3,Hangup()
; This is a loopback dial-around to allow for immediate answer of outbound calls
exten => _8305888888888888.,1,Answer
exten => _8305888888888888.,n,Wait(${EXTEN:16:1})
exten => _8305888888888888.,n,Dial(${TRUNKloop}/${EXTEN:17},,To)
exten => _8305888888888888.,n,Hangup()
; No-call silence extension
exten => _8305888888888888X999,1,Answer
exten => _8305888888888888X999,n,Wait(3600)
exten => _8305888888888888X999,n,Hangup()

[vicidial-auto-phones]
exten => h,1,AGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})

; Phones direct dial extensions:
exten => 200,1,Dial(SIP/200,60,)
exten => 200,2,Goto(default,85026666666666200,1)
exten => 200,3,Hangup()
exten => 201,1,Dial(SIP/201,60,)
exten => 201,2,Goto(default,85026666666666201,1)
exten => 201,3,Hangup()
exten => 202,1,Dial(SIP/202,60,)
exten => 202,2,Goto(default,85026666666666202,1)
exten => 202,3,Hangup()
exten => 102,1,Dial(SIP/gs102,60,)
exten => 102,2,Goto(default,85026666666666102,1)
exten => 102,3,Hangup()

[vicidial-auto]
exten => h,1,AGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})

include => vicidial-auto-internal
include => vicidial-auto-phones
include => vicidial-auto-external


; END OF FILE    Last Forced System Reload: 2015-04-03 17:14:22

也可以看看:

http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/DeviceConfig_id216341.html

答案1

尝试重命名

; Babytel
[general]

; Babytel
[default]

答案2

它说失败的因为在给定的上下文中找不到此扩展。

根据您的 sip.conf,SIP 用户的默认上下文是默认,但所有可以处理 919876543210 的模式都在一般的上下文。因此,当您拨打电话时,Asterisk 无法找到它们,因为呼叫流程不会通过一般的语境。

你可能想要设置一般的作为 SIP 用户的背景。

相关内容