Hi Michael and others. The thing I really liked about Freeswitch when I downloaded the install, installed it on a Windows PC here and got it running, was how many things were working right out of the box. Of course there are the warnings about its default configuration being unsuitable for production use, but on the other hand it means I could get phones registered and start playing with stuff within half an hour, and functions like music on hold, transferring calls, voice mail etc, were working just as you would expect with a turnkey system. Well obviously I then spent time learning more about what goes on under the hood and getting us hooked up to a SIP provider etc but really that was quite straightforward, although I have had some experience with VOIP which obviously helped. My external script is written in Python and I do my Python developing on my laptop which is separate from the PC running Freeswitch. When I'm happy enough with it, I turn it into an executable and then run it on the same PC as Freeswitch. I think when you work in Windows as I do, the embedded scripting is not an option. In fact the Freeswitch scripts directory is empty I think. I had actually done some work with Yate earlier this year so I already had my programming framework established to handle messages between the script an external PABX so it didn't take long before I had the basic IVR functionality working. As an aside, we have quite a lot of home automation here including software that runs the house, and I very quickly realised that I could easily set up a system whereby you can enter simple commands on any phone to control certain things. All our phones, including cordless and mobile phones, are now remote controls that can control everything from entertainment to heating, and it only took a few hours. Such are the benefits of sockets programming. Anyway I digress. I'll have to experiment further with playing tones but won't have time today. Sometimes we have to do real work. I may look at it again tomorrow or Friday. And by the way, although right now my use of Freeswitch has been largely domestic, I do have a small and possibly commercial IVR application in mind to turn my attention to later when I am more familiar with it. Clive Lansink Email: Clive@Lansink.Co.NZ Phone: +64 9 520-4242 Mobile: +64 21 663-999 Fax: +64 21 789-150 -----Original message----- From: Michael Collins <msc@freeswitch.org> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] Playing tones Reply-to: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Date: Tue, 19 Apr 2011 09:36:44 -0700 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@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@Lansink.Co.NZ Phone: +64 9 520-4242 Mobile: +64 21 663-999 Fax: +64 21 789-150
_______________________________________________ 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
_______________________________________________ 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
participants (1)
-
Clive Lansink