[asterisk-dev] capture the time before Answer of call in dialplan

Muteesa Fred fred.muteesa at infocom.ug
Tue May 19 02:04:37 CDT 2015


Thanks Kaloyan,

I have tried the M() option and passing ${EPOCH}, it captured the start time
and answered time.
This is exactly what I want. 
My problem is that the hangup in the macro is not effective. When I test
that a call has been answered below 5 seconds, I run hangup(), even
macroexit() but the call continues until the other party hangsup.

Thanks and regards,
Fred

-----Original Message-----
From: asterisk-dev-bounces at lists.digium.com
[mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of Kaloyan Kovachev
Sent: Friday, May 15, 2015 12:48 PM
To: asterisk-dev at lists.digium.com
Subject: Re: [asterisk-dev] capture the time before Answer of call in
dialplan

Hello,
this can be done in dialplan without additional codding (and actually user
mailing list question).
Check the U() and M() options of the Dial command and pass ${EPOCH} as an
argument

On 2015-05-15 07:54, Muteesa Fred wrote:
> Hello Everyone,
> 
> I apologise this might look like a user mailing list question but it's 
> more of a developers question. I think this is the only forum that can 
> help me.
> 
> I have spent a week trying to achieve this. I realize I might have to 
> write a C or PERL extension to achieve it but I don't know where to 
> start. Or might need to rebuild the dial funtion.
> Objective:
> I want to dial a number in asterisk via a sip-trunk, and when the 
> other party answers the call, I want to test if the call was answered 
> before
> 5
> seconds, or after 5 seconds.
> If it was answered in less than 5 seconds I want to cancel the call, 
> otherwise the call should continue.
> 
> Your guidance will highly be appreciated.
> 
> Regards,
> Fred Muteesa

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev





More information about the asterisk-dev mailing list