<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Nik,<div><br></div><div>Here's a snipped in Perl that launches an outbound call:</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>if (my $sock = IO::Socket::INET->new(Proto =>'tcp', PeerAddr => '127.0.0.1', PeerPort => 8021)) {</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>print $sock "auth XXX\n\n";</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>print $sock "api originate {softivr_id=$siid,src_softivr_id=$siid,<a href="mailto:softivr_outdial=true}sofia/frombt/$ntd@1.2.3.4">softivr_outdial=true}sofia/frombt/$ntd@1.2.3.4</a> $service\n\n";</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>$sock->close();</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>}</div><div><br></div><div>- it does no error checking or anything, but (line by line) it:</div><div>&nbsp;- opens a socket to the event socket interface</div><div>&nbsp;- authenticates</div><div>&nbsp;- issues an originate which dials out to the number in $ntd. &nbsp;The bits in {} set a bunch of variables on the channel, which are used by the software which processes the call later on. &nbsp;The call is linked to the extension in $service - FS looks this up in the dialplan - which handles our end.</div><div>&nbsp;- closes the socket&nbsp;</div><div><br></div><div>Cheers --</div><div><br></div><div>Dave</div><div><br></div><div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div bgcolor="white" lang="EN-US" link="blue" vlink="blue"><o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"><div class="Section1"><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">Thanks for that, coming from a C++ background it’s a refreshing change to be looking at something that seems logical and efficient.<o:p></o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">I’d briefly looked at the event socket and wondered if that was the way to go.&nbsp; 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)<o:p></o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">I’m not using a TDM card, I have a direct interconnect with the PSTN breakout provider with 1,500 channels available to me.&nbsp; 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.&nbsp; The only thing that’s concerning me is XML at the moment.&nbsp; Lots of code and very wordy.&nbsp; I’m sure I’ll appreciate why XML given time<o:p></o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">Regards,<o:p></o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p>&nbsp;</o:p></span></font></div><div><div class="MsoNormal" align="center" style="text-align: center; margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><hr size="2" width="100%" align="center" tabindex="-1"></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><b><font size="2" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold; ">From:</span></font></b><font size="2" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma; "><span class="Apple-converted-space">&nbsp;</span><a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" style="color: blue; text-decoration: underline; ">freeswitch-users-bounces@lists.freeswitch.org</a><span class="Apple-converted-space">&nbsp;</span>[<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" style="color: blue; text-decoration: underline; ">mailto:freeswitch-users-bounces@lists.freeswitch.org</a>]<span class="Apple-converted-space">&nbsp;</span><b><span style="font-weight: bold; ">On Behalf Of<span class="Apple-converted-space">&nbsp;</span></span></b>Michael S Collins<br><b><span style="font-weight: bold; ">Sent:</span></b><span class="Apple-converted-space">&nbsp;</span>03 February 2009 01:17<br><b><span style="font-weight: bold; ">To:</span></b><span class="Apple-converted-space">&nbsp;</span><a href="mailto:freeswitch-users@lists.freeswitch.org" style="color: blue; text-decoration: underline; ">freeswitch-users@lists.freeswitch.org</a><br><b><span style="font-weight: bold; ">Subject:</span></b><span class="Apple-converted-space">&nbsp;</span>Re: [Freeswitch-users] Generating calls from external source</span></font><o:p></o:p></div></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p>&nbsp;</o:p></span></font></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">Nik,<o:p></o:p></span></font></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p>&nbsp;</o:p></span></font></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">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.&nbsp;<o:p></o:p></span></font></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p>&nbsp;</o:p></span></font></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">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)&nbsp;<o:p></o:p></span></font></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">Are you using TDM cards for this? Just curious.&nbsp;<o:p></o:p></span></font></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><o:p>&nbsp;</o:p></span></font></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">-MC (IRC nick: mercutioviz)<o:p></o:p></span></font></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><br>Sent from my iPhone<o:p></o:p></span></font></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; "><br>On Feb 2, 2009, at 3:35 PM, "<st1:personname w:st="on">Nik Middleton</st1:personname>" &lt;<a href="mailto:nik.middleton@noblesolutions.co.uk" style="color: blue; text-decoration: underline; ">nik.middleton@noblesolutions.co.uk</a>> wrote:<o:p></o:p></span></font></div></div><blockquote type="cite" style="margin-top: 5pt; margin-bottom: 5pt; "><div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">Hi Guys,<u1:p></u1:p></span></font><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">As a long time Asterisk user, I’m looking into freeswitch as an alternative mainly due to (list multiple reasons here)<u1:p></u1:p></span></font><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">Can anyone give me a pointer as to how I would achieve the following?<u1:p></u1:p></span></font><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">I need to replicate an emergency broadcast system currently running under Asterisk.<u1:p></u1:p></span></font><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">At the moment, I run through a Mysql database and using the manager API, issues an Originate command to dial a number.<u1:p></u1:p></span></font><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">When the call is answered, a message is played, and the recipient has the option of hitting a digit to confirm receipt.&nbsp; I then call an AGI script to update the database.<u1:p></u1:p></span></font><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">Is this fairly easy to do in Freeswitch?<u1:p></u1:p></span></font><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">Not looking for code, just some pointers as to what’s available to do the above /<u1:p></u1:p></span></font><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">Regards,<u1:p></u1:p></span></font><o:p></o:p></div></div></div></blockquote><blockquote type="cite" style="margin-top: 5pt; margin-bottom: 5pt; "><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="3" face="Times New Roman"><span style="font-size: 12pt; ">_______________________________________________<br>Freeswitch-users mailing list<br><a href="mailto:Freeswitch-users@lists.freeswitch.org" style="color: blue; text-decoration: underline; ">Freeswitch-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" style="color: blue; text-decoration: underline; ">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" style="color: blue; text-decoration: underline; "></a><a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" style="color: blue; text-decoration: underline; ">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org" style="color: blue; text-decoration: underline; ">http://www.freeswitch.org</a><o:p></o:p></span></font></div></div></blockquote></div>_______________________________________________<br>Freeswitch-users mailing list<br><a href="mailto:Freeswitch-users@lists.freeswitch.org" style="color: blue; text-decoration: underline; ">Freeswitch-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" style="color: blue; text-decoration: underline; ">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" style="color: blue; text-decoration: underline; ">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org" style="color: blue; text-decoration: underline; ">http://www.freeswitch.org</a><br></o:smarttagtype></div></span></blockquote></div><br></div></body></html>