Discussion:
[asterisk-users] The 'h' extension problem
Rizwan Hisham
2007-05-09 13:37:30 UTC
Permalink
Hi all,
There is a problem with my dialplan. here is the dialplan:

exten=> 123,1,Dial(SIP/U1,,Ttg)
exten=> 123,2,Hangup

exten=> h,1,AGI(onhangup.pl)

The problem is whenever U1 is called or calls someone, if U1 hangsup the
call then the h extension is NOT executed. but if the other person hangsup
the call, then the h extension is executed (assuming that the other person
is calling from out of our asterisk system). I understand if U1 hangsup then
there is no channel to execute h extension, but is it possible to execute
the h exten even then.

i want the h extension to excute everytime. how can i do this. i have used
the g flag in dial which tell asterisk to execute remaining extensions even
after hangup but its not doing in the above described case.
--
Rizwan Hisham
Software Engineer
AXVOICE Inc.
Eric "ManxPower" Wieling
2007-05-09 14:14:11 UTC
Permalink
exten => 123,1,Dial(SIP/U1,,Ttg)
exten => 123,2,AGI(onhangup.pl)
exten => 123,3,Hangup
exten => h,1,DeadAGI(onhangup.pl)
Rafael Rodrigo - NSI
2007-05-09 15:21:39 UTC
Permalink
Please try this,

exten=> 123,1,Dial(SIP/U1,,Tt)
exten=> 123,2,Hangup
exten=> h,1,DEADAGI(onhangup.pl)

ok? ;)

Rafael Rodrigo M. Rosa.
www.megavoz.com.br <http://www.megavoz.com.br/> (Voip e Telemarketing)
www.nsinet.com.br <http://www.nsinet.com.br/> (Serviços Internet)

<http://www.megavoz.com.br/>
Post by Rizwan Hisham
Hi all,
exten=> 123,1,Dial(SIP/U1,,Ttg)
exten=> 123,2,Hangup
exten=> h,1,AGI(onhangup.pl)
The problem is whenever U1 is called or calls someone, if U1 hangsup
the call then the h extension is NOT executed. but if the other person
hangsup the call, then the h extension is executed (assuming that the
other person is calling from out of our asterisk system). I understand
if U1 hangsup then there is no channel to execute h extension, but is
it possible to execute the h exten even then.
i want the h extension to excute everytime. how can i do this. i have
used the g flag in dial which tell asterisk to execute remaining
extensions even after hangup but its not doing in the above described
case.
--
Rizwan Hisham
Software Engineer
AXVOICE Inc.
------------------------------------------------------------------------
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Stephen Bosch
2007-05-10 00:11:41 UTC
Permalink
Post by Rizwan Hisham
Hi all,
exten=> 123,1,Dial(SIP/U1,,Ttg)
exten=> 123,2,Hangup
exten=> h,1,AGI(onhangup.pl)
The problem is whenever U1 is called or calls someone, if U1 hangsup
the call then the h extension is NOT executed. but if the other person
hangsup the call, then the h extension is executed (assuming that the
other person is calling from out of our asterisk system). I understand
if U1 hangsup then there is no channel to execute h extension, but is it
possible to execute the h exten even then.
You cannot use AGI() on an inactive channel. Use DeadAGI() instead.

-Stephen-

Loading...