[Freeswitch-users] Playing tones

Michael Collins msc at freeswitch.org
Tue Apr 19 20:36:44 MSD 2011


Clive,

Welcome to FreeSWITCH! If you're doing event socket stuff after only two
weeks then I must tip my hat to you. Well done!

I've never seen this symptom before so I'm at a bit of a loss as to what is
happening. Out of curiosity, what language are you using for your event
socket communications? I'm wondering if you can send the tone_stream without
the "loops=-1" over and over again and receive the same symptom where the
playback speeds up. The other test I would try is doing something like
"loops=25" or some relatively high number. Again see if the symptom presents
itself. (I'm wondering if this happens only on loops=-1 or if it happens any
time there is a loop.)

Let us know what you discover.

-MC

On Mon, Apr 18, 2011 at 7:01 PM, Clive Lansink <clive at lansink.co.nz> wrote:

> Hello
>
> I am relatively new to Freeswitch; I've played with it for about two weeks.
> It is now fully installed as our home PABX system. I've also done some
> elementary IVR stuff using an external script communicating to event_socket.
> It can monitor Freeswitch events, answer calls, play and record files and
> get digits so I suppose it does all the basics.
>
> But I'm having difficulty playing tones. A simple tone is no problem like
> the UK busy tone, %(400,200,400,450);%(400,2000,400,450), but things go
> wrong when I try loops.
>
> In my external script when I want to play a tone, I sende a sendmsg request
> with the appropriate UUID. In the headers, I have:
> call-command: execute
> execute-app-name: gentones
> execute-app-arg: %(400,200,400,450);%(400,2000,400,450)
> ]
> That works, but if I want the ring tone to repeat for an indefinite period,
> the header then becomes:
> execute-app-arg: %(400,200,400,450);%(400,2000,400,450);loops=-1
> When I do this, I hear one ring tone, then a single DTMF digit is played,
> presumably the 1 of loops=-1. I've also tried like loops=5 and got the same
> result.
>
> After seeing some examples, I then tried the following, again using the
> sendmsg command:
> call-command: execute
> execute-app-name: playback
> execute-app-arg:
> tone_stream://%(400,200,400,450);%(400,2000,400,450);loops=-1
> ]
> This time it does at least seem to loop indefinitely, but after the first
> two or so loops, the speed increases (not the pitch) so that the tone
> repeats much more quickly than it should.
>
> Any help would be much appreciated. It seems to me that using playback in
> this way must be accessing the same raw functionality as gentones, so I
> don't understand why the result would be different. But in the end I guess I
> don't care which method I use but it would be good to understand why both
> methods currently don't work for me.
>
> By the way, I am using a recent version of Freeswitch, a pre-compiled
> version running on Windows XP.
>
> Cheers.
>
>
> Clive Lansink
> Email: Clive at Lansink.Co.NZ
> Phone: +64 9 520-4242
> Mobile: +64 21 663-999
> Fax: +64 21 789-150
>
> _______________________________________________
> 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/20110419/b7d9709f/attachment.html 


More information about the FreeSWITCH-users mailing list