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

Asterisk 星号呼叫记录不显示任何日志和文件,asterisk,audio-recording,sip-server,Asterisk,Audio Recording,Sip Server,我正在尝试使用Asterisk(版本11.7.0.5)录制通话,但它不起作用。我已经完成了以下步骤,但控制台上没有可见的日志(调试和详细级别5) 在sip.conf中添加了goip和用户 使用MixMonitor记录呼叫 更改/var/spool/asterisk/monitor的权限/ 我的sip.conf配置是 [IMSI4051XXXXXXXXXXXX] callerid=21005 username=user3 canreinvite=no type=friend context=sip

我正在尝试使用Asterisk(版本11.7.0.5)录制通话,但它不起作用。我已经完成了以下步骤,但控制台上没有可见的日志(调试和详细级别5)

  • 在sip.conf中添加了goip和用户
  • 使用MixMonitor记录呼叫
  • 更改/var/spool/asterisk/monitor的权限/
  • 我的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'
    

    您不能在
    拨号
    命令之前添加
    混合监视器
    ,它必须在应答或进度()后挂接

    您可以简单地使用Monitor()和m选项来记录调用

    extn=>s,1,监视器(wav,您的文件名,m)

    扩展=>s,2,拨号(您要拨号的SIP/扩展)

    要查看您的录音,您只需执行以下操作
    extn=>s,1,播放(/var/spool/asterisk/monitor/yourfilename.wav)

    您使用的是什么CDR后端?我的坏了,不久前在一个测试箱v.13,但我从来没有时间来研究为什么。它不工作。日志中未显示任何与Mixmonitor相关的内容。甚至没有测试我在NoOp中指定的测试。任何对星号框的调用都将查找sip.conf,然后匹配extensions.conf的
    context
    。因此,根据您的代码,仅当呼叫路由到
    goip_上下文时
    它将到达您的
    宏拨号GSM
    。我猜不出更多,因为您还没有粘贴完整的日志。我已经用新的配置和日志相应地更新了问题。请检查并帮助我:)问题解决了。除了在正确的位置添加配置,我做的一切都是正确的。:/我把它添加到另一个上下文中。可怜的我:你想出来的家伙:)
    exten=>s,1,NoOp(testingtesting)
    exten=>s,2,Dial(SIP/${ARG1},20,M(record))
    
    [macro-record]
    exten => s,1,MixMonitor(testrecording.wav)