Hello every one,
Did any of you encounter the following problem? and how did you solve it?
In my a2billing.conf, I have the following setting
Code:
; this is the number of seconds to wait before initiating the call back.
sec_wait_before_callback=5
But I have noticed that the "5 seconds wait" is being done directly in the DEADAGI script a2billing.php using the php function
sleep().
Code:
sleep($A2B -> config["callback"]['sec_wait_before_callback']);
The a2billing.php script will only hangup the phone line sometime after having done the sleep() thing. This causes the line to stay engaged for the delay specified in "sec_wait_before_callback" and it causes the callback to be made right after the termination of the script (because the delay has been already applied before hanging up).
As a result, many of my users end up receiving the callback on the second line (call waiting). That is, if they do have the call waiting feature on their phone. Otherwise, the call will end up in the voice mail.
I was trying to see if the Asterisk Manager Command "Originate" has a parameter that will allow to postpone the origination, but there doesn't seem to be any. I am writing a code that will create a call file instead. Then, by modifying the creation date of the call file and make it look like it's been created in the future, asterisk we wait before processing the call file. I believe that this will allow the a2billing.php script to hang up and finish its execution long before the 5 seconds delay expires.
Does that make any sense, or do I just need some additional settings?