[Freeswitch-users] Make a call with Perl

Hector Geraldino Hector.Geraldino at ipsoft.com
Tue Jan 22 21:06:33 MSK 2013


I think you need to &park() the call and then send any other commands you want. If you do an originate + playback what will happen is that, once the call is answered, the playback is executed and then there's nothing else on the 'dialplan', so call gets dropped.

Do an originate + park (or just originate), then using the uuid do an uuid_playback. The while/loop will also be executed.

Finally, you have the option to use an api call (instead of a bgapi) so you don't move to the next action until the call is actually answered (blocking mode) 


-----Original Message-----
From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Matthias Cramer
Sent: Tuesday, January 22, 2013 4:21 AM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] Make a call with Perl

Hi Michael

On 21/01/13 20:50, Michael Collins wrote:
> If you have the FS Cookbook <http://link.packtpub.com/nuIOlX> then check out chapter 4, page 81. If you don't have the FS Cookbook then *SHAME* on you! :D

I've ordered the book, but it has not yet arrived... :-(

> Tip: you can download the examples from both book at the Packt Publishing website. The only caveat as far as I can tell is that you need to create a login account.

You do not need a login... Could download them without one.

> Grab the examples for the Cookbook and look at chapter 4. The recipe is called "Launching a call with an inbound event socket connect" and it's written in - you guessed it - Perl. :)

I started exactly with that example, I do an originate with &playback(). But I do not have real control over the call. I can not play anything else in the audio stream.

And if the playback is finished the call hangs up ...

Attached is the script I came up with so far ...

Regards

  Matthias

-- 
Matthias Cramer / mc322-ripe   Senior Network & Security Engineer
iway AG                        Phone +41 43 500 1111
Badenerstrasse 569             Fax   +41 44 271 3535
CH-8048 Zürich                 http://www.iway.ch/
GnuPG 1024D/2D208250 = DBC6 65B6 7083 1029 781E  3959 B62F DF1C 2D20 8250



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list