In a condition (i.e. not using Set) when you put quotes on one side of the =
sign, then you need to put it on the other side of the = sign as well.
ExecIf("${ARG4}" != ""]?....
I don't know if this is your specific problem, but if you don't fix it,
it will come back and bite you later.
I suspect jumping to "h" is handled by app_dial, so it may not work in
IVRs.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces
at lists.digium.com] On Behalf Of NassimAbedi
Sent: Sunday, December 30, 2012 9:59 AM
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] hangup&timeout option in asterisk 1.8
Hi ,
I have a problem with "h" and "t" option in asterisk 1.8 .
They don't work.
Option "h" and "t" don't work in following macro and in
this macro "DeadAGI" never run ?!
What is problem?!
any idea?
[macro-vt-record]
include => macro-vt-record-custom
exten => s,1,ExecIf(${ARG4} != ""]?SET(TIMEOUT(absolute)=2)) exten
=>
s,n,Set(VTRECORDNAME=/tmp/voiceticket_${CALLERID(num)}-${CUT(UNIQUEID,\.,1)}-${CUT(UNIQUEID,\.,2)})
exten => s,n,Set(RECORDTICKET=)
exten => s,n,Set(ACTION=${ARG1})
exten => s,n,Set(QUEUENUM=${ARG2})
exten => s,n,Set(BEFORERECORDEDTIME=${STRFTIME(${EPOCH}||%Y-%m-%d %H:%M:%S)})
exten => s,n,Record(${VTRECORDNAME}:wav) exten =>
s,n(saveticket),DeadAGI(pp-voiceticket.php,${ACTION},${VTRECORDNAME}.wav,${QUEUENUM},${BEFORERECORDEDTIME})
exten => T,1,Goto(macro-vt-record,s,saveticket)
exten => t,1,Goto(macro-vt-record,s,saveticket)
exten => t,n,Noop(hangup situation is not work yet) exten =>
h,1,Goto(macro-vt-record,s,saveticket)
I saw these log when run this macro and hangup or timeout :
- Executing [s at voiceticket_customer-1:3] Macro("SIP/102-0000009f",
"vt-record,add,0,vt-13-say-q,300,") in new stack
-- Executing [s at macro-vt-record:1] ExecIf("SIP/102-0000009f",
"300 != ""]?SET(TIMEOUT(absolute)=2)") in new stack Channel
will hangup at 2012-12-30 16:54:13.195 IRST.
-- Executing [s at macro-vt-record:2] Set("SIP/102-0000009f",
"VTRECORDNAME=/tmp/voiceticket_102-1356873840-195") in new stack
-- Executing [s at macro-vt-record:3] Set("SIP/102-0000009f",
"RECORDTICKET=") in new stack
-- Executing [s at macro-vt-record:4] Set("SIP/102-0000009f",
"ACTION=add") in new stack
-- Executing [s at macro-vt-record:5] Set("SIP/102-0000009f",
"QUEUENUM=0") in new stack
-- Executing [s at macro-vt-record:6] Set("SIP/102-0000009f",
"BEFORERECORDEDTIME=Sun Dec 30 16:54:11 2012") in new stack
-- Executing [s at macro-vt-record:7] Record("SIP/102-0000009f",
"/tmp/voiceticket_102-1356873840-195:wav") in new stack
-- <SIP/102-0000009f> Playing 'beep.slin' (language
'en')
== Spawn extension (macro-vt-record, s, 7) exited non-zero on
'SIP/102-0000009f' in macro 'vt-record'
== Spawn extension (voiceticket_customer-1, s, 3) exited non-zero on
'SIP/102-0000009f'
Thanks,