<div dir="ltr"><div><br></div>Oh yes that will be more suitable but will still need to do it via AMI <div><div><br clear="all"><div dir="ltr">Regards,<br>Zohair Raza<div><br></div><div><br></div></div><div class="gmail_quote">
On Wed, Jan 18, 2012 at 11:35 AM, virendra bhati <span dir="ltr"><<a href="mailto:virbhati@gmail.com">virbhati@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Batter is used DB to store intime of call then when ever currect used time is required then deduct from intime - current time.<div><div class="h5"><br><br><div class="gmail_quote">On Wed, Jan 18, 2012 at 1:01 PM, Zohair Raza <span dir="ltr"><<a href="mailto:engineerzuhairraza@gmail.com" target="_blank">engineerzuhairraza@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, <div><br></div><div>I understand this, but I think there isn't any option that helps us to reduce cost while call is in progress. <div>
<br></div><div>One option that I was thinking is to check elapsed time by "core show channel channel-id" and deduct the amount but we need to check it every second or x seconds via AMI.<br clear="all">
<div dir="ltr"><br></div><div dir="ltr">Regards,<br><font color="#888888">Zohair Raza<div></div></font></div><div><div></div><div>
<div><br></div><br><br><div class="gmail_quote">On Wed, Jan 18, 2012 at 9:35 AM, virendra bhati <span dir="ltr"><<a href="mailto:virbhati@gmail.com" target="_blank">virbhati@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Zohair,<br><br>By using only asterisk it's not possible. So used progremming languages and do realtime billing at your ends. <br><br>like 1st caller will take complete amount ($5) and if 2nd call will come then deduct used amount and share remaining amount to others like that.<br>
<br><div class="gmail_quote"><div><div>On Tue, Jan 17, 2012 at 9:54 PM, Zohair Raza <span dir="ltr"><<a href="mailto:engineerzuhairraza@gmail.com" target="_blank">engineerzuhairraza@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
<div dir="ltr">Hi All, <div><br></div><div>I am writing a billing engine in AGI. My scenario is :</div><div><br></div><div>One customer can have simultaneous calls and I need to hang up one customer's all call when balance reaches 0</div>
<div><br></div><div>If I set limit for each call using 'L' in dial command, lets say 5 minutes in accordance with remaining credit and connect the call, few seconds later a 2nd call comes in and the first call is still in progress. If I permit the same 5 minutes as per this formula and both calls remains connected for the next 5 minutes then credit will go in minus which is not acceptable. </div>
<div><br></div><div>One option is to charge credit via AMI and as soon as the credit goes 0, hangup all calls for this customer.</div><div><br></div><div>Is there any other way to achieve this ?</div><div> </div><div><br clear="all">
<div dir="ltr">Regards,<br><font color="#888888">Zohair Raza<div><br></div></font></div>
</div></div>
<br></div></div><span><font color="#888888">--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></font></span></blockquote></div><span><font color="#888888"><br>
<br clear="all"><br>-- <br><div dir="ltr"><br>Thanks and regards<br>
<br> Virendra Bhati<br><a href="tel:%2B91-8885268942" value="+918885268942" target="_blank">+91-8885268942</a><br>Software Engineer<br></div><br>
</font></span></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div></div></div></div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><br>Thanks and regards<br>
<br> Virendra Bhati<br><a href="tel:%2B91-8885268942" value="+918885268942" target="_blank">+91-8885268942</a><br>Software Engineer<br></div><br>
</div></div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div></div></div>