<p dir="ltr">Here&#39;s an alpha implementation:</p><p dir="ltr"><br></p><p dir="ltr">Drop this in your agi-bin (likely at /var/lib/asterisk/agi-bin )</p><p dir="ltr"><a href="http://pastebin.com/RjgN8MHg">http://pastebin.com/RjgN8MHg</a></p>
<p dir="ltr"><br></p><p dir="ltr">and put this in your dialplan (likely extensions.conf,  or exensions_additional.conf under &quot;from-internal-custom&quot;) somewhere:</p><p dir="ltr"></p><p dir="ltr">(you MAY want to put this in a [section],  and include=&gt; section in your existing contexts)</p>
<p dir="ltr">exten =&gt; 6543,1,Answer</p><p dir="ltr">exten =&gt; 6543,n,AGI(lotto.php)</p><p dir="ltr">exten =&gt; 6543,n,Noop(${ScriptResult})</p><p dir="ltr">exten =&gt; 6543,n,Hangup</p><div><br></div><p></p><p dir="ltr">
When asterisk receives a call to that extension,  it will run the script,  which gets the XML results (only reads the first one), and sends &quot;playnumber(number)&quot;  to asterisk. </p><p dir="ltr">(unfortunately,  asterisk treats numbers over 10 funny,  and you&#39;ll want to come up with something..  the number 35 is spoken &quot;thirty, [pause] five&quot;  which LOGICALLY works,  as the numbers should ALWAYS be in ascending order.)</p>
<p dir="ltr">you could do something like,  take input from the user to select the date,  maybe even have it LIST the dates from the XML.  whatever you like!</p><p dir="ltr"><br></p><br><div class="gmail_quote">On 25 January 2013 16:07, Hernan Popper <span dir="ltr">&lt;<a href="mailto:hernanp@key.com.ar" target="_blank">hernanp@key.com.ar</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Dear gurues</div><div> </div><div>I&#39;m trying to do a proof of concept, and I could use some help. </div>
<div> </div><div>I would like an Asterisk to be able to speak the lottery results. In a nutshell, there is an xml feed (<a href="http://www.wclc.com/scraped/main/winning_numbers.xml)" target="_blank">http://www.wclc.com/scraped/main/winning_numbers.xml) </a> with the winning numbers, and I want an asterisk to read out loud those numbers using Allison&#39;s voice. Sounds simple.</div>


<div> </div><div>I&#39;ve been looking at some php examples I got from PIAF (nv-news, nv-stocks, etc), but I&#39;m not a programmer nor expert in AGI, PHP or any other of those amazing technologies.</div><div> </div><div>


Any advise/clue/ideas?</div><span class="HOEnZb"><font color="#888888"><div> </div><div>Hernan</div><div> </div></font></span></div>
<br>_______________________________________________<br>
Asterisk mailing list<br>
<a href="mailto:Asterisk@muug.mb.ca">Asterisk@muug.mb.ca</a><br>
<a href="http://www.muug.mb.ca/mailman/listinfo/asterisk" target="_blank">http://www.muug.mb.ca/mailman/listinfo/asterisk</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br> - Justin Davidow<br>Unit #9 - 860 Westminster Ave<br>Winnipeg, MB, Canada<div>R3G1A9</div><div>Work# 204.272.2942<br>Home# 204.480.3896</div><div>MSNID: <a href="mailto:phyrexian@shaw.ca" target="_blank">phyrexian@shaw.ca</a></div>