星号呼叫记录未显示任何日志和文件

时间:2017-02-09 21:20:27

标签: asterisk audio-recording sip-server

我正在尝试使用Asterisk(版本11.7.0.5)录制呼叫,但它无法正常工作。我已完成以下步骤,但在控制台上没有可见的日志(Debug和verbose level 5)

  1. 在sip.conf中添加了goip和用户
  2. 使用MixMonitor录制来电
  3. 更改/ var / spool / asterisk / monitor /
  4. 的权限

    我的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,goip@192.168.10.6:5062)
    
    [macro-record]
    exten=>s,1,MixMonitor(testrecording.wav)
    

    日志如下。

    Asterisk Ready.
      == Using SIP RTP TOS bits 184
      == Using SIP RTP CoS mark 5
        -- Executing [93278388855@from-openBTS:1] Set("SIP/00101100010-00000000", "CDR(B-Number)=93278388855") in new stack
        -- Executing [93278388855@from-openBTS:2] Set("SIP/00101100010-00000000", "CDR(A-IMSI)=IMSI405140603684903") in new stack
        -- Executing [93278388855@from-openBTS: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 [93278388855@from-openBTS:4] Set("SIP/00101100010-00000000", "CDR(A-Number)=") in new stack
        -- Executing [93278388855@from-openBTS:5] ExecIf("SIP/00101100010-00000000", "1?Set(CDR(A-Number)=IMSI405140603684903):Set(CALLERID(num)=)") in new stack
        -- Executing [93278388855@from-openBTS:6] GotoIf("SIP/00101100010-00000000", "0?emergency,911,1") in new stack
        -- Executing [93278388855@from-openBTS:7] GotoIf("SIP/00101100010-00000000", "0?default,93278388855,1") in new stack
        -- Executing [93278388855@from-openBTS: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 [93278388855@phones:1] Set("SIP/00101100010-00000000", "CDR(B-IMSI)=") in new stack
        -- Executing [93278388855@phones:2] GotoIf("SIP/00101100010-00000000", "0?B-IPAddr") in new stack
        -- Executing [93278388855@phones:3] Gosub("SIP/00101100010-00000000", "to-e164,93278388855,1") in new stack
        -- Executing [93278388855@to-e164:1] Return("SIP/00101100010-00000000", "93278388855") in new stack
        -- Executing [93278388855@phones: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 [93278388855@phones:5] Set("SIP/00101100010-00000000", "CDR(B-IMSI)=") in new stack
        -- Executing [93278388855@phones:6] GotoIf("SIP/00101100010-00000000", "1?to-pstn,93278388855,1") in new stack
        -- Goto (to-pstn,93278388855,1)
        -- Executing [93278388855@to-pstn:1] Set("SIP/00101100010-00000000", "CDR(hangupdirection)=A") in new stack
        -- Executing [93278388855@to-pstn:2] Gosub("SIP/00101100010-00000000", "CallLimit,s,1(IMSI405140603684903,93278388855)") in new stack
        -- Executing [s@CallLimit:1] GotoIf("SIP/00101100010-00000000", "1?A-IMSI") in new stack
        -- Goto (CallLimit,s,4)
        -- Executing [s@CallLimit:4] ExecIf("SIP/00101100010-00000000", "0?Return()") in new stack
        -- Executing [s@CallLimit:5] Set("SIP/00101100010-00000000", "GROUP(A)=IMSI405140603684903") in new stack
        -- Executing [s@CallLimit:6] GotoIf("SIP/00101100010-00000000", "0?VM") in new stack
        -- Executing [s@CallLimit:7] Return("SIP/00101100010-00000000", "") in new stack
        -- Executing [93278388855@to-pstn:3] Dial("SIP/00101100010-00000000", "SIP/93278388855@,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 [93278388855@to-pstn:4] Set("SIP/00101100010-00000000", "CDR(hangupdirection)=SYSTEM") in new stack
        -- Executing [93278388855@to-pstn:5] GotoIf("SIP/00101100010-00000000", "1?:h-20,1") in new stack
        -- Executing [93278388855@to-pstn:6] Dial("SIP/00101100010-00000000", "SIP/93278388855@goip,3600,g") in new stack
      == Using SIP RTP TOS bits 184
      == Using SIP RTP CoS mark 5
        -- Called SIP/93278388855@goip
        -- 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 [93278388855@to-pstn:7] Set("SIP/00101100010-00000000", "CDR(hangupdirection)=B") in new stack
        -- Executing [93278388855@to-pstn:8] Goto("SIP/00101100010-00000000", "h-16,1") in new stack
        -- Goto (to-pstn,h-16,1)
        -- Executing [h-16@to-pstn:1] Progress("SIP/00101100010-00000000", "") in new stack
        -- Executing [h-16@to-pstn:2] NoOp("SIP/00101100010-00000000", "AST_CAUSE_NORMAL_CLEARING,noanswer") in new stack
        -- Executing [h-16@to-pstn:3] Hangup("SIP/00101100010-00000000", "16") in new stack
      == Spawn extension (to-pstn, h-16, 3) exited non-zero on 'SIP/00101100010-00000000'
        -- Executing [h@to-pstn: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 [h@to-pstn:2] Hangup("SIP/00101100010-00000000", "") in new stack
      == Spawn extension (to-pstn, h, 2) exited non-zero on 'SIP/00101100010-00000000'
    

2 个答案:

答案 0 :(得分:0)

您无法在Mixmoniter命令之前添加Dial,必须在回答或进度()refer

之后将其挂钩
exten=>s,1,NoOp(testingtesting)
exten=>s,2,Dial(SIP/${ARG1},20,M(record))

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

答案 1 :(得分:0)

您可以简单地使用带有m个选项的Monitor()来记录呼叫

exten => S,如图1所示,监视器(WAV,yourfilename,M)

exten => s,2,拨号(您要拨打的SIP /分机)

并检查你的录音,你可以做到 exten => s,1,播放(/var/spool/asterisk/monitor/yourfilename.wav)