[Freeswitch-users] Sound not OK (Choppy Sound) while using ManagedSession (.NET/C#)

Phillip Jones pjintheusa at gmail.com
Wed Jul 7 06:30:25 PDT 2010


In example two you are parking the call. You are then playing media into a
parked call. I am not sure this is valid. According to the wiki "Please note
that to retrieve a call that has been "parked", you'll have to
bridge<http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_bridge>to
them or transfer the call to a valid location." - so you might need to
transfer that parked call to a DialPlan App before you try and play media -
or just not park it in the first place.

I might be wrong - but that where I would start.

On Wed, Jul 7, 2010 at 8:03 AM, Durmuş Ali Öztürk <ali.stgt at gmail.com>wrote:

> Hello,
>
> I have successfully entegrated a dll-module (written udner .Net / c#)
> in fs which is loadable by the mod_managed component.
>
> Now, if I try to stream a wav file to the callee then the sound is
> very poor and choppy (also the file is played slower).
>
> The fs is running under Windows XP and tested under Windows 2003 with
> the same result.
>
> Streaming by using FreeSWITCH.Native.Api() works without problems,
> sound is perfect.
>
> Samples which I have tried:
>
>
>
> 1 - This works fine but delegate mechanism is missing there:
>
> FreeSWITCH.Native.Api fsApi = new FreeSWITCH.Native.Api();
>
> string uuid = fsApi.ExecuteString("create_uuid");
> string apiResult = fsApi.Execute("originate",
>
> string.Format("{{ignore_early_media=false,absolute_codec_string='PCMU'}}[origination_uuid={0},origination_caller_id_number={1}]sofia/gateway/Test/{2}
> &&playback({3}", uuid, callerID, phoneNumber, wavFile));
>
>
>
>
> 2 - ManagedSession is integrated but we have sound problems:
>
> FreeSWITCH.Native.Api fsApi = new FreeSWITCH.Native.Api();
>
> string uuid = fsApi.ExecuteString("create_uuid");
>
> string apiResult = fsApi.Execute("originate",
>
> string.Format("{{ignore_early_media=false,absolute_codec_string='PCMU'}}[origination_uuid={0},origination_caller_id_number={1}]sofia/gateway/Test/{2}
> &park", uuid, callerID, phoneNumber));
>
> FreeSWITCH.Native.ManagedSession blegSession = new
> FreeSWITCH.Native.ManagedSession(uuid);
>
> if (blegSession.IsAvailable)
> {
>     while (!blegSession.answered())
>         {
>         blegSession.sleep(500, 1);
>     }
>
>         if (blegSession.Ready() && blegSession.mediaReady())
>         {
>         //blegSession.Answer();
>         //blegSession.Execute("playback",wavFile);
>                 blegSession.StreamFile(wavFile, 0);
>         }
>
>         blegSession.Hangup("Normal call clearing");
> }
>
>
>
>
> Is there a mistake in my code or do I have forgotten something? Can
> you support me with some examples?
>
>
> Another issue is, that I am not able to make a origination directly by
> ManagedSession or CoreSession without using the
> FreeSWITCH.Native.Api(). How can I create an instance of a CoreSession
> object?
>
>
> Many thanks for you help in advance.
>
> Ali
>
> _______________________________________________
> 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/20100707/08245321/attachment.html 


More information about the FreeSWITCH-users mailing list