Hangup&timeout Option In Asterisk 1.8

Home » Asterisk Users » Hangup&timeout Option In Asterisk 1.8
Asterisk Users 1 Comment

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@voiceticket_customer-1:3] Macro(“SIP/102-0000009f”,
“vt-record,add,0,vt-13-say-q,300,”) in new stack
— Executing [s@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@macro-vt-record:2] Set(“SIP/102-0000009f”,
“VTRECORDNAME=/tmp/voiceticket_102-1356873840-195”) in new stack
— Executing [s@macro-vt-record:3] Set(“SIP/102-0000009f”,
“RECORDTICKET=”) in new stack
— Executing [s@macro-vt-record:4] Set(“SIP/102-0000009f”,
“ACTION

One thought on - Hangup&timeout Option In Asterisk 1.8

  • 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—