[Freeswitch-users] Conference delay increasing over time

Duvid Rottenberg adrottenberg at gmail.com
Mon Nov 25 18:36:56 MSK 2013


I am doing a similar setup on a Windows Server using conference with some
C# code.In my system I have a few extension each one is playing music from
a different web stream. The way I set it up is that when a call comes in I
check if  the conference related to the dialed extension is already setup
("conference <extension> list" doesn't return "not found"), if not I create
a new thread and execute "conference <extension> play <url> async" and then
conference in the caller.
If the conference is already in session I just add the caller to the
conference.

The reason I do it on a separate thread is that conference play only works
once the conference is already created, but the api call to add the caller
to the conference is a blocking call and will only return when the user
hangs up or is kicked from the conference.

I also had some issues with the stream falling behind, also the stream
would sometimes go silent, so I resolved this by setting a time for every 5
minutes which executes "conference <extension> stop" and then "conf
<extension> play <url>". This happens so quickly that the listeners barely
notice that the stream has been restarted.

You might be able to implement a similar setup with other languages. I went
through a few iterations until I got to this setup and it now appears to be
working great.



On Fri, Nov 22, 2013 at 7:55 PM, Erik M. Devane - Comms Guy <
emdevane at gmail.com> wrote:

> Increasing the conference internal to 10 to 20 to 200 had no detectable
> effect.
>
> In order to improve timing, I rebuilt the server as Centos 6.4, building
> from the tarball (git had some proxy-related issues).
>
> [New issue on Linux]
> I haven't been able to get mod_portaudio to give me more than two mono
> inputs per M-Audio Delta 1010 card (though alsamixer and pa_devs seem
> perfectly happy).
>
>
> [Back to the original issue]
> I reverted all RTP timer, flush, and other changes, back very close to the
> default configuration.
>
> Still I have a delay, still increases seconds per minute.
>
> I explored moh but couldn't figure out how to have multiple playlists. If
> this is possible, Id love to know how!
>
> My best solution so far has been to have the first call bridge portaudio
> and subsequent calls eavesdrop on that first bridged call. Latency is
> almost as good as a single bridged call, and I have tested six
> eavesdroppers with no ill effects.
>
> Right now I'm going to:
>
> 1) Work out how to mute external caller's audio from the eavesdrop.
>
> 2) Learn lua enough to roll an eavesdropper onto the bridge when the first
> caller hangs up.
>
> It's not a satisfactory solution, but I'm out of ideas for the conference
> lag unless anyone else can help, and I don't know how to do multiple MOH
> instances.
>
> Any help would be most appreciated - either on conference lag or moh or
> eavesdrop mute.
>
> Erik
>
> On Tuesday, November 12, 2013, Anthony Minessale wrote:
>
>> https://wiki.freeswitch.org/wiki/Mod_local_stream#moh.loc
>>
>> Its just setting up mod_local_stream to point at a dir with a file with a
>> .loc extension that has the string of the pa url in it.
>>
>> You should probably not change any of those params away from default.  I
>> would recommend putting those back to where they belong.
>>
>> If anything it could worsen your problem.  What about the interval?  DId
>> you try increasing that?
>>
>>
>>
>>
>>
>>
>>
>>
>> On Mon, Nov 11, 2013 at 11:00 PM, Erik M. Devane - Comms Guy <
>> emdevane at gmail.com> wrote:
>>
>> I've been working at this all day, with no joy.
>>
>> I thought that antivirus software was to blame, but that was a dead end.
>>
>> Does anyone have an example of running the .loc local_stream approach?
>>
>>
>> On Sunday, November 10, 2013, Erik M. Devane - Comms Guy wrote:
>>
>> OK, so I've had another chance to work with the settings following your
>> suggestion.
>>
>> Setup - mixing console sending identical channels to sixteen channels on
>> two M-Audio Delta 1010 cards.
>> SIP trunk from Cisco system, testing using AT&T phone to public phone
>> number. CODEC is PCMU/8000.
>>
>> Everything seems perfect when just doing a simple bridge:
>> <action application="bridge"
>> data="portaudio/endpoint/MAUDIO-${destination_number:-2}"/>
>> I can listen to it for hours, with no issues or delay.
>>
>>
>> Problems start when creating a default conference used, by dialplan:
>>
>> <action application="conference_set_auto_outcall"
>> data="portaudio/endpoint/MAUDIO-11"/>
>> <action application="conference" data="$1-${domain_name}@
>> ${use_profile}++flags{mute}""/>
>>
>> Test - call both bridged extension and conference, and listen. After a
>> minute, there is definite delay in the conference. After three minutes,
>> there is a second delay. After ten minutes, the audio is so far behind it
>> is unusable.
>>
>> Setup:
>>
>> Conference - default, energy level: 100, waste, all callers set to mute.
>>
>> External.xml used for profile, changes to the default:
>>
>> <param name="rtp-timer-name" value="none"/>
>> <param name="rtp-autoflush-during-bridge" value="true"/>
>> <param name="rtp-autoflush" value="true"/>
>>
>> Setting PortAudio rate to 8000, using default conference rate 8000, audio
>> sounds the same, and no issues over bridge. Conference still has delay..
>>
>> Setting PortAudio rate to 48000, upping default conference rate to 48000,
>> audio sounds the same, and no issues over bridge. Conference still has
>> delay.
>>
>> Any other suggestions would be gladly received. I couldn't locate many
>> examples of using soundcards as an MOH loc and streaming that, so that is
>> another avenue to try, if anyone has any hints.
>>
>> Thank you for your earlier suggestions - that I can stream sixteen
>> channels to the outside world reliably, with sensible configuration
>> options, is an outstanding achievement by the developers. Now if I could
>> have multiple callers receive the same audio...
>>
>>
>>
>>
>> On Sat, Nov 9, 2013 at 7:20 PM, Anthony Minessale <
>> anthony.minessale at gmail.com> wrote:
>>
>> Are you running the pa and the conference both at a high rate?
>> Some soundcards do bad at slower rates since its emulated.  Its most
>> likely the timing on the soundcard over anything else.
>>
>>
>> On Sat, Nov 9, 2013 at 4:18 PM, Erik M. Devane - Comms Guy <
>> emdevane at gmail.com> wrote:
>>
>> No, I hadn't - that sounds good. I'm using the new(ish) PortAudio
>> shstreams endpoints and have been trying to find examples of the .loc
>> approach with multiple soundcards.
>>
>> Any guidance welcomed!
>>
>> Does anyone have any thoughts on why conferences would be slowing down?
>>
>> On Fri, Nov 8, 2013 at 2:00 PM, Anthony Minessale <
>> anthony.minessale at gmail.com> wrote:
>>
>> have you seen mod_portaudio_stream you can use that in a .loc file
>> together with mod_local_stream for static muxing and just play the
>> localstream as a file in your dialplan
>>
>>
>> On Fri, Nov 8, 2013 at 1:26 PM, Erik M. Devane - Comms Guy <emdevane at g
>>
>> FreeSWITCH Developer Conference
>> sip:888 at conference.freeswitch.org
>> googletalk:conf+888 at conference.freeswitch.org
>> pstn:+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/20131125/2ced7d00/attachment-0001.html 


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