[Freeswitch-users] 4 second delay in call.

Mitch Capper mitch.capper at gmail.com
Fri Jan 24 20:01:20 MSK 2014


Hi Andrew,
You can also look at: http://wiki.freeswitch.org/wiki/Fs_logger.pl if you
are having problems collecting logs as it will simplify the collection and
submission of them.   Without a whole picture no one is going to spend much
time looking at the issue.   Your best bet would be to capture logs of a
similar call path with the console vs your application, the great part
about embedded FS is you should get the exact same logging.  With debugging
turned on it most likely would show on your app where there is a delay
(between what log messages) vs the console and give a much better chance of
solving the problem.

Finally you may want to consider the paid FreeSWITCH consulting services (
consulting at freeswitch.org) you can get a quote for what you need and then
have an expert help you with the problem if you want someone else to do
more of the work.

~mitch


On Thu, Jan 23, 2014 at 5:26 PM, Anthony Minessale <
anthony.minessale at gmail.com> wrote:

> If you don't even ever see the logs or interact with FS over the API, I am
> not sure how you have any chance.
> Maybe load mod_event_socket and use fs_cli binary to turn on the debugging
> and get the trace.....
>
>
>
>
> On Thu, Jan 23, 2014 at 7:05 PM, Andrew <aademattia at comcast.net> wrote:
>
>> Hi,
>>
>> Built my own exe and not using the console.  Console does do better
>> performance than my .net exe.
>>
>> I start the server using
>>
>>
>>
>>           uint flags = (uint)(switch_core_flag_enum_t.SCF_USE_AUTO_NAT);
>>
>>
>>
>>             String err = "";
>>
>>             freeswitch.switch_core_set_globals();
>>
>>
>>
>>             switch_status_t res = freeswitch.switch_core_init(flags,
>> switch_bool_t.SWITCH_TRUE, ref err);
>>
>>             search_bind = FreeSWITCH.SwitchXmlSearchBinding.Bind(xml_search,
>> switch_xml_section_enum_t.SWITCH_XML_SECTION_CONFIG);
>>
>>             event_bind = FreeSWITCH.EventBinding.Bind("SampleClient",
>> switch_event_types_t.SWITCH_EVENT_ALL, null, event_handler, true);
>>
>>             freeswitch.switch_core_init_and_modload(flags, switch_bool_t.SWITCH_TRUE,
>> ref err);
>>
>>
>>
>>
>>
>> I then get the incoming even then I call the code for bridge.
>>
>> From the start of the incoming call to bridge code takes less than one
>> sec.
>>
>> Here is part of the incoming call. (I had to crop it)
>>
>> First two is incoming call and 3248 is the sent message to my provider.
>>
>>
>>
>>
>>
>> [image: cid:image001.png at 01CF1875.DF84B410]
>>
>>
>>
>> I am running in 64bit mode and this happens in less than 100 cps.
>>
>>
>>
>> I have spent almost ½ year on this project to fail.
>>
>>
>>
>>
>>
>> *From:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
>> freeswitch-users-bounces at lists.freeswitch.org] *On Behalf Of *Anthony
>> Minessale
>> *Sent:* Thursday, January 23, 2014 7:50 PM
>>
>> *To:* FreeSWITCH Users Help
>> *Subject:* Re: [Freeswitch-users] 4 second delay in call.
>>
>>
>>
>> I'm not getting mixed up in some attempt to achieve 700cps, we don't have
>> time for that kind of help. =D
>>
>>
>>
>> When I suggested the console I was telling you to make the call and look
>> at the console with the commands I provided enabled so you could debug
>> where the time was being spent.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Jan 23, 2014 at 6:21 PM, Andrew <aademattia at comcast.net> wrote:
>>
>> My brother did something using the console and made a .net dll and he
>> gets 250 CPS+
>>
>> We are going to be renting a 64 CPU and 128 gb ran to run Freeswitch.
>>
>> We need to get 700 cps per profile and  hoping the super server will do
>> it.
>>
>>
>>
>> I just don’t know why freeswitch is not working well when it’s a .net exe
>> vs c++ or c exe.
>>
>>
>>
>> .net is not having the issue so I can only guess its something else.
>>
>> My brother said when using the console it is using a lot more threads
>> then my .net exe.  I am sure why.
>>
>> On event of incoming call I start a new thread.  I do my LCR ado async.
>>
>> When the even comes back I start another tread to make the call.  Again
>> all of this happens in less than a second more like 500 or less mill sec.
>>
>>
>>
>> The only difference in the config file is I am passing the gateway in
>> code and build my own start up exe.
>>
>>
>>
>>
>>
>> I am willing to send the source code if it helps.
>>
>> Andrew
>>
>>
>>
>>
>>
>>
>>
>> *From:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
>> freeswitch-users-bounces at lists.freeswitch.org] *On Behalf Of *Anthony
>> Minessale
>> *Sent:* Thursday, January 23, 2014 7:01 PM
>> *To:* FreeSWITCH Users Help
>> *Subject:* Re: [Freeswitch-users] 4 second delay in call.
>>
>>
>>
>> Did you ever get a trace on the console
>>
>>
>>
>> console loglevel debug
>>
>> sofia global siptrace on
>>
>> sofia tracelevel alert
>>
>>
>>
>>
>>
>> On Thu, Jan 23, 2014 at 5:46 PM, Andrew <aademattia at comcast.net> wrote:
>>
>> I know most of the people don’t like windows but I am looking for some
>> help.
>>
>> I am building a switch and the exe is done in .net.
>>
>> I have everything in threads.  I found that I will take in a call then do
>> a bridge all in less than 1 second.
>>
>> When doing a wire shark trace it looks like the bridge call take almost
>> 4-6 seconds to send a request.
>>
>> I am close to giving up.  I did a study and traced every step of my code
>> and its clear its not .net  due to the call will come in and out in less
>> than a sec.
>>
>>
>>
>> Again all of this from incoming to bridge happens in less than 1 second
>> but wire shark shows almost 4 seconds from incoming to outgoing call.
>>
>>
>>
>> string Route = "{bypass_media=" + MediaByPass + ",hangup_after_bridge=true,hangup_complete_with_xml=true,continue_on_fail=true,execute_on_answer=sched_hangup
>> +" + SecMaxTalkTime + " alloted_timeout, ignore_early_media=true,
>> origination_caller_id_number=" + CallerIDNumber + ",
>> origination_caller_id_name=" + CallerIDName + ",originate_timeout=" +
>> RingTimeOUT + ",call_timeout=" + RingTimeOUT + ",progress_timeout=" +
>> PDD + ",fail_on_single_reject=USER_BUSY NO_ANSWER NO_USER_RESPONSE
>> ORIGINATOR_CANCEL} " + DialPath;
>>
>>             ManagedSession leg_A = new ManagedSession(UUID_LegA);
>>
>>            // leg_A.begin_allow_threads();
>>
>>             leg_A.SetVariable("bypass_media", MediaByPass.ToString());
>>
>>
>>
>>             leg_A.Execute("bridge", Route);
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> 
>> 
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>>
>>
>>
>> --
>>
>> Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬
>>
>>
>>
>>http://freeswitch.org/http://cluecon.com/>> http://twitter.com/FreeSWITCH
>>
>> ☞ irc.freenode.net #freeswitch ☞ http://freeswitch.org/g+
>>
>> ClueCon Weekly Development Call
>>
>> ☎ sip:888 at conference.freeswitch.org  ☎ +19193869900
>>
>>
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> 
>> 
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>>
>>
>>
>> --
>>
>> Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬
>>
>>
>>
>>http://freeswitch.org/http://cluecon.com/>> http://twitter.com/FreeSWITCH
>>
>> ☞ irc.freenode.net #freeswitch ☞ http://freeswitch.org/g+
>>
>> ClueCon Weekly Development Call
>>
>> ☎ sip:888 at conference.freeswitch.org  ☎ +19193869900
>>
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> 
>> 
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>
>
> --
> Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬
>
>http://freeswitch.org/http://cluecon.com/> http://twitter.com/FreeSWITCH
> ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+
> <http://freeswitch.org/g+>*
>
> ClueCon Weekly Development Call
> ☎ sip:888 at conference.freeswitch.org  ☎ +19193869900
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140124/a4fc1839/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 18637 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140124/a4fc1839/attachment-0001.jpe 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list