Timeout

Good Day all,

I am trying to create DID callback using PERL agi. all setting is working fine just i am facing small issue,

How i can disconnect the DID call immediately once it hit the particulars extentions?

Here is what i used but it is not disconnecting in 2 sec.

[callback-ext]
exten => _x.,1,Set(TIMEOUT(absolute)=2)
exten => _x.,2,Set(QUEUE_PRIO=10)
exten => _x.,3,Set(CID=${CALLERIDNUM})
exten => _x.,4,Set(SRC=${CALLERIDNUM})
exten => _x.,5,system(/var/lib/asterisk/agi-bin/callback.pl ${CALLERIDNUM})
exten => h,6,Hangup

I will be appreciate for your suggestions.

Thank You
Abdul

exten => _x.,6,Hangup

Is there a reason you are using SYSTEM() instead of AGI()? You could also hangup the channel from within AGI.

Hi,

I am not using AGI becuase i was unable to erite .call file. But from system i can do normal perl script to creat .call file.

Thank You

hi,

I did the following but still DID is not disconnecting immediately.

[callback-ext]
exten => _x.,1,Set(TIMEOUT(absolute)=3)
exten => _x.,2,Set(QUEUE_PRIO=10)
exten => _x.,3,Set(CID=${CALLERIDNUM})
exten => _x.,4,Set(SRC=${CALLERIDNUM})
exten => _x.,5,system(/var/lib/asterisk/agi-bin/callback.pl ${CALLERIDNUM})
exten => _x.,6,Hangup

Any suggestion pleaseā€¦?

Not disconnecting on which side, the asterisk side, or the far end? On the asterisk side, it should disconnect immediately after hitting the hangup(). The far end depends on how it is connected as to how fast their end detects the disconnect. Might I suggest if you are doing some sort of callback and need it to work this way, changing the dialplan to this:

[code][callback-ext]
exten => _x.,1,Set(TIMEOUT(absolute)=3)
exten => _x.,n,Set(QUEUE_PRIO=10)
exten => _x.,n,Set(CID=${CALLERIDNUM})
exten => _x.,n,Set(SRC=${CALLERIDNUM})
exten => _x.,n,Hangup

exten => h,1,Wait(5); #Wait 5 Seconds for far end disconnect
exten => h,n,system(/var/lib/asterisk/agi-bin/callback.pl ${CALLERIDNUM})
[/code]