|Summary:||ASTERISK-07762: TIMEOUT() is not working|
|Reporter:||Hala El Khoury (hala)||Labels:|
|Date Opened:||2006-09-18 08:39:40||Date Closed:||2011-06-07 14:03:07|
|Environment:||Attachments:||( 0) debug_file|
( 1) debug_file_2
|Description:||i'm working on a prepaid applications using SIP.conf. i'm trying to terminate the call after n seconds using the Dial command but the call is being terminated always after n+x seconds where x varies .. |
i tried to use the Set(TIMEOUT(absolute)=n) but still facing the same prob.
at first i though this is caused by the .php file i was using but i did the tests directly from the extensions.conf and still facing the prob
this is very crucial for the prepaid.
|Comments:||By: Hala El Khoury (hala) 2006-09-18 10:24:55|
in fact it turned out that the application is terminating the call but the duration of the call is 2*x -1 sec
for example if the call is supposed to last for 60 sec it's being terminated after 119 sec.
i'm using the Dial(SIP/mysip/calledid|30|HL(duration in msec))
By: Serge Vecher (serge-v) 2006-09-18 10:42:45
1. Are you doing any modifications to the Asterisk sources?
2. Enable debug logging for console in logger.conf, enable debugging, analyze the output and post the debug output along with your analysis here.
By: Joshua C. Colp (jcolp) 2006-09-18 10:45:21
I just tested both TIMEOUT(absolute) usage and the L option to Dial. I used 60 as the parameter for absolute, and 60000 for the parameter to the L option. Both worked as described. Any other hints you can give?
By: Hala El Khoury (hala) 2006-09-19 02:52:16
no i didn't change asterisk sources. In fact i'm new to asterisk.
i attached a debug file showing a call i did to 9618997010.
as you will notice the a2billing ( prepaid application) shows that the call last 1 min as it should but the softswitch i use to terminate the call on my spx is showing 119 sec in fact i did the tests also without the prepaid application directly from the extensions.conf and using counterpath eyebeem and the soft phone also shows that duration = 2 * x - 1 sec. same test with my cel phone. so it seems that the duration that shows in asterisk is (real callduration in sec /2 )+ 1.i don't know if there is any clock frequence that i should set? i attached the debug file above and
below the portion of the dialplan that was used during the test for i did:
include => international
include => a2billing
exten => 101,1,Dial(SIP/8991007|15|HL(56000))
; CallingCard application
exten => _X.,1,Answer
exten => _X.,2,Wait,2
exten => _X.,3,DeadAGI,a2billing.php
exten => _X.,4,Wait,2
exten => _X.,5,Hangup
By: Hala El Khoury (hala) 2006-09-19 02:54:06
PS: i' installed asterisk 18.104.22.168 on Fedora core 4
By: Joshua C. Colp (jcolp) 2006-09-19 11:38:00
You have me thoroughly confused, can you try to understand this vechers?
By: Serge Vecher (serge-v) 2006-09-19 12:58:21
shows us a log of a call being placed through the Dial() command -- note, I've asked for a log from the console and you've included it from the debug file -- with a timeout set at 60 sec and in reality timing out at 119 sec.
By: Hala El Khoury (hala) 2006-09-20 01:45:29
i included a log from the cli after activating the debug in the logger.conf
in fact our tests showed that the problem isn't at the level of the timeout but at the level of the call duration calculation : even if i hung up the phone after 10 sec ( as per my softphone or my cel phone or whatever ) asterisk shows in its cdrs that the call lased 6 sec . i attached the output from the cli for two calls sent with the Dial command. the first one has been terminated by asterisk after 60 sec as per asterisk records but in fact it was 119 sec . the second one was terminated by the called person after 10 sec but asterisk showed 6 sec. do you think there is anything ishould set in the clock . i'm using fedora core 4 installed under vmware and i have two similar installations and we are facing the same prob on both
By: Hala El Khoury (hala) 2006-09-20 02:20:53
sorry i think the problem is caused by Fedora's clock not astersik. i will try to fix it and see if this will solve the problem.
i'm sorry i'v bothered you .
Thanks for your help
By: Tristan Mahe (tristan_mahe) 2006-09-20 05:14:44
Hi, I'm facing this too on FC5 sometimes, with an absolute timeout of 1800s, I get some calls that last more ...
As this is not happening so much, It is difficult to trace where's the problem,
I'll try anyway to catch the situation that makes this happens...
By: Anthony LaMantia (alamantia) 2006-09-29 17:43:00
i am having some trouble reproducing this problem on my test platform, also from what i can see in the debug file's that you posted a few of the calls once they are picked up last 60seconds according to the time stamps... but i could be reading your logs wrong...
Sep 19 08:18:47 DEBUG: chan_sip.c:6152 build_route: build_route: Contact hop: <sip:email@example.com:5060;transport=udp>
-- SIP/xxx.xxx.xxx.xxx-08a62418 answered SIP/8991007-08a58fb8
-- Attempting native bridge of SIP/8991007-08a58fb8 and SIP/xxx.xxx.xxx.xxx-08a62418
Sep 19 08:19:47 DEBUG: channel.c:1373 ast_hangup: Hanging up channel 'SIP/xxx.xxx.xxx.xxx-08a62418'
By: Tilghman Lesher (tilghman) 2006-09-29 20:00:16
Neither of your debugs actually set the TIMEOUT() value to anything. Are you sure you're actually running that command?
By: Hala El Khoury (hala) 2006-09-30 03:57:23
As i specified in my previous ontes. the problem was caused by Fedora's clock . the clock wasn't synchronizing because it was installed under vmware. now it's working fine.
i don't know how to close the bug.
thanks for your help and sorry for the inconvenience