<p dir="ltr">Ok cool cool and I will thhzmKvdhmg</p>
<div class="gmail_quote">On 20 Sep 2014 16:23, "Aqs Younas" <<a href="mailto:aqsyounas@gmail.com">aqsyounas@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Thanks for your reply and time...<br></div>Both variables are correctly set and call is accounted only after termination.<br></div>I don't know why heartbeat is not fired from nibblebill.conf.xml file after 1 second.But does fire from fs_cli for given call manually.<br></div>After i fire heartbeat from cli everything works perfectly.<br><br></div>Did anybody get mod_nibblebill in working conditions.?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 20 September 2014 03:23, Bernhard Wendel <span dir="ltr"><<a href="mailto:bernhard@sessionbird.com" target="_blank">bernhard@sessionbird.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
Hi,<br>
<br>
I think you have an error in your dialplan. You are using <i>variable</i>-tags
that are actually ment for directory instead of the <i>set</i>-dialplan
application.<br>
Please try again with <br>
<span><span><br>
<condition field="destination_number"
expression="^(1[2-9][0-9]{2}[0-9]{7})$"><br>
</span><b> <action application="set" data="nibble_rate0.03"
/>
</b><b><br>
</b><b> <action application="set"
data="nibble_account=45893148"/></b><span><b><br>
</b> <action application="bridge"
data=<a href="mailto:sofia/external/1$@168.183.648" target="_blank">"sofia/external/1$@168.183.648"</a>/> <br>
</condition><br>
</extension></span></span><br>
<br>
If this does not help with your problem, try with the <i>info</i>-dialplan
application to check whether all channel variables needed by
nibblebill are set.<br>
<br>
Regards,<br>
Bernhard<br>
<br>
<br>
<div>Am 19.09.2014 17:56, schrieb Aqs
Younas:<br>
</div><div><div>
<blockquote type="cite">
<div dir="ltr">
<div>After some considertation i foung, Its heartbeat fire does
not fire after 1 second as i have specified in my
nibblebill.conf.xml file. After call is completed nibblebill
update the database balance column according to given formula.<br>
<br>
[time call ended] - [time call answered] x [rate per minute] =
$total bill rate<br>
<br>
<div>Though this formula is used when global_heartbeat is
off.<br>
</div>
Here is my nibblebill.conf.xml<br>
<br>
<configuration name="nibblebill.conf" description="Nibble
Billing"><br>
<settings><br>
<br>
<br>
<param name="odbc-dsn"
value="odbc://freeswitch"/><br>
<param name="db_table" value="users"/><br>
<br>
<!-- The column name where we store the value of the
account --><br>
<param name="db_column_cash" value="balance"/><br>
<br>
<!-- The column name for the unique ID identifying the
account --><br>
<param name="db_column_account"
value="accountcode"/><br>
<br>
<!-- Custom SQL for loading current balance - overrides
column names<br>
channel vars are interpreted.<br>
field nibble_balance is used for balance info<br>
<br>
<param name="custom_sql_lookup" value="SELECT cash AS
nibble_balance FROM accounts WHERE account_code='${nibble_
<div dir="ltr">account}'"/><br>
--><br>
<br>
<!-- Custom SQL for loading current balance -
overrides column names<br>
channel vars are interpreted.<br>
nibble_increment is the amount to update<br>
<br>
<param name="custom_sql_save" value="UPDATE accounts
SET cash=cash-${nibble_increment} WHERE
account_code='${nibble_account}'"/><br>
--><br>
<!-- Default heartbeat interval. Set to 'off' for no
heartbeat (i.e. bill only at end of call) --><br>
<param name="global_heartbeat" value="1"/><br>
<br>
<!-- By default, warn a caller when their balance is
at $5.00. You can set this to a negative number. --><br>
<param name="lowbal_amt" value="5"/><br>
<param name="lowbal_action" value="play ding"/><br>
<br>
<!-- By default, terminate a caller when their
balance hits $0.00. You can set this to a negative number.
--><br>
<param name="nobal_amt" value="0"/><br>
<param name="nobal_action" value="hangup XML
default"/><br>
<br>
<!-- If a call goes beyond a certain dollar amount,
flag or terminate it --><br>
<param name="percall_max_amt" value="0"/><br>
<param name="percall_action" value="hangup"/><br>
<br>
</settings><br>
</configuration><br>
<br>
</div>
<div>When i apply this on Freeswitch cli for channel uuid i
get this..<br>
<br>
</div>
<div dir="ltr"><br>
<br>
</div>
freeswitch@internal> nibblebill
3f3f3b4a-fe4e-47d0-a43a-e1d8a54c6dfe check<br>
-ERR no reply<br>
<br>
2014-09-19 04:30:38.704124 [INFO] mod_nibblebill.c:793 Can't
check - channel is not initialized for billing!<br>
2014-09-19 04:30:38.704124 [INFO] mod_nibblebill.c:888 Current
billing is at $-99999.000000<br>
<br>
</div>
Why freeswitch does not fire heartbeat after one second and set
the channel for billing.?<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 19 September 2014 02:29, Aqs Younas
<span dir="ltr"><<a href="mailto:aqsyounas@gmail.com" target="_blank">aqsyounas@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">
<div>Sorry Still i am unable to terminate calls.Here are
both files.<span><br>
<br>
<div>Here is my nibblebill.conf.xml file.<br>
</div>
<span><br>
<configuration name="nibblebill.conf"
description="Nibble Billing"><br>
<settings><br>
<br>
<param name="odbc-dsn"
value="odbc://freeswitch"/><br>
<param name="db_table" value="users"/><br>
</span><span> <param name="db_column_cash"
value="balance"/><br>
</span><span> <param name="db_column_account"
value="accountcode"/><br>
</span><span> <param name="lowbal_amt"
value="5"/><br>
<param name="lowbal_action" value="play
ding"/><br>
<br>
<br>
</span></span><span><span> <param
name="nobal_amt" value="0"/><br>
</span> <param name="nobal_action" value="hangup
XML default"/><br>
<br>
</span><span><span> <param
name="percall_max_amt" value="0"/><br>
<param name="percall_action"
value="hangup"/><br>
<br>
</settings><br>
</configuration></span><br>
<br>
<br>
<br>
Here is my default.xml<br>
<br>
<include><br>
<context name="default"><br>
<extension name="unloop"><br>
<br>
<condition field="destination_number"
expression="^(1[2-9][0-9]{2}[0-9]{7})$"><br>
<variable name="nibble_rate"
value="0.03"/>
<br>
<variable name="nibble_account"
value="45893148"/><br>
<action application="bridge"
data=<a href="mailto:sofia/external/1$@168.183.648" target="_blank">"sofia/external/1$@168.183.648"</a>/> <br>
</condition><br>
</extension><br>
<br>
<br>
</span><extension name="hangup"><br>
<condition field="destination_number"
expression="^(hangup)$"><br>
<action application="hangup"/><br>
</condition><br>
</extension><br>
<br>
</context><br>
</include><br>
<br>
<br>
</div>
Any Suggestion :(<br>
<div><br>
</div>
</div>
<div>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 19 September 2014 01:33,
Aqs Younas <span dir="ltr"><<a href="mailto:aqsyounas@gmail.com" target="_blank">aqsyounas@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">
<div>Thanks for your reply..i try it and get
back to you.<br>
</div>
Many thanks<br>
</div>
<div>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 19 September
2014 01:14, Steven Ayre <span dir="ltr"><<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@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">
<pre style="font-family:monospace,Courier;padding:1em;border:1px dashed rgb(47,111,171);color:rgb(0,0,0);line-height:1.3em;font-size:12.7272720336914px;background-color:rgb(249,249,249)"><param name="nobal_action" value="hangup XML default"/>
</pre>
<div>It's a dialplan transfer, you
need the XML and context name, and
an extension to handle it.</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">
<div>
<div>On 18 September 2014 19:39,
Aqs Younas <span dir="ltr"><<a href="mailto:aqsyounas@gmail.com" target="_blank">aqsyounas@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">
<div>Hi,<br>
<br>
</div>
<div>I am new to freeswitch,
i am using mod_nibblebill
for billing of realtime
calls.It works perfectly,
detects correct balance
after the completion of
call and performs update
query on database.What
difficulty I am facing now
is that mod_nibblebill
does not terminate call
even when user balance is
below zero(0) or is
zero(0), which I have
specified in my xml file.<br>
<br>
</div>
<div>Here is my
nibblebill.conf.xml file.<br>
</div>
<div>
<div><span><br>
<configuration
name="nibblebill.conf"
description="Nibble
Billing"><br>
<settings><br>
<br>
<param
name="odbc-dsn"
value="odbc://freeswitch"/><br>
<param
name="db_table"
value="users"/><br>
</span><span>
<param
name="db_column_cash"
value="balance"/><br>
</span><span>
<param
name="db_column_account"
value="accountcode"/><br>
</span><span>
<param
name="lowbal_amt"
value="5"/><br>
<param
name="lowbal_action"
value="play ding"/><br>
<br>
<br>
</span><span>
<param
name="nobal_amt"
value="0"/><br>
<param
name="nobal_action"
value="hangup"/><br>
<br>
</span><span>
<param
name="percall_max_amt"
value="0"/><br>
<param
name="percall_action"
value="hangup"/><br>
<br>
</settings><br>
</configuration><br>
<br>
</span></div>
<div>Here is my
default.xml<br>
<br>
include><br>
<context
name="default"><br>
<extension
name="unloop"><br>
<br>
<condition
field="destination_number"
expression="^(1[2-9][0-9]{2}[0-9]{7})$"><br>
<variable
name="nibble_rate"
value="0.03"/>
<br>
<variable
name="nibble_account"
value="45893148"/><br>
<action
application="bridge"
data=<a href="mailto:sofia/external/1$@168.183.648" target="_blank">"sofia/external/1$@168.183.648"</a>/>
<br>
</condition><br>
</extension><br>
</context><br>
</include><br>
<br>
</div>
<div>Could Someone please
tell me why
mod_nibblebill is not
terminating call but
accounts call perfectly.<br>
<br>
</div>
<div>(if a user balance is
below or at zero(0)
mob_nibblebill let them
call and after call sets
balance to negative
value)<br>
</div>
<div><br>
Thanks In Advance.<br>
</div>
</div>
</div>
<br>
</div>
</div>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting
Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The
CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote>
</div>
<br>
</div>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting
Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel
Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a>
Official FreeSWITCH Sites
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a>
FreeSWITCH-users mailing list
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></pre>
</blockquote>
<br>
</div></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div>