[Freeswitch-users] Make a call with Perl

Hector Geraldino Hector.Geraldino at ipsoft.com
Tue Jan 22 01:17:20 MSK 2013


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 at GATEWAY

Check this simple perl example:

http://wiki.freeswitch.org/wiki/Event_Socket_Library#Simple_Perl_Example


-----Original Message-----
From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Matthias Cramer
Sent: Monday, January 21, 2013 10:20 AM
To: freeswitch-users at 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




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