[asterisk-users] Dial() application 'g' option

Geoff Lane geoff at gjctech.co.uk
Sat Feb 21 20:09:52 CST 2009


On Saturday, February 21, 2009, Philipp Kempgen wrote:

> To be quite precise the documentation says
> ---cut---
>    g    -  Proceed with dialplan execution at the current extension if the
>            destination channel hangs up.
> ---cut---
> So I would not expect the g option to have any effect if the
> *source* channel hangs up.

> I guess you should do any kind of logging or post-hangup calculations
> in the h extension.

Thanks. I did wonder about that but carried out some experiments that
suggested it didn't matter which channel hung up first. I have two SIP
geographical numbers with different providers and I tried ringing one
from the other and got the same result no matter which handset I hung
up first.

Unfortunately, by the time the call gets to the h extension, the
original dialled number in ${EXTEN} is changed to "h" - so I won't be
able to carry out the desired logging there. Also, I suspect that
${DIALEDTIME} and ${ANSWEREDTIME} might be lost. That said, I'm only
interested in recording the accumulated time for outgoing calls via
one SIP trunk, so if I can tie that down with a channel name...

Some further experimentation is in order!

Thanks again,

-- 
Geoff




More information about the asterisk-users mailing list