2017-02-09 91 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)

相關問題