Just tossed it on a PBX I have around:<div><br></div><div>2046668226</div><div><br></div><div>option 1 is the menu. If you change the result of the XML, you'll get the updated result! (no caching in the PHP, so it's always what's returned)</div>
<div><br><br><div class="gmail_quote">On 25 January 2013 17:26, Justin Davidow <span dir="ltr"><<a href="mailto:justin@xens.net" target="_blank">justin@xens.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p dir="ltr">Here'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" target="_blank">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 "from-internal-custom") somewhere:</p><p dir="ltr"></p><p dir="ltr">(you MAY want to put this in a [section], and include=> section in your existing contexts)</p>
<p dir="ltr">exten => 6543,1,Answer</p><p dir="ltr">exten => 6543,n,AGI(lotto.php)</p><p dir="ltr">exten => 6543,n,Noop(${ScriptResult})</p><p dir="ltr">exten => 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 "playnumber(number)" to asterisk. </p><p dir="ltr">(unfortunately, asterisk treats numbers over 10 funny, and you'll want to come up with something.. the number 35 is spoken "thirty, [pause] five" 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"><div><div class="h5">
On 25 January 2013 16:07, Hernan Popper <span dir="ltr"><<a href="mailto:hernanp@key.com.ar" target="_blank">hernanp@key.com.ar</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Dear gurues</div><div> </div><div>I'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's voice. Sounds simple.</div>
<div> </div><div>I've been looking at some php examples I got from PIAF (nv-news, nv-stocks, etc), but I'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><font color="#888888"><div> </div><div>Hernan</div><div> </div></font></span></div>
<br></div></div>_______________________________________________<br>
Asterisk mailing list<br>
<a href="mailto:Asterisk@muug.mb.ca" target="_blank">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><span class="HOEnZb"><font color="#888888"><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# <a href="tel:204.272.2942" value="+12042722942" target="_blank">204.272.2942</a><br>
Home# <a href="tel:204.480.3896" value="+12044803896" target="_blank">204.480.3896</a></div><div>MSNID: <a href="mailto:phyrexian@shaw.ca" target="_blank">phyrexian@shaw.ca</a></div>
</font></span></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>
</div>