<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.voxeo.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.voxeo.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Voxeo Developer's Corner</title>
	
	<link>http://blogs.voxeo.com/voxeodeveloperscorner</link>
	<description>Tips, tricks and tutorials about developing applications on Voxeo's platform</description>
	<pubDate>Wed, 27 Aug 2008 20:19:37 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.voxeo.com/VoxeoDevelopersCorner" type="application/rss+xml" /><item>
		<title>Prophecy 9 Early Access release now out on Mac OS X, Linux and WIndows</title>
		<link>http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~3/376474675/</link>
		<comments>http://blogs.voxeo.com/voxeodeveloperscorner/2008/08/27/prophecy-9-early-access-release-now-out-on-mac-os-x-linux-and-windows/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 20:19:34 +0000</pubDate>
		<dc:creator>Dan York</dc:creator>
		
		<category><![CDATA[Prophecy]]></category>

		<guid isPermaLink="false">http://blogs.voxeo.com/voxeodeveloperscorner/?p=57</guid>
		<description><![CDATA[When we announced last week that a &#8220;early access&#8221; release of Prophecy 9 was available, the software was actually only available that day on Mac OS X.  Now, however, the Prophecy 9 early access release is out on all three platforms: Windows, Linux and Mac OS X.  You can download it from www.voxeo.com/prophecy [...]

<script type="text/javascript">
SHARETHIS.addEntry({
	title: "Prophecy 9 Early Access release now out on Mac OS X, Linux and WIndows",
	url: "http://blogs.voxeo.com/voxeodeveloperscorner/2008/08/27/prophecy-9-early-access-release-now-out-on-mac-os-x-linux-and-windows/"
});
</script>
	]]></description>
			<content:encoded><![CDATA[<p>When <a href="http://blogs.voxeo.com/voxeotalks/2008/08/19/voxeo-announces-prophecy-9-with-new-management-ui-new-sip-apis-and-linux-and-mac-os-x-support/">we announced last week that a &#8220;early access&#8221; release of Prophecy 9 was available</a>, the software was actually only available <em>that day</em> on Mac OS X.  Now, however, the Prophecy 9 early access release is out on all three platforms: Windows, Linux and Mac OS X.  You can download it from <a href="http://www.voxeo.com/prophecy">www.voxeo.com/prophecy</a> in the Prophecy 9 - Early Access column a little bit down the page.  The software is still in very active development, so we&#8217;ll be posting updated versions over time and yes, some things may not work exactly right.  </p>
<p>Please do check it out if you are interested in seeing the future of our application platform - and please do send along any comments and feedback that you have.  We definitely do appreciate it all. </p>
<p><!-- Technorati Tags Start --></p>
<p>Technorati Tags:
<a href="http://technorati.com/tag/voxeo" rel="tag">voxeo</a>, <a href="http://technorati.com/tag/prophecy" rel="tag">prophecy</a>, <a href="http://technorati.com/tag/windows" rel="tag">windows</a>, <a href="http://technorati.com/tag/linux" rel="tag">linux</a>, <a href="http://technorati.com/tag/macosx" rel="tag">macosx</a>
</p>
<p><!-- Technorati Tags End --></p>
<p><a href="http://sharethis.com/item?publisher=c0af778a-87ab-41b4-be56-8ec058cd3e46&title=Prophecy+9+Early+Access+release+now+out+on+Mac+OS+X%2C+Linux+and+WIndows&url=http%3A%2F%2Fblogs.voxeo.com%2Fvoxeodeveloperscorner%2F2008%2F08%2F27%2Fprophecy-9-early-access-release-now-out-on-mac-os-x-linux-and-windows%2F">ShareThis</a></p><img src="http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~4/376474675" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.voxeo.com/voxeodeveloperscorner/2008/08/27/prophecy-9-early-access-release-now-out-on-mac-os-x-linux-and-windows/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.voxeo.com/voxeodeveloperscorner/2008/08/27/prophecy-9-early-access-release-now-out-on-mac-os-x-linux-and-windows/</feedburner:origLink></item>
		<item>
		<title>VoiceXML Variable Scoping</title>
		<link>http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~3/363988710/</link>
		<comments>http://blogs.voxeo.com/voxeodeveloperscorner/2008/08/13/voicexml-variable-scoping/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 15:43:43 +0000</pubDate>
		<dc:creator>voxeojeremyr</dc:creator>
		
		<category><![CDATA[Applications]]></category>

		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[VoiceXML]]></category>

		<guid isPermaLink="false">http://blogs.voxeo.com/voxeodeveloperscorner/?p=45</guid>
		<description><![CDATA[
Here in Support we get a fair amount of tickets asking about variables.  Namely, if a variable is created in a form can it be accessed in the field of that form or in a different form?  What I am talking about is called variable scoping.  In VXML there are several different variable scopes.  [...]

<script type="text/javascript">
SHARETHIS.addEntry({
	title: "VoiceXML Variable Scoping",
	url: "http://blogs.voxeo.com/voxeodeveloperscorner/2008/08/13/voicexml-variable-scoping/"
});
</script>
	]]></description>
			<content:encoded><![CDATA[<p><img src="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/01/voicexmlcertifieddeveloper.gif" alt="VoiceXML certified developer logo" align="right" height="150">
Here in Support we get a fair amount of tickets asking about variables.  Namely, if a variable is created in a form can it be accessed in the field of that form or in a different form?  What I am talking about is called variable scoping.  In VXML there are several different variable scopes.  You might have heard of global and local variables with other programming languages.  VXML, while not a programming language, is similar in how it approaches variables and how they can be accessed. </p>
<p>First lets get a proper definition for variable scope.  The scope of a variable defines when and where the variable exists and may be accessed. When the VXML browser exits the scope where the variable is defined, the variable is out-of-scope and cannot be accessed. When a variable is in scope, it can be accessed by both VoiceXML and ECMAScript.</p>
<p>Here is a table of the different scope levels of variables in VXML:
<TABLE border="”1″">
<TR>
<TH>Scopes</TH>
<TH>Declared In</TH>
<TH>Initialized In</TH>
<TH>Where accessible</TH>
<TH>Becomes Unavailable</TH>
</TR>
<TR>
<TD>Session</TD>
<TD>By the VXML browser </TD>
<TD>At the beginning of a session </TD>
<TD>Anytime during the session </TD>
<TD>At the end of the session </TD>
</TR>
<TR>
<TD>Application </TD>
<TD>In the root document </TD>
<TD>When VXML browser loads the root document </TD>
<TD>Throughout the application </TD>
<TD>When the VXML browser leaves the root document </TD>
</TR>
<TR>
<TD>document </TD>
<TD>In the &lt;vxml&gt; document </TD>
<TD>When the VXML browser loads the document </TD>
<TD>Within the &lt;vxml&gt; element </TD>
<TD>When VXML browser leaves the document </TD>
</TR>
<TR>
<TD>dialog </TD>
<TD>In the &lt;field&gt; element of a &lt;form&gt; or &lt;menu&gt; element </TD>
<TD>When the VXML browser loads the element </TD>
<TD>Within the element </TD>
<TD>When the VXML browser leaves the element </TD>
</TR>
<TR>
<TD>anonymous </TD>
<TD>In a &lt;block&gt;, &lt;filled&gt; or &lt;catch&gt; element </TD>
<TD>When the VXML browser begins to interpret the element </TD>
<TD>Within the element</TD>
<TD>When the VXML browser leaves the element </TD>
</TR>
</TABLE></p>
<p>Here is an example of document scoped variable.  As you can see it is accessible throughout the current VXML document.</p>
<blockquote><p>
&lt;?xml version=&#8221;1.0&#8243;?&gt;
&lt;vxml version=&#8221;2.0&#8243;&gt;</p>
<p>&lt;var name = &#8220;counter&#8221; expr = &#8220;0&#8243;/&gt;</p>
<p>&lt;form id=&#8221;F_1&#8243;&gt;
&lt;!&#8211; additional VXML code &#8211;&gt;
&lt;filled&gt;
&lt;assign name=&#8221;counter&#8221; expr = &#8220;counter + 1&#8243;/&gt;
&lt;/filled&gt;
&lt;/form&gt;</p>
<p>&lt;form id=&#8221;F_2&#8243;&gt;
&lt;!&#8211; additional VXML code &#8211;&gt;
&lt;filled&gt;
&lt;assign name=&#8221;counter&#8221; expr = &#8220;counter + 2&#8243;/&gt;
&lt;/filled&gt;
&lt;/form&gt;</p>
<p>&lt;/vxml&gt;
</p></blockquote>
<p>Here is an example of a dialog scoped document.  In form &#8220;F_1&#8243; the value of &#8220;counter&#8221; after the assign &lt;element&gt; would be 1.  In form &#8220;F_2&#8243; the value after the &lt;assign&gt; value would be 2.</p>
<blockquote><p>
&lt;?xml version=&#8221;1.0&#8243;?&gt;
&lt;vxml version=&#8221;2.0&#8243;&gt;</p>
<p>&lt;form id=&#8221;F_1&#8243;&gt;
&lt;!&#8211; additional VXML code &#8211;&gt;
&lt;filled&gt;
&lt;var name = &#8220;counter&#8221; expr = &#8220;0&#8243;/&gt;
&lt;assign name=&#8221;counter&#8221; expr = &#8220;counter + 1&#8243;/&gt;
&lt;/filled&gt;
&lt;/form&gt;</p>
<p>&lt;form id=&#8221;F_2&#8243;&gt;
&lt;!&#8211; additional VXML code &#8211;&gt;
&lt;filled&gt;
&lt;var name = &#8220;counter&#8221; expr = &#8220;0&#8243;/&gt;
&lt;assign name=&#8221;counter&#8221; expr = &#8220;counter + 2&#8243;/&gt;
&lt;/filled&gt;
&lt;/form&gt;</p>
<p>&lt;/vxml&gt;
</p></blockquote>
<p>It is also good to know that variable references will match the closest applicable scope. You can prefix a reference with a scope name, such as application.counter, for clarity or to resolve ambiguity.</p>
<p>We hope this clears up a little confusion about VXML variables and where they are defined and when they can accessed.</p>
<p>Jeremy Richmond
VXML Certified Developer</p>
<p><a href="http://sharethis.com/item?publisher=c0af778a-87ab-41b4-be56-8ec058cd3e46&title=VoiceXML+Variable+Scoping&url=http%3A%2F%2Fblogs.voxeo.com%2Fvoxeodeveloperscorner%2F2008%2F08%2F13%2Fvoicexml-variable-scoping%2F">ShareThis</a></p><img src="http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~4/363988710" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.voxeo.com/voxeodeveloperscorner/2008/08/13/voicexml-variable-scoping/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.voxeo.com/voxeodeveloperscorner/2008/08/13/voicexml-variable-scoping/</feedburner:origLink></item>
		<item>
		<title>New tutorial on passing variables between CCXML and VoiceXML</title>
		<link>http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~3/362272997/</link>
		<comments>http://blogs.voxeo.com/voxeodeveloperscorner/2008/08/11/new-tutorial-on-passing-variables-between-ccxml-and-voicexml/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 20:40:58 +0000</pubDate>
		<dc:creator>Dan York</dc:creator>
		
		<category><![CDATA[CCXML]]></category>

		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[VoiceXML]]></category>

		<guid isPermaLink="false">http://blogs.voxeo.com/voxeodeveloperscorner/?p=56</guid>
		<description><![CDATA[Ever wanted to pass variables between a CCXML and VoiceXML app and weren&#8217;t sure how?  Well, now you can learn in a recently posted tutorial from Voxeo staff member Jeff Menkel:  Passing variables to and from VoiceXML and CCXML. This tutorial builds on the previous piece about passing variables to CCXML applications as [...]

<script type="text/javascript">
SHARETHIS.addEntry({
	title: "New tutorial on passing variables between CCXML and VoiceXML",
	url: "http://blogs.voxeo.com/voxeodeveloperscorner/2008/08/11/new-tutorial-on-passing-variables-between-ccxml-and-voicexml/"
});
</script>
	]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to pass variables between a CCXML and VoiceXML app and weren&#8217;t sure how?  Well, now you can learn in a recently posted tutorial from Voxeo staff member Jeff Menkel:  <a href="http://docs.voxeo.com/ccxml/1.0-final/frame.jsp?page=ccxml10_passtovxml.htm"><em>Passing variables to and from VoiceXML and CCXML</em></a>. This tutorial builds on <a href="http://docs.voxeo.com/ccxml/1.0-final/appendixh_ccxml10.htm">the previous piece about passing variables to CCXML applications</a> as well as other pieces of <a href="http://docs.voxeo.com/ccxml/1.0-final/toc.htm">the CCXML documentation</a>.  It&#8217;s well worth a read and shows how easy it is to use CCXML and VoiceXML together.</p>
<p><!-- Technorati Tags Start --></p>
<p>Technorati Tags:
<a href="http://technorati.com/tag/applications" rel="tag">applications</a>, <a href="http://technorati.com/tag/voice" rel="tag">voice</a>, <a href="http://technorati.com/tag/voip" rel="tag">voip</a>, <a href="http://technorati.com/tag/voicexml" rel="tag">voicexml</a>, <a href="http://technorati.com/tag/ccxml" rel="tag">ccxml</a>, <a href="http://technorati.com/tag/voxeo" rel="tag">voxeo</a>, <a href="http://technorati.com/tag/tutorials" rel="tag">tutorials</a>
</p>
<p><!-- Technorati Tags End --></p>
<p><a href="http://sharethis.com/item?publisher=c0af778a-87ab-41b4-be56-8ec058cd3e46&title=New+tutorial+on+passing+variables+between+CCXML+and+VoiceXML&url=http%3A%2F%2Fblogs.voxeo.com%2Fvoxeodeveloperscorner%2F2008%2F08%2F11%2Fnew-tutorial-on-passing-variables-between-ccxml-and-voicexml%2F">ShareThis</a></p><img src="http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~4/362272997" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.voxeo.com/voxeodeveloperscorner/2008/08/11/new-tutorial-on-passing-variables-between-ccxml-and-voicexml/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.voxeo.com/voxeodeveloperscorner/2008/08/11/new-tutorial-on-passing-variables-between-ccxml-and-voicexml/</feedburner:origLink></item>
		<item>
		<title>OSCON - Greetings… and voice mashups with identi.ca</title>
		<link>http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~3/343760672/</link>
		<comments>http://blogs.voxeo.com/voxeodeveloperscorner/2008/07/23/oscon-greetings-and-voice-mashups-with-identica/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 17:38:08 +0000</pubDate>
		<dc:creator>Dan York</dc:creator>
		
		<category><![CDATA[Applications]]></category>

		<category><![CDATA[Conferences]]></category>

		<category><![CDATA[Microblogging]]></category>

		<category><![CDATA[oscon]]></category>

		<category><![CDATA[oscon08]]></category>

		<guid isPermaLink="false">http://blogs.voxeo.com/voxeodeveloperscorner/?p=55</guid>
		<description><![CDATA[Greetings from the floor of O&#8217;Reilly&#8217;s Open Source Convention (OSCON) in Portland, ME&#8230; OSCON - Greetings&#8230; and a teaser about my talk on voice mashing up with identi.ca&#160; 
As I said in the video, I&#8217;ll be speaking today at 5:20pm US Pacific time on the topic of &#8220;Mashing up Voice and the Web using Open [...]

<script type="text/javascript">
SHARETHIS.addEntry({
	title: "OSCON - Greetings&#8230; and voice mashups with identi.ca",
	url: "http://blogs.voxeo.com/voxeodeveloperscorner/2008/07/23/oscon-greetings-and-voice-mashups-with-identica/"
});
</script>
	]]></description>
			<content:encoded><![CDATA[<p>Greetings from the floor of O&#8217;Reilly&#8217;s Open Source Convention (OSCON) in Portland, ME&#8230; <div style='display:block; clear:both; width:100%'><div id='zQOEEEUNAE_preview'><a href='http://www.seesmic.com/video/zQOEEEUNAE' target='_blank' class='see_link' >OSCON - Greetings&#8230; and a teaser about my talk on voice mashing up with identi.ca&nbsp;</a><br><div style='display:block;width:160px; height:120px; border:none; background-image:url(http://t.seesmic.com/thumbnail/3aATDeXXb3_th1.jpg)'><div id='zQOEEEUNAE_hide' class='seePlayOverlay' style='display:none;'><img onclick="see_play_video('zQOEEEUNAE',false)" src='http://blogs.voxeo.com/voxeodeveloperscorner/wp-content/plugins/seesmic-wp-plugin/images/stopOverlay.png' width='50'  height='50' style='cursor:pointer; cursor:hand' /></div><div id='zQOEEEUNAE_show' class='seePlayOverlay'><img onclick="see_play_video('zQOEEEUNAE',true)" src='http://blogs.voxeo.com/voxeodeveloperscorner/wp-content/plugins/seesmic-wp-plugin/images/playOverlay.png' width='50'  height='50' style='cursor:pointer; cursor:hand; border:none' /></div></div></div><div id='zQOEEEUNAE_content' style='display:block; clear:both; width:100%; padding-top:5px'></div></div> </p>
<p>As I said in the video, I&#8217;ll be speaking today at 5:20pm US Pacific time on the topic of &#8220;Mashing up Voice and the Web using Open Standards and XML&#8221; where I&#8217;ll be showing how you can use VoiceXML and CCXML to do interesting connections to &#8220;web 2.0&#8243; sites.  Needing a site to use for my examples, I decided to this round of demos with <a href="http://identi.ca/">identi.ca</a>, the new open source microblogging site (like <a href="http://twitter.com/">Twitter</a>, only open source).  </p>
<p>Once my talk is over, I&#8217;ll post the slide deck here in this blog and also the code to the demos I&#8217;ve written.  I&#8217;m looking forward to it&#8230; it should be fun!  (If you&#8217;re here at OSCON, I will apparently be in room D137 at 5:20pm.)</p>
<p><em>P.S. You can also follow me on identi.ca at <a href="http://identi.ca/danyork/">identi.ca/danyork</a></em></p>
<p><a href="http://sharethis.com/item?publisher=c0af778a-87ab-41b4-be56-8ec058cd3e46&title=OSCON+-+Greetings%26%238230%3B+and+voice+mashups+with+identi.ca&url=http%3A%2F%2Fblogs.voxeo.com%2Fvoxeodeveloperscorner%2F2008%2F07%2F23%2Foscon-greetings-and-voice-mashups-with-identica%2F">ShareThis</a></p><img src="http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~4/343760672" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.voxeo.com/voxeodeveloperscorner/2008/07/23/oscon-greetings-and-voice-mashups-with-identica/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.voxeo.com/voxeodeveloperscorner/2008/07/23/oscon-greetings-and-voice-mashups-with-identica/</feedburner:origLink></item>
		<item>
		<title>Never forget to make a call with scheduled conferencing</title>
		<link>http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~3/332070874/</link>
		<comments>http://blogs.voxeo.com/voxeodeveloperscorner/2008/07/10/never-forget-to-make-a-call-with-scheduled-conferencing/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 21:04:56 +0000</pubDate>
		<dc:creator>jmccall</dc:creator>
		
		<category><![CDATA[Applications]]></category>

		<category><![CDATA[CCXML]]></category>

		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[Voxeo]]></category>

		<guid isPermaLink="false">http://blogs.voxeo.com/voxeodeveloperscorner/?p=40</guid>
		<description><![CDATA[We all forget to make important calls from time-to-time.  With this tutorial, you will be able to schedule a call ahead of time, so that Voxeo&#8217;s IVR system calls you at that time in the future, and then links you with the party you intended to call.
While you&#8217;re utilizing your free Voxeo developer account, [...]

<script type="text/javascript">
SHARETHIS.addEntry({
	title: "Never forget to make a call with scheduled conferencing",
	url: "http://blogs.voxeo.com/voxeodeveloperscorner/2008/07/10/never-forget-to-make-a-call-with-scheduled-conferencing/"
});
</script>
	]]></description>
			<content:encoded><![CDATA[<p>We all forget to make important calls from time-to-time.  With this tutorial, you will be able to schedule a call ahead of time, so that Voxeo&#8217;s IVR system calls you at that time in the future, and then links you with the party you intended to call.</p>
<p>While you&#8217;re utilizing your <a href="http://evolution.voxeo.com/">free Voxeo developer account</a>, you might as well keep the whole shabang free, right?  Head on over to <a href="http://www.x10hosting.com/">x10hosting.com</a> or <a href="http://www.forwardhosting.com/">forwardhosting.com</a>, and register for an account.  These are two of the very few hosting companies that will allow you to run cron jobs for free.  Now that you are all setup, let&#8217;s get into the design aspect, cron job first.</p>
<p>While cron web interfaces will certainly be different, the underlying principal is the same: cron will wait until the system time matches your job time, and then will execute an action.  Most web portals to cron jobs will allow you specify minute, hour, day, month, and weekday.</p>
<p>Let&#8217;s assume you have to call your wife every Friday night at 5 pm to let her know that you&#8217;re coming straight home from work.  We&#8217;ll set minute to &#8220;00&#8243;, the hour to &#8220;17&#8243;, the weekday to &#8220;4&#8243;, and the rest to &#8220;*&#8221;.  This will make the cron job execute on Fridays at 1700.  You may need to adjust the time on your cron job to account for differences between system time and your time.  For example, the x10hosting box on which my cron job runs is set to US central time.  For the cron job command, use the Unix command &#8220;curl&#8221; like so:</p>
<p>curl http://api.voxeo.net/SessionControl/CCXML10.start?tokenid=dd5a1d7f44e97f49856eb6e894c9c669d152e89a571f6201eb3b265045b7a1d2bb52ff8d9856fbbbbbbbbbba\&amp;numdial=5551231234</p>
<p>This command sends an http request to api.voxeo.net for our CCXML 1.0 token.  The request also contains the variable &#8220;numdial.&#8221;</p>
<p>( Please note that the backslash is used in cron to escape the ampersand.  This request will not work properly from a browser window )</p>
<p><a title="Cron job interface" href="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/05/picture-3.png"><img src="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/05/picture-3.png" alt="Cron job interface" /></a></p>
<p>Now for the XML part:</p>
<blockquote>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;ccxml version="1.0" xmlns:voxeo="http://community.voxeo.com/xmlns/ccxml"&gt;

&lt;var name="state0" expr="'init'"/&gt;
&lt;var name="callid_out1"/&gt;
&lt;var name="callid_out2"/&gt;
&lt;var name="pin"/&gt;
&lt;var name="holdMusicDlg"/&gt;

&lt;eventprocessor statevariable="state0"&gt;

  &lt;transition state="init" event="ccxml.loaded"&gt;
    &lt;createcall dest="'tel:+15555555555'" connectionid="callid_out1" callerid="'1112223333'" timeout="'30s'"/&gt;
  &lt;/transition&gt;

  &lt;transition state="init" event="connection.connected"&gt;
    &lt;assign name="callid_out1" expr="event$.connectionid"/&gt;
    &lt;assign name="state0" expr="'enterpin'"/&gt;
    &lt;dialogstart src="'null://?termdigits=#&amp;text=Press 1 and then pound if you want to dial' + session.values.numdial"&amp;
    type="'application/x-fetchdigits'"/&gt;
  &lt;/transition&gt;

  &lt;transition state="enterpin" event="dialog.exit"&gt;
    &lt;log expr="'PIN = [' + event$.values.digits + ']&#8216;&#8221;/&gt;
    &lt;if cond=&#8221;&#8216;1&#8242; != event$.values.digits&#8221;&gt;
      &lt;exit/&gt;
    &lt;else/&gt;
      &lt;assign name=&#8221;pin&#8221; expr=&#8221;event$.values.digits&#8221;/&gt;
    &lt;/if&gt;

    &lt;assign name=&#8221;state0&#8243; expr=&#8221;&#8216;calling&#8217;&#8221;/&gt;
    &lt;dialogstart src=&#8221;&#8216;holdingPattern.vxml&#8217;&#8221; type=&#8221;&#8216;application/xml+vxml&#8217;&#8221; namelist=&#8221;pin&#8221; dialogid=&#8221;holdMusicDlg&#8221;/&gt;
    &lt;createcall dest=&#8221;&#8216;tel:+1&#8242; + session.values.numdial&#8221; connectionid=&#8221;callid_out2&#8243; callerid=&#8221;&#8216;5555555555&#8242;&#8221;/&gt;

  &lt;/transition&gt;

  &lt;transition state=&#8221;calling&#8221; event=&#8221;connection.failed&#8221;&gt;
    &lt;assign name=&#8221;state0&#8243; expr=&#8221;&#8216;callfailed&#8217;&#8221;/&gt;
    &lt;dialogterminate dialogid=&#8221;holdMusicDlg&#8221;/&gt;
  &lt;/transition&gt;

  &lt;transition state=&#8221;callfailed&#8221; event=&#8221;dialog.exit&#8221;&gt;
    &lt;assign name=&#8221;state0&#8243; expr=&#8221;&#8216;playingCallFailed&#8217;&#8221;/&gt;
    &lt;dialogstart src=&#8221;&#8216;callFailure.vxml&#8217;&#8221; type=&#8221;&#8216;application/xml+vxml&#8217;&#8221; connectionid=&#8221;callid_out1&#8243;/&gt;
  &lt;/transition&gt;

  &lt;transition state=&#8221;playingCallFailed&#8221; event=&#8221;dialog.exit&#8221;&gt;
    &lt;disconnect/&gt;
  &lt;/transition&gt;

  &lt;transition state=&#8221;calling&#8221; event=&#8221;connection.connected&#8221;&gt;
    &lt;if cond=&#8221;event$.connectionid == callid_out1&#8243;&gt;
      &lt;exit/&gt;
    &lt;else/&gt;
      &lt;assign name=&#8221;state0&#8243; expr=&#8221;&#8216;beforeBridging&#8217;&#8221;/&gt;
      &lt;dialogterminate dialogid=&#8221;holdMusicDlg&#8221;/&gt;
    &lt;/if&gt;
  &lt;/transition&gt;

  &lt;transition state=&#8221;beforeBridging&#8221; event=&#8221;dialog.exit&#8221;&gt;
    &lt;send name=&#8221;&#8216;pause&#8217;&#8221; target=&#8221;session.id&#8221; delay=&#8221;&#8216;200ms&#8217;&#8221;/&gt;
  &lt;/transition&gt;

  &lt;transition state=&#8221;beforeBridging&#8221; event=&#8221;pause&#8221;&gt;
    &lt;assign name=&#8221;state0&#8243; expr=&#8221;&#8216;bridged&#8217;&#8221;/&gt;
    &lt;join id1=&#8221;callid_out1&#8243; id2=&#8221;callid_out2&#8243;/&gt;
  &lt;/transition&gt;

  &lt;transition event=&#8221;error.conference.join&#8221;&gt;
    &lt;log expr=&#8221;&#8216;*** ERROR DURING JOIN ***&#8217;&#8221;/&gt;
    &lt;exit/&gt;
  &lt;/transition&gt;

  &lt;transition event=&#8221;error.*&#8221;&gt;
    &lt;log expr=&#8221;&#8216;an error has occured (&#8217; + event$.reason + &#8216;)&#8217;&#8221;/&gt;

    &lt;voxeo:sendemail to=&#8221;&#8216;yourEmail@there.com&#8217;&#8221;
      from=&#8221;&#8216;myApp@here.com&#8217;&#8221;
      type=&#8221;&#8216;debug&#8217;&#8221;
      body=&#8221; &#8216;generic error detected ! &#8216; &#8220;/&gt;
    &lt;exit/&gt;
  &lt;/transition&gt;
&lt;/eventprocessor&gt;
&lt;/ccxml&gt;
</pre>
</blockquote>
<p>This application has a fairly simple flow.  It calls 1-555-555-5555, and then asks the callee to press 1 and then # to connect to whatever number was passed in via the http request (in this case numdial=5551231234).</p>
<p>That&#8217;s it.  To make this work for you, you need to change four values:</p>
<p>1. token ID in http request
2. numdial variable in http request
3. &#8220;5555555555&#8243; is found twice in the CCXML file - both instances should be changed to your number
4. sendemail &#8220;to&#8221; and &#8220;from&#8221; in CCXML file</p>
<p>Good luck with your development - mix in a little MySQL and PHP action to make adding more cron jobs easier.</p>
<p>Till next time,</p>
<p>Jeremy McCall
Voxeo Network Operations</p>
<p><a href="http://sharethis.com/item?publisher=c0af778a-87ab-41b4-be56-8ec058cd3e46&title=Never+forget+to+make+a+call+with+scheduled+conferencing&url=http%3A%2F%2Fblogs.voxeo.com%2Fvoxeodeveloperscorner%2F2008%2F07%2F10%2Fnever-forget-to-make-a-call-with-scheduled-conferencing%2F">ShareThis</a></p><img src="http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~4/332070874" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.voxeo.com/voxeodeveloperscorner/2008/07/10/never-forget-to-make-a-call-with-scheduled-conferencing/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.voxeo.com/voxeodeveloperscorner/2008/07/10/never-forget-to-make-a-call-with-scheduled-conferencing/</feedburner:origLink></item>
		<item>
		<title>LogSearch - Categories, Filtering and Themes</title>
		<link>http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~3/318955102/</link>
		<comments>http://blogs.voxeo.com/voxeodeveloperscorner/2008/06/24/logsearch-categories-filtering-and-themes/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 14:55:09 +0000</pubDate>
		<dc:creator>RJ Auburn</dc:creator>
		
		<category><![CDATA[Voxeo]]></category>

		<category><![CDATA[debugging]]></category>

		<category><![CDATA[evolution]]></category>

		<category><![CDATA[logging]]></category>

		<category><![CDATA[Prophecy]]></category>

		<category><![CDATA[prophecy log search]]></category>

		<category><![CDATA[tools]]></category>

		<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://blogs.voxeo.com/voxeodeveloperscorner/?p=46</guid>
		<description><![CDATA[Last week we announced LogSearch Beta for our Evolution developer portal. As part of the beta process we will be improving it with a number of new features based on feedback from our customers. 
The first round of changes adds several new features including: message categories, filtering, easy reversing and a new black color theme.
The first thing [...]

<script type="text/javascript">
SHARETHIS.addEntry({
	title: "LogSearch - Categories, Filtering and Themes",
	url: "http://blogs.voxeo.com/voxeodeveloperscorner/2008/06/24/logsearch-categories-filtering-and-themes/"
});
</script>
	]]></description>
			<content:encoded><![CDATA[<p>Last week we announced <a href="http://blogs.voxeo.com/voxeotalks/2008/06/18/voxeo-announces-a-new-beta-service-prophecy-log-search-a-better-way-to-search-your-application-log-files/">LogSearch Beta</a> for our Evolution developer portal. As part of the beta process we will be improving it with a number of new features based on feedback from our customers. </p>
<p>The first round of changes adds several new features including: message categories, filtering, easy reversing and a new black color theme.</p>
<p>The first thing you will now notice is that when you login you will see a tool bar at the top with a bunch of checkboxes in it:</p>
<p><a href="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/06/filterbar.png"><img class="alignnone size-medium wp-image-48" src="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/06/filterbar-300x27.png" alt="" width="300" height="27" /></a></p>
<p>These boxes don&#8217;t do much until you run a search but once you search for something you will start to see some of the power of what it can provide. </p>
<p>To start with lets run a search for a session and see what we get:</p>
<p><a href="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/06/unfiltered.png"><img class="alignnone size-medium wp-image-51" src="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/06/unfiltered-300x230.png" alt="" width="300" height="230" /></a></p>
<p>As you can see you get the full set of log messages here. Whats is new here is that you now can see that we have colorizing of the log messages making it easer to pick out the important messages in the log stream. </p>
<p>The first thing you might want to try doing is clicking on one of the filters and see what happens. For example if you click &#8220;Playback&#8221; you will filter out everything but the browser playback messages:</p>
<p><a href="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/06/playback.png"><img class="alignnone size-medium wp-image-52" src="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/06/playback-300x230.png" alt="" width="300" height="230" /></a></p>
<p>The next thing you might want to try is clicking on the &#8220;User Filter&#8221; button to filter stuff down to only being user facing log messages:</p>
<p><a href="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/06/filtered2.png"><img class="alignnone size-medium wp-image-53" src="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/06/filtered2-300x230.png" alt="" width="300" height="230" /></a></p>
<p>Another new feature is the new button to easily reverse the results to be in chronological order instead of most recent first. This can make it a lot easer to read things like session logs where you are trying to understand the flow of what happened. Do be aware however that if your search spans a large amount of time it may take longer to display the initial search results in this mode since we need to search over the entire time block and gather all the results before we display them in the UI:</p>
<p><a href="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/06/reverse.png"><img class="alignnone size-medium wp-image-54" src="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/06/reverse-300x230.png" alt="" width="300" height="230" /></a></p>
<p>Lastly one other thing you may like to try is switching to the &#8220;black&#8221; theme we now include. To enable this open your preferences dialog and select VoxeoBlack on the theme menu on the General tab:</p>
<p><a href="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/06/prefs.png"><img class="alignnone size-medium wp-image-50" src="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/06/prefs-300x187.png" alt="" width="300" height="187" /></a></p>
<p>You will then get your UI rendered in proper old school programer colors:</p>
<p><a href="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/06/black.png"><img class="alignnone size-medium wp-image-47" src="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/06/black-300x230.png" alt="" width="300" height="230" /></a></p>
<p> Hopefully these improvements will help make the tool more useful.  As always we are looking for feedback on ways we can improve our offerings so please leave us feedback either in the comments below or in our <a href="https://evolution.voxeo.com/forums/main.jsp?bb-cid=79">LogSearch feedback forum</a> on the <a href="https://evolution.voxeo.com/">Evolution developer site</a>. </p>
<p><a href="http://sharethis.com/item?publisher=c0af778a-87ab-41b4-be56-8ec058cd3e46&title=LogSearch+-+Categories%2C+Filtering+and+Themes&url=http%3A%2F%2Fblogs.voxeo.com%2Fvoxeodeveloperscorner%2F2008%2F06%2F24%2Flogsearch-categories-filtering-and-themes%2F">ShareThis</a></p><img src="http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~4/318955102" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.voxeo.com/voxeodeveloperscorner/2008/06/24/logsearch-categories-filtering-and-themes/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.voxeo.com/voxeodeveloperscorner/2008/06/24/logsearch-categories-filtering-and-themes/</feedburner:origLink></item>
		<item>
		<title>New Prophecy version (8.0.198.0) now available for download…</title>
		<link>http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~3/309890527/</link>
		<comments>http://blogs.voxeo.com/voxeodeveloperscorner/2008/06/11/new-prophecy-version-801980-now-available-for-download/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 20:44:29 +0000</pubDate>
		<dc:creator>Dan York</dc:creator>
		
		<category><![CDATA[Prophecy]]></category>

		<category><![CDATA[Voxeo]]></category>

		<guid isPermaLink="false">http://blogs.voxeo.com/voxeodeveloperscorner/2008/06/11/new-prophecy-version-801980-now-available-for-download/</guid>
		<description><![CDATA[FYI, a new version of Prophecy was released last Thursday. Version 8.0.198.0 is now available for download.  The very detailed release notes go into all the many changes and fixes.  Enjoy&#8230;

Technorati Tags:
prophecy, voxeo, voicexml, ccxml




<script type="text/javascript">
SHARETHIS.addEntry({
	title: "New Prophecy version (8.0.198.0) now available for download&#8230;",
	url: "http://blogs.voxeo.com/voxeodeveloperscorner/2008/06/11/new-prophecy-version-801980-now-available-for-download/"
});
</script>
	]]></description>
			<content:encoded><![CDATA[<p>FYI, a new version of <a href="http://www.voxeo.com/prophecy/">Prophecy</a> was released last Thursday. Version 8.0.198.0 is now available <a href="http://www.voxeo.com/prophecy/">for download</a>.  The <a href="http://evolution.voxeo.com/bizblog/viewer?bb-nid=0&amp;bb-cid=42&amp;accountGUID=9F2DD387-4AD4-45F8-A63E-5BD2BD00CEBA&amp;bb-tid=676809&amp;bb-pid=676809">very detailed release notes</a> go into all the many changes and fixes.  Enjoy&#8230;</p>
<p><!-- Technorati Tags Start --></p>
<p>Technorati Tags:
<a href="http://technorati.com/tag/prophecy" rel="tag">prophecy</a>, <a href="http://technorati.com/tag/voxeo" rel="tag">voxeo</a>, <a href="http://technorati.com/tag/voicexml" rel="tag">voicexml</a>, <a href="http://technorati.com/tag/ccxml" rel="tag">ccxml</a>
</p>
<p><!-- Technorati Tags End --></p>
<p><a href="http://sharethis.com/item?publisher=c0af778a-87ab-41b4-be56-8ec058cd3e46&title=New+Prophecy+version+%288.0.198.0%29+now+available+for+download%26%238230%3B&url=http%3A%2F%2Fblogs.voxeo.com%2Fvoxeodeveloperscorner%2F2008%2F06%2F11%2Fnew-prophecy-version-801980-now-available-for-download%2F">ShareThis</a></p><img src="http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~4/309890527" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.voxeo.com/voxeodeveloperscorner/2008/06/11/new-prophecy-version-801980-now-available-for-download/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.voxeo.com/voxeodeveloperscorner/2008/06/11/new-prophecy-version-801980-now-available-for-download/</feedburner:origLink></item>
		<item>
		<title>Certified Tech Tip: Alpha-Numeric voice recognition grammars - part two</title>
		<link>http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~3/294382681/</link>
		<comments>http://blogs.voxeo.com/voxeodeveloperscorner/2008/05/20/certified-tech-tip-alpha-numeric-voice-recognition-grammars-part-two/#comments</comments>
		<pubDate>Tue, 20 May 2008 16:32:33 +0000</pubDate>
		<dc:creator>matt</dc:creator>
		
		<category><![CDATA[Grammar]]></category>

		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[VoiceXML]]></category>

		<category><![CDATA[grammars]]></category>

		<category><![CDATA[howto]]></category>

		<category><![CDATA[SISR]]></category>

		<category><![CDATA[SRGS]]></category>

		<category><![CDATA[Voxeo]]></category>

		<guid isPermaLink="false">http://blogs.voxeo.com/voxeodeveloperscorner/2008/05/20/certified-tech-tip-alpha-numeric-voice-recognition-grammars-part-two/</guid>
		<description><![CDATA[
In our last entry to the tech-tips blog, we detailed the challenges inherent in capturing alphabetical, or alpha-numeric entries from our callers, and detailed several paths for minimizing the chance of mis-recognition when implementing input fields based on these two categories of voice recognition. The long and short of this posting was that IVR developers [...]

<script type="text/javascript">
SHARETHIS.addEntry({
	title: "Certified Tech Tip: Alpha-Numeric voice recognition grammars - part two",
	url: "http://blogs.voxeo.com/voxeodeveloperscorner/2008/05/20/certified-tech-tip-alpha-numeric-voice-recognition-grammars-part-two/"
});
</script>
	]]></description>
			<content:encoded><![CDATA[<p><img src="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/01/voicexmlcertifieddeveloper.gif" alt="voicexmlcertifieddeveloper.gif" align="right" border="0" height="150" width="119" />
In our last entry to the tech-tips blog, we detailed the challenges inherent in capturing alphabetical, or alpha-numeric entries from our callers, and detailed several paths for minimizing the chance of mis-recognition when implementing input fields based on these two categories of voice recognition. The long and short of this posting was that IVR developers should refrain from attempting this wherever possible, and to instead try these alternatives:</p>
<p>* Pre-compiled Statistical Language Model grammars
* Leveraging TargusInfo services for advanced recognition accuracy</p>
<p>However, the IVR project requirements dictate what we can, and can&#8217;t do as developers, so in some cases, we have to try and whip out a user grammar that takes alpha, or alpha-numeric input. As mentioned in our last blog entry, there are a few things we can do to stack the deck to try and squeeze more accuracy out of these grammars so that we don&#8217;t end up with frustrated callers, but the plain truth is that we will never, ever be able to write a grammar that accepts alphabetical characters to be 100% accurate using todays recognition technology. What we will do today is twofold:</p>
<p>(1) Craft an SRGS+SISR subgrammar for alphabetical, and numeric characters</p>
<p>(2) Plug this grammar into a mixed-initiative form dialog that will minimize (but not fully address!), the possibility for mis-recognitions.</p>
<p>Those developers who have the need for such a grammar and dialog within their production-grade applications are advised to take this basic framework as a starting point, and then expand on it by:</p>
<p>(a) Test carefully with a broad range of users, and to fully flesh out alternate utterance values for alphabetic characters</p>
<p>(b) Apply item weighting to specific characters based on the probability of a given character versus another like-sounding character - this will depend greatly on the specific usage of the grammar</p>
<p>(c) Track results by using w3c-compliant utterance recording, and logging all shadow variables, so that these results can be used to further tune and tweak our grammar for maximum accuracy</p>
<p>(d) Consider using n-best post-processing as an additional confirmation step to ensure that the results we receive are indeed accurate</p>
<p>For today&#8217;s entry, lets assume that we need to track a three digit zip code, which are prevalent in Canadian locales. Our predefined format for utterance values are &#8220;Alpha Digit Alpha&#8221;, and luckily, not all alpha characters are applicable: Instead of trying to recognize 26 letters accurately, we only need to recognize 16, which helps a lot!</p>
<p>We won&#8217;t dig into the specifics of a mixed-initiative form dialog, as we have already done so in our <a href="http://docs.voxeo.com/voicexml/2.0/t_20.htm">mixed-initiatve tutorial</a>, but the gist is that this feature of VoiceXML allows us to fill multiple fields with a single utterance, and breaking up each alpha and numeric character into it&#8217;s own recognition field greatly cuts down on disambiguation problems that can occur.</p>
<p>For the purposes of brevity, what we have below is a stripped-down version of our fully fleshed-out grammar, but you may download the full grammar, and the mixed-initiative dialog <a href="http://www.voxeo.com/files/blogs/5-14-08-alphanumeric.zip">right here</a>, which contains lots more inline notations.</p>
<blockquote>
<pre>&lt;?xml version= "1.0"?&gt;&lt;grammar xmlns="http://www.w3.org/2001/06/grammar" xml:lang="en-US"&gt;

&lt;rule id="canadianZip" scope="public"&gt;

&lt;one-of&gt;

&lt;!-- ALL THREE FIELDS FILLED --&gt;

&lt;item&gt;

&lt;item&gt;

&lt;ruleref uri="#alphaRule1"/&gt;

&lt;tag&gt;out.alphaSlot1=rules.alphaRule1.alphaSlot1;&lt;/tag&gt;

&lt;/item&gt;

&lt;item&gt;

&lt;ruleref uri="#numRule"/&gt;

&lt;tag&gt;out.numSlot=rules.numRule.numSlot;&lt;/tag&gt;

&lt;/item&gt;

&lt;item&gt;

&lt;ruleref uri="#alphaRule2"/&gt;

&lt;tag&gt;out.alphaSlot2=rules.alphaRule2.alphaSlot2;&lt;/tag&gt;

&lt;/item&gt;

&lt;/item&gt;&lt;!-- ONLY TWO FIELDS FILLED --&gt;

&lt;item&gt;

&lt;item&gt;

&lt;ruleref uri="#alphaRule1"/&gt;

&lt;tag&gt;out.alphaSlot1=rules.alphaRule1.alphaSlot1;&lt;/tag&gt;

&lt;/item&gt;

&lt;item&gt;

&lt;ruleref uri="#numRule"/&gt;

&lt;tag&gt;out.numSlot=rules.numRule.numSlot;&lt;/tag&gt;

&lt;/item&gt;

&lt;/item&gt;

&lt;item&gt;

&lt;item&gt;

&lt;ruleref uri="#numRule"/&gt;

&lt;tag&gt;out.numSlot=rules.numRule.numSlot;&lt;/tag&gt;

&lt;/item&gt;

&lt;item&gt;

&lt;ruleref uri="#alphaRule2"/&gt;

&lt;tag&gt;out.alphaSlot2=rules.alphaRule2.alphaSlot2;&lt;/tag&gt;

&lt;/item&gt;

&lt;/item&gt;

&lt;item&gt;

&lt;item&gt;

&lt;ruleref uri="#alphaRule1"/&gt;

&lt;tag&gt;out.alphaSlot1=rules.alphaRule1.alphaSlot1;&lt;/tag&gt;

&lt;/item&gt;

&lt;item&gt;

&lt;ruleref uri="#alphaRule2"/&gt;

&lt;tag&gt;out.alphaSlot2=rules.alphaRule2.alphaSlot2;&lt;/tag&gt;

&lt;/item&gt;

&lt;/item&gt;

&lt;!-- ONLY ONE FIELD FILLED  --&gt;

&lt;item&gt;

&lt;ruleref uri="#alphaRule1"/&gt;

&lt;tag&gt;&lt;/tag&gt;

&lt;/item&gt;

&lt;item&gt;

&lt;ruleref uri="#numRule"/&gt;

&lt;tag&gt;out.numSlot=rules.numRule.numSlot;&lt;/tag&gt;

&lt;/item&gt;

&lt;/one-of&gt;

&lt;/rule&gt;

&lt;rule id="alphaRule1" scope="public"&gt;

&lt;one-of&gt;

&lt;item weight="1.0"&gt;

&lt;one-of&gt;

&lt;item&gt; ex&lt;/item&gt;

&lt;item&gt; ax&lt;/item&gt;

&lt;item&gt; x &lt;/item&gt;

&lt;/one-of&gt;

&lt;tag&gt;out.alphaSlot1="X"; &lt;/tag&gt;

&lt;/item&gt;

&lt;/one-of&gt;

&lt;/rule&gt;

&lt;rule id="numRule" scope="public"&gt;

&lt;one-of&gt;

&lt;item&gt; one &lt;tag&gt;out.numSlot="1"; &lt;/tag&gt;  &lt;/item&gt;

&lt;/one-of&gt;

&lt;/rule&gt;

&lt;rule id="alphaRule2" scope="public"&gt;

&lt;one-of&gt;

&lt;item weight="1.0"&gt;

&lt;one-of&gt;

&lt;item&gt; ay&lt;/item&gt;

&lt;/one-of&gt;

&lt;tag&gt;out.alphaSlot2="A"; &lt;/tag&gt;

&lt;/item&gt;

&lt;/one-of&gt;

&lt;/rule&gt;

&lt;/grammar&gt;</pre>
</blockquote>
<p>In brief, our top-level rule assumes that we can have any of the following entries:</p>
<blockquote>
<pre>"X1A""X"

"X1"

"XA"

"1"

"1A"</pre>
</blockquote>
<p>And in the event that we get one or two characters matched in our utterance, the VoiceXML mixed-initiative logic will then take over, and prompt the caller to fill in any &#8220;blanks&#8221; remaining.</p>
<p>A few things of note about the grammar defined below is that in the event that we receive only a single alpha utterance, we will assume that it is the first character, not the last. Additionally, when we construct a grammar that contains multiple slot returns, it is required that we explicitly define the slot values all the way up the chain: if we didn&#8217;t define the &#8220;out.[slotname]=rules.[rulename].[subslot]&#8221; within the context of the top-level rule, the last slot value would overwrite all others, meaning that we would only get a value for &#8220;alphaSlot2&#8243; within the VoiceXML dialog. To illustrate even further, the below snippet for a top-level return would make this a reality:</p>
<blockquote>
<pre>&lt;item&gt; 
&lt;ruleref uri="#alphaRule1"/&gt;

&lt;ruleref uri="#numRule"/&gt;

&lt;ruleref uri="#alphaRule2"/&gt;

&lt;/item&gt;</pre>
</blockquote>
<p>You&#8217;ll also see that each possibility for character recognition is specified within the top-level rule, so in the event that we get 1, 2 or 3 character strings, we can pipe the return value back to the VoiceXML, and let the mixed-initiative dialogs then access the sub-rules (alphaRule1/2 and numRule), individually as needed.</p>
<p>We also illustrated in brief how one can define multiple like-sounding utterance values that return the same interpretation value, and defined an  for our alphaRule1 entry simply to show how this can be done: The task of taking this framework, and turning it into a grammar that satisfies any given project rests in the hands of you, the capable IVR developer.</p>
<p>=^)</p>
<p>Till next time,</p>
<p>Matthew Henry
Director of Customer Support
Voxeo Corporation</p>
<h4>Useful Links</h4>
<ul>
<li><a href="http://blogs.voxeo.com/voxeodeveloperscorner/wp-admin/%3Ca%20mce_thref=%27http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/05/5-14-08-alphanumeric.zip%27%20title=%27AlphaNumeric%20Grammar%20and%20Mixed-Init%20Code%20download%27%3EAlphaNumeric%20Grammar%20and%20Mixed-Init%20Code%20download%3C/a%3E">AlphaNumeric Grammar and Mixed-Init Code download</a></li>
<li><a href="http://www.w3.org/TR/semantic-interpretation/">SISR specification</a></li>
<li><a href="http://www.w3.org/TR/speech-grammar/#S2.4.1">SRGS Grammar Specification: Grammar weighting</a></li>
<li><a href="http://www.w3.org/TR/semantic-interpretation/#SI5">SISR Default Slot Assignments</a></li>
<li><a href="http://www.w3.org/TR/voicexml20/#dml2.1.5">VXML 2.0 specification: Mixed-Initiative Dialogs</a></li>
</ul>
<p><!-- Technorati Tags Start --></p>
<p>Technorati Tags:
<a href="http://technorati.com/tag/voicexml" rel="tag">voicexml</a>, <a href="http://technorati.com/tag/voxeo" rel="tag">voxeo</a>, <a href="http://technorati.com/tag/srgs" rel="tag">srgs</a>, <a href="http://technorati.com/tag/sisr" rel="tag">sisr</a>, <a href="http://technorati.com/tag/grammars" rel="tag">grammars</a>, <a href="http://technorati.com/tag/ivr" rel="tag">ivr</a>, <a href="http://technorati.com/tag/applications" rel="tag">applications</a>, <a href="http://technorati.com/tag/tutorials" rel="tag">tutorials</a></p>
<p><!-- Technorati Tags End --></p>
<p><a href="http://sharethis.com/item?publisher=c0af778a-87ab-41b4-be56-8ec058cd3e46&title=Certified+Tech+Tip%3A+Alpha-Numeric+voice+recognition+grammars+-+part+two&url=http%3A%2F%2Fblogs.voxeo.com%2Fvoxeodeveloperscorner%2F2008%2F05%2F20%2Fcertified-tech-tip-alpha-numeric-voice-recognition-grammars-part-two%2F">ShareThis</a></p><img src="http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~4/294382681" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.voxeo.com/voxeodeveloperscorner/2008/05/20/certified-tech-tip-alpha-numeric-voice-recognition-grammars-part-two/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.voxeo.com/voxeodeveloperscorner/2008/05/20/certified-tech-tip-alpha-numeric-voice-recognition-grammars-part-two/</feedburner:origLink></item>
		<item>
		<title>What is a “State Machine”? And how does it apply to CCXML (and James Bond)?</title>
		<link>http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~3/288734363/</link>
		<comments>http://blogs.voxeo.com/voxeodeveloperscorner/2008/05/12/what-is-a-state-machine-and-how-does-it-apply-to-ccxml-and-james-bond/#comments</comments>
		<pubDate>Mon, 12 May 2008 14:46:36 +0000</pubDate>
		<dc:creator>Dan York</dc:creator>
		
		<category><![CDATA[CCXML]]></category>

		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://blogs.voxeo.com/voxeodeveloperscorner/2008/05/12/what-is-a-state-machine-and-how-does-it-apply-to-ccxml-and-james-bond/</guid>
		<description><![CDATA[When people come to CCXML from other languages, one concept that is sometimes difficult to understand is the whole notion of a &#8220;state machine&#8221;. Once you are comfortable with that idea, CCXML becomes rather easy to work with.  While the Wikipedia page on state machines gets quite complex, let&#8217;s reduce the concept to some [...]

<script type="text/javascript">
SHARETHIS.addEntry({
	title: "What is a &#8220;State Machine&#8221;? And how does it apply to CCXML (and James Bond)?",
	url: "http://blogs.voxeo.com/voxeodeveloperscorner/2008/05/12/what-is-a-state-machine-and-how-does-it-apply-to-ccxml-and-james-bond/"
});
</script>
	]]></description>
			<content:encoded><![CDATA[<p><img src="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/05/ccxml.jpg" alt="ccxml.jpg" border="0" width="148" height="64" align="right" />When people come to <a href="http://docs.voxeo.com/ccxml/1.0-final/">CCXML</a> from other languages, one concept that is sometimes difficult to understand is the whole notion of a &#8220;state machine&#8221;. Once you are comfortable with that idea, CCXML becomes rather easy to work with.  While <a href="http://en.wikipedia.org/wiki/Finite_state_machine">the Wikipedia page on state machines</a> gets quite complex, let&#8217;s reduce the concept to some basics.</p>
<p>First, some vocabulary. In a &#8220;state machine&#8221;, there are a series of &#8220;<em>states</em>&#8220;, such as being &#8220;on&#8221; or &#8220;off&#8221;. There are then &#8220;<em>events&#8221;</em> that cause there to be a &#8220;<em>transition</em>&#8221; between states.  </p>
<p>Now to illustrate this, let&#8217;s take the typical action hero film (such as any one of the James Bond movies) and describe it as a series of &#8220;states&#8221;:</p>
<ol>
<li>
<p>Hero is relaxing on a beach with a drink in some exotic locale.</p>
<li>
<p>Hero is preparing for mission (getting briefing, gadgets, etc.)</p>
<li>
<p>Hero is hunting for evil villain.</p>
<li>
<p>Hero is fighting evil villain and his minions.</p>
<li>
<p>Hero is relaxing on a beach in some other exotic locale in the company of rescued beautiful woman.</p>
</ol>
<p>There are obviously other &#8220;states&#8221; that occur in an action movie, many of which involve beds, but in an effort to: a) keep this blog &#8220;safe for work&#8221;; and b) keep our example simple, we&#8217;ll reduce it to this list. Graphically, we could depict this as something like:</p>
<div><img src="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/05/statemachineactionhero.jpg" alt="statemachineactionhero.jpg" border="0" width="400" height="56" /></div>
<p>The hero can remain in any one of these &#8220;states&#8221; indefinitely (and in some films it seems like the hero does!) until there is some event that triggers a &#8220;transition&#8221; between the states.  Let&#8217;s look at our list again and add in some events:</p>
<ol>
<li>
<p>Hero is relaxing on a beach with a drink in some exotic locale.</p>
<ul>
<li>Receives visit from courier who says his assistance is needed immediately. (Alternatively and more exciting for a movie, a team of assassins attempts to kill him.)
</ul>
<li>
<p>Hero is preparing for mission (getting briefing, gadgets, etc.)</p>
<ul>
<li>Receives final briefing, heads to airport, etc.
</ul>
</li>
<li>
<p>Hero is hunting for evil villain.</p>
<ul>
<li>Finds evil villain (or is found by evil villain).
</ul>
</li>
<li>
<p>Hero is fighting evil villain and his minions.</p>
<ul>
<li>Blows up villain and his lair, saves world, rescues beautiful woman.
</ul>
<li>
<p>Hero is relaxing on a beach in some other exotic locale in the company of rescued beautiful woman.</p>
</ol>
<p>At a 10,000 foot level, you can describe most action movies in this pattern. A series of <em>states</em> where <em>events</em> trigger <em>transitions</em> between those states.</p>
<p>So what does this have to do with CCXML, eh?</p>
<p>Well, you could take the basic <em>successful</em> inbound call to a CCXML application and describe it in the following states and events:</p>
<ol>
<li>
<p>CCXML application is waiting for connections.</p>
<ul>
<li>Call is received.
</ul>
<li>
<p>Application enters &#8220;Alerting&#8221; state to decide what to do with the call.</p>
<ul>
<li>Application accepts call.
</ul>
<li>
<p>Application is connected to incoming call and performs actions such as playing dialogs, accepting input, etc..</p>
<ul>
<li>Application finishes - or caller hangs up.
</ul>
<li>
<p>Application is disconnected from call and performs any final actions.</p>
<ul>
<li>Application finishes post-call activity and exits.
</ul>
<li>
<p>Application returns to waiting for connections.</p>
</ol>
<p>Graphically, we could illustrate it like this:
<div><img src="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/05/statemachineccxmlsimplified.jpg" alt="statemachineccxmlsimplified.jpg" border="0" width="400" height="56" /></div>
<p><em>Conceptually</em>, this is what it looks like. I would, though, note, that the &#8220;waiting&#8221; state I&#8217;ve shown here is not <em>typically</em> a part of the actual CCXML application but rather is part of the application <em>platform</em> on which your CCXML application is housed. For instance, the &#8220;platform&#8221; could be <a href="http://evolution.voxeo.com/">our Evolution hosted platform</a> or a copy of our <a href="http://www.voxeo.com/prophecy">Prophecy premise platform</a> running on your network. When a call is received by either Evolution or Prophecy, your CCXML application is loaded and (in this example) the &#8220;connection.alerting&#8221; event is sent which triggers the transition into the &#8220;Alerting&#8221; state.</p>
<p>You can think of this in a similar fashion to a web server. Your Apache (or other) web server is sitting there waiting for connections. When it receives a connection, it loads the appropriate page which may contain an application which is then executed.  CCXML works in a similar fashion (and yes, there are exceptions&#8230; remember, I&#8217;m trying to keep this tutorial <em>simple</em>!).
<P>In any event,  let&#8217;s see what this looks like in CCXML code:</p>
<blockquote><pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;ccxml version="1.0"&gt;
  &lt;eventprocessor&gt;
    &lt;transition event=&#8221;connection.alerting&#8221;&gt;
    &lt;log expr=&#8221;&#8216;*** Incoming call from Caller ID: &#8216; + event$.connection.remote&#8221;/&gt;
    &lt;accept/&gt;
    &lt;/transition&gt;
    &lt;transition event=&#8221;connection.connected&#8221;&gt;
      &lt;log expr=&#8221;&#8216;*** Call was accepted ***&#8217;&#8221;/&gt;
      &lt;disconnect/&gt;
    &lt;/transition&gt;
    &lt;transition event=&#8221;connection.disconnected&#8221;&gt;
      &lt;log expr=&#8221;&#8216;*** Call was disconnected ***&#8217;&#8221;/&gt;
      &lt;exit/&gt;
    &lt;/transition&gt;
  &lt;/eventprocessor&gt;
&lt;/ccxml&gt;</pre>
</blockquote>
<p>That&#8217;s it.  The <code>&lt;transition&gt;</code> tag indicates what actions should be taken when the event included in the &#8220;event&#8221; attribute occurs. Conceptually this is a transition between states. So when the event &#8220;<code>connection.alerting</code>&#8221; is received by this application the code in the first <code>&lt;transition&gt;</code> is executed.  At the end of that block you can see the <code>&lt;accept/&gt;</code> command which is the action that causes a new event (&#8221;<code>connection.connected</code>&#8220;) to occur. Likewise, <code>&lt;disconnect/&gt;</code> and <code>&lt;exit/&gt;</code> in later states signal that a new event has occurred and a transition needs to occur.</p>
<p>Your task, then, is to write the actions that occur in each state since this code above does really nothing except accept and then hangup a call (and generate log entries). During the &#8220;alerting&#8221; state, for instance, maybe there are some phone numbers from which you do not want to accept calls.  You may have some conditional logic there that rejects calls from some numbers and then accepts calls from all others. In the &#8220;connected&#8221; state, obviously, is where the meat of your application goes.  What are you going to do with the caller?</p>
<p>With this framework in mind, you can now dive into the &#8220;Learning CCXML&#8221; section of <a href="http://docs.voxeo.com/ccxml/1.0-final/">our CCXML documentation</a> and see the examples there that flesh out the very simple outline I&#8217;ve given here.</p>
<p>I should note, of course, that my simple example doesn&#8217;t even closely illustrate <em>all</em> the &#8220;states&#8221; in CCXML. What happens if a call fails in some way other than just a disconnect?  What if there are errors in your application? How about <em>outbound</em> calls where the &#8220;alerting&#8221; concept doesn&#8217;t make sense?  We go into the different states in our documentation and the actual <a href="http://www.w3.org/TR/ccxml/">CCXML specification</a> from the W3C also has this nice diagram (click on the image to see it larger):</p>
<div><a href="http://www.w3.org/TR/ccxml/#s10.2.1"><img src="http://blogs.voxeo.com/voxeodeveloperscorner/files/2008/05/ccxmlstatediagram.jpg" alt="ccxmlstatediagram.jpg" border="0" width="400" height="304" /></a></div>
<p>(Hint: For an <em>outbound</em> call, the initial state equivalent to &#8220;alerting&#8221; is &#8220;<em>progressing</em>&#8220;.) This, too, does not show <em>all</em> the states, but does provide a richer view of the flow of a typical CCXML application.   As you&#8217;ll see in <a href="http://docs.voxeo.com/ccxml/1.0-final/">the documentation</a>, there&#8217;s a lot more you can do with states in CCXML.  You can create your own events that you us the <code>&lt;send&gt;</code> command to trigger a transition to a new state. There are a range of pre-defined states as well, that both <a href="http://docs.voxeo.com/ccxml/1.0-final/">our documentation</a> and the W3C <a href="http://www.w3.org/TR/ccxml/">CCXML specification</a> describe in more detail.</p>
<p>Again, it is all about the CCXML application describing a series of &#8220;states&#8221; and what actions occur during that state. <em>Events</em> trigger <em>transitions</em> between <em>states</em>.</p>
<p>Got it? Ready to start actually building applications?  If so just head over to <a href="http://www.voxeo.com/free">www.voxeo.com/free</a> and sign up for either a free developer account on our <a href="http://evolution.voxeo.com/">Evolution hosted platform</a> or download our free <a href="http://www.voxeo.com/prophecy">Prophecy premise platform</a> to run on your own server. Figure out your states and away you go&#8230;</p>
<p><em>P.S. If you are really intrigued by all the theory around state machines, you might want to check out the &#8220;<a href="http://www.w3.org/TR/2005/WD-scxml-20050705/#Semantics">Semantics</a>&#8221; section of another W3C draft language called <a href="http://www.w3.org/TR/2005/WD-scxml-20050705/">SCXML</a> (&#8221;State Chart XML&#8221;) which dives into the theory around Harel State Tables and much more.  The aim of the (draft) SCXML effort is to create a more generic state machine language which is not tied to telephony as CCXML is.  If all you want to do is write voice applications, feel free to skip these links entirely! <img src='http://blogs.voxeo.com/voxeodeveloperscorner/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </em>
<!-- Technorati Tags Start --></p>
<p>Technorati Tags:
<a href="http://technorati.com/tag/applications" rel="tag">applications</a>, <a href="http://technorati.com/tag/state%20machines" rel="tag">state machines</a>, <a href="http://technorati.com/tag/ccxml" rel="tag">ccxml</a>, <a href="http://technorati.com/tag/scxml" rel="tag">scxml</a>, <a href="http://technorati.com/tag/w3c" rel="tag">w3c</a>, <a href="http://technorati.com/tag/voxeo" rel="tag">voxeo</a>, <a href="http://technorati.com/tag/programming" rel="tag">programming</a>, <a href="http://technorati.com/tag/xml" rel="tag">xml</a>, <a href="http://technorati.com/tag/voip" rel="tag">voip</a>, <a href="http://technorati.com/tag/voice" rel="tag">voice</a>, <a href="http://technorati.com/tag/voice%20mashups" rel="tag">voice mashups</a>, <a href="http://technorati.com/tag/phone%20mashups" rel="tag">phone mashups</a>
</p>
<p><!-- Technorati Tags End --></p>
<p><a href="http://sharethis.com/item?publisher=c0af778a-87ab-41b4-be56-8ec058cd3e46&title=What+is+a+%26%238220%3BState+Machine%26%238221%3B%3F+And+how+does+it+apply+to+CCXML+%28and+James+Bond%29%3F&url=http%3A%2F%2Fblogs.voxeo.com%2Fvoxeodeveloperscorner%2F2008%2F05%2F12%2Fwhat-is-a-state-machine-and-how-does-it-apply-to-ccxml-and-james-bond%2F">ShareThis</a></p><img src="http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~4/288734363" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.voxeo.com/voxeodeveloperscorner/2008/05/12/what-is-a-state-machine-and-how-does-it-apply-to-ccxml-and-james-bond/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.voxeo.com/voxeodeveloperscorner/2008/05/12/what-is-a-state-machine-and-how-does-it-apply-to-ccxml-and-james-bond/</feedburner:origLink></item>
		<item>
		<title>Accessing Web Services From VoiceXML</title>
		<link>http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~3/286419990/</link>
		<comments>http://blogs.voxeo.com/voxeodeveloperscorner/2008/05/08/accessing-web-services-from-voicexml/#comments</comments>
		<pubDate>Thu, 08 May 2008 23:21:32 +0000</pubDate>
		<dc:creator>Mark Headd</dc:creator>
		
		<category><![CDATA[Applications]]></category>

		<category><![CDATA[Prophecy]]></category>

		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[VoiceXML]]></category>

		<category><![CDATA[Web Services]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blogs.voxeo.com/voxeodeveloperscorner/2008/05/08/accessing-web-services-from-voicexml/</guid>
		<description><![CDATA[This is a guest post from Mark Headd, a voice application developer who was one of the first 10,000 users of our platform, and was originally published on his Vox Populi blog on May 6, 2008.

A few weeks ago, I posted about accessing web services from CCXML using PHP.  This post will demonstrate how [...]

<script type="text/javascript">
SHARETHIS.addEntry({
	title: "Accessing Web Services From VoiceXML",
	url: "http://blogs.voxeo.com/voxeodeveloperscorner/2008/05/08/accessing-web-services-from-voicexml/"
});
</script>
	]]></description>
			<content:encoded><![CDATA[<p><em>This is a guest post from <a href="http://www.voiceingov.org/blog/">Mark Headd</a>, a voice application developer who was one of the first 10,000 users of our platform, and was <a href="http://www.voiceingov.org/blog/?p=139">originally published on his Vox Populi blog on May 6, 2008</a>.</em></p>
<hr />
<p>A few weeks ago, I posted about <a href="http://www.voiceingov.org/blog/?p=136">accessing web services from CCXML</a> using PHP.  This post will demonstrate how to do the same thing, only from VoiceXML.  We’ll be using <a href="http://voxeo.com/prophecy/">Voxeo Prophecy</a> and PHP for this example.  We’ll also be referring to the <a href="http://www.voiceingov.org/blog/?p=135">GreenPhone project</a> — available free for download — for the sample code.</p>
<p>Before we dive in, its important to keep in mind that there are a number of different techniques for getting information from web services into a VoiceXML dialog.  This is just one method — there are many others.  Voxeo even has its own <a href="http://www.voicexmlguide.com/appendixo.htm">platform-specific way of accessing SOAP web services via JavaScript</a>.  Ultimately, the method you employ needs to be a good fit for the environment your working in and the requirements of your project.</p>
<p><strong>Using the greenSoapClient Class</strong></p>
<p>In the last post on this topic, I demonstrated how to use a simple PHP class as a way to access multiple SOAP-based web services from CCXML.  This class forms the basis of our method for accessing web services from VoiceXML as well.  However, in this instance, instead of using the CCXML &lt;send/&gt; element, we’ll use a VoiceXML <a href="http://www.w3.org/TR/2004/REC-voicexml20-20040316/#dml2.3.4">subdialog</a>.</p>
<p>Subdialogs in VoiceXML are typically used to create reusable dialog components for capturing common types of input, like a series of digits (e.g., credit card numbers, account numbers, etc).  They can also be used to compartmentalize complex interactions with a caller and provide a simple interface for accessing results.   By way of example, this is how the <a href="http://www.nuance.com/dialogmodules/advanced/">OSDMs from Nuance</a> work, as well as the <a href="http://community.voxeo.com/services_pro/targus/home.jsp">Targus service</a> from Voxeo.  We’ll borrow this approach to access a <a href="http://www.strikeiron.com/ProductDetail.aspx?p=190">web service from StrikeIron</a> that will send the details of an E85 or bio-diesel station to a cell phone via SMS.</p>
<p><strong>Setting up our Subdialog</strong></p>
<p>In order to send an SMS message with details on an E85 or bio-diesel station, we’ll need 2 things; the station details, and a cell phone number to send it to.</p>
<p>In order to send the details on a station from VoiceXML to PHP, we’ll pack it up in a pipe-delimited string called “detailsToSend” (I won’t go into too much detail about how this is done in this post — to learn more, refer to the GreenPhone Project code).  The cell phone number we are sending to is obtained from the caller ID of the calling party, stored in a variable named “ani”.  Details on how to access caller ID are given in a <a href="http://www.voiceingov.org/blog/?p=136">previous post</a>.</p>
<p>Our subdialog call will look like this:</p>
<blockquote><pre>&lt;form id="sendDetails"&gt;
&lt;catch event="error.badfetch"&gt;
&lt;prompt&gt;
There was a problem sending the station details to your phone.
&lt;break strength="weak"/&gt;
&lt;/prompt&gt;
&lt;goto next="#goodbye"/&gt;
&lt;/catch&gt;

&lt;subdialog name="sendSMS" src="../php/sendStationDetails.php" namelist="ani detailsToSend"&gt;
&lt;prompt&gt;
Sending the station details to
&lt;say-as interpret-as="telephone"&gt;&lt;value expr="ani"/&gt;&lt;/say-as&gt;
&lt;/prompt&gt;
&lt;filled&gt;
&lt;if cond="sendSMS.result==0"&gt;
&lt;prompt&gt;Your message has been sent.&lt;break strength="weak"/&gt;&lt;/prompt&gt;
&lt;else/&gt;
&lt;prompt&gt;
There was a problem sending the station details to your phone.
&lt;break strength="weak"/&gt;
&lt;/prompt&gt;
&lt;/if&gt;
&lt;goto next="#goodbye"/&gt;
&lt;/filled&gt;
&lt;/subdialog&gt;
&lt;/form&gt;</pre>
</blockquote>
<p>We use the attributes on the &lt;subdialog&gt; element to give our subdialog a name (which we’ll use to access the results sent back from PHP), to specify where to POST our variables to and also to specify which variables to POST.</p>
<p>You’ll also notice that we have set up a handler here for an “error.badfetch” event.  This is a good habit to get into whenever you set up a request to an external resource (like a PHP script).  If the script isn’t there or has problems, an “error.badfetch” event will get returned and unless you specified a handler for this event, your day will not end well.</p>
<p>Additionally, we’ve set up logic in our filled block to inspect the result of the subdialog call.  We access the result as a property of the subdialog, using the name we set up in the &lt;subdialog&gt; element and the dot notation (”.”) familiar to JavaScript.</p>
<blockquote><pre>&lt;if cond=”sendSMS.result==0″&gt;

… code logic goes here …

&lt;/if&gt;</pre>
</blockquote>
<p>With this in mind, our PHP script needs to send back a variable called “result”.  How do we do this?  Lets take a look at the PHP script:</p>
<p><strong>A Simple Subdialog using PHP</strong></p>
<p>The subdialog that we want to render is extremely simple — we only need to render enough VoiceXML to declare a variable called “result” and return it to the parent dialog.  We’ll do this after we make our web service call to send the SMS message.</p>
<p>There are two pieces of information returned from the StrikeIron web service that we are interested in; a string that holds the response message from the service (i.e., “success”, “failure”, etc.) and a number indicating the outcome of the web service call.</p>
<p>We’ll take these two bits if information and assign them to PHP variables:</p>
<blockquote><pre>$result = $xml-&gt;soapHeader-&gt;ResponseInfo-&gt;ResponseCode;
$message = $xml-&gt;soapHeader-&gt;ResponseInfo-&gt;Response;
</pre>
</blockquote>
<p>Now, we want to write out these variables in a simple VoiceXML subdialog:</p>
<blockquote><pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;vxml version="2.1" xmlns="http://www.w3.org/2001/vxml"&gt;
&lt;form id="F_1"&gt;
&lt;log&gt;*** SMS response message was: &lt;?php echo $message; ?&gt;. ***&lt;/log&gt;
&lt;block&gt;
&lt;var name="result" expr="&lt;?php echo $result ?&gt;"/&gt;
&lt;return namelist="result"/&gt;
&lt;/block&gt;
&lt;/form&gt;
&lt;/vxml&gt;</pre>
</blockquote>
<p>As discussed above, this creates just enough VoiceXML to instantiate a variable and return it to the parent dialog.  For good measure, we’ll write out the web service string (contained in the PHP variable $message) as a log statement, in case it contains information we want to look at later.</p>
<p><strong>Why This Approach?</strong></p>
<p>Using this technique for accessing web services from VoiceXML provides a couple of advantages.  First, it allows us to completely separate the presentation layer (the VoiceXML) from the logic used to invoke the web service.  This is a fairly standard design practice that makes creating the dialog much easier for a developer that does not necessarily know a whole lot about web services.  With this approach, they don’t really need to — they only need to know that the subdialog call will return a variable called “result” whose value can be inspected to determine what to do next.</p>
<p>Additionally, because the parent dialog is just static VoiceXML it may be possible to cache it.  Since the parent dialog isn’t dynamic, it can be cached for fast access, while the subdialog — which must be dynamic — is the only component sent from the web server to the VoiceXML platform each time a caller accesses the application.  Careful design can yield additional caching opportunities that can make your applications more efficient and less bandwidth intensive.</p>
<p>In the next post, we’ll explore one additional method for accessing web service from VoiceXML.  Stay tuned…</p>
<p><!-- Technorati Tags Start --></p>
<p>Technorati Tags:
<a href="http://technorati.com/tag/voicexml" rel="tag">voicexml</a>, <a href="http://technorati.com/tag/tutorials" rel="tag">tutorials</a>, <a href="http://technorati.com/tag/php" rel="tag">php</a>, <a href="http://technorati.com/tag/voip" rel="tag">voip</a>, <a href="http://technorati.com/tag/applications" rel="tag">applications</a>, <a href="http://technorati.com/tag/phone" rel="tag">phone</a>, <a href="http://technorati.com/tag/voxeo" rel="tag">voxeo</a>
</p>
<p><!-- Technorati Tags End --></p>
<p><a href="http://sharethis.com/item?publisher=c0af778a-87ab-41b4-be56-8ec058cd3e46&title=Accessing+Web+Services+From+VoiceXML&url=http%3A%2F%2Fblogs.voxeo.com%2Fvoxeodeveloperscorner%2F2008%2F05%2F08%2Faccessing-web-services-from-voicexml%2F">ShareThis</a></p><img src="http://feeds.voxeo.com/~r/VoxeoDevelopersCorner/~4/286419990" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blogs.voxeo.com/voxeodeveloperscorner/2008/05/08/accessing-web-services-from-voicexml/feed/</wfw:commentRss>
		<feedburner:origLink>http://blogs.voxeo.com/voxeodeveloperscorner/2008/05/08/accessing-web-services-from-voicexml/</feedburner:origLink></item>
	</channel>
</rss>
