Thanks for reply, well actually I&#39;m doing billing after call hangup. If h extension is interupts I&#39;m sending to it to addcdr context which interupts perl script for billing purpose. As I&#39;m listing down below asterisk configuration;<br>
<br><font size="4"><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt;">h =&gt;<br>
    {<br>
        NOOP(&quot;Call Completed with Carrier ${CARRIER}&quot;);<br>
        goto add_cdr|h|1;<br>
    };</span></font></font><br><br><font size="4"><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt;">
context add_cdr<br>{<br>    _X. =&gt;<br>    {<br>        Hangup();<br>    };<br>    h =&gt;<br>    {<br>        Set(CALL_END_TIME=${EPOCH});<br>        //&amp;print_variables();<br>        NOOP(&quot;Call Ended: Card:${CARDNUM} Destination:${CALLEDNUM} Caller-ID:${CALLERID(num)}&quot;);<br>
        if (${DIALEXECUTED}=YES)<br>        {<br>            NOOP(&quot;Dial-Status:${DIALSTATUS}&quot;);<br>        }else<br>        {<br>            NOOP(&quot;Dial was not Executed&quot;);<br>        };<br>        DeadAGI(/vopium/agi/billing.pl);<br>
        NOOP();<br>    };<br><br>};<br><br>Kindly advice me how I pass/translate h extension in FS in this situation i.e. &lt;action application=&quot;api_hangup_hook&quot; data=&quot;addcdr 1&quot;/&gt; or there is other way around???<br>

<hr size="3" width="95%" align="center"><b>From: </b>Michael Collins &lt;<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>&gt;<br>
<b>Reply-To: </b>&lt;<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>&gt;<br>
<b>Date: </b>Thu, 10 Sep 2009 00:55:02 -0700<br>
<b>To: </b>&lt;<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>&gt;<br>
<b>Subject: </b>Re: [Freeswitch-users] Implementing h extension in FS<br>
<br>
<br>
<br>
On Wed, Sep 9, 2009 at 10:16 PM, Ahmed Munir &lt;<a href="mailto:ahmedmunir007@gmail.com" target="_blank">ahmedmunir007@gmail.com</a>&gt; wrote:<br>
</span></font></font><blockquote><font size="4"><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt;">HI,<br>
<br>
I&#39;m newbie in FS, I want to know how to implement h extension of asterisk to FS. As I listed down below;<br>
<br>
h =&gt;<br>
    {<br>
        NOOP(&quot;Call Completed with Carrier ${CARRIER}&quot;);<br>
        goto add_cdr|h|1;<br>
    };<br>
<br>
My other question is, which application/function/class is use in
mod_perl to check the channel status? i.e. busy,
answer,hangup,ringing,etc.<br>
<br>
<br>
Kindly advice me soon.<br>
<br>
-- <br>
Regards,<br>
<font color="#888888"><br>
Ahmed Munir<br>
<br>
</font></span></font></font></blockquote><font size="4"><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size: 11pt;"><br>
It depends on what you are trying to accomplish, but the closest thing
you&#39;ll find in FS to the &#39;h&#39; extension is the channel variable
api_hangup_hook which lets you launch an API at the end of the call. It
sounds like you are working on CDR processing. Please tell us more
about your application and we&#39;ll do our best to offer advice.<br>
-MC</span></font></font><br clear="all"><br>-- <br>Regards,<br><br>Ahmed Munir<br><br><br>