Nik,<div><br class="webkit-block-placeholder"></div><div>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.</div>
<div><br class="webkit-block-placeholder"></div><div>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.</div>
<div><br class="webkit-block-placeholder"></div><div>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:</div><div><br class="webkit-block-placeholder">
</div><div>bgapi originate{$set_some_vars}sofia/external/$ANI@$IP:$PORT $EXTENSION xml $CONTEXT</div><div><br class="webkit-block-placeholder"></div><div>The beauty of it all is that:</div><div> -- a lot of flexibility in what you can do (like drive the call through events)</div>
<div> -- the CDR reporting is about 3 million times better than *</div><div> -- obviously higher capacity</div><div><br class="webkit-block-placeholder"></div><div>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!</div>
<div><br class="webkit-block-placeholder"></div><div>Shelby</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div><div class="gmail_quote">
On Tue, Feb 3, 2009 at 10:53 AM, Nik Middleton <span dir="ltr"><<a href="mailto:nik.middleton@noblesolutions.co.uk">nik.middleton@noblesolutions.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Are you suggesting that I should process the call externally instead of<br>
using the dialplan? That would be neat as the audio file select could<br>
be driven from the db select for the number. I presume that I could<br>
also bridge the call to another number as well dependant on DTMF<br>
selection?<br>
<br>
Regards<br>
<div class="Ih2E3d"><br>
<br>
-----Original Message-----<br>
From: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a><br>
</div><div><div></div><div class="Wj3C7c">[mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] On Behalf Of Raul<br>
Fragoso<br>
Sent: 03 February 2009 13:12<br>
To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
Subject: Re: [Freeswitch-users] Generating calls from external source<br>
<br>
In addition do David's suggestion, you probably want to have your<br>
application to watch for some specific events after the call is<br>
originated and take action based on them. For example, you could watch<br>
for the CHANNEL_ANSWER event and play some audio file waiting for some<br>
digit, which is generated by the DTMF event.<br>
To watch only for those specific events, you should do the following<br>
just after authentication (still using Perl as an example, but the<br>
mod_event_socket is language agnostic), then you will receive those<br>
events from FreeSWITCH through the socket stream:<br>
<br>
...<br>
print $sock "auth XXX\n\n";<br>
print $sock "event plain CHANNEL_ANSWER DTMF\n\n";<br>
...<br>
<br>
To see a list of available events, please look at the following wiki<br>
pages:<br>
<a href="http://wiki.freeswitch.org/wiki/Mod_event_socket#event" target="_blank">http://wiki.freeswitch.org/wiki/Mod_event_socket#event</a><br>
<a href="http://wiki.freeswitch.org/wiki/Event_list" target="_blank">http://wiki.freeswitch.org/wiki/Event_list</a><br>
<br>
Regards,<br>
<br>
Raul<br>
<br>
On Tue, 2009-02-03 at 09:46 +0000, David Knell wrote:<br>
> Hi Nik,<br>
><br>
><br>
> Here's a snipped in Perl that launches an outbound call:<br>
><br>
><br>
> if (my $sock = IO::Socket::INET->new(Proto =>'tcp', PeerAddr =><br>
> '127.0.0.1', PeerPort => 8021)) {<br>
> print $sock "auth XXX\n\n";<br>
> print $sock "api originate {softivr_id=$siid,src_softivr_id=<br>
> $siid,softivr_outdial=true}sofia/frombt/$<a href="mailto:ntd@1.2.3.4">ntd@1.2.3.4</a> $service\n\n";<br>
> $sock->close();<br>
> }<br>
><br>
><br>
> - it does no error checking or anything, but (line by line) it:<br>
> - opens a socket to the event socket interface<br>
> - authenticates<br>
> - issues an originate which dials out to the number in $ntd. The<br>
> bits in {} set a bunch of variables on the channel, which are used by<br>
> the software which processes the call later on. The call is linked to<br>
> the extension in $service - FS looks this up in the dialplan - which<br>
> handles our end.<br>
> - closes the socket<br>
><br>
><br>
> Cheers --<br>
><br>
><br>
> Dave<br>
><br>
><br>
><br>
> > Thanks for that, coming from a C++ background it's a refreshing<br>
> > change to be looking at something that seems logical and efficient.<br>
> ><br>
> > I'd briefly looked at the event socket and wondered if that was the<br>
> > way to go. I presume that there's some sort of event generation<br>
> > that can trigger and external process as well somewhere, though all<br>
> > I need to do is update mysql (hopefully using some sort of pooled<br>
> > connection)<br>
> ><br>
> > I'm not using a TDM card, I have a direct interconnect with the PSTN<br>
> > breakout provider with 1,500 channels available to me. I'm finding<br>
> > Asterisk proving to be less than stable at high call volumes and<br>
> > load values spike at more than 100 calls with billing/accounting in<br>
> > place, hence my interest in FS. The only thing that's concerning me<br>
> > is XML at the moment. Lots of code and very wordy. I'm sure I'll<br>
> > appreciate why XML given time<br>
> ><br>
> > Regards,<br>
> ><br>
> ><br>
> > ____________________________________________________________________<br>
> > From: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a><br>
[mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>] On Behalf Of<br>
Michael S Collins<br>
> > Sent: 03 February 2009 01:17<br>
> > To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
> > Subject: Re: [Freeswitch-users] Generating calls from external<br>
> > source<br>
> ><br>
> > Nik,<br>
> ><br>
> > Welcome to FreeSWITCH! The short answer is "yes, FS can do that."<br>
> > The first thing that you should do is unlearn "the Asterisk way" of<br>
> > thinking. Usually there is an elegant way of doing things in FS that<br>
> > wasn't possible in Ast.<br>
> ><br>
> > I would recommend that you start by looking at the event socket,<br>
> > which is somewhat analogous to the AMI only cooler. :) I have<br>
> > personally done something similar to this using the event socket and<br>
> > a Perl script. The key is to learn the syntax of the originate<br>
> > command. (definitely hit the wiki and IRC channel)<br>
> > Are you using TDM cards for this? Just curious.<br>
> ><br>
> > -MC (IRC nick: mercutioviz)<br>
> ><br>
> > Sent from my iPhone<br>
> ><br>
> > On Feb 2, 2009, at 3:35 PM, "Nik Middleton"<br>
> > <<a href="mailto:nik.middleton@noblesolutions.co.uk">nik.middleton@noblesolutions.co.uk</a>> wrote:<br>
> > > Hi Guys,<br>
> > ><br>
> > > As a long time Asterisk user, I'm looking into freeswitch as an<br>
> > > alternative mainly due to (list multiple reasons here)<br>
> > ><br>
> > > Can anyone give me a pointer as to how I would achieve the<br>
> > > following?<br>
> > ><br>
> > > I need to replicate an emergency broadcast system currently<br>
> > > running under Asterisk.<br>
> > ><br>
> > > At the moment, I run through a Mysql database and using the<br>
> > > manager API, issues an Originate command to dial a number.<br>
> > ><br>
> > > When the call is answered, a message is played, and the recipient<br>
> > > has the option of hitting a digit to confirm receipt. I then call<br>
> > > an AGI script to update the database.<br>
> > ><br>
> > > Is this fairly easy to do in Freeswitch?<br>
> > ><br>
> > > Not looking for code, just some pointers as to what's available to<br>
> > > do the above /<br>
> > ><br>
> > > Regards,<br>
> > > _______________________________________________<br>
> > > Freeswitch-users mailing list<br>
> > > <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
> > > <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> > ><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> > > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
> > _______________________________________________<br>
> > Freeswitch-users mailing list<br>
> > <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
> > <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> ><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
> ><br>
><br>
><br>
> _______________________________________________<br>
> Freeswitch-users mailing list<br>
> <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br></div>