I don’t believe so, the Exten-vm macro is below:
exten => s,1,Macro(user-callerid)
exten => s,2,Set(FROMCONTEXT=exten-vm)
exten => s,3,Macro(record-enable,${ARG2},IN)
exten => s,4,Macro(dial,${RINGTIMER},${DIAL_OPTIONS},${ARG2})
exten => s,5,GotoIf($["${CHANNEL:0:5}" = “Local”]?s-${DIALSTATUS},1) ; if the channel is Local, then do not go to voicemail. This is primarily to avoid vm for call-forwarded extensions in ring groups
exten => s,6,GotoIf($["${ARG1}" = “novm”]?s-${DIALSTATUS},1) ; no voicemail in use for this extension
exten => s,7,NoOp(Sending to Voicemail box ${ARG2})
exten => s,8,Macro(vm,${ARG1},${DIALSTATUS})
exten => s-BUSY,1,NoOp(Extension is reporting BUSY and has no Voicemail)
exten => s-BUSY,2,Busy()
exten => s-BUSY,3,Wait(60)
exten => s-BUSY,4,NoOp()
exten => _s-.,1,Congestion()
It could very well be that because the extension is set to monitor, plus the queue, that it is causing the double, but I would imagine even then at least one of them would work?
I am going to test to see if removing the monitor command on the queue will change the result and will update here if it did or didn’t.
[edit]
Trying it did not change anything. This is what I am seeing in the log in full, from when I answer the extension, to hangup.
Jul 21 14:08:19 DEBUG[2340] chan_sip.c: build_route: Contact hop:
Jul 21 14:08:19 VERBOSE[3041] logger.c: – SIP/200-9fc2 answered Local/200@from-internal-76e6,2
Jul 21 14:08:19 DEBUG[3031] app_queue.c: Dunno what to do with control type -1
Jul 21 14:08:19 VERBOSE[3031] logger.c: – Local/200@from-internal-76e6,1 answered SIP/cclai-8ed9
Jul 21 14:08:19 VERBOSE[3031] logger.c: – Stopped music on hold on SIP/cclai-8ed9
Jul 21 14:08:19 DEBUG[3031] channel.c: Scheduling timer at 0 sample intervals
Jul 21 14:08:19 DEBUG[2327] channel.c: Avoiding initial deadlock for 'Local/200@from-internal-76e6,2’
Jul 21 14:08:19 DEBUG[2327] channel.c: Avoiding initial deadlock for 'Local/200@from-internal-76e6,2’
Jul 21 14:08:19 DEBUG[3031] channel.c: Planning to masquerade channel SIP/cclai-8ed9 into the structure of Local/200@from-internal-76e6,2
Jul 21 14:08:19 DEBUG[3031] channel.c: Done planning to masquerade channel SIP/cclai-8ed9 into the structure of Local/200@from-internal-76e6,2
Jul 21 14:08:19 DEBUG[3031] chan_local.c: Not posting to queue since already masked on 'Local/200@from-internal-76e6,1’
Jul 21 14:08:19 DEBUG[3031] chan_local.c: Not posting to queue since already masked on ‘Local/200@from-internal-76e6,1’
Jul 21 14:08:19 DEBUG[3041] channel.c: Got clone lock for masquerade on ‘SIP/cclai-8ed9’ at 0xa0a21f4
Jul 21 14:08:19 DEBUG[3041] channel.c: Putting channel SIP/cclai-8ed9 in 4/4 formats
Jul 21 14:08:19 DEBUG[3041] channel.c: Released clone lock on ‘Local/200@from-internal-76e6,2’
Jul 21 14:08:19 DEBUG[3041] channel.c: Done Masquerading SIP/cclai-8ed9 (6)
Jul 21 14:08:19 VERBOSE[3041] logger.c: – Attempting native bridge of SIP/cclai-8ed9 and SIP/200-9fc2
Jul 21 14:08:19 DEBUG[3031] channel.c: Didn’t get a frame from channel: Local/200@from-internal-76e6,2
Jul 21 14:08:19 DEBUG[3031] channel.c: Bridge stops bridging channels Local/200@from-internal-76e6,2 and Local/200@from-internal-76e6,1
Jul 21 14:08:19 DEBUG[3031] res_monitor.c: monitor executing ( nice -n 19 soxmix “//var/spool/asterisk/monitor/q850-20060721-140755-1153505272.169-in.gsm” “//var/spool/asterisk/monitor/q850-20060721-140755-1153505272.169-out.gsm” “//var/spool/asterisk/monitor/q850-20060721-140755-1153505272.169.gsm” && rm -f “//var/spool/asterisk/monitor/q850-20060721-140755-1153505272.169-”* ) &
Jul 21 14:08:19 VERBOSE[3031] logger.c: == Spawn extension (ext-queues, 850, 5) exited non-zero on ‘Local/200@from-internal-76e6,2’
Jul 21 14:08:19 DEBUG[2327] channel.c: Avoiding initial deadlock for ‘Local/200@from-internal-76e6,2’
Jul 21 14:08:19 DEBUG[3031] cdr_addon_mysql.c: cdr_mysql: inserting a CDR record.
Jul 21 14:08:19 DEBUG[3031] cdr_addon_mysql.c: cdr_mysql: SQL command as follows: INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid) VALUES (‘2006-07-21 14:07:52’,’“CBC: 3522XXXXXX” <3522XXXXXX>’,‘3522XXXXXX’,‘850’,‘ext-queues’, ‘SIP/cclai-8ed9’,‘Local/200@from-internal-76e6,1’,‘Queue’,‘850|t|||1200’,27,27,‘ANSWERED’,3,’’,‘1153505272.169’)
Jul 21 14:08:19 DEBUG[3031] res_monitor.c: monitor executing ( nice -n 19 soxmix “/var/spool/asterisk/monitor/20060721-140815-1153505295.171-in.WAV” “/var/spool/asterisk/monitor/20060721-140815-1153505295.171-out.WAV” “/var/spool/asterisk/monitor/20060721-140815-1153505295.171.WAV” && rm -f “/var/spool/asterisk/monitor/20060721-140815-1153505295.171-”* ) &
Jul 21 14:08:31 DEBUG[2340] chan_sip.c: Stopping retransmission on ‘2f2e979f68a23a623984ed401164619e@192.168.30.99’ of Request 102: Match Found
Jul 21 14:08:33 DEBUG[2340] chan_sip.c: Auto destroying call '39fc362a3c18c5673be3c77f3e18c76f@127.0.0.1’
Jul 21 14:08:37 DEBUG[3030] manager.c: Manager received command 'Command’
Jul 21 14:08:37 DEBUG[3030] manager.c: Manager received command ‘Command’
Jul 21 14:09:20 DEBUG[3041] channel.c: Didn’t get a frame from channel: SIP/200-9fc2
Jul 21 14:09:20 DEBUG[3041] channel.c: Bridge stops bridging channels SIP/cclai-8ed9 and SIP/200-9fc2
Jul 21 14:09:20 DEBUG[3041] chan_sip.c: update_call_counter(200) - decrement call limit counter
Jul 21 14:09:20 DEBUG[3041] app_dial.c: Exiting with DIALSTATUS=ANSWER.
Jul 21 14:09:20 VERBOSE[3041] logger.c: == Spawn extension (macro-dial, s, 10) exited non-zero on ‘SIP/cclai-8ed9’ in macro ‘dial’
Jul 21 14:09:20 VERBOSE[3041] logger.c: == Spawn extension (macro-dial, s, 10) exited non-zero on ‘SIP/cclai-8ed9’ in macro ‘exten-vm’
Jul 21 14:09:20 VERBOSE[3041] logger.c: == Spawn extension (macro-dial, s, 10) exited non-zero on ‘SIP/cclai-8ed9’
Jul 21 14:09:20 DEBUG[3041] cdr_addon_mysql.c: cdr_mysql: inserting a CDR record.
Jul 21 14:09:20 DEBUG[3041] cdr_addon_mysql.c: cdr_mysql: SQL command as follows: INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid) VALUES (‘2006-07-21 14:08:15’,’“CBC: 3522XXXXXX” <3522XXXXXX>’,‘3522420804’,‘200’,‘from-internal’, ‘Local/200@from-internal-76e6,2’,‘SIP/200-9fc2’,‘Monitor’,‘wav49|20060721-140815-1153505295.171| mX’,65,61,‘ANSWERED’,3,’’,‘1153505295.171’)
Jul 21 14:09:20 DEBUG[3041] chan_sip.c: update_call_counter(cclai) - decrement call limit counter
Jul 21 14:09:20 DEBUG[2340] chan_sip.c: Stopping retransmission on ‘06ac4f2f0dab6f7100f1aea9487b584a@4.79.19.59’ of Request 102: Match Found
[Edit 2]
I thought it was odd that it was joining the in and out wav’s prior to the call being completed, so I did a call out to see the difference. For some reason, Asterisk is calling Monitor to join the files and be completed before the call even starts, whereas my outbound log, Monitor makes the call after the call is hungup, so it seems its terminating early.
This is my log outbound:
Jul 21 14:12:57 DEBUG[2340] chan_sip.c: Checking SIP call limits for device 2200
Jul 21 14:12:57 DEBUG[2340] chan_sip.c: build_route: Contact hop:
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing Macro(“SIP/2200-c486”, “dialout-trunk|2|13522XXXXXX||”) in new stack
Jul 21 14:12:57 DEBUG[3079] pbx.c: Expression result is '1’
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing GotoIf(“SIP/2200-c486”, “1?3:2”) in new stack
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Goto (macro-dialout-trunk,s,3)
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing Macro(“SIP/2200-c486”, “user-callerid”) in new stack
Jul 21 14:12:57 DEBUG[3079] pbx.c: Function result is '2200’
Jul 21 14:12:57 DEBUG[3079] pbx.c: Function result is '2200’
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing Set(“SIP/2200-c486”, “AMPUSER=2200”) in new stack
Jul 21 14:12:57 DEBUG[3079] pbx.c: Function result is '2200’
Jul 21 14:12:57 DEBUG[3079] db.c: Unable to find key ‘2200/emergency_cid’ in family 'DEVICE’
Jul 21 14:12:57 DEBUG[3079] func_db.c: DB: DEVICE/2200/emergency_cid not found in database.
Jul 21 14:12:57 DEBUG[3079] pbx.c: Function result is ''
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing Set(“SIP/2200-c486”, “EMERGENCYCID=”) in new stack
Jul 21 14:12:57 DEBUG[3079] pbx.c: Function result is 'PRV Chxxxxxxxxx Cxxx’
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing Set(“SIP/2200-c486”, “AMPUSERCIDNAME=PRV Chxxxxxxxxx Cxxx”) in new stack
Jul 21 14:12:57 DEBUG[3079] pbx.c: Expression result is '0’
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing GotoIf(“SIP/2200-c486”, “0?6”) in new stack
Jul 21 14:12:57 DEBUG[3079] pbx.c: Not taking any branch
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing Set(“SIP/2200-c486”, “CALLERID(all)=“PRV Chxxxxxxxxx Cxxx” <2200>”) in new stack
Jul 21 14:12:57 DEBUG[3079] pbx.c: Function result is '“PRV Chxxxxxxxxx Cxxx” <2200>'
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing NoOp(“SIP/2200-c486”, “Using CallerID “PRV Chxxxxxxxxx Cxxx” <2200>”) in new stack
Jul 21 14:12:57 DEBUG[3079] pbx.c: Function result is '2200’
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing Macro(“SIP/2200-c486”, “record-enable|2200|OUT”) in new stack
Jul 21 14:12:57 DEBUG[3079] pbx.c: Function result is '0’
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing GotoIf(“SIP/2200-c486”, “0 > 0?2:4”) in new stack
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Goto (macro-record-enable,s,4)
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing AGI(“SIP/2200-c486”, “recordingcheck|20060721-141257|1153505577.173”) in new stack
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
Jul 21 14:12:57 VERBOSE[3079] logger.c: recordingcheck|20060721-141257|1153505577.173: Outbound recording enabled.
Jul 21 14:12:57 VERBOSE[3079] logger.c: recordingcheck|20060721-141257|1153505577.173: CALLFILENAME=OUT2200-20060721-141257-1153505577.173
Jul 21 14:12:57 VERBOSE[3079] logger.c: – AGI Script recordingcheck completed, returning 0
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing Monitor(“SIP/2200-c486”, “wav49|OUT2200-20060721-141257-1153505577.173| mb”) in new stack
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing Macro(“SIP/2200-c486”, “outbound-callerid|2”) in new stack
Jul 21 14:12:57 DEBUG[3079] pbx.c: Function result is '2200’
Jul 21 14:12:57 DEBUG[3079] pbx.c: Function result is ''
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing Set(“SIP/2200-c486”, “USEROUTCID=”) in new stack
Jul 21 14:12:57 DEBUG[3079] pbx.c: Expression result is '1’
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing GotoIf(“SIP/2200-c486”, “1?4”) in new stack
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Goto (macro-outbound-callerid,s,4)
Jul 21 14:12:57 DEBUG[3079] pbx.c: Expression result is '1’
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing GotoIf(“SIP/2200-c486”, “1?6”) in new stack
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Goto (macro-outbound-callerid,s,6)
Jul 21 14:12:57 DEBUG[3079] pbx.c: Expression result is '1’
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing GotoIf(“SIP/2200-c486”, “1?8”) in new stack
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Goto (macro-outbound-callerid,s,8)
Jul 21 14:12:57 DEBUG[3079] pbx.c: Function result is '“PRV Chxxxxxxxxx Cxxx” <2200>'
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing NoOp(“SIP/2200-c486”, “CallerID set to “PRV Chxxxxxxxxx Cxxx” <2200>”) in new stack
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing Set(“SIP/2200-c486”, “GROUP()=OUT_2”) in new stack
Jul 21 14:12:57 DEBUG[3079] pbx.c: Function result is '1’
Jul 21 14:12:57 WARNING[3079] ast_expr2.fl: ast_yyerror(): syntax error: syntax error, unexpected $end, expecting TOK_MINUS or TOK_COMPL or TOK_LP or TOKEN; Input:
1 >
^
Jul 21 14:12:57 WARNING[3079] ast_expr2.fl: If you have questions, please refer to doc/README.variables in the asterisk source.
Jul 21 14:12:57 DEBUG[3079] pbx.c: Expression result is '0’
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing GotoIf(“SIP/2200-c486”, “0?108”) in new stack
Jul 21 14:12:57 DEBUG[3079] pbx.c: Not taking any branch
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing Set(“SIP/2200-c486”, “DIAL_NUMBER=13522XXXXXX”) in new stack
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing Set(“SIP/2200-c486”, “DIAL_TRUNK=2”) in new stack
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing AGI(“SIP/2200-c486”, “fixlocalprefix”) in new stack
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
Jul 21 14:12:57 VERBOSE[3079] logger.c: fixlocalprefix: Could not parse /etc/asterisk/localprefixes.conf
Jul 21 14:12:57 VERBOSE[3079] logger.c: – AGI Script fixlocalprefix completed, returning 0
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing Set(“SIP/2200-c486”, “OUTNUM=13522XXXXXX”) in new stack
Jul 21 14:12:57 DEBUG[3079] pbx.c: Function result is 'SIP/TelaSIP’
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing Set(“SIP/2200-c486”, “custom=SIP/TelaSIP”) in new stack
Jul 21 14:12:57 DEBUG[3079] pbx.c: Expression result is ‘0’
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing GotoIf(“SIP/2200-c486”, “0?16”) in new stack
Jul 21 14:12:57 DEBUG[3079] pbx.c: Not taking any branch
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Executing Dial(“SIP/2200-c486”, “SIP/TelaSIP/13522XXXXXX|120|W”) in new stack
Jul 21 14:12:57 DEBUG[3079] chan_sip.c: Setting NAT on RTP to 0
Jul 21 14:12:57 DEBUG[3079] chan_sip.c: Outgoing Call for 13522XXXXXX
Jul 21 14:12:57 VERBOSE[3079] logger.c: – Called TelaSIP/13522XXXXXX
Jul 21 14:12:58 DEBUG[2340] chan_sip.c: Acked pending invite 102
Jul 21 14:12:58 DEBUG[2340] chan_sip.c: Stopping retransmission on ‘010ce12369747bc85b14796458db9dd4@192.168.30.99’ of Request 102: Match Found
Jul 21 14:12:58 DEBUG[2340] chan_sip.c: (Provisional) Stopping retransmission (but retaining packet) on ‘010ce12369747bc85b14796458db9dd4@192.168.30.99’ Request 103: Found
Jul 21 14:13:02 DEBUG[2340] chan_sip.c: (Provisional) Stopping retransmission (but retaining packet) on ‘010ce12369747bc85b14796458db9dd4@192.168.30.99’ Request 103: Found
Jul 21 14:13:02 VERBOSE[3079] logger.c: – SIP/TelaSIP-fe67 is making progress passing it to SIP/2200-c486
Jul 21 14:13:10 DEBUG[2340] chan_sip.c: Acked pending invite 103
Jul 21 14:13:10 DEBUG[2340] chan_sip.c: Stopping retransmission on ‘010ce12369747bc85b14796458db9dd4@192.168.30.99’ of Request 103: Match Found
Jul 21 14:13:10 DEBUG[2340] chan_sip.c: build_route: Contact hop:
Jul 21 14:13:10 VERBOSE[3079] logger.c: – SIP/TelaSIP-fe67 answered SIP/2200-c486
Jul 21 14:13:10 DEBUG[2340] chan_sip.c: Stopping retransmission on ‘0011bb30-b75f0047-1819d754-0d9363a1@192.168.30.200’ of Response 102: Match Found
Jul 21 14:13:11 DEBUG[2340] chan_sip.c: Stopping retransmission on ‘010ce12369747bc85b14796458db9dd4@192.168.30.99’ of Response 102: Match Found
Jul 21 14:13:16 DEBUG[2340] chan_sip.c: Scheduled a registration timeout for gw4.telasip.com id #178570
Jul 21 14:13:17 DEBUG[2340] chan_sip.c: (Provisional) Stopping retransmission (but retaining packet) on ‘39fc362a3c18c5673be3c77f3e18c76f@127.0.0.1’ Request 112: Found
Jul 21 14:13:17 DEBUG[2340] chan_sip.c: Stopping retransmission on ‘39fc362a3c18c5673be3c77f3e18c76f@127.0.0.1’ of Request 112: Match Found
Jul 21 14:13:17 DEBUG[2340] chan_sip.c: (Provisional) Stopping retransmission (but retaining packet) on ‘39fc362a3c18c5673be3c77f3e18c76f@127.0.0.1’ Request 113: Found
Jul 21 14:13:17 DEBUG[2340] chan_sip.c: Stopping retransmission on ‘39fc362a3c18c5673be3c77f3e18c76f@127.0.0.1’ of Request 113: Match Found
Jul 21 14:13:17 DEBUG[2340] chan_sip.c: Registration successful
Jul 21 14:13:17 DEBUG[2340] chan_sip.c: Cancelling timeout 178570
Jul 21 14:13:31 DEBUG[2340] chan_sip.c: Stopping retransmission on ‘17a6e7db347b91be3c03a5ec74cc8ad3@192.168.30.99’ of Request 102: Match Found
Jul 21 14:13:49 DEBUG[2340] chan_sip.c: Auto destroying call ‘39fc362a3c18c5673be3c77f3e18c76f@127.0.0.1’
Jul 21 14:13:52 DEBUG[3079] channel.c: Didn’t get a frame from channel: SIP/2200-c486
Jul 21 14:13:52 DEBUG[3079] channel.c: Bridge stops bridging channels SIP/2200-c486 and SIP/TelaSIP-fe67
Jul 21 14:13:52 DEBUG[3079] chan_sip.c: update_call_counter(13522XXXXXX) - decrement call limit counter
Jul 21 14:13:52 DEBUG[3079] app_dial.c: Exiting with DIALSTATUS=ANSWER.
Jul 21 14:13:52 VERBOSE[3079] logger.c: == Spawn extension (macro-dialout-trunk, s, 14) exited non-zero on ‘SIP/2200-c486’ in macro ‘dialout-trunk’
Jul 21 14:13:52 VERBOSE[3079] logger.c: == Spawn extension (macro-dialout-trunk, s, 14) exited non-zero on ‘SIP/2200-c486’
Jul 21 14:13:52 DEBUG[3079] cdr_addon_mysql.c: cdr_mysql: inserting a CDR record.
Jul 21 14:13:52 DEBUG[3079] cdr_addon_mysql.c: cdr_mysql: SQL command as follows: INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid) VALUES (‘2006-07-21 14:12:57’,’“PRV Chxxxxxxxxx Cxxx” <2200>’,‘2200’,‘513522XXXXXX’,‘from-internal’, ‘SIP/2200-c486’,‘SIP/TelaSIP-fe67’,‘Monitor’,‘wav49|OUT2200-20060721-141257-1153505577.173| mX’,55,42,‘ANSWERED’,3,’’,‘1153505577.173’)
Jul 21 14:13:52 DEBUG[3079] chan_sip.c: update_call_counter(2200) - decrement call limit counter
Jul 21 14:13:52 DEBUG[3079] res_monitor.c: monitor executing ( nice -n 19 soxmix “/var/spool/asterisk/monitor/OUT2200-20060721-141257-1153505577.173-in.WAV” “/var/spool/asterisk/monitor/OUT2200-20060721-141257-1153505577.173-out.WAV” “/var/spool/asterisk/monitor/OUT2200-20060721-141257-1153505577.173.WAV” && rm -f “/var/spool/asterisk/monitor/OUT2200-20060721-141257-1153505577.173-”* ) &
Jul 21 14:13:52 DEBUG[2340] chan_sip.c: Stopping retransmission on ‘010ce12369747bc85b14796458db9dd4@192.168.30.99’ of Request 104: Match Found