title: Asterisk call recording not showing any logs and file
body: <p>I am trying to record calls using Asterisk (Version 11.7.0.5) but it is not working. I have done the following steps but no logs are visible on console (Debug and verbose level 5)</p>
  
  <ol>
  <li>Added goip and users in sip.conf</li>
  <li>Using MixMonitor to record calls</li>
  <li>Changing permission of /var/spool/asterisk/monitor/</li>
  </ol>
  
  <p>My sip.conf config is</p>
  
  <pre><code>[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
  </code></pre>
  
  <p>And extensions.conf is</p>
  
  <pre><code>[macro-dialGSM]
  exten=&gt;s,1,Dial(SIP/${ARG1},20,M(record))
  exten=&gt;s,2,Goto(s-${DIALSTATUS},1})
  exten=&gt;s-CANCEL,1,Hangup
  exten=&gt;s-NOANSWER,1,Hangup
  exten=&gt;s-BUSY,1,Busy(30)
  exten=&gt;s-CONGESTION,1,Congestion(30)
  exten=&gt;s-CHANUNAVAIL,1,playback(ss-noservice)
  exten=&gt;s-CANCEL,1,Hangup
  
  [goip_context]
  exten=&gt;_93.,1,Macro(dialGSM,goip@192.168.10.6:5062)
  
  [macro-record]
  exten=&gt;s,1,MixMonitor(testrecording.wav)
  </code></pre>
  
  <p>The logs are as under.</p>
  
  <pre><code>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
         &gt; 0x7f216001f550 -- Probation passed - setting RTP source address to 192.168.10.6:16384
      -- SIP/goip-00000001 answered SIP/00101100010-00000000
         &gt; 0x7f2178014760 -- Probation passed - setting RTP source address to 127.0.0.1:16562
         &gt; 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'
  </code></pre>