性格决定命运 气度左右格局 拼搏方能取胜 谦虚才会进步

IVR-3 开发Demo [GetSession and InputNumber and split]

上一篇 / 下一篇  2008-04-29 17:42:36 / 个人分类:做着

GetSession

<?xml version="1.0" encoding="UTF-8"?>


o3pX[g]6f0<vxml version = "2.1">

  <meta. name="maintainer" content="YOUREMAILADDRESS@HERE.com"/>

  <form. id="Hello_World">ITPUB个人空间F2pV8DG/U
    <block>

     <prompt>ITPUB个人空间$I*n)@ vg p5u
      Hello there. The caller i d number is:

      <say-as interpret-as="telephone">ITPUB个人空间x@@$J8M$_s+r
        <value expr="session.callerid"/>.ITPUB个人空间+e9tY'Dt\Nu
      </say-as>

      The called i d of this application is:

      <say-as interpret-as="telephone">
@Bk'jw7u'F)O J0        <value expr="session.telephone.dnis"/>.
P2[KPP8\ N\0      </say-as>

     </prompt>

    </block>ITPUB个人空间!vR-m&S)I"d:sH\|
  </form>
zu'l3P ~3S1x`0</vxml>

ITPUB个人空间P2N"N!^ C\$Z

InputNumber

<?xml version="1.0"?>
5LB+X Vk'U*aN!m0<vxml version = "2.1">ITPUB个人空间 _ Z9mpT!?
 <var name="varCustomerId"/>
`d:Vns0owe0 <var name="varPassword"/>
v)dW-k t },lE j0 ITPUB个人空间8?0F'dni&e/U pLC$H(y
 <form. id="Customer_Id">
*i_${+S.E xX0  <assign name="varCustomerId" expr=""/>

  <field name="Customer_Id_Number">ITPUB个人空间W L+Px3w4P
   <grammar mode="dtmf" root="digit">ITPUB个人空间'N$_!K@L
    <rule id="digit"  scope="public">
Zi.i2^G)Z0     <item repeat="6" >
Hy`;QrgGh0      <one-of>ITPUB个人空间ND#}}+FG#f
       <item>dtmf-0</item>ITPUB个人空间b ]V:hUU,@ |5y
       <item>dtmf-1</item>
?._u/[/HpInb*rP0       <item>dtmf-2</item>
'rE6HVm Ri0       <item>dtmf-3</item>
!W)A[pT0       <item>dtmf-4</item>
On&ya"if4d&Y0       <item>dtmf-5</item>
$R!| iu7Je \&`0       <item>dtmf-6</item>ITPUB个人空间uJhX1lHH M
       <item>dtmf-7</item>
{ DDu$v~!U0       <item>dtmf-8</item>ITPUB个人空间}ni6Qtg6N DY
       <item>dtmf-9</item>ITPUB个人空间J+JI F,@
      </one-of>ITPUB个人空间9E"uG3I MQP K\%{
     </item>
%qm,Lsk9J:E HV0    </rule>ITPUB个人空间C{)m+?/H2wA@
   </grammar>

   <prompt>
j3dMg!g H)L.z0    Please enter the last 6 digits of your customer ID number.ITPUB个人空间&z)x;N{&V
   </prompt>

   <noinput>
%q#u"Ma,zK0    <prompt>ITPUB个人空间m? tLi
     Time out.
t3U"fMp4N0     Please try again.
^k2OM_#B:u-j&G?0    </prompt>
({*l7N"y qs|)p0    <reprompt/>ITPUB个人空间M fA9E7m$\
   </noinput>

   <nomatch>
6HY?4~+YsTb0    <prompt>ITPUB个人空间8{G] D"D
     Incorrect input.
(|B3@4ct0j2oM5Xc|0     Please try again.ITPUB个人空间(R-U[9cQ/tYx
    </prompt>
:Xj fx[0L0    <reprompt/>
;{CK0| W0   </nomatch>

   <filled>ITPUB个人空间3C$F xE&_P
    <assign name="varCustomerId" expr="Customer_Id_Number"/>ITPUB个人空间 yN&_8F$j,@a"Fz]g@
    <goto next="#password"/>
3T%j:FL&P0   </filled>
"rF;AK,JK0  </field>
#f-xO tbDV:Y0 </form>

 <form. id="password">
vuw9O!?B"v*E0  <assign name="varPassword" expr=""/>

  <field name="passwordNumber" type="digits">
n:v(b4Pb-a[8i8\0   <grammar mode="dtmf" root="digits">ITPUB个人空间L*jCu.b
    <rule id="digit">ITPUB个人空间\pBkI(M
     <one-of>
9vg?1M e j#z|0      <item>dtmf-0</item>
j%]m*J/Q^-[0      <item>dtmf-1</item>
&_/P0I0W,Lo"Em ^0      <item>dtmf-2</item>ITPUB个人空间|S)eNW!Z
      <item>dtmf-3</item>
` S"GS6Ku0      <item>dtmf-4</item>ITPUB个人空间 y7OHu"Co:Ofh
      <item>dtmf-5</item>
4i9Y1a-{ig0      <item>dtmf-6</item>ITPUB个人空间-yf/[/z(O5`YoFS
      <item>dtmf-7</item>
Wn qsT#D(q0      <item>dtmf-8</item>
| }O `!C|0      <item>dtmf-9</item>ITPUB个人空间[^+e3Yj3|*?G
     </one-of>
A[G{TG f0    </rule>
UgGw9V }%H:[p5{h0    <rule id="digits" scope="public">
eK4E-Mgr#J#VQ0     <item>ITPUB个人空间lRB,cohWj\.l
      <ruleref uri="#digit"/>
`4PO&^:el ?_0     </item>
A9R b n wC;?[0    </rule>ITPUB个人空间)D1U!H(| R!lH i
   </grammar>

   <prompt>
v/WyHP!D)d7xy s0    Please enter your password followed by the sharp key. ITPUB个人空间| Pah r
   </prompt>

   <noinput>
aV kD Ru:aWj}7Z0    <prompt>
,[2I"M ]8x-O"dU0     Time out.ITPUB个人空间 \Ep4C:Uh q a h
     Please try again. ITPUB个人空间&q^;s%v'\ sa ||i]
    </prompt>ITPUB个人空间U,b0z5VZ&Q'E"sg
    <reprompt/>ITPUB个人空间u[.N,U+X/le;e ]
   </noinput>

   <nomatch>ITPUB个人空间/XV}I`
    <prompt>ITPUB个人空间7Pv/U8G3E
     Incorrect input.ITPUB个人空间.e'A @.d@*OL f
     Please try again.ITPUB个人空间 b"d*L;wR&t [
    </prompt>
tC%a8[&t `~Gf0    <reprompt/>
!t t&`Mvq0   </nomatch>

   <filled>
q`k4{&E#v9T0b ^0    <assign name="varPassword" expr="passwordNumber"/>ITPUB个人空间9E4w4~ Ra[lZ[
    <goto next="#Post_1" />
K5dorE jY0   </filled>ITPUB个人空间6uw O:lql i4U-}
  </field>ITPUB个人空间UkGl [VO
 </form>
HQ'PI$k*S0 
Q)p,o ZV,vO {2a-w0 <form. id="Post_1">
e4[@)fd0  <block>
pBc$V4wf"d0   <prompt>ITPUB个人空间0i @g-\y)M%X;n b
    information.
4FrUG4gv(W0    customer I d.ITPUB个人空间A%Hs0f'u
    <say-as interpret-as="number" format="digits">ITPUB个人空间E CML'F5S;G;hf
      <value expr="varCustomerId"/>ITPUB个人空间q1K'JU mwcP
     </say-as>.ITPUB个人空间.c;{dF9X
     password.ITPUB个人空间H/B;DRq&lT
     <say-as interpret-as="number" format="digits">
wCdp*M6qU2Bp Q2I0      <value expr="varPassword"/>
V!n1]}'p1Z"Cr0      </say-as>.
N U/u-Z7~ G|q0      <break time="3s"/>
,g w-i4c#r6n!r.]Z0     </prompt>ITPUB个人空间:d NSY/H)Mw,C.M1K
  </block>
X'E.f eh!r9s|?-Z0 </form>
4GJUW+`r0</vxml>

split

<?xml version="1.0"?>ITPUB个人空间gKo],_ [
<vxml version = "2.1">

 <script> <![CDATA[
M!Z3q k,nm:g[0      function round(number)
5d)r)E&imb#j1E0      {
b.b1Igc:Ni%r `+Z0        var strSource = "'deposit',25.02,'02/02/2008','America','withdrawal',12.10,'01/02/2008','Canada','deposit',60.50,'02/16/2008','America','withdrawal',108.88,'03/02/2008','Canada','withdrawal',100.00,'03/15/2008','Canada'";
eA5i.S,Z2Zk0        var i;
g1oA J q"{t6~;tNi0   var my_array = new Array();ITPUB个人空间LfMp~3A{,U,H#^ C
  ITPUB个人空间4`VN.i*XU
    my_array = strSource.split(",", 20);
9oe7d}:\.R"Z_5d0  
Oq&F!]p`2@kt{)l0   return my_array[number];
{f~5z~{b#A0   
CtIN;NbZE `0      }ITPUB个人空间!Tw.QxG(]-XX5Y"W
   ]]></script>

 <form>ITPUB个人空间ePH bj*J8Eu
  <block>
h7h0U$|6P~ F0   <prompt>ITPUB个人空间R2L@7^1{gII)eF7B
     A <value expr="round(0)"/> in the amount of <say-as interpret-as="currency">$<value expr="round(1)"/></say-as>, Posted on <say-as interpret-as="date" format="mdy"><value expr="round(2)"/></say-as> ,In the location <value expr="round(3)"/>.
e-[p#}6h5`X0     A <value expr="round(4)"/> in the amount of <say-as interpret-as="currency">$<value expr="round(5)"/></say-as>, Posted on <say-as interpret-as="date" format="mdy"><value expr="round(6)"/></say-as> ,In the location <value expr="round(7)"/>.ITPUB个人空间/R.i KZ"`q Irfd
     A <value expr="round(8)"/> in the amount of <say-as interpret-as="currency">$<value expr="round(9)"/></say-as>, Posted on <say-as interpret-as="date" format="mdy"><value expr="round(10)"/></say-as> ,In the location <value expr="round(11)"/>.
~u+fH Q w2` `6kv0     A <value expr="round(12)"/> in the amount of <say-as interpret-as="currency">$<value expr="round(13)"/></say-as>, Posted on <say-as interpret-as="date" format="mdy"><value expr="round(14)"/></say-as> ,In the location <value expr="round(15)"/>.ITPUB个人空间 k&lp/Gm#?4@|}
     A <value expr="round(16)"/> in the amount of <say-as interpret-as="currency">$<value expr="round(17)"/></say-as>, Posted on <say-as interpret-as="date" format="mdy"><value expr="round(18)"/></say-as> ,In the location <value expr="round(19)"/>.ITPUB个人空间u7D.v&p[C`Lm5|
     <break time="3s"/>
{"v D2`2n0   </prompt>   
M2B+V ap `*uhdq0  </block>
/G.|5S;qnSz0 </form>
0eB+em;[0</vxml>


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

Open Toolbar