2017-02-09 141 views
0

我想使用星号(版本11.7.0.5)记录呼叫,但它不起作用。我也做了下面的步骤,但没有日志在控制台可见(调试和详细级别5)星号通话记录不显示任何日志和文件

  1. 新增GoIP网关和用户sip.conf
  2. 使用MixMonitor通话录音
  3. 更改/ VAR许可/卷轴/星/监视器/

我的sip.conf配置是

[IMSI4051XXXXXXXXXXXX] 
callerid=21005 
username=user3 
canreinvite=no 
type=friend 
context=sip-external 
host=dynamic 
dtmfmode=info 
allow=all 
directmedia=yes 

    ; GOIP 

[goip] 
type=friend 
username=goip 
fromuser=goip 
regexten=goip          ; When they register, create extension 401 
secret=goip           ; Asterisk extension password 
context=goip_context 
dtmfmode=inband          ; Very important for DISA to work 
call-limit=1           ; Limit to 1 call max 
callerid=101 
host=dynamic 
nat=no            ; Gateway is not behind a NAT router 
canreinvite=no          ; Typically set to NO if behind NAT 
insecure=very 
qualify=yes 
allow=all 
directmedia=yes 

而且extensions.conf文件是

[macro-dialGSM] 
exten=>s,1,Dial(SIP/${ARG1},20,M(record)) 
exten=>s,2,Goto(s-${DIALSTATUS},1}) 
exten=>s-CANCEL,1,Hangup 
exten=>s-NOANSWER,1,Hangup 
exten=>s-BUSY,1,Busy(30) 
exten=>s-CONGESTION,1,Congestion(30) 
exten=>s-CHANUNAVAIL,1,playback(ss-noservice) 
exten=>s-CANCEL,1,Hangup 

[goip_context] 
exten=>_93.,1,Macro(dialGSM,[email protected]:5062) 

[macro-record] 
exten=>s,1,MixMonitor(testrecording.wav) 

日志如下。

Asterisk Ready. 
    == Using SIP RTP TOS bits 184 
    == Using SIP RTP CoS mark 5 
    -- Executing [[email protected]:1] Set("SIP/00101100010-00000000", "CDR(B-Number)=93278388855") in new stack 
    -- Executing [[email protected]:2] Set("SIP/00101100010-00000000", "CDR(A-IMSI)=IMSI405140603684903") in new stack 
    -- Executing [[email protected]:3] Set("SIP/00101100010-00000000", "CDR(A-Name)=") in new stack 
[2017-02-15 09:51:09.375] WARNING[1505][C-00000000]: func_odbc.c:191 generic_execute: SQL Execute returned an error -1: HY000: [SQLite]unable to open database file (14) (41) 
[2017-02-15 09:51:09.375] WARNING[1505][C-00000000]: func_odbc.c:199 generic_execute: SQL Exec Direct failed (-1)![select callerid from sip_buddies where username="IMSI405140603684903"] 
[2017-02-15 09:51:09.375] WARNING[1505][C-00000000]: res_odbc.c:608 ast_odbc_direct_execute: SQL Execute error! Verifying connection to asterisk [asterisk]... 
[2017-02-15 09:51:09.375] WARNING[1505][C-00000000]: func_odbc.c:191 generic_execute: SQL Execute returned an error -1: HY000: [SQLite]unable to open database file (14) (41) 
[2017-02-15 09:51:09.375] WARNING[1505][C-00000000]: func_odbc.c:199 generic_execute: SQL Exec Direct failed (-1)![select callerid from sip_buddies where username="IMSI405140603684903"] 
[2017-02-15 09:51:09.375] ERROR[1505][C-00000000]: func_odbc.c:538 acf_odbc_read: Unable to execute query [select callerid from sip_buddies where username="IMSI405140603684903"] 
    -- Executing [[email protected]:4] Set("SIP/00101100010-00000000", "CDR(A-Number)=") in new stack 
    -- Executing [[email protected]:5] ExecIf("SIP/00101100010-00000000", "1?Set(CDR(A-Number)=IMSI405140603684903):Set(CALLERID(num)=)") in new stack 
    -- Executing [[email protected]:6] GotoIf("SIP/00101100010-00000000", "0?emergency,911,1") in new stack 
    -- Executing [[email protected]:7] GotoIf("SIP/00101100010-00000000", "0?default,93278388855,1") in new stack 
    -- Executing [[email protected]:8] Goto("SIP/00101100010-00000000", "phones,93278388855,1") in new stack 
    -- Goto (phones,93278388855,1) 
[2017-02-15 09:51:09.376] WARNING[1505][C-00000000]: func_odbc.c:191 generic_execute: SQL Execute returned an error -1: HY000: [SQLite]unable to open database file (14) (41) 
[2017-02-15 09:51:09.376] WARNING[1505][C-00000000]: func_odbc.c:199 generic_execute: SQL Exec Direct failed (-1)![select dial from dialdata_table where exten="93278388855"] 
[2017-02-15 09:51:09.376] WARNING[1505][C-00000000]: res_odbc.c:608 ast_odbc_direct_execute: SQL Execute error! Verifying connection to asterisk [asterisk]... 
[2017-02-15 09:51:09.376] WARNING[1505][C-00000000]: func_odbc.c:191 generic_execute: SQL Execute returned an error -1: HY000: [SQLite]unable to open database file (14) (41) 
[2017-02-15 09:51:09.376] WARNING[1505][C-00000000]: func_odbc.c:199 generic_execute: SQL Exec Direct failed (-1)![select dial from dialdata_table where exten="93278388855"] 
[2017-02-15 09:51:09.376] ERROR[1505][C-00000000]: func_odbc.c:538 acf_odbc_read: Unable to execute query [select dial from dialdata_table where exten="93278388855"] 
    -- Executing [[email protected]:1] Set("SIP/00101100010-00000000", "CDR(B-IMSI)=") in new stack 
    -- Executing [[email protected]:2] GotoIf("SIP/00101100010-00000000", "0?B-IPAddr") in new stack 
    -- Executing [[email protected]:3] Gosub("SIP/00101100010-00000000", "to-e164,93278388855,1") in new stack 
    -- Executing [[email protected]:1] Return("SIP/00101100010-00000000", "93278388855") in new stack 
    -- Executing [[email protected]:4] Set("SIP/00101100010-00000000", "CDR(B-Number)=93278388855") in new stack 
[2017-02-15 09:51:09.377] WARNING[1505][C-00000000]: func_odbc.c:191 generic_execute: SQL Execute returned an error -1: HY000: [SQLite]unable to open database file (14) (41) 
[2017-02-15 09:51:09.377] WARNING[1505][C-00000000]: func_odbc.c:199 generic_execute: SQL Exec Direct failed (-1)![select dial from dialdata_table where exten="93278388855"] 
[2017-02-15 09:51:09.377] WARNING[1505][C-00000000]: res_odbc.c:608 ast_odbc_direct_execute: SQL Execute error! Verifying connection to asterisk [asterisk]... 
[2017-02-15 09:51:09.377] WARNING[1505][C-00000000]: func_odbc.c:191 generic_execute: SQL Execute returned an error -1: HY000: [SQLite]unable to open database file (14) (41) 
[2017-02-15 09:51:09.377] WARNING[1505][C-00000000]: func_odbc.c:199 generic_execute: SQL Exec Direct failed (-1)![select dial from dialdata_table where exten="93278388855"] 
[2017-02-15 09:51:09.377] ERROR[1505][C-00000000]: func_odbc.c:538 acf_odbc_read: Unable to execute query [select dial from dialdata_table where exten="93278388855"] 
    -- Executing [[email protected]:5] Set("SIP/00101100010-00000000", "CDR(B-IMSI)=") in new stack 
    -- Executing [[email protected]:6] GotoIf("SIP/00101100010-00000000", "1?to-pstn,93278388855,1") in new stack 
    -- Goto (to-pstn,93278388855,1) 
    -- Executing [[email protected]:1] Set("SIP/00101100010-00000000", "CDR(hangupdirection)=A") in new stack 
    -- Executing [[email protected]:2] Gosub("SIP/00101100010-00000000", "CallLimit,s,1(IMSI405140603684903,93278388855)") in new stack 
    -- Executing [[email protected]:1] GotoIf("SIP/00101100010-00000000", "1?A-IMSI") in new stack 
    -- Goto (CallLimit,s,4) 
    -- Executing [[email protected]:4] ExecIf("SIP/00101100010-00000000", "0?Return()") in new stack 
    -- Executing [[email protected]:5] Set("SIP/00101100010-00000000", "GROUP(A)=IMSI405140603684903") in new stack 
    -- Executing [[email protected]:6] GotoIf("SIP/00101100010-00000000", "0?VM") in new stack 
    -- Executing [[email protected]:7] Return("SIP/00101100010-00000000", "") in new stack 
    -- Executing [[email protected]:3] Dial("SIP/00101100010-00000000", "SIP/[email protected],3600,g") in new stack 
[2017-02-15 09:51:09.379] WARNING[1505][C-00000000]: chan_sip.c:6160 create_addr: Purely numeric hostname(), and not a peer--rejecting! 
[2017-02-15 09:51:09.379] WARNING[1505][C-00000000]: app_dial.c:2437 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent) 
    == Everyone is busy/congested at this time (1:0/0/1) 
    -- Executing [[email protected]:4] Set("SIP/00101100010-00000000", "CDR(hangupdirection)=SYSTEM") in new stack 
    -- Executing [[email protected]:5] GotoIf("SIP/00101100010-00000000", "1?:h-20,1") in new stack 
    -- Executing [[email protected]:6] Dial("SIP/00101100010-00000000", "SIP/[email protected],3600,g") in new stack 
    == Using SIP RTP TOS bits 184 
    == Using SIP RTP CoS mark 5 
    -- Called SIP/[email protected] 
    -- SIP/goip-00000001 is ringing 
    -- SIP/goip-00000001 is making progress passing it to SIP/00101100010-00000000 
     > 0x7f216001f550 -- Probation passed - setting RTP source address to 192.168.10.6:16384 
    -- SIP/goip-00000001 answered SIP/00101100010-00000000 
     > 0x7f2178014760 -- Probation passed - setting RTP source address to 127.0.0.1:16562 
     > Saved useragent "dble" for peer goip 
    -- Executing [[email protected]:7] Set("SIP/00101100010-00000000", "CDR(hangupdirection)=B") in new stack 
    -- Executing [[email protected]:8] Goto("SIP/00101100010-00000000", "h-16,1") in new stack 
    -- Goto (to-pstn,h-16,1) 
    -- Executing [[email protected]:1] Progress("SIP/00101100010-00000000", "") in new stack 
    -- Executing [[email protected]:2] NoOp("SIP/00101100010-00000000", "AST_CAUSE_NORMAL_CLEARING,noanswer") in new stack 
    -- Executing [[email protected]:3] Hangup("SIP/00101100010-00000000", "16") in new stack 
    == Spawn extension (to-pstn, h-16, 3) exited non-zero on 'SIP/00101100010-00000000' 
    -- Executing [[email protected]:1] Log("SIP/00101100010-00000000", "NOTICE,A-Number=IMSI405140603684903 A-Name= A-IMSI=IMSI405140603684903 B-Number=93278388855 B-Name= B-IMSI= hangupcause=16 dialstatus=ANSWER hangupdirection=B duration=0 billsec=0") in new stack 
[2017-02-15 09:51:33.137] NOTICE[1505][C-00000000]: Ext. h:1 @ to-pstn: A-Number=IMSI405140603684903 A-Name= A-IMSI=IMSI405140603684903 B-Number=93278388855 B-Name= B-IMSI= hangupcause=16 dialstatus=ANSWER hangupdirection=B duration=0 billsec=0 
    -- Executing [[email protected]:2] Hangup("SIP/00101100010-00000000", "") in new stack 
    == Spawn extension (to-pstn, h, 2) exited non-zero on 'SIP/00101100010-00000000' 
+0

您正在使用什么CDR后端?我在测试盒v.13上打破了一段时间,但我从来没有想过为什么。 – user3788685

回答

0

不能前Dial命令有答案或进展()refer

exten=>s,1,NoOp(testingtesting) 
exten=>s,2,Dial(SIP/${ARG1},20,M(record)) 

[macro-record] 
exten => s,1,MixMonitor(testrecording.wav) 
+0

它不工作。日志中没有与Mixmonitor相关的任何内容。甚至没有测试过我在NoOp中指定的测试。 –

+0

任何调用进入你的星号框将查找sip.conf,然后匹配extensions.conf的'context'。所以根据你的代码,只有当呼叫路由到'goip_context'时,它才会到你的'macro-dialGSM'。我无法猜测更多,因为你没有粘贴完整的日志 –

+0

我已经更新了相应的问题,新的配置和日志。请检查并帮助我:) –

0

后上瘾添加Mixmoniter你可以简单地使用Monitor()有m个选项,记录呼叫

讯号分配延长=> S,1,监视器(WAV,yourfilename,米)

讯号分配延长=> S,2,拨号(SIP /扩展要拨打)

,并检查您的录音,你可以简单地做 讯号分配延长=> S,1,播放(/var/spool/asterisk/monitor/yourfilename.wav)

相关问题