Or the awesome example from the FreeSWITCH Cookbook... ;) -MC On Mon, Jan 21, 2013 at 2:17 PM, Hector Geraldino < Hector.Geraldino@ipsoft.com> wrote:
I'm not a perl expert, but in general I think you need to follow this pattern:
1) Establish the connection to FreeSWITCH, you'll be using the event socket on inbound mode 2) Start listening for the events you want to capture (send the 'event plain all' or 'event plain CHANNEL_ANSWER DTMF CHANNEL_HANGUP ...' command) 3) Create an uuid (by sending the create_uuid command) so you can identify which call you'll be listening events for 4) Add a filter for this uuid, so you'll only receive events for this call over this connection (filter Unique-ID + uuid) 5) originate the call: {origination_uuid= + uuid}sofia/internal/NXX@GATEWAY
Check this simple perl example:
http://wiki.freeswitch.org/wiki/Event_Socket_Library#Simple_Perl_Example
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Matthias Cramer Sent: Monday, January 21, 2013 10:20 AM To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] Make a call with Perl
Hi All
I try to make a Perl Script which calls a certain external Phone number. It then should wait until someone picks up and play a sound file The user on the other end then needs to confirm the call with a pin Then another sound file should be played and the the call should be terminated.
I tried several ways with ESL and originate. But I allays end up with a call I have no control over. I can read DTMF but can not hang up the call or play a second file.
I think I am going in to a wrong direction.
Any hints ?
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org