VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
nik.middleton at noble... Guest
|
Posted: Mon Feb 02, 2009 8:01 pm Post subject: [Freeswitch-users] Generating calls from external source |
|
|
Hi Guys,
As a long time Asterisk user, I’m looking into freeswitch as an alternative mainly due to (list multiple reasons here)
Can anyone give me a pointer as to how I would achieve the following?
I need to replicate an emergency broadcast system currently running under Asterisk.
At the moment, I run through a Mysql database and using the manager API, issues an Originate command to dial a number.
When the call is answered, a message is played, and the recipient has the option of hitting a digit to confirm receipt. I then call an AGI script to update the database.
Is this fairly easy to do in Freeswitch?
Not looking for code, just some pointers as to what’s available to do the above /
Regards, |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Mon Feb 02, 2009 8:18 pm Post subject: [Freeswitch-users] Generating calls from external source |
|
|
Nik,
Welcome to FreeSWITCH! The short answer is "yes, FS can do that." The first thing that you should do is unlearn "the Asterisk way" of thinking. Usually there is an elegant way of doing things in FS that wasn't possible in Ast.
I would recommend that you start by looking at the event socket, which is somewhat analogous to the AMI only cooler. I have personally done something similar to this using the event socket and a Perl script. The key is to learn the syntax of the originate command. (definitely hit the wiki and IRC channel)
Are you using TDM cards for this? Just curious.
-MC (IRC nick: mercutioviz)
Sent from my iPhone
On Feb 2, 2009, at 3:35 PM, "Nik Middleton" <nik.middleton@noblesolutions.co.uk (nik.middleton@noblesolutions.co.uk)> wrote:
|
|
Back to top |
|
|
nik.middleton at noble... Guest
|
Posted: Tue Feb 03, 2009 4:31 am Post subject: [Freeswitch-users] Generating calls from external source |
|
|
Thanks for that, coming from a C++ background it’s a refreshing change to be looking at something that seems logical and efficient.
I’d briefly looked at the event socket and wondered if that was the way to go. I presume that there’s some sort of event generation that can trigger and external process as well somewhere, though all I need to do is update mysql (hopefully using some sort of pooled connection)
I’m not using a TDM card, I have a direct interconnect with the PSTN breakout provider with 1,500 channels available to me. I’m finding Asterisk proving to be less than stable at high call volumes and load values spike at more than 100 calls with billing/accounting in place, hence my interest in FS. The only thing that’s concerning me is XML at the moment. Lots of code and very wordy. I’m sure I’ll appreciate why XML given time
Regards,
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Michael S Collins
Sent: 03 February 2009 01:17
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Generating calls from external source
Nik,
Welcome to FreeSWITCH! The short answer is "yes, FS can do that." The first thing that you should do is unlearn "the Asterisk way" of thinking. Usually there is an elegant way of doing things in FS that wasn't possible in Ast.
I would recommend that you start by looking at the event socket, which is somewhat analogous to the AMI only cooler. I have personally done something similar to this using the event socket and a Perl script. The key is to learn the syntax of the originate command. (definitely hit the wiki and IRC channel)
Are you using TDM cards for this? Just curious.
-MC (IRC nick: mercutioviz)
Sent from my iPhone
On Feb 2, 2009, at 3:35 PM, "Nik Middleton" <nik.middleton@noblesolutions.co.uk (nik.middleton@noblesolutions.co.uk)> wrote:
|
|
Back to top |
|
|
dave at 3c.co.uk Guest
|
Posted: Tue Feb 03, 2009 4:48 am Post subject: [Freeswitch-users] Generating calls from external source |
|
|
Hi Nik,
Here's a snipped in Perl that launches an outbound call:
if (my $sock = IO::Socket::INET->new(Proto =>'tcp', PeerAddr => '127.0.0.1', PeerPort => 8021)) {
print $sock "auth XXX\n\n";
print $sock "api originate {softivr_id=$siid,src_softivr_id=$siid,softivr_outdial=true}sofia/frombt/$ntd@1.2.3.4 ([email]softivr_outdial=true}sofia/frombt/@1.2.3.4[/email]) $service\n\n";
$sock->close();
}
- it does no error checking or anything, but (line by line) it:
- opens a socket to the event socket interface
- authenticates
- issues an originate which dials out to the number in $ntd. The bits in {} set a bunch of variables on the channel, which are used by the software which processes the call later on. The call is linked to the extension in $service - FS looks this up in the dialplan - which handles our end.
- closes the socket
Cheers --
Dave
Quote: | Thanks for that, coming from a C++ background it’s a refreshing change to be looking at something that seems logical and efficient.
I’d briefly looked at the event socket and wondered if that was the way to go. I presume that there’s some sort of event generation that can trigger and external process as well somewhere, though all I need to do is update mysql (hopefully using some sort of pooled connection)
I’m not using a TDM card, I have a direct interconnect with the PSTN breakout provider with 1,500 channels available to me. I’m finding Asterisk proving to be less than stable at high call volumes and load values spike at more than 100 calls with billing/accounting in place, hence my interest in FS. The only thing that’s concerning me is XML at the moment. Lots of code and very wordy. I’m sure I’ll appreciate why XML given time
Regards,
From: freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org) [mailto:freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)] On Behalf Of Michael S Collins
Sent: 03 February 2009 01:17
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Subject: Re: [Freeswitch-users] Generating calls from external source
Nik,
Welcome to FreeSWITCH! The short answer is "yes, FS can do that." The first thing that you should do is unlearn "the Asterisk way" of thinking. Usually there is an elegant way of doing things in FS that wasn't possible in Ast.
I would recommend that you start by looking at the event socket, which is somewhat analogous to the AMI only cooler. I have personally done something similar to this using the event socket and a Perl script. The key is to learn the syntax of the originate command. (definitely hit the wiki and IRC channel)
Are you using TDM cards for this? Just curious.
-MC (IRC nick: mercutioviz)
Sent from my iPhone
On Feb 2, 2009, at 3:35 PM, "Nik Middleton" <nik.middleton@noblesolutions.co.uk (nik.middleton@noblesolutions.co.uk)> wrote:
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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
|
|
|
Back to top |
|
|
raul at etellicom.com Guest
|
Posted: Tue Feb 03, 2009 8:15 am Post subject: [Freeswitch-users] Generating calls from external source |
|
|
In addition do David's suggestion, you probably want to have your
application to watch for some specific events after the call is
originated and take action based on them. For example, you could watch
for the CHANNEL_ANSWER event and play some audio file waiting for some
digit, which is generated by the DTMF event.
To watch only for those specific events, you should do the following
just after authentication (still using Perl as an example, but the
mod_event_socket is language agnostic), then you will receive those
events from FreeSWITCH through the socket stream:
...
print $sock "auth XXX\n\n";
print $sock "event plain CHANNEL_ANSWER DTMF\n\n";
...
To see a list of available events, please look at the following wiki
pages:
http://wiki.freeswitch.org/wiki/Mod_event_socket#event
http://wiki.freeswitch.org/wiki/Event_list
Regards,
Raul
On Tue, 2009-02-03 at 09:46 +0000, David Knell wrote:
Quote: | Hi Nik,
Here's a snipped in Perl that launches an outbound call:
if (my $sock = IO::Socket::INET->new(Proto =>'tcp', PeerAddr =>
'127.0.0.1', PeerPort => 8021)) {
print $sock "auth XXX\n\n";
print $sock "api originate {softivr_id=$siid,src_softivr_id=
$siid,softivr_outdial=true}sofia/frombt/$ntd@1.2.3.4 $service\n\n";
$sock->close();
}
- it does no error checking or anything, but (line by line) it:
- opens a socket to the event socket interface
- authenticates
- issues an originate which dials out to the number in $ntd. The
bits in {} set a bunch of variables on the channel, which are used by
the software which processes the call later on. The call is linked to
the extension in $service - FS looks this up in the dialplan - which
handles our end.
- closes the socket
Cheers --
Dave
Quote: | Thanks for that, coming from a C++ background it’s a refreshing
change to be looking at something that seems logical and efficient.
I’d briefly looked at the event socket and wondered if that was the
way to go. I presume that there’s some sort of event generation
that can trigger and external process as well somewhere, though all
I need to do is update mysql (hopefully using some sort of pooled
connection)
I’m not using a TDM card, I have a direct interconnect with the PSTN
breakout provider with 1,500 channels available to me. I’m finding
Asterisk proving to be less than stable at high call volumes and
load values spike at more than 100 calls with billing/accounting in
place, hence my interest in FS. The only thing that’s concerning me
is XML at the moment. Lots of code and very wordy. I’m sure I’ll
appreciate why XML given time
Regards,
____________________________________________________________________
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Michael S Collins
Sent: 03 February 2009 01:17
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Generating calls from external
source
Nik,
Welcome to FreeSWITCH! The short answer is "yes, FS can do that."
The first thing that you should do is unlearn "the Asterisk way" of
thinking. Usually there is an elegant way of doing things in FS that
wasn't possible in Ast.
I would recommend that you start by looking at the event socket,
which is somewhat analogous to the AMI only cooler. I have
personally done something similar to this using the event socket and
a Perl script. The key is to learn the syntax of the originate
command. (definitely hit the wiki and IRC channel)
Are you using TDM cards for this? Just curious.
-MC (IRC nick: mercutioviz)
Sent from my iPhone
On Feb 2, 2009, at 3:35 PM, "Nik Middleton"
<nik.middleton@noblesolutions.co.uk> wrote:
Quote: | Hi Guys,
As a long time Asterisk user, I’m looking into freeswitch as an
alternative mainly due to (list multiple reasons here)
Can anyone give me a pointer as to how I would achieve the
following?
I need to replicate an emergency broadcast system currently
running under Asterisk.
At the moment, I run through a Mysql database and using the
manager API, issues an Originate command to dial a number.
When the call is answered, a message is played, and the recipient
has the option of hitting a digit to confirm receipt. I then call
an AGI script to update the database.
Is this fairly easy to do in Freeswitch?
Not looking for code, just some pointers as to what’s available to
do the above /
Regards,
_______________________________________________
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
|
_______________________________________________
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 |
|
Back to top |
|
|
anthony.minessale at g... Guest
|
Posted: Tue Feb 03, 2009 9:17 am Post subject: [Freeswitch-users] Generating calls from external source |
|
|
There is also an event socket library written in C called esl that is in the fs tree in the libs directory.
This has the ability to establish connections both inbound and outbound from FS.
There is also a perl module FreeSWITCH::Client that mr collins may be interested in in the tree as well.
On Tue, Feb 3, 2009 at 7:12 AM, Raul Fragoso <raul@etellicom.com (raul@etellicom.com)> wrote:
Quote: | In addition do David's suggestion, you probably want to have your
application to watch for some specific events after the call is
originated and take action based on them. For example, you could watch
for the CHANNEL_ANSWER event and play some audio file waiting for some
digit, which is generated by the DTMF event.
To watch only for those specific events, you should do the following
just after authentication (still using Perl as an example, but the
mod_event_socket is language agnostic), then you will receive those
events from FreeSWITCH through the socket stream:
...
print $sock "auth XXX\n\n";
print $sock "event plain CHANNEL_ANSWER DTMF\n\n";
...
To see a list of available events, please look at the following wiki
pages:
http://wiki.freeswitch.org/wiki/Mod_event_socket#event
http://wiki.freeswitch.org/wiki/Event_list
Regards,
Raul
On Tue, 2009-02-03 at 09:46 +0000, David Knell wrote:
Quote: | Hi Nik,
Here's a snipped in Perl that launches an outbound call:
if (my $sock = IO::Socket::INET->new(Proto =>'tcp', PeerAddr =>
'127.0.0.1', PeerPort => 8021)) {
print $sock "auth XXX\n\n";
print $sock "api originate {softivr_id=$siid,src_softivr_id=
$siid,softivr_outdial=true}sofia/frombt/$ntd@1.2.3.4 (ntd@1.2.3.4) $service\n\n";
$sock->close();
}
- it does no error checking or anything, but (line by line) it:
- opens a socket to the event socket interface
- authenticates
- issues an originate which dials out to the number in $ntd. The
bits in {} set a bunch of variables on the channel, which are used by
the software which processes the call later on. The call is linked to
the extension in $service - FS looks this up in the dialplan - which
handles our end.
- closes the socket
Cheers --
Dave
Quote: | Thanks for that, coming from a C++ background it's a refreshing
change to be looking at something that seems logical and efficient.
I'd briefly looked at the event socket and wondered if that was the
way to go. I presume that there's some sort of event generation
that can trigger and external process as well somewhere, though all
I need to do is update mysql (hopefully using some sort of pooled
connection)
I'm not using a TDM card, I have a direct interconnect with the PSTN
breakout provider with 1,500 channels available to me. I'm finding
Asterisk proving to be less than stable at high call volumes and
load values spike at more than 100 calls with billing/accounting in
place, hence my interest in FS. The only thing that's concerning me
is XML at the moment. Lots of code and very wordy. I'm sure I'll
appreciate why XML given time
Regards,
____________________________________________________________________
From: freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org) [mailto:freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)] On Behalf Of Michael S Collins
Sent: 03 February 2009 01:17
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Subject: Re: [Freeswitch-users] Generating calls from external
source
Nik,
Welcome to FreeSWITCH! The short answer is "yes, FS can do that."
The first thing that you should do is unlearn "the Asterisk way" of
thinking. Usually there is an elegant way of doing things in FS that
wasn't possible in Ast.
I would recommend that you start by looking at the event socket,
which is somewhat analogous to the AMI only cooler. I have
personally done something similar to this using the event socket and
a Perl script. The key is to learn the syntax of the originate
command. (definitely hit the wiki and IRC channel)
Are you using TDM cards for this? Just curious.
-MC (IRC nick: mercutioviz)
Sent from my iPhone
On Feb 2, 2009, at 3:35 PM, "Nik Middleton"
<nik.middleton@noblesolutions.co.uk (nik.middleton@noblesolutions.co.uk)> wrote:
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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 (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 (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
|
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400 |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Tue Feb 03, 2009 11:54 am Post subject: [Freeswitch-users] Generating calls from external source |
|
|
On Tue, Feb 3, 2009 at 6:09 AM, Anthony Minessale
<anthony.minessale@gmail.com> wrote:
Quote: | There is also an event socket library written in C called esl that is in the
fs tree in the libs directory.
This has the ability to establish connections both inbound and outbound from
FS.
There is also a perl module FreeSWITCH::Client that mr collins may be
interested in in the tree as well.
|
As a matter of fact that is the module I used for my outbound IVR
application. It simply handled the communications between my perl
script and my FS instance. The script would read in pre-formatted
originate strings from a text file that had been previously generated
by another application. Then all I had to do was specify how many
concurrent channels that I wanted - kind of like a throttle - and then
I let the script go. I used the "bgapi originate" syntax so that I
wouldn't have to wait to see what happened with each origination
attempt. Then about every second or so I would issue an "oz dump 1"
and parse the results to count how many b channels were in use. If the
number of b channels in use was >= my throttle limit then I'd pause
the script for 1000ms and then issue the oz dump again until the
number of b channels in use had dropped down below my limit. Nothing
too fancy.
You're welcome to review my script, originate syntax, and dialplan
entries if you are interested.
-MC
Quote: |
On Tue, Feb 3, 2009 at 7:12 AM, Raul Fragoso <raul@etellicom.com> wrote:
Quote: |
In addition do David's suggestion, you probably want to have your
application to watch for some specific events after the call is
originated and take action based on them. For example, you could watch
for the CHANNEL_ANSWER event and play some audio file waiting for some
digit, which is generated by the DTMF event.
To watch only for those specific events, you should do the following
just after authentication (still using Perl as an example, but the
mod_event_socket is language agnostic), then you will receive those
events from FreeSWITCH through the socket stream:
...
print $sock "auth XXX\n\n";
print $sock "event plain CHANNEL_ANSWER DTMF\n\n";
...
To see a list of available events, please look at the following wiki
pages:
http://wiki.freeswitch.org/wiki/Mod_event_socket#event
http://wiki.freeswitch.org/wiki/Event_list
Regards,
Raul
On Tue, 2009-02-03 at 09:46 +0000, David Knell wrote:
Quote: | Hi Nik,
Here's a snipped in Perl that launches an outbound call:
if (my $sock = IO::Socket::INET->new(Proto =>'tcp', PeerAddr =>
'127.0.0.1', PeerPort => 8021)) {
print $sock "auth XXX\n\n";
print $sock "api originate {softivr_id=$siid,src_softivr_id=
$siid,softivr_outdial=true}sofia/frombt/$ntd@1.2.3.4 $service\n\n";
$sock->close();
}
- it does no error checking or anything, but (line by line) it:
- opens a socket to the event socket interface
- authenticates
- issues an originate which dials out to the number in $ntd. The
bits in {} set a bunch of variables on the channel, which are used by
the software which processes the call later on. The call is linked to
the extension in $service - FS looks this up in the dialplan - which
handles our end.
- closes the socket
Cheers --
Dave
Quote: | Thanks for that, coming from a C++ background it's a refreshing
change to be looking at something that seems logical and efficient.
I'd briefly looked at the event socket and wondered if that was the
way to go. I presume that there's some sort of event generation
that can trigger and external process as well somewhere, though all
I need to do is update mysql (hopefully using some sort of pooled
connection)
I'm not using a TDM card, I have a direct interconnect with the PSTN
breakout provider with 1,500 channels available to me. I'm finding
Asterisk proving to be less than stable at high call volumes and
load values spike at more than 100 calls with billing/accounting in
place, hence my interest in FS. The only thing that's concerning me
is XML at the moment. Lots of code and very wordy. I'm sure I'll
appreciate why XML given time
Regards,
____________________________________________________________________
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Michael
S Collins
Sent: 03 February 2009 01:17
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Generating calls from external
source
Nik,
Welcome to FreeSWITCH! The short answer is "yes, FS can do that."
The first thing that you should do is unlearn "the Asterisk way" of
thinking. Usually there is an elegant way of doing things in FS that
wasn't possible in Ast.
I would recommend that you start by looking at the event socket,
which is somewhat analogous to the AMI only cooler. I have
personally done something similar to this using the event socket and
a Perl script. The key is to learn the syntax of the originate
command. (definitely hit the wiki and IRC channel)
Are you using TDM cards for this? Just curious.
-MC (IRC nick: mercutioviz)
Sent from my iPhone
On Feb 2, 2009, at 3:35 PM, "Nik Middleton"
<nik.middleton@noblesolutions.co.uk> wrote:
Quote: | Hi Guys,
As a long time Asterisk user, I'm looking into freeswitch as an
alternative mainly due to (list multiple reasons here)
Can anyone give me a pointer as to how I would achieve the
following?
I need to replicate an emergency broadcast system currently
running under Asterisk.
At the moment, I run through a Mysql database and using the
manager API, issues an Originate command to dial a number.
When the call is answered, a message is played, and the recipient
has the option of hitting a digit to confirm receipt. I then call
an AGI script to update the database.
Is this fairly easy to do in Freeswitch?
Not looking for code, just some pointers as to what's available to
do the above /
Regards,
_______________________________________________
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
|
_______________________________________________
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
|
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org
pstn:213-799-1400
_______________________________________________
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 |
|
Back to top |
|
|
nik.middleton at noble... Guest
|
Posted: Tue Feb 03, 2009 11:56 am Post subject: [Freeswitch-users] Generating calls from external source |
|
|
Are you suggesting that I should process the call externally instead of
using the dialplan? That would be neat as the audio file select could
be driven from the db select for the number. I presume that I could
also bridge the call to another number as well dependant on DTMF
selection?
Regards
-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Raul
Fragoso
Sent: 03 February 2009 13:12
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Generating calls from external source
In addition do David's suggestion, you probably want to have your
application to watch for some specific events after the call is
originated and take action based on them. For example, you could watch
for the CHANNEL_ANSWER event and play some audio file waiting for some
digit, which is generated by the DTMF event.
To watch only for those specific events, you should do the following
just after authentication (still using Perl as an example, but the
mod_event_socket is language agnostic), then you will receive those
events from FreeSWITCH through the socket stream:
...
print $sock "auth XXX\n\n";
print $sock "event plain CHANNEL_ANSWER DTMF\n\n";
...
To see a list of available events, please look at the following wiki
pages:
http://wiki.freeswitch.org/wiki/Mod_event_socket#event
http://wiki.freeswitch.org/wiki/Event_list
Regards,
Raul
On Tue, 2009-02-03 at 09:46 +0000, David Knell wrote:
Quote: | Hi Nik,
Here's a snipped in Perl that launches an outbound call:
if (my $sock = IO::Socket::INET->new(Proto =>'tcp', PeerAddr =>
'127.0.0.1', PeerPort => 8021)) {
print $sock "auth XXX\n\n";
print $sock "api originate {softivr_id=$siid,src_softivr_id=
$siid,softivr_outdial=true}sofia/frombt/$ntd@1.2.3.4 $service\n\n";
$sock->close();
}
- it does no error checking or anything, but (line by line) it:
- opens a socket to the event socket interface
- authenticates
- issues an originate which dials out to the number in $ntd. The
bits in {} set a bunch of variables on the channel, which are used by
the software which processes the call later on. The call is linked to
the extension in $service - FS looks this up in the dialplan - which
handles our end.
- closes the socket
Cheers --
Dave
Quote: | Thanks for that, coming from a C++ background it's a refreshing
change to be looking at something that seems logical and efficient.
I'd briefly looked at the event socket and wondered if that was the
way to go. I presume that there's some sort of event generation
that can trigger and external process as well somewhere, though all
I need to do is update mysql (hopefully using some sort of pooled
connection)
I'm not using a TDM card, I have a direct interconnect with the PSTN
breakout provider with 1,500 channels available to me. I'm finding
Asterisk proving to be less than stable at high call volumes and
load values spike at more than 100 calls with billing/accounting in
place, hence my interest in FS. The only thing that's concerning me
is XML at the moment. Lots of code and very wordy. I'm sure I'll
appreciate why XML given time
Regards,
____________________________________________________________________
From: freeswitch-users-bounces@lists.freeswitch.org
|
| [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of
Michael S Collins
Quote: | Quote: | Sent: 03 February 2009 01:17
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Generating calls from external
source
Nik,
Welcome to FreeSWITCH! The short answer is "yes, FS can do that."
The first thing that you should do is unlearn "the Asterisk way" of
thinking. Usually there is an elegant way of doing things in FS that
wasn't possible in Ast.
I would recommend that you start by looking at the event socket,
which is somewhat analogous to the AMI only cooler. I have
personally done something similar to this using the event socket and
a Perl script. The key is to learn the syntax of the originate
command. (definitely hit the wiki and IRC channel)
Are you using TDM cards for this? Just curious.
-MC (IRC nick: mercutioviz)
Sent from my iPhone
On Feb 2, 2009, at 3:35 PM, "Nik Middleton"
<nik.middleton@noblesolutions.co.uk> wrote:
Quote: | Hi Guys,
As a long time Asterisk user, I'm looking into freeswitch as an
alternative mainly due to (list multiple reasons here)
Can anyone give me a pointer as to how I would achieve the
following?
I need to replicate an emergency broadcast system currently
running under Asterisk.
At the moment, I run through a Mysql database and using the
manager API, issues an Originate command to dial a number.
When the call is answered, a message is played, and the recipient
has the option of hitting a digit to confirm receipt. I then call
an AGI script to update the database.
Is this fairly easy to do in Freeswitch?
Not looking for code, just some pointers as to what's available to
do the above /
Regards,
_______________________________________________
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
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
Quote: | 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
_______________________________________________
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 |
|
Back to top |
|
|
sicfslist at gmail.com Guest
|
Posted: Tue Feb 03, 2009 12:18 pm Post subject: [Freeswitch-users] Generating calls from external source |
|
|
Nik,
There are a lot of ways to make FS dial out and deliver messaging etc. We are going through the process of replacing * for this purpose. For us (getting started with the help of our friends here on the list) it has been pretty easy.
With * we were using AMI to originate calls ... to migrate to FS we just changed that to use event_socket with bgapi to originate the call and connect the call to a context and extension. There are several ways to get the dialplan to FS after that ... a script, xml_curl, or statically configured in the conf directory.
So as an example the application we have just logs into the FS socket (similar to * but much better) and then rips off calls like this:
bgapi originate{$set_some_vars}sofia/external/$ANI@$IP:$PORT $EXTENSION xml $CONTEXT
The beauty of it all is that:
-- a lot of flexibility in what you can do (like drive the call through events)
-- the CDR reporting is about 3 million times better than *
-- obviously higher capacity
I'd start playing with event_socket and some static dialplans to get the feel for it ... but if you have an application written already to work with * (i.e. the logic and backend) it will be very easy to migrate and you'll be glad you did it!
Shelby
On Tue, Feb 3, 2009 at 10:53 AM, Nik Middleton <nik.middleton@noblesolutions.co.uk (nik.middleton@noblesolutions.co.uk)> wrote:
Quote: | Are you suggesting that I should process the call externally instead of
using the dialplan? That would be neat as the audio file select could
be driven from the db select for the number. I presume that I could
also bridge the call to another number as well dependant on DTMF
selection?
Regards
-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)
[mailto:freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)] On Behalf Of Raul
Fragoso
Sent: 03 February 2009 13:12
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Subject: Re: [Freeswitch-users] Generating calls from external source
In addition do David's suggestion, you probably want to have your
application to watch for some specific events after the call is
originated and take action based on them. For example, you could watch
for the CHANNEL_ANSWER event and play some audio file waiting for some
digit, which is generated by the DTMF event.
To watch only for those specific events, you should do the following
just after authentication (still using Perl as an example, but the
mod_event_socket is language agnostic), then you will receive those
events from FreeSWITCH through the socket stream:
...
print $sock "auth XXX\n\n";
print $sock "event plain CHANNEL_ANSWER DTMF\n\n";
...
To see a list of available events, please look at the following wiki
pages:
http://wiki.freeswitch.org/wiki/Mod_event_socket#event
http://wiki.freeswitch.org/wiki/Event_list
Regards,
Raul
On Tue, 2009-02-03 at 09:46 +0000, David Knell wrote:
Quote: | Hi Nik,
Here's a snipped in Perl that launches an outbound call:
if (my $sock = IO::Socket::INET->new(Proto =>'tcp', PeerAddr =>
'127.0.0.1', PeerPort => 8021)) {
print $sock "auth XXX\n\n";
print $sock "api originate {softivr_id=$siid,src_softivr_id=
$siid,softivr_outdial=true}sofia/frombt/$ntd@1.2.3.4 (ntd@1.2.3.4) $service\n\n";
$sock->close();
}
- it does no error checking or anything, but (line by line) it:
- opens a socket to the event socket interface
- authenticates
- issues an originate which dials out to the number in $ntd. The
bits in {} set a bunch of variables on the channel, which are used by
the software which processes the call later on. The call is linked to
the extension in $service - FS looks this up in the dialplan - which
handles our end.
- closes the socket
Cheers --
Dave
Quote: | Thanks for that, coming from a C++ background it's a refreshing
change to be looking at something that seems logical and efficient.
I'd briefly looked at the event socket and wondered if that was the
way to go. I presume that there's some sort of event generation
that can trigger and external process as well somewhere, though all
I need to do is update mysql (hopefully using some sort of pooled
connection)
I'm not using a TDM card, I have a direct interconnect with the PSTN
breakout provider with 1,500 channels available to me. I'm finding
Asterisk proving to be less than stable at high call volumes and
load values spike at more than 100 calls with billing/accounting in
place, hence my interest in FS. The only thing that's concerning me
is XML at the moment. Lots of code and very wordy. I'm sure I'll
appreciate why XML given time
Regards,
____________________________________________________________________
From: freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)
|
| [mailto:freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)] On Behalf Of
Michael S Collins
Quote: | Quote: | Sent: 03 February 2009 01:17
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Subject: Re: [Freeswitch-users] Generating calls from external
source
Nik,
Welcome to FreeSWITCH! The short answer is "yes, FS can do that."
The first thing that you should do is unlearn "the Asterisk way" of
thinking. Usually there is an elegant way of doing things in FS that
wasn't possible in Ast.
I would recommend that you start by looking at the event socket,
which is somewhat analogous to the AMI only cooler. I have
personally done something similar to this using the event socket and
a Perl script. The key is to learn the syntax of the originate
command. (definitely hit the wiki and IRC channel)
Are you using TDM cards for this? Just curious.
-MC (IRC nick: mercutioviz)
Sent from my iPhone
On Feb 2, 2009, at 3:35 PM, "Nik Middleton"
<nik.middleton@noblesolutions.co.uk (nik.middleton@noblesolutions.co.uk)> wrote:
Quote: | Hi Guys,
As a long time Asterisk user, I'm looking into freeswitch as an
alternative mainly due to (list multiple reasons here)
Can anyone give me a pointer as to how I would achieve the
following?
I need to replicate an emergency broadcast system currently
running under Asterisk.
At the moment, I run through a Mysql database and using the
manager API, issues an Originate command to dial a number.
When the call is answered, a message is played, and the recipient
has the option of hitting a digit to confirm receipt. I then call
an AGI script to update the database.
Is this fairly easy to do in Freeswitch?
Not looking for code, just some pointers as to what's available to
do the above /
Regards,
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
|
|
| UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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 (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
|
|
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Tue Feb 03, 2009 12:29 pm Post subject: [Freeswitch-users] Generating calls from external source |
|
|
On Tue, Feb 3, 2009 at 8:53 AM, Nik Middleton
<nik.middleton@noblesolutions.co.uk> wrote:
Quote: | Are you suggesting that I should process the call externally instead of
using the dialplan? That would be neat as the audio file select could
|
I'm not saying you should, merely that you could. What I did was
create a bunch of extensions in my dialplan that handled various steps
of the IVR outbound call: start, answered, busy, not answered, SIT
tones, etc. So my originate command would originate the call (A leg)
and drop the B leg into the dialplan at the "start" extension and then
it goes from there. It listens for early media busy or SIT tones and
also does an "execute_on_answer" to the extension that does the actual
IVR. (Only need the IVR on an answered call.) If the call is not
answered after 25 seconds then I run a Lua script that checks for the
presence of certain channel variables that I set with the
"tone_detect" application (busy and SIT). If none of those are present
then I assume the call went unanswered and do the post-processing.
Quote: | be driven from the db select for the number. I presume that I could
also bridge the call to another number as well dependant on DTMF
selection?
|
Yes, you can do this as well. You can build an IVR in XML or you can
build in a scripting language like Lua:
demo IVR: http://svn.freeswitch.org/svn/freeswitch/trunk/conf/autoload_configs/ivr.conf.xml
Lua IVR info: http://wiki.freeswitch.org/wiki/IVR#Lua_IVRs
Sorry if this is all a bit overwhelming, but you'll be glad that you
dove in to FS because it does soooo much and does it so well. Enjoy!
-MC
Quote: |
Regards
-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Raul
Fragoso
Sent: 03 February 2009 13:12
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Generating calls from external source
In addition do David's suggestion, you probably want to have your
application to watch for some specific events after the call is
originated and take action based on them. For example, you could watch
for the CHANNEL_ANSWER event and play some audio file waiting for some
digit, which is generated by the DTMF event.
To watch only for those specific events, you should do the following
just after authentication (still using Perl as an example, but the
mod_event_socket is language agnostic), then you will receive those
events from FreeSWITCH through the socket stream:
...
print $sock "auth XXX\n\n";
print $sock "event plain CHANNEL_ANSWER DTMF\n\n";
...
To see a list of available events, please look at the following wiki
pages:
http://wiki.freeswitch.org/wiki/Mod_event_socket#event
http://wiki.freeswitch.org/wiki/Event_list
Regards,
Raul
On Tue, 2009-02-03 at 09:46 +0000, David Knell wrote:
Quote: | Hi Nik,
Here's a snipped in Perl that launches an outbound call:
if (my $sock = IO::Socket::INET->new(Proto =>'tcp', PeerAddr =>
'127.0.0.1', PeerPort => 8021)) {
print $sock "auth XXX\n\n";
print $sock "api originate {softivr_id=$siid,src_softivr_id=
$siid,softivr_outdial=true}sofia/frombt/$ntd@1.2.3.4 $service\n\n";
$sock->close();
}
- it does no error checking or anything, but (line by line) it:
- opens a socket to the event socket interface
- authenticates
- issues an originate which dials out to the number in $ntd. The
bits in {} set a bunch of variables on the channel, which are used by
the software which processes the call later on. The call is linked to
the extension in $service - FS looks this up in the dialplan - which
handles our end.
- closes the socket
Cheers --
Dave
Quote: | Thanks for that, coming from a C++ background it's a refreshing
change to be looking at something that seems logical and efficient.
I'd briefly looked at the event socket and wondered if that was the
way to go. I presume that there's some sort of event generation
that can trigger and external process as well somewhere, though all
I need to do is update mysql (hopefully using some sort of pooled
connection)
I'm not using a TDM card, I have a direct interconnect with the PSTN
breakout provider with 1,500 channels available to me. I'm finding
Asterisk proving to be less than stable at high call volumes and
load values spike at more than 100 calls with billing/accounting in
place, hence my interest in FS. The only thing that's concerning me
is XML at the moment. Lots of code and very wordy. I'm sure I'll
appreciate why XML given time
Regards,
____________________________________________________________________
From: freeswitch-users-bounces@lists.freeswitch.org
|
| [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of
Michael S Collins
Quote: | Quote: | Sent: 03 February 2009 01:17
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Generating calls from external
source
Nik,
Welcome to FreeSWITCH! The short answer is "yes, FS can do that."
The first thing that you should do is unlearn "the Asterisk way" of
thinking. Usually there is an elegant way of doing things in FS that
wasn't possible in Ast.
I would recommend that you start by looking at the event socket,
which is somewhat analogous to the AMI only cooler. I have
personally done something similar to this using the event socket and
a Perl script. The key is to learn the syntax of the originate
command. (definitely hit the wiki and IRC channel)
Are you using TDM cards for this? Just curious.
-MC (IRC nick: mercutioviz)
Sent from my iPhone
On Feb 2, 2009, at 3:35 PM, "Nik Middleton"
<nik.middleton@noblesolutions.co.uk> wrote:
Quote: | Hi Guys,
As a long time Asterisk user, I'm looking into freeswitch as an
alternative mainly due to (list multiple reasons here)
Can anyone give me a pointer as to how I would achieve the
following?
I need to replicate an emergency broadcast system currently
running under Asterisk.
At the moment, I run through a Mysql database and using the
manager API, issues an Originate command to dial a number.
When the call is answered, a message is played, and the recipient
has the option of hitting a digit to confirm receipt. I then call
an AGI script to update the database.
Is this fairly easy to do in Freeswitch?
Not looking for code, just some pointers as to what's available to
do the above /
Regards,
_______________________________________________
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
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
Quote: | 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
_______________________________________________
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 |
|
Back to top |
|
|
nicolas at medularis.com Guest
|
Posted: Tue Feb 03, 2009 12:30 pm Post subject: [Freeswitch-users] Generating calls from external source |
|
|
Nik,
There's also a PHP library fs_sock.php under contrib in the source
code. I used it to create a simple app that originates calls and then
run some other sutff when it detects the call has ended. The actual
call originate command is executed inside a javascript file which is
run using bgapi jsrun. The js script also makes a POST request to an
external URL using CURL.
There's plenty to play around with, Freeswitch is really great, and
mostly easy, a world of difference with *.
Good luck!
Nicolas
On Tue, Feb 3, 2009 at 2:13 PM, Shelby Ramsey <sicfslist@gmail.com> wrote:
Quote: | Nik,
There are a lot of ways to make FS dial out and deliver messaging etc. We
are going through the process of replacing * for this purpose. For us
(getting started with the help of our friends here on the list) it has been
pretty easy.
With * we were using AMI to originate calls ... to migrate to FS we just
changed that to use event_socket with bgapi to originate the call and
connect the call to a context and extension. There are several ways to get
the dialplan to FS after that ... a script, xml_curl, or statically
configured in the conf directory.
So as an example the application we have just logs into the FS socket
(similar to * but much better) and then rips off calls like this:
bgapi originate{$set_some_vars}sofia/external/$ANI@$IP:$PORT $EXTENSION xml
$CONTEXT
The beauty of it all is that:
-- a lot of flexibility in what you can do (like drive the call through
events)
-- the CDR reporting is about 3 million times better than *
-- obviously higher capacity
I'd start playing with event_socket and some static dialplans to get the
feel for it ... but if you have an application written already to work with
* (i.e. the logic and backend) it will be very easy to migrate and you'll be
glad you did it!
Shelby
On Tue, Feb 3, 2009 at 10:53 AM, Nik Middleton
<nik.middleton@noblesolutions.co.uk> wrote:
Quote: |
Are you suggesting that I should process the call externally instead of
using the dialplan? That would be neat as the audio file select could
be driven from the db select for the number. I presume that I could
also bridge the call to another number as well dependant on DTMF
selection?
Regards
-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Raul
Fragoso
Sent: 03 February 2009 13:12
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Generating calls from external source
In addition do David's suggestion, you probably want to have your
application to watch for some specific events after the call is
originated and take action based on them. For example, you could watch
for the CHANNEL_ANSWER event and play some audio file waiting for some
digit, which is generated by the DTMF event.
To watch only for those specific events, you should do the following
just after authentication (still using Perl as an example, but the
mod_event_socket is language agnostic), then you will receive those
events from FreeSWITCH through the socket stream:
...
print $sock "auth XXX\n\n";
print $sock "event plain CHANNEL_ANSWER DTMF\n\n";
...
To see a list of available events, please look at the following wiki
pages:
http://wiki.freeswitch.org/wiki/Mod_event_socket#event
http://wiki.freeswitch.org/wiki/Event_list
Regards,
Raul
On Tue, 2009-02-03 at 09:46 +0000, David Knell wrote:
Quote: | Hi Nik,
Here's a snipped in Perl that launches an outbound call:
if (my $sock = IO::Socket::INET->new(Proto =>'tcp', PeerAddr =>
'127.0.0.1', PeerPort => 8021)) {
print $sock "auth XXX\n\n";
print $sock "api originate {softivr_id=$siid,src_softivr_id=
$siid,softivr_outdial=true}sofia/frombt/$ntd@1.2.3.4 $service\n\n";
$sock->close();
}
- it does no error checking or anything, but (line by line) it:
- opens a socket to the event socket interface
- authenticates
- issues an originate which dials out to the number in $ntd. The
bits in {} set a bunch of variables on the channel, which are used by
the software which processes the call later on. The call is linked to
the extension in $service - FS looks this up in the dialplan - which
handles our end.
- closes the socket
Cheers --
Dave
Quote: | Thanks for that, coming from a C++ background it's a refreshing
change to be looking at something that seems logical and efficient.
I'd briefly looked at the event socket and wondered if that was the
way to go. I presume that there's some sort of event generation
that can trigger and external process as well somewhere, though all
I need to do is update mysql (hopefully using some sort of pooled
connection)
I'm not using a TDM card, I have a direct interconnect with the PSTN
breakout provider with 1,500 channels available to me. I'm finding
Asterisk proving to be less than stable at high call volumes and
load values spike at more than 100 calls with billing/accounting in
place, hence my interest in FS. The only thing that's concerning me
is XML at the moment. Lots of code and very wordy. I'm sure I'll
appreciate why XML given time
Regards,
____________________________________________________________________
From: freeswitch-users-bounces@lists.freeswitch.org
|
| [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of
Michael S Collins
Quote: | Quote: | Sent: 03 February 2009 01:17
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Generating calls from external
source
Nik,
Welcome to FreeSWITCH! The short answer is "yes, FS can do that."
The first thing that you should do is unlearn "the Asterisk way" of
thinking. Usually there is an elegant way of doing things in FS that
wasn't possible in Ast.
I would recommend that you start by looking at the event socket,
which is somewhat analogous to the AMI only cooler. I have
personally done something similar to this using the event socket and
a Perl script. The key is to learn the syntax of the originate
command. (definitely hit the wiki and IRC channel)
Are you using TDM cards for this? Just curious.
-MC (IRC nick: mercutioviz)
Sent from my iPhone
On Feb 2, 2009, at 3:35 PM, "Nik Middleton"
<nik.middleton@noblesolutions.co.uk> wrote:
Quote: | Hi Guys,
As a long time Asterisk user, I'm looking into freeswitch as an
alternative mainly due to (list multiple reasons here)
Can anyone give me a pointer as to how I would achieve the
following?
I need to replicate an emergency broadcast system currently
running under Asterisk.
At the moment, I run through a Mysql database and using the
manager API, issues an Originate command to dial a number.
When the call is answered, a message is played, and the recipient
has the option of hitting a digit to confirm receipt. I then call
an AGI script to update the database.
Is this fairly easy to do in Freeswitch?
Not looking for code, just some pointers as to what's available to
do the above /
Regards,
_______________________________________________
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
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
Quote: | 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
_______________________________________________
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
|
_______________________________________________
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 |
|
Back to top |
|
|
raul at etellicom.com Guest
|
Posted: Tue Feb 03, 2009 12:38 pm Post subject: [Freeswitch-users] Generating calls from external source |
|
|
Hi Nik,
That's one possibility, yes. You could use mod_xml_curl to provide the
dial-plan on the fly and then use mod_event_socket to send commands to
FS and process events. That's exactly what I do actually, we have an IVR
engine that is driven by mod_event_socket and another module that
provides the XML dial-plan through mod_xml_curl.
The beauty of FS is that you have many options to tack a problem, and
all of those options are very elegant. I suggest looking at
mod_event_socket first and then decide if you can live with the static
dial-plan or go to a more dynamic dial-plan via mod_xml_curl.
Regards,
Raul
On Tue, 2009-02-03 at 16:53 +0000, Nik Middleton wrote:
Quote: | Are you suggesting that I should process the call externally instead of
using the dialplan? That would be neat as the audio file select could
be driven from the db select for the number. I presume that I could
also bridge the call to another number as well dependant on DTMF
selection?
Regards
-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Raul
Fragoso
Sent: 03 February 2009 13:12
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Generating calls from external source
In addition do David's suggestion, you probably want to have your
application to watch for some specific events after the call is
originated and take action based on them. For example, you could watch
for the CHANNEL_ANSWER event and play some audio file waiting for some
digit, which is generated by the DTMF event.
To watch only for those specific events, you should do the following
just after authentication (still using Perl as an example, but the
mod_event_socket is language agnostic), then you will receive those
events from FreeSWITCH through the socket stream:
...
print $sock "auth XXX\n\n";
print $sock "event plain CHANNEL_ANSWER DTMF\n\n";
...
To see a list of available events, please look at the following wiki
pages:
http://wiki.freeswitch.org/wiki/Mod_event_socket#event
http://wiki.freeswitch.org/wiki/Event_list
Regards,
Raul
On Tue, 2009-02-03 at 09:46 +0000, David Knell wrote:
Quote: | Hi Nik,
Here's a snipped in Perl that launches an outbound call:
if (my $sock = IO::Socket::INET->new(Proto =>'tcp', PeerAddr =>
'127.0.0.1', PeerPort => 8021)) {
print $sock "auth XXX\n\n";
print $sock "api originate {softivr_id=$siid,src_softivr_id=
$siid,softivr_outdial=true}sofia/frombt/$ntd@1.2.3.4 $service\n\n";
$sock->close();
}
- it does no error checking or anything, but (line by line) it:
- opens a socket to the event socket interface
- authenticates
- issues an originate which dials out to the number in $ntd. The
bits in {} set a bunch of variables on the channel, which are used by
the software which processes the call later on. The call is linked to
the extension in $service - FS looks this up in the dialplan - which
handles our end.
- closes the socket
Cheers --
Dave
Quote: | Thanks for that, coming from a C++ background it's a refreshing
change to be looking at something that seems logical and efficient.
I'd briefly looked at the event socket and wondered if that was the
way to go. I presume that there's some sort of event generation
that can trigger and external process as well somewhere, though all
I need to do is update mysql (hopefully using some sort of pooled
connection)
I'm not using a TDM card, I have a direct interconnect with the PSTN
breakout provider with 1,500 channels available to me. I'm finding
Asterisk proving to be less than stable at high call volumes and
load values spike at more than 100 calls with billing/accounting in
place, hence my interest in FS. The only thing that's concerning me
is XML at the moment. Lots of code and very wordy. I'm sure I'll
appreciate why XML given time
Regards,
____________________________________________________________________
From: freeswitch-users-bounces@lists.freeswitch.org
|
| [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of
Michael S Collins
Quote: | Quote: | Sent: 03 February 2009 01:17
To: freeswitch-users@lists.freeswitch.org
Subject: Re: [Freeswitch-users] Generating calls from external
source
Nik,
Welcome to FreeSWITCH! The short answer is "yes, FS can do that."
The first thing that you should do is unlearn "the Asterisk way" of
thinking. Usually there is an elegant way of doing things in FS that
wasn't possible in Ast.
I would recommend that you start by looking at the event socket,
which is somewhat analogous to the AMI only cooler. I have
personally done something similar to this using the event socket and
a Perl script. The key is to learn the syntax of the originate
command. (definitely hit the wiki and IRC channel)
Are you using TDM cards for this? Just curious.
-MC (IRC nick: mercutioviz)
Sent from my iPhone
On Feb 2, 2009, at 3:35 PM, "Nik Middleton"
<nik.middleton@noblesolutions.co.uk> wrote:
Quote: | Hi Guys,
As a long time Asterisk user, I'm looking into freeswitch as an
alternative mainly due to (list multiple reasons here)
Can anyone give me a pointer as to how I would achieve the
following?
I need to replicate an emergency broadcast system currently
running under Asterisk.
At the moment, I run through a Mysql database and using the
manager API, issues an Originate command to dial a number.
When the call is answered, a message is played, and the recipient
has the option of hitting a digit to confirm receipt. I then call
an AGI script to update the database.
Is this fairly easy to do in Freeswitch?
Not looking for code, just some pointers as to what's available to
do the above /
Regards,
_______________________________________________
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
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
Quote: | 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
_______________________________________________
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 |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|