Thanks a lot. 03.08.2012 16:40, SamyGo пишет:
Here it is: I had to delete alot of lines to make it understandable for you.
-- START OF CODE -- phone_number = argv[1]; client_id = argv[2]; B_PARTY = argv[3]; outbound_cli = argv[4]; rate = argv[5];
freeswitch.consoleLog("INFO","the number we are calling is " .. phone_number.."\n");
session = freeswitch.Session("{ignore_early_media=true,origination_caller_id_number="..outbound_cli.."}sofia/gateway/Asterisk/" .. phone_number); session:execute("nibblebill","heartbeat 30") -- triggered for 30 sec billing deduction on A-Leg session:setVariable("client_id",client_id) session:setVariable("nibble_account",phone_number) session:setVariable("nibble_rate",rate) session:setVariable("nibble_increment",30) if(session:answered() == true) then freeswitch.consoleLog("INFO","Originate a New Call for"..destination_data.." and Start Billing B-Leg too\n") dialB = "{ignore_early_media=false,origination_caller_id_number="..B_PARTY.."}sofia/gateway/Asterisk/I" legB = freeswitch.Session(dialB..destination_data,session) legB:execute("nibblebill","heartbeat 60") -- Triggered for 60 sec billing on B-Leg legB:setVariable("client_id",client_id) legB:setVariable("nibble_account",phone_number) --[[Deduct from A-Party's cash]]-- legB:setVariable("nibble_rate",rate) legB:setVariable("nibble_increment",30) if ( legB:ready()) then freeswitch.consoleLog("NOTICE","------ALL READY BRIDGE THE CALLS------\n") freeswitch.bridge(legB,session) else freeswitch.consoleLog("NOTICE","It appears that " ..session.. " or " .. dialB .. " disconnected...\n") end session:hangup(); end end freeswitch.consoleLog("INFO","hangup reasons '"..session:hangupCause().."' \n"); session:hangup(); ---END OF CODE--
BR Sammy
On Fri, Aug 3, 2012 at 4:36 PM, qasimakhan@gmail.com <qasimakhan@gmail.com>wrote:
Try using pastebin.pk. It should work!
On Fri, Aug 3, 2012 at 4:15 PM, SamyGo<govoiper@gmail.com> wrote:
yes why not, wait for some time while I access my files.
On Fri, Aug 3, 2012 at 3:56 PM, Evgeniy Movlyan< evgeniy@bestnet.kharkov.ua> wrote:
I checked it twice from different computers and it works fine =\ I made another one paste - http://pastebin.com/iW9DaAWN Can you show me how you make calls from lua script?
03.08.2012 11:41, SamyGo пишет:
Hi Your link isn't working for me !!
On Thu, Aug 2, 2012 at 4:12 PM, Evgeniy Movlyan <evgeniy@bestnet.kharkov.ua>wrote:
02.08.2012 13:58, SamyGo пишет: > Ok, > Paste the whole call console log and share via pastebin. > Maybe find some other thing breaking it. > BR > Sammy > On Aug 2, 2012 3:52 PM, "Evgeniy Movlyan"<evgeniy@bestnet.kharkov.ua
> wrote: > >> I changed my dialplan, but got the same message =( >> >> 02.08.2012 07:49, SamyGo пишет: >>> You might wanna change your dialplan to something like this: >>> >>> <action application="bridge" data="{ >>> ignore_early_media=true >> }sofia/gateway/${default_gateway}/${dialed_number}"/> >>> That's How I;ve done it, no wonder I use LUA but the dial-string is >> exactly >>> as below. >>> >>> I think there is a difference if you do it like above, It will set the >>> ignore_early_media on the B-leg session and not on A-leg. >>> >>> This a snippet from the FS-1.6 book: *page:186* >>> >>> "Curly brackets are used "globally" for the duration of a call. Take the >>> following example where we are bridging a call to Darren's cell phone, >>> 203-829-3150. We >>> only want to ring the phone for 20 seconds, to avoid hitting voicemail. >>> >>> <application action="bridge" >>> data="{call_timeout=20}sofia/my_provider/2038293150"> >>> >>> *The variable in brackets is utilized on the newly setup channel, >>> sofia/my_provider/2038293150.*" >>> >>> >>> Regards, >>> Sammy >>> >>> >>> On Wed, Aug 1, 2012 at 8:00 PM, Evgeniy Movlyan >>> <evgeniy@bestnet.kharkov.ua>wrote: >>> >>>> It did not work for me, i got the same message. >>>> My outbond extension: >>>> >>>> <extension name="AUTH_rad"> >>>> <condition field="${toll_allow}" expression="international"/> >>>> <condition field="${AUTH_RESULT_RADIUS}" expression="^NOK$" >>>> break="on-true"> >>>> <action application="lua" data="callfailed.lua >> ${caller_id_number}"/> >>>> </condition> >>>> <condition field="${AUTH_RESULT_RADIUS}" expression="^OK$"> >>>> <action application="set" >>>> data="effective_caller_id_number=${outbound_caller_id_number}"/> >>>> <action application="set" >>>> data="effective_caller_id_name=${outbound_caller_id_name}"/> >>>> <action application="set" data="ignore_early_media=true"/> >>>> <action application="bridge" >>>> data="sofia/gateway/${default_gateway}/${dialed_number}"/> >>>> </condition> >>>> </extension> >>>> >>>> >>>> 31.07.2012 11:06, SamyGo пишет: >>>>> Hi, >>>>> Well its works perfect for me, do you guys have ignore_early_media set >> in >>>>> your outbound string, if no then set it and then see what happens. >>>>> On Jul 31, 2012 12:50 PM, "Evgeniy Movlyan"< evgeniy@bestnet.kharkov.ua >>> >>>>> wrote: >>>>> >>>>>> I have the same problem. When i am calling from one my extension to >>>>>> another all is ok, but when i am calling to external number i got this >>>>>> message: "mod_nibblebill.c:465 Not billing XXXXXXXXXX - call is not in >>>>>> answered state". >>>>>> >>>>>> 31.07.2012 10:35, virendra bhati пишет: >>>>>>> mod_nibblebill.c:465 Not billing >>>>>>> 97183008 - call is not in answered state >>>>>> >>>>>> -- >>>>>> Evgeniy Movlyan, >>>>>> BestNet Ltd. >>>>>> >>>>>> >>>> >>
>>>>>> 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 >>>>>> >>>>>> Join Us At ClueCon - Aug 7-9, 2012 >>>>>> >>>>>> 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 >>>>>> >>>>> >>>>> >>>>> >>>>> >>
>>>>> 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 >>>>> >>>>> Join Us At ClueCon - Aug 7-9, 2012 >>>>> >>>>> 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 >>>> >>>> -- >>>> Evgeniy Movlyan, >>>> BestNet Ltd. >>>> >>>> >>
>>>> 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 >>>> >>>> Join Us At ClueCon - Aug 7-9, 2012 >>>> >>>> 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 >>>> >>> >>> >>> >>>
>>> 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 >>> >>> Join Us At ClueCon - Aug 7-9, 2012 >>> >>> 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 >> >> -- >> Evgeniy Movlyan, >> BestNet Ltd. >> >>
>> 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 >> >> Join Us At ClueCon - Aug 7-9, 2012 >> >> 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 >> > > > >
> 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 > > Join Us At ClueCon - Aug 7-9, 2012 > > 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
-- Evgeniy Movlyan, BestNet Ltd.
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
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________
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
Join Us At ClueCon - Aug 7-9, 2012
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
-- Evgeniy Movlyan, BestNet Ltd.
_________________________________________________________________________ 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
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ 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
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ 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
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ 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
Join Us At ClueCon - Aug 7-9, 2012
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
-- Evgeniy Movlyan, BestNet Ltd.