Hello sir
i set the TIMEOUT(absolute) in my AGI . i generate the call form asterisk and i play music after the given time out its not hang up can any one give me any idea why ?
also i can generate more then one call from cli mode via agi
Hello sir
i set the TIMEOUT(absolute) in my AGI . i generate the call form asterisk and i play music after the given time out its not hang up can any one give me any idea why ?
also i can generate more then one call from cli mode via agi
Can you show console output that confirms your AGI set this? As well is your AGI properly handling a hangup in that case?
Hi, I hope you are well.
I set the variable value but not working as below:
$agi->set_variable(“TIMEOUT(absolute)”, 30);
CLI display the hanguptime but not working.
Please see the image:
N.B. I have played the “/var/lib/asterisk/moh/macroform-cold_day” file after answering the call. The call is not being hanged up until the file played.
Please help.
Thanks.
It seems you re using phpagi class , wrong way to set the timeout using this class
$agi is an object of phpagi class. Object can be called anytime to use the class.
What He is trying to say is that you are using the wrong command, try with EXEC
Hi,
I hope you are well.
I am using the command:
originate Local/number@from-sip extension @from-sip
Call generate with no problem.
But $agi->set_variable(“TIMEOUT(absolute)”, 30); is not working
Though $agi->set_variable(“ERROR”, 123); is working fine.
Please help me.
Thanks.
The correct syntax is SET VARIABLE <* variablename* > <* value *> , so you should provide a variable name TIMEOUT(absolute) it is a function not a variable. There are others method to set the timeout using this class like exec_absolutetimeout () or use
set_autohangup ()
Cause the channel to automatically hangup at $time seconds in the future.
Whilst I’m not certain that this is the case for AGI, in most cases Asterisk actually uses the same, low level, code as the Set application, so will happily accept an LV context function call where it would accept the name of a variable.
Is it possible that the class library doesn’t like the parentheses?
(LV = left value, and indicates something that can be on the left of an assignment.)
inside the set_variable function, the syntax is “SET VARIABLE <* variablename* > <* value *>” as you have written.
set_variable is a PHP function created by PHPAGI.
So, on a marginal edge, I can say:
The command “SET VARIABLE TIMEOUT(absolute) 30” is not working.
Please help.
Thanks.
Have you try one of the above ?
I have used this function: CLI shows:
WARNING[1603]: res_agi.c:2503 handle_exec: Could not find application (AbsoluteTimeout)
Show your agi code please.
$dialStr = “IAX2/” . $rtip[‘mac’] . ‘/’ . $number;
$dialRoute = $number . ‘@’ . $rtip[‘ip’] . ‘:’ . $rtip[‘port’];
$agi = new AGI();
$agi->set_variable(“CALLID”, $callid);
$agi->set_variable(“DIALSTR”, $dialStr);
$agi->set_variable(“ROUTE”, $dialRoute);
$agi->exec_absolutetimeout($maxduration);
$agi->verbose("\033[32m Dial Pattern:" . $dialStr . “. \033[0m”);
$agi->verbose("\033[32m Dial Route:" . $dialRoute . “. \033[0m”);
$agi->verbose("\033[32m Authentication: Access Granted. \033[0m");
It seems to be fine, make sure the $maxduration value is set
http://phpagi.sourceforge.net/phpagi2/docs/phpAGI/AGI.html#exec_absolutetimeout
Hi,
I hope you are well.
I have tried $agi->exec_absolutetimeout($maxduration); by several values directly without variable like
$agi->exec_absolutetimeout(30); or
$agi->exec_absolutetimeout(45); or
$agi->exec_absolutetimeout(60); etc.
But all attempts are failed.
Please help me the actual reason to fail.
Thanks.
Dear ambiorixg Sir,
we got same issue asterisk don’t have released calls after 30 min .asterisk version-Asterisk 11.5.0
find below details of my asterisk configuration-
exten => _X.,n,Set(TIMEOUT(absolute)=1800)
kindly help to resolve this issue
Please show this line in context, including everything between it and Dial.
Also please do not address questions to individual volunteers.
Upgrade Asterisk and and we talk about your issue, that version is not longer supported