Re: [Freeswitch-users] Apply Connection Charges on LegB
thanks Avi for the reply! nibblebill is working fine but i want to apply connection charges on leg B when it is answered; i want to apply extra charges as connection charges on legB answer like if call duration is 60 sec rate is 30cents connection charges is 5 cents then call charged as 35 cents 30cent for call duration and 5cents as connection charges i hope that will give idea what i want to say Regards Shahzad Bhatti
---------- Forwarded message ---------- From: Shahzad Bhatti <shahzad.bhatti@g-r-v.com> To: freeswitch-users@lists.freeswitch.org Cc: Date: Thu, 28 Nov 2013 21:05:45 +0500 Subject: [Freeswitch-users] Apply Connection Charges on LegB Hi all, i am using mod_xml_curl to bridge call to legB and charge call using mod_nibblebill and it works fine, but now i want to apply connection charges to that bridge call when legB is answered but want to know how? any suggestion will be appreciated
here is sample of my xml_dialplan
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="dialplan" description="Dial Plan For FreeSwitch"> <context name="default"> <extension name="Bridge Call to Destination"> <condition field="destination_number" expression="^1004$"> <action application="set" data="process_cdr=b_only"/> <action application="set" data="hangup_after_bridge=true"/> <action application="set" data="nibble_account=1"/> <action application="set" data="nibble_rate=0"/> <action application="export" data="nolocal:nibble_account=1"/> <action application="export" data="nolocal:nibble_rate=0.034155"/> <action application="answer" /> <action application="bridge" data="sofia/external/1004%192.168.0.100"/> <action application="hangup"/> </condition> </extension> <extension name="hangup"> <condition field="destination_number" expression="^(hangup)$"> <action application="respond" data="503"/> <action application="hangup"/> </condition> </extension> </context> </section> </document>
Regards
Shahzad Bhatti
---------- Forwarded message ---------- From: Avi Marcus <avi@avimarcus.net> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Cc: Date: Thu, 28 Nov 2013 16:21:06 +0000 Subject: Re: [Freeswitch-users] Apply Connection Charges on LegB Since nibblebill only charges for answered calls, that looks like it should work. Is it not working as expected? -Avi
How do you know it doesn't already work? Nibblebill should only start billing once it gets answered. Save a freeswitch log of the call and see if nibblebill is doing what you want... -Avi
Avi, he wants to apply an additional charge to the call that is per call and not per minute, as well as the per minute rate. On 28 November 2013 16:54, Avi Marcus <avi@avimarcus.net> wrote:
How do you know it doesn't already work? Nibblebill should only start billing once it gets answered. Save a freeswitch log of the call and see if nibblebill is doing what you want... -Avi
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- *Andrew Cassidy BSc (Hons) MBCS SSCA* Managing Director *T <info@cassidywebservices.co.uk> *03300 100 960 *F <info@cassidywebservices.co.uk> *03300 100 961 *E <info@cassidywebservices.co.uk> *andrew@cassidywebservices.co.uk *W <info@cassidywebservices.co.uk> *www.cassidywebservices.co.uk
Ah, sorry! I read "apply connection charges" as "when the call connects" and figured I understood. OK, so I presume you want to export:nolocal an execute_on_answer or api_on_answer that calls something that charges the 5cents http://wiki.freeswitch.org/wiki/Variable_execute_on_answer http://wiki.freeswitch.org/wiki/Variable_api_on_answer It seems nibblebill supports this directly:
Adding/Deducting funds Inserting this in your dialplan: <action application="nibblebill" data="adjust 5.00"/> ... Use negative numbers to deduct from an account.
... you'd of course want to make sure this ends up in your logs somewhere so you have an audit trail! Seemingly this would be an execute_on_answer. Hope that helps! -Avi On Thu, Nov 28, 2013 at 7:03 PM, Andrew Cassidy < andrew@cassidywebservices.co.uk> wrote:
Avi, he wants to apply an additional charge to the call that is per call and not per minute, as well as the per minute rate.
participants (3)
-
Andrew Cassidy
-
Avi Marcus
-
Shahzad Bhatti