<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>Autour du VB .Net !</title>
	<atom:link href="http://www.toutvb.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.toutvb.net</link>
	<description>Où comment utiliser les technologies liées au VB</description>
	<pubDate>Wed, 03 Sep 2008 07:36:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Autour du VB&#8230; .net : cr&#233;ation d&#8217;une application VXML en utilisant le flux HTTP !</title>
		<link>http://www.toutvb.net/2008/09/02/autour-du-vb-net-cration-dune-application-vxml-en-utilisant-le-flux-http/</link>
		<comments>http://www.toutvb.net/2008/09/02/autour-du-vb-net-cration-dune-application-vxml-en-utilisant-le-flux-http/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 09:39:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[VXML]]></category>

		<category><![CDATA[asp]]></category>

		<category><![CDATA[asp .net]]></category>

		<category><![CDATA[aspx]]></category>

		<category><![CDATA[dotnet]]></category>

		<category><![CDATA[Internet]]></category>

		<category><![CDATA[ivr]]></category>

		<category><![CDATA[Site Web]]></category>

		<category><![CDATA[Visual Studio 2008]]></category>

		<category><![CDATA[VoiceXML]]></category>

		<category><![CDATA[voxpilot]]></category>

		<guid isPermaLink="false">http://www.toutvb.net/?p=6</guid>
		<description><![CDATA[Introduction
Parallèlement au VXML, j&#8217;entame aujourd&#8217;hui une nouvelle série autour de mon langage de prédilection : VB .Net. En effet, les deux technologies sont complémentaires. Si l&#8217;une sert pour réaliser des SVI, l&#8217;autre sert à les préparer. Il est donc nécessaire, afin de les maitriser efficacement, de posséder les compétences adéquates sur ces deux environnements.
Ces billets, [...]]]></description>
			<content:encoded><![CDATA[<h1>Introduction</h1>
<p>Parallèlement au VXML, j&#8217;entame aujourd&#8217;hui une nouvelle série autour de mon langage de prédilection : VB .Net. En effet, les deux technologies sont complémentaires. Si l&#8217;une sert pour réaliser des SVI, l&#8217;autre sert à les préparer. Il est donc nécessaire, afin de les maitriser efficacement, de posséder les compétences adéquates sur ces deux environnements.</p>
<p>Ces billets, chacun de leur côté, vous donneront, je l&#8217;espère, les moyens de créer des applications vocales performantes. Du débutant à l&#8217;expert confirmé, nous verrons comment construire du code clair et fonctionnel.</p>
<p>Mais n&#8217;allons pas trop vite. Avant d&#8217;en arriver là, il faut pouvoir réaliser de simples applications web. En effet, le VXML utilise du flux http. Nous allons donc découvrir comment, grâce au dotnet, réaliser une application VXML puissante.</p>
<p>Nous allons reprendre pour cela notre projet &#8220;HelloWorld&#8221; présenté dans le <a href="http://www.esohier-online.info/2008/08/bonjour-le-monde-ou-comment-crer-sa-1re-application-voicexml" target="_blank">billet précédent</a>, et le transcrire en application dotnet !</p>
<h2>Préparation du projet</h2>
<p><a href="http://www.esohier-online.info/wp-content/uploads/2008/08/createproject.jpg" target="_blank"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 30px 0px 0px; border-right-width: 0px" src="http://www.esohier-online.info/wp-content/uploads/2008/08/createproject-thumb.jpg" border="0" alt="CreateProject" width="222" height="78" align="left" /></a>Afin de réaliser cette application, nous allons créer un nouveau projet web. Pour cela, les différentes étapes sous Visual Studio sont :</p>
<ol>
<li>Création du projet,</li>
<li>Création des fichiers nécessaires au projet,</li>
<li>Écriture du code,</li>
<li>Publication du projet,</li>
<li>Paramétrage de l&#8217;interface VoiceXML (Voxpilot),</li>
<li>Exécution du code.</li>
</ol>
<p>Nous appellerons notre solution &#8220;HelloVXML&#8221;.</p>
<h3>Création des pages</h3>
<p>Il faut ajouter à notre solution plusieurs fichiers nécessaires à son exécution, dont 2 <em>webforms :</em></p>
<ol>
<li>&#8220;Default.aspx&#8221;, qui sera notre page maître,</li>
<li>&#8220;HelloWorld.aspx&#8221; qui contiendra notre traitement principal.</li>
</ol>
<p>Pour ces deux pages, il faudra que la partie HTML soit en fait du vxml afin qu&#8217;il puisse être interprêté par le VoiceXML (les balises n&#8217;ont rien d&#8217;extraordinaire, voir là aussi le billet précédent pour de plus amples détails). On trouvera donc le code suivant :</p>
<p>&lt;?xml version=&#8221;<span style="color: #8b0000;">1.0</span>&#8221; encoding=&#8221;<span style="color: #8b0000;">UTF-8</span>&#8220;?&gt;</p>
<p>&lt;!DOCTYPE vxml <span style="color: #0000ff;">PUBLIC</span> <span style="color: #008000;">&#8216;-//Voxpilot/DTD VoiceXML 2.1//EN&#8217; &#8216;http://dtd.voxpilot.com/voice/2.1/voxpilot_voicexml-2.1.dtd&#8217;&gt;</span></p>
<p> </p>
<p>&lt;%@ Page Language=&#8221;<span style="color: #8b0000;">VB</span>&#8221; AutoEventWireup=&#8221;<span style="color: #8b0000;">false</span>&#8221; CodeFile=&#8221;<span style="color: #8b0000;">Default.aspx.vb</span>&#8221; <span style="color: #0000ff;">Inherits</span>=&#8221;<span style="color: #8b0000;">_Default</span>&#8221; %&gt;</p>
<p> </p>
<p>&lt;!&#8211;</p>
<p>* Acceptation de l<span style="color: #008000;">&#8216;appel et transfert au traitement principal</span></p>
<p>*</p>
<p>*</p>
<p>&#8211;&gt;</p>
<p>&lt;vxml version=&#8221;<span style="color: #8b0000;">2.1</span>&#8221; xmlns=&#8221;<span style="color: #8b0000;">http://www.w3.org/2001/vxml</span>&#8221; xml:lang=&#8221;<span style="color: #8b0000;">en-GB</span>&#8220;&gt;</p>
<p> </p>
<p>&lt;form id=&#8221;<span style="color: #8b0000;">bienvenue</span>&#8220;&gt;</p>
<p> </p>
<p>&lt;!&#8211; Transfert le contrôle vers le formulaire de bienvenue &#8211;&gt;</p>
<p>&lt;block&gt;</p>
<p>&lt;submit <span style="color: #0000ff;">next</span>=&#8221;<span style="color: #8b0000;">HelloWorld.aspx</span>&#8221; /&gt;</p>
<p>&lt;/block&gt;</p>
<p>&lt;/form&gt;</p>
<p>&lt;/vxml&gt;</p>
<p> </p>
<p><span style="color: #008000;"><span style="color: #008000;"><span style="color: #000000;">Toujours dans notre projet, nous avons également :</span></span></span></p>
<p><span style="color: #008000;"><span style="color: #000000;">- un fichier son &#8220;Helloworld.wav&#8221; qui joura le son de bienvenue de notre exemple. Pour cela, on peut reprendre celui de voxpilot. Afin d&#8217;organiser correctement notre solution, il est nécessaire de créer un nouveau dossier que nous appellerons&#8230; media.</span></span></p>
<p><span style="color: #000000;">- un fichier de dialogue qui comportera le code vxml à exécuter. Tout comme pour le fichier ci-desssus, nous allons ajouter un nouveau dossier : dialogs.</span></p>
<p><a href="http://www.esohier-online.info/wp-content/uploads/2008/08/solution-explorer.jpg" target="_blank"></a><a href="http://www.esohier-online.info/wp-content/uploads/2008/08/solution-explorer2.jpg" target="_blank"><span style="color: #000000;"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 30px 0px 0px; border-right-width: 0px" src="http://www.esohier-online.info/wp-content/uploads/2008/08/solution-explorer-thumb1.jpg" border="0" alt="Solution_Explorer" width="244" height="168" align="left" /></span></a><span style="color: #000000;">Vous devriez voir notre solution comme le montre l&#8217;image ci-contre.</span></p>
<p><span style="color: #000000;">Ensuite, il faut :</span></p>
<ol>
<li><span style="color: #000000;">Créer le flux vxml dans un fichier de dialogue (nous verrons en effet par la suite qu&#8217;il est plus simple d&#8217;intégrer le flux vxml dans des fichiers séparés afin de traiter les processus spécifiques à nos applications), </span></li>
<li><span style="color: #000000;">Générer le flux et  l&#8217;envoyer grâce à la page aspx. </span></li>
</ol>
<h3><span style="color: #000000;">Création du flux VXML</span></h3>
<p><span style="color: #000000;">Il nous faut donc créer notre dialogue. Pour rappel, ce langage est dérivé de l&#8217;XML. Donc, nous allons ajouter une nouvelle page XML dans notre projet, et la renommer en &#8220;HelloWorld.vxml&#8221;. Une fois cela réalisé, copié dans cette page le code ci-dessous :</span></p>
<p> </p>
<p><span style="color: #0000ff;">&lt;?</span>xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;<span style="color: #0000ff;">?&gt;</span></p>
<p><span style="color: #008000;">&lt;!&#8211; * Exemple de flux VXML * &#8211;&gt;</span></p>
<p><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">vxml</span> <span style="color: #ff0000;">version</span>=<span style="color: #0000ff;">&#8220;2.1&#8243;</span> <span style="color: #ff0000;">xmlns</span>=<span style="color: #0000ff;">&#8220;http://www.w3.org/2001/vxml&#8221;</span> <span style="color: #ff0000;">xml</span>:<span style="color: #ff0000;">lang</span>=<span style="color: #0000ff;">&#8220;en-GB&#8221;</span><span style="color: #0000ff;">&gt;</span></p>
<p> </p>
<p><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">form</span> <span style="color: #ff0000;">id</span>=<span style="color: #0000ff;">&#8220;formHello&#8221;</span><span style="color: #0000ff;">&gt;</span></p>
<p><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">block</span><span style="color: #0000ff;">&gt;</span></p>
<p><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">audio</span> <span style="color: #ff0000;">expr</span>=<span style="color: #0000ff;">&#8220;&#8216;media/helloworld.wav&#8217;&#8221;</span><span style="color: #0000ff;">/&gt;</span></p>
<p><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">block</span><span style="color: #0000ff;">&gt;</span></p>
<p><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">form</span><span style="color: #0000ff;">&gt;</span></p>
<p> </p>
<p><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">vxml</span><span style="color: #0000ff;">&gt;</span></p>
<p> </p>
<p><span style="color: #008000;"><span style="color: #000000;">N&#8217;oublier pas de sauvegarder le contenu (Ctrl-S).</span></span></p>
<p><span style="color: #000000;"><!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></span></p>
<h3><span style="color: #000000;">Génération de la page VB</span></h3>
<p><span style="color: #000000;">Dans notre page aspx &#8220;HelloWorld.aspx&#8221;, au niveau du code <em>behind</em>, nous allons préparer notre flux, à savoir :</span></p>
<p><span style="color: #000000;">1. vérifier l&#8217;existance du dialogue pour éviter toutes erreurs,</span></p>
<p><span style="color: #000000;">2. envoyer le dialogue vers le flux http en ayant pris soin d&#8217;ajouter son en-tête. Nous avons pour cela plusieurs méthodes de l&#8217;objet <em>Response</em> : <em>WriteFile</em> pour l&#8217;envoi d&#8217;un fichier complet, ou <em>Write</em> pour l&#8217;envoi d&#8217;une variable. Ces deux méthodes vont nous être très utiles.</span></p>
<p><span style="color: #000000;">Afin que notre code puisse être exécuté dès le chargement de notre page, nous allons écrire notre flux dans l&#8217;événement &#8220;<em>load</em>&#8221; de celui-ci :</span></p>
<div class="csharpcode"><span style="color: #008000;">&#8216;Pour obtenir des informations sur le fichier</span> <span style="color: #0000ff;">Dim</span> fs_helloworld <span style="color: #0000ff;">As</span> FileInfo <span style="color: #008000;">&#8216;Page du dialogue à envoyer vers le flux</span> <span style="color: #0000ff;">Const</span> helloworld <span style="color: #0000ff;">As</span> <span style="color: #0000ff;">String</span> = &#8220;<span style="color: #8b0000;">dialogs/HelloWorld.vxml</span>&#8221; <span style="color: #0000ff;">Dim</span> helloworld_filename <span style="color: #0000ff;">As</span> <span style="color: #0000ff;">String</span> <span style="color: #008000;">&#8216;Préparation de la réponse HTTP</span> Response.Clear() Response.ClearContent() Response.ClearHeaders() Response.Buffer = <span style="color: #0000ff;">True</span> Response.BufferOutput = <span style="color: #0000ff;">True</span> <span style="color: #008000;">&#8216;Initialisation des fichiers VXML</span> helloworld_filename = Server.MapPath(helloworld) fs_helloworld = <span style="color: #0000ff;">New</span> FileInfo(helloworld_filename) <span style="color: #0000ff;">If</span> fs_helloworld.Exists <span style="color: #0000ff;">Then</span> Trace.Write(&#8221;<span style="color: #8b0000;">fichier existant lg=</span>&#8221; + <span style="color: #0000ff;">CStr</span>(fs_helloworld.Length)) Response.ContentType = &#8220;<span style="color: #8b0000;">Text/xml</span>&#8221; Response.AddHeader(&#8221;<span style="color: #8b0000;">Content-Length</span>&#8220;, <span style="color: #0000ff;">CStr</span>(fs_helloworld.Length)) <span style="color: #008000;">&#8216;Envoi du fichier vers le flux http</span> Response.WriteFile(helloworld_filename) Response.Flush() Response.Close() <span style="color: #0000ff;">Else</span> Trace.Warn(&#8221;<span style="color: #8b0000;">Le fichier : </span>&#8221; &amp; helloworld_filename &amp; &#8220;<span style="color: #8b0000;">n&#8217;existe pas.</span>&#8220;) <span style="color: #0000ff;">End</span> <span style="color: #0000ff;">If</span></div>
<h2><span style="color: #000000;">Exécution du code</span></h2>
<p><span style="color: #000000;">Pour que notre application puisse fonctionner, il suffit de publier notre site web dans le répertoire local de IIS, sans avoir bien sûr, préalablement, oublié de créer l&#8217;application IIS.</span></p>
<p><a href="http://www.esohier-online.info/wp-content/uploads/2008/08/voxpilot.jpg" target="_blank"><span style="color: #000000;"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" src="http://www.esohier-online.info/wp-content/uploads/2008/08/voxpilot-thumb.jpg" border="0" alt="voxpilot" width="244" height="77" align="left" /></span></a><span style="color: #000000;"> Il ne reste plus qu&#8217;à configurer notre IVR afin qu&#8217;il puisse exécuter &#8220;Hello World!&#8221;. Pour cela, avec voxpilot, ouvrir la console d&#8217;administration, puis se rendre dans la section &#8220;Application&#8221;. Saisir l&#8217;uri de l&#8217;application :</span></p>
<p><span style="color: #000000;"><a href="http://localhost/HelloVXML/Default.aspx">http://localhost/HelloVXML/Default.aspx</a></span></p>
<p><span style="color: #000000;">Et voilà. L&#8217;application est terminée. Vous avez ainsi pu réaliser un premier SVI plein d&#8217;avenirs.</span></p>
<h2><span style="color: #000000;">Conclusion</span></h2>
<p><span style="color: #000000;">Cet exemple est donc très simple mais permet de se faire une idée sur la façon de créer des applications vocales puissantes et performantes. Ce procédé à l&#8217;avantage en effet de pouvoir intégrer dans notre flux toutes sortes de données diverses : des variables bien sûrs, ou des combinaisons de dialogues, après intérogation de bases de données. Nous verrons comment au fil des prochains billets.</span></p>
<p><span style="color: #000000;">Pour entendre le résultat de notre application, il nous faut un téléphone compatible avec la norme sip. En voici deux : le premier, il s&#8217;agit de Sjphone, que l&#8217;on peut trouver à cette adresse : </span><a href="http://www.sjlabs.com/sjp.html"><span style="color: #000000;">http://www.sjlabs.com/sjp.html</span></a><span style="color: #000000;">, et pour le second, il s&#8217;agit de Kapanga, que l&#8217;on trouve ici : </span><a title="http://www.kapanga.net/IP/home.cfm" href="http://www.kapanga.net/IP/home.cfm"><span style="color: #000000;">http://www.kapanga.net/IP/home.cfm</span></a><span style="color: #000000;">. Ce dernier offre l&#8217;avantage d&#8217;ajouter la vidéo en plus du son.</span></p>
<p><span style="color: #000000;">Vous pouvez télécharger la solution ci-dessous sur votre pc.</span></p>
<p><span style="color: #000000;">Nous allons continuer dans nos prochains billets à explorer cet univers, et découvrir les secrets et la puissance du VoiceXML lié au dotnet.</span></p>
<div><span style="color: #008000;"><span style="color: #008000;"><span style="color: #008000;"></span></span></span></div>
<p><span style="color: #008000;"></p>
<div id="scid:18d43e01-4549-4fde-8ca6-c7b4b7385fac:9de0d09e-179c-4f93-86a2-720dba93bedb" class="wlWriterSmartContent" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<p>Download Solution - <a href="http://www.toutvb.net/wp-content/uploads/2008/09/hellovxml.zip">HelloVXML.zip</a></div>
<p> </p>
<p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.toutvb.net/2008/09/02/autour-du-vb-net-cration-dune-application-vxml-en-utilisant-le-flux-http/feed/</wfw:commentRss>
		</item>
		<item>
		<title>&#34;Bonjour le monde&#34;, ou comment cr&#233;er sa 1&#232;re application VoiceXML ?</title>
		<link>http://www.toutvb.net/2008/09/02/bonjour-le-monde-ou-comment-crer-sa-1re-application-voicexml/</link>
		<comments>http://www.toutvb.net/2008/09/02/bonjour-le-monde-ou-comment-crer-sa-1re-application-voicexml/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 09:38:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[VXML]]></category>

		<category><![CDATA[.net]]></category>

		<category><![CDATA[balisage]]></category>

		<category><![CDATA[CCXML]]></category>

		<category><![CDATA[dynamique]]></category>

		<category><![CDATA[html]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[plums]]></category>

		<category><![CDATA[télécoms]]></category>

		<category><![CDATA[VoiceXML]]></category>

		<category><![CDATA[voxeo]]></category>

		<category><![CDATA[voxpilot]]></category>

		<guid isPermaLink="false">http://www.toutvb.net/?p=4</guid>
		<description><![CDATA[Introduction
Depuis un peu plus de 6 mois, je pratique et d&#233;couvre tous les jours le VoiceXML, ou VXML 2.0. Ce standard, peu r&#233;pandu encore en France, est destin&#233; &#224; l&#8217;&#233;laboration de services vocaux int&#233;ractifs (SVI), ou d&#8217;applications t&#233;l&#233;coms. Vous savez ? &#34;Taper 1, pour &#8230;, 2 pour &#8230;, ou * pour joindre un correspondant&#34;. C&#8217;est [...]]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p>Depuis un peu plus de 6 mois, je pratique et d&#233;couvre tous les jours le VoiceXML, ou VXML 2.0. Ce standard, peu r&#233;pandu encore en France, est destin&#233; &#224; l&#8217;&#233;laboration de services vocaux int&#233;ractifs (SVI), ou d&#8217;applications t&#233;l&#233;coms. Vous savez ? &quot;Taper 1, pour &#8230;, 2 pour &#8230;, ou * pour joindre un correspondant&quot;. C&#8217;est exactement ceci.</p>
<p>Plusieurs billets seront donc consacr&#233;s &#224; cette nouvelle technologie. Je combine &#233;galement ce standard &#224; l&#8217;ASP .net (mon outil de programmation, li&#233; &#224; Visual Studio 2005), pour r&#233;aliser des applications vocales avec int&#233;rogation d&#8217;un serveur sp&#233;cialis&#233;, et des bases de donn&#233;es (en l&#8217;occurence, SQL Server).</p>
<p>Je vais donc parler VXML, mais aussi ASP .net, pour donner des astuces, des exemples de code que je j&#8217;utilise lors du d&#233;veloppement de mes applications. En effet, ce standard tend &#224; &#234;tre connu et reconnu.</p>
<p>En parlant code, vous allez pouvoir dans la section suivante, d&#233;couvrir le principe de ce langage avec deux exemples &#224; la cl&#233;.</p>
<h2>Le langage VXML</h2>
<p>Le langage VXML est un langage compos&#233; de balises, d&#233;riv&#233; du XML. Le VXML signifie <strong>V</strong>oice <strong>E</strong>xtensible <strong>M</strong>arkup <strong>L</strong>anguage, ou&quot;langage de balisage extensible vocal&quot; . Semblable au HTML, il permet de cr&#233;er des applications t&#233;l&#233;coms. Ce langage s&#8217;articule autour de 3 notions qui sont :</p>
<ol>
<li>la reconnaissance vocale, </li>
<li>une voix synth&#233;tis&#233;, </li>
<li>les touches DTMF. </li>
</ol>
<p>Pour concevoir une application VXML, un simple &#233;diteur suffit.</p>
<h3>Bonjour le monde</h3>
<p>&#192; titre d&#8217;exemple, le programme ci-dessous joue un fichier son qui contient le traditionnel &quot;hello world !&quot;</p>
<pre style="border-right: #cecece 1px solid; padding-right: 5px; border-top: #cecece 1px solid; padding-left: 5px; min-height: 40px; padding-bottom: 5px; overflow: auto; border-left: #cecece 1px solid; width: 650px; padding-top: 5px; border-bottom: #cecece 1px solid; background-color: #fbfbfb">
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb"><span style="color: #0000ff">&lt;?</span>xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;<span style="color: #0000ff">?&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb"> <span style="color: #0000ff">&lt;</span><span style="color: #800000">vxml</span> <span style="color: #ff0000">version</span>=<span style="color: #0000ff">&quot;2.1&quot;</span> <span style="color: #ff0000">xmlns</span>=<span style="color: #0000ff">&quot;http://www.w3.org/2001/vxml&quot;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">  <span style="color: #ff0000">xml</span>:<span style="color: #ff0000">lang</span>=<span style="color: #0000ff">&quot;en-GB&quot;</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb"> <span style="color: #0000ff">&lt;</span><span style="color: #800000">var</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">&quot;strMediaExt&quot;</span> <span style="color: #ff0000">expr</span>=<span style="color: #0000ff">&quot;('video' ==
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">      session.connection.callmode)?'.3gp':'.wav'&quot;</span><span style="color: #0000ff">/&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb"> <span style="color: #0000ff">&lt;</span><span style="color: #800000">form</span> <span style="color: #ff0000">id</span>=<span style="color: #0000ff">&quot;formHello&quot;</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">     <span style="color: #0000ff">&lt;</span><span style="color: #800000">block</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">         <span style="color: #0000ff">&lt;</span><span style="color: #800000">audio</span> <span style="color: #ff0000">expr</span>=<span style="color: #0000ff">&quot;'media/helloworld'+strMediaExt&quot;</span><span style="color: #0000ff">/&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">block</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb"> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">form</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">vxml</span><span style="color: #0000ff">&gt;</span></pre>
</pre>
<p>Comme on peut le voir, tout l&#8217;aspect du langage tourne autour des balises, ce qui explique la d&#233;rivation du XML. &lt;form&gt;, &lt;block&gt;, &lt;audio&gt; sont des instructions propres au langage, mais l&#8217;&#233;l&#233;ment qui d&#233;finit une application vxml &#224; la base est la balise&#8230; &lt;vxml&gt;&lt;/vxml&gt;.</p>
<h3>Acquittement d&#8217;un appel</h3>
<p>Un second exemple plus complexe, de code est celui que j&#8217;ai &#233;crit pour l&#8217;une de mes applications. Il s&#8217;agit de l&#8217;acquittement d&#8217;un appel t&#233;l&#233;phonique, et le transfert de celui-ci vers une page sp&#233;cifique :</p>
<pre style="border-right: #cecece 1px solid; padding-right: 5px; border-top: #cecece 1px solid; padding-left: 5px; min-height: 40px; padding-bottom: 5px; overflow: auto; border-left: #cecece 1px solid; width: 650px; padding-top: 5px; border-bottom: #cecece 1px solid; background-color: #fbfbfb">
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb"><span style="color: #0000ff">&lt;?</span>xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;<span style="color: #0000ff">?&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb"><span style="color: #0000ff">&lt;</span><span style="color: #800000">vxml</span> <span style="color: #ff0000">version</span>=<span style="color: #0000ff">&quot;2.1&quot;</span> <span style="color: #ff0000">xmlns</span>=<span style="color: #0000ff">&quot;http://www.w3.org/2001/vxml&quot;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">      <span style="color: #ff0000">xml</span>:<span style="color: #ff0000">lang</span>=<span style="color: #0000ff">&quot;en-GB&quot;</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">     <span style="color: #0000ff">&lt;</span><span style="color: #800000">property</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">&quot;inputmodes&quot;</span> <span style="color: #ff0000">value</span>=<span style="color: #0000ff">&quot;dtmf&quot;</span><span style="color: #0000ff">/&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">     <span style="color: #0000ff">&lt;</span><span style="color: #800000">var</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">&quot;now&quot;</span> <span style="color: #ff0000">expr</span>=<span style="color: #0000ff">&quot;new Date()&quot;</span><span style="color: #0000ff">/&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">     <span style="color: #0000ff">&lt;</span><span style="color: #800000">var</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">&quot;dtdebut&quot;</span> <span style="color: #ff0000">expr</span>=<span style="color: #0000ff">&quot;now.toLocaleString()&quot;</span><span style="color: #0000ff">/&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">     <span style="color: #0000ff">&lt;</span><span style="color: #800000">var</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">&quot;essai&quot;</span> <span style="color: #ff0000">expr</span>=<span style="color: #0000ff">&quot;0&quot;</span> <span style="color: #0000ff">/&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb"></pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">     <span style="color: #0000ff">&lt;</span><span style="color: #800000">catch</span> <span style="color: #ff0000">event</span>=<span style="color: #0000ff">&quot;connection.disconnect.hangup&quot;</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">         <span style="color: #0000ff">&lt;</span><span style="color: #800000">var</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">&quot;statut&quot;</span> <span style="color: #ff0000">expr</span>=<span style="color: #0000ff">&quot;'NOK'&quot;</span> <span style="color: #0000ff">/&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">         <span style="color: #0000ff">&lt;</span><span style="color: #800000">submit</span> <span style="color: #ff0000">next</span>=<span style="color: #0000ff">&quot;Ticket.aspx&quot;</span> <span style="color: #ff0000">method</span>=<span style="color: #0000ff">&quot;get&quot;</span> <span style="color: #ff0000">namelist</span>=<span style="color: #0000ff">&quot;statut
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">fulldate session.telephone.dnis session.telephone.ani
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">  session.connection.callid&quot;</span><span style="color: #0000ff">/&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">catch</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb"></pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">     <span style="color: #0000ff">&lt;</span><span style="color: #800000">form</span> <span style="color: #ff0000">id</span>=<span style="color: #0000ff">&quot;bienvenue&quot;</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">         <span style="color: #008000">&lt;!-- Acceuil de l'utilisateur --&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">         <span style="color: #0000ff">&lt;</span><span style="color: #800000">block</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">             <span style="color: #0000ff">&lt;</span><span style="color: #800000">audio</span> <span style="color: #ff0000">src</span>=<span style="color: #0000ff">&quot;media/bonjour.wav&quot;</span> <span style="color: #0000ff">/&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">             <span style="color: #008000">&lt;!-- Transfer le controle vers le formulaire
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">  'saisie' --&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">             <span style="color: #0000ff">&lt;</span><span style="color: #800000">submit</span> <span style="color: #ff0000">next</span>=<span style="color: #0000ff">&quot;suite.aspx&quot;</span> <span style="color: #ff0000">namelist</span>=<span style="color: #0000ff">&quot;essai
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">              dtdebut&quot;</span> <span style="color: #0000ff">/&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">         <span style="color: #0000ff">&lt;/</span><span style="color: #800000">block</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb">     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">form</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="font-size: 10px; margin: 0em; width: 100%; font-family: monospace; background-color: #fbfbfb"> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">vxml</span><span style="color: #0000ff">&gt;</span></pre>
</pre>
<p style="font-family: ">Nous avons plusieurs &#233;l&#233;ments dans ce deuxi&#232;me exemple comme des instructions (les &quot;fameuses&quot; balises d&#233;crites plus haut), et des &#233;l&#233;ments variables (comme les propri&#233;t&#233;s, et les variables : la date de d&#233;but d&#8217;appel, et le nombre d&#8217;essais r&#233;alis&#233;s).</p>
<p style="font-family: ">Le principe de ce code est le suivant : au d&#233;clenchement de l&#8217;appel, le son &quot;bonjour.wav&quot; est jou&#233;, puis on transfert cet acquittement au traitement qui se situe dans la page &quot;suite.aspx&quot;. En cas d&#8217;erreur, c&#8217;est l&#8217;&#233;v&#233;nement &quot;catch&quot; qui est ex&#233;cut&#233;. Et l&#224;, on transfert le traitement &#224; la page &quot;ticket.aspx&quot; (qui &#233;crit un ticket contenant l&#8217;erreur).</p>
<p style="font-family: ">Dans cet exemple, l&#8217;int&#233;gration avec le .net est &#233;vident ! Cela permet de concevoir des applications sophistiqu&#233;es (validation d&#8217;un paiement par carte bancaire, r&#233;cup&#233;ration de messages vocaux, par un identifiant, &#8230; les exemples sont nombreux).</p>
<p style="font-family: ">Les applications dynamiques, telles que d&#233;crient ici, ne sont pas forc&#233;ment d&#233;di&#233;es au .net. Il est &#233;galement possible d&#8217;utiliser des langages comme le php, perl, cgi, python, &#8230;</p>
<p style="font-family: ">On le voit, le VoiceXML est un langage ouvert !</p>
<h2 style="font-family: ">Les plateformes IVR (<em>Interactive Voice Response</em>)</h2>
<p style="font-family: ">Afin que notre code ci-dessus puisse fonctionner, il est n&#233;cessaire de pouvoir les ex&#233;cuter par un interpr&#233;teur.</p>
<p style="font-family: ">Pour cela, nous avons besoin d&#8217;une plateforme sp&#233;cifique sachant lire le code VXML.</p>
<p style="font-family: ">Actuellement, il en existe de deux cat&#233;gories.</p>
<ol>
<li>
<div style="font-family: ">
<p style="font-family: ">Des plateformes en ligne comme <a href="http://www.plumvoice.com/" target="_blank">Plums</a>, ou <a href="http://www.voxeo.com/" target="_blank">Voxeo</a>,</p>
</p></div>
</li>
<li>
<p style="font-family: ">Des plateformes &#224; installer sur notre PC, comme <a title="Voxpilot" href="http://www.voxpilot.com" target="_blank">Voxpilot</a></p>
</li>
</ol>
<p style="font-family: ">Gr&#226;ce &#224; ces environnements, nous allons pouvoir d&#233;velopper nos propres applications t&#233;l&#233;coms.</p>
<p>Pour ma part, j&#8217;utilise l&#8217;architecture de <a title="Voxpilot" href="http://www.voxpilot.com" target="_blank">Voxpilot</a>. C&#8217;est donc tout naturellement que je l&#8217;ai &#233;galement install&#233; sur mon PC personnel. Il est possible d&#8217;obtenir et / ou de renouveller une licence gratuie pour 3 mois.</p>
<p>Sachant qu&#8217;il s&#8217;agit l&#224; d&#8217;un standard, il est tout &#224; fait possible d&#8217;utiliser un autre service&#8230; avec le m&#234;me code !</p>
<h2>Conclusion</h2>
<p>Voici donc un aper&#231;u d&#8217;un langage porteur. Les applications orient&#233;es &quot;t&#233;l&#233;phonies&quot; se d&#233;veloppent en effet rapidement, et l&#8217;aboutissement d&#8217;un standard facilite la cr&#233;ation des applications sans n&#233;cessit&#233; de mat&#233;riel ou d&#233;veloppement lourd, comme ce f&#251;t le cas par le pass&#233;.</p>
<p>Les prochains billets tenteront d&#8217;expliquer le langage lui-m&#234;me ainsi que les diff&#233;rents &#233;v&#233;nements associ&#233;s au VXML, mais nous ferons aussi un petit tour vers le CCXML, compagnon compl&#233;mentaire du VXML orient&#233; &quot;&#233;v&#233;nements&quot;, sans oublier l&#8217;int&#233;gration &#224; des langages dynamiques comme le .net.</p>
<p>Bref, un langage plein d&#8217;avenir et de tr&#232;s belles r&#233;alisations en perspective.</p>
<p>&#192; suivre&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.toutvb.net/2008/09/02/bonjour-le-monde-ou-comment-crer-sa-1re-application-voicexml/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Autour du VB .net : un nouvel univers</title>
		<link>http://www.toutvb.net/2008/09/02/autour-du-vb-net-un-nouvel-univers/</link>
		<comments>http://www.toutvb.net/2008/09/02/autour-du-vb-net-un-nouvel-univers/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 09:35:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[lead]]></category>

		<category><![CDATA[.net]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[VB]]></category>

		<category><![CDATA[VoiceXML]]></category>

		<category><![CDATA[VXML]]></category>

		<guid isPermaLink="false">http://www.toutvb.net/?p=3</guid>
		<description><![CDATA[Et puis quoi ? Encore un nouveau blog ? 
Et oui, m&#233;langer le blog perso et professionnel n&#8217;est pas forc&#233;ment la meilleure des solutions. Voici donc un blog plus sp&#233;cialement d&#233;di&#233; aux technologies autour de mon langage de pr&#233;dilection : le VB .net !
Pourquoi un blog, alors qu&#8217;il y en a d&#233;j&#224; de nombreux autour [...]]]></description>
			<content:encoded><![CDATA[<p>Et puis quoi ? Encore un nouveau blog ? </p>
<p>Et oui, m&#233;langer le blog perso et professionnel n&#8217;est pas forc&#233;ment la meilleure des solutions. Voici donc un blog plus sp&#233;cialement d&#233;di&#233; aux technologies autour de mon langage de pr&#233;dilection : le VB .net !</p>
<p>Pourquoi un blog, alors qu&#8217;il y en a d&#233;j&#224; de nombreux autour de ce langage ? Tout simplement pour montrer les capacit&#233;s techniques que celui-ci peut amener au cours du d&#233;veloppement professionnel, et des diff&#233;rentes technologies qu&#8217;il peut utiliser, notamment avec le VXML. J&#8217;en reparlerais.</p>
<p>En effet, d&#233;velopper en .net, c&#8217;est bien, cela permet de r&#233;aliser des applications puissantes et performantes, bas&#233; sur le <em>framework</em> de Microsoft, tant pour des applications que des sites internet. </p>
<p>Mais on verra au cours des diff&#233;rents billets que l&#8217;on peut am&#233;liorer encore plus ces applications. En ajoutant composants sp&#233;cifiques, des RIA, et autres WFC, des contr&#244;les. Bref, toute une panoplie qui permettront de tirer le maximum des capacit&#233;s du langages, pour r&#233;aliser des applications.</p>
<p>Plusieurs s&#233;ries d&#8217;articles accompagneront ce blog, et le premier d&#8217;entre eux, acc&#232;s bien s&#251;r au VXML (VoiceXML ou Voice eXtender Markup Language). Je r&#233;alise en effet professionnellement des applications de services vocaux.</p>
<p>Mais ce site s&#8217;enrichira aussi d&#8217;articles techniques &#233;trangers puisque j&#8217;ai eu l&#8217;accord de traduire ceux-ci sur mon blog. Vous trouverez donc des infos en provenance de sites de renom dans le domaine.</p>
<p>Alors, bien s&#251;r, ce site a encore des d&#233;fauts, qui seront corrig&#233;s au fur et &#224; mesure. Ne m&#8217;en voulait pas.</p>
<p>N&#8217;h&#233;siter pas &#224; laisser tous les commentaires qui permettront d&#8217;am&#233;liorer encore plus ce site.</p>
<p>Et si vous voulez en savoir plus, tout de suite, consulter ce post pour cr&#233;er votre <a href="http://www.toutvb.net/2008/09/02/autour-du-vb-net-cration-dune-application-vxml-en-utilisant-le-flux-http/">1&#232;re application VXML</a>, en compagnie du .net !</p>
<p>Bon surf, bonne d&#233;couverte, et coder bien.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.toutvb.net/2008/09/02/autour-du-vb-net-un-nouvel-univers/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
