<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=1941995" />
  <subtitle>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=1941995</id>
  <updated>2013-05-23T20:43:50Z</updated>
  <dc:date>2013-05-23T20:43:50Z</dc:date>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=7419111" />
    <author>
      <name>Michal Myszor</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=7419111</id>
    <updated>2012-10-08T13:22:48Z</updated>
    <published>2012-10-08T13:22:48Z</published>
    <summary type="html">Hi
since last post I have succesfully implemented this script and it's working
but there's still one problem - when a phone is busy...
there are few different dial-peers on router, some for PSTN calls, some for mobile networks.. all of them are directed to E1
situation is like this:
sb calls -&gt; router picsk up the call -&gt; plays message -&gt; forwards to CUCM (certain phone number) -&gt; phone is busy
and
when calling party comes from PSTN network it hears busy tone and call gets disconnected
but 
when calling party comes from mobile network (different dial-peer) it doesn't hear busy tone, just one clik and call gets dropped
 
Both calls (to mobile and PSTN networks) go out the same dial-peer...
any suggestions ?</summary>
    <dc:creator>Michal Myszor</dc:creator>
    <dc:date>2012-10-08T13:22:48Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5757756" />
    <author>
      <name>Michal Myszor</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5757756</id>
    <updated>2012-05-21T07:29:25Z</updated>
    <published>2012-05-21T07:29:25Z</published>
    <summary type="html">Hi Michal,

i have tested your script  didn't face any issue, are you able to place a call using "leg setup" command instead of "handoff" command.

could you please let us know the ios image  version your are using.

Thanks,
Raghavendra</summary>
    <dc:creator>Michal Myszor</dc:creator>
    <dc:date>2012-05-21T07:29:25Z</dc:date>
  </entry>
  <entry>
    <title>Re: New Message from Raghavendra Gutty Veeranagappa in Voice Gateway API (V</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5749852" />
    <author>
      <name>Cyril Joseph</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5749852</id>
    <updated>2012-05-18T14:20:53Z</updated>
    <published>2012-05-18T14:20:53Z</published>
    <summary type="html">From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Friday, May 18, 2012 07:33 AM
To: cdicuser@developer.cisco.com &lt;cdicuser@developer.cisco.com&gt;
Subject: New Message from Raghavendra Gutty Veeranagappa in Voice Gateway API (VGAPI) - TCL-API: RE: TCL/IVR script (incoming E1, plays a message and forwards call)

Raghavendra Gutty Veeranagappa has created a new message in the forum "TCL-API":

--------------------------------------------------------------
Hi Michal,
need to remove the act_Cleanup procedure after leg setup, try with the attached script.
Thanks,
Raghavendra
--
To respond to this post, please click the following link:

&lt;http://developer.cisco.com/web/vgapi/forums/-/message_boards/view_message/5748209&gt;

or simply reply to this email.



Information contained in this email is subject to the disclaimer found by clicking on the following link: http://www.lyondellbasell.com/Footer/Disclaimer/</summary>
    <dc:creator>Cyril Joseph</dc:creator>
    <dc:date>2012-05-18T14:20:53Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5749849" />
    <author>
      <name>Michal Myszor</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5749849</id>
    <updated>2012-05-18T14:19:18Z</updated>
    <published>2012-05-18T14:19:18Z</published>
    <summary type="html">Hi Michal,

i have tested your script  didn't face any issue, are you able to place a call using "leg setup" command instead of "handoff" command.

could you please let us know the ios image  version your are using.

Thanks,
Raghavendra</summary>
    <dc:creator>Michal Myszor</dc:creator>
    <dc:date>2012-05-18T14:19:18Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5749846" />
    <author>
      <name>Michal Myszor</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5749846</id>
    <updated>2012-05-18T14:18:43Z</updated>
    <published>2012-05-18T14:18:43Z</published>
    <summary type="html">Hi Michal,

i have tested your script  didn't face any issue, are you able to place a call using "leg setup" command instead of "handoff" command.

could you please let us know the ios image  version your are using.

Thanks,
Raghavendra</summary>
    <dc:creator>Michal Myszor</dc:creator>
    <dc:date>2012-05-18T14:18:43Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5748209" />
    <author>
      <name>Raghavendra Gutty Veeranagappa</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5748209</id>
    <updated>2012-05-18T13:33:49Z</updated>
    <published>2012-05-18T13:33:49Z</published>
    <summary type="html">Hi Michal,
need to remove the act_Cleanup procedure after leg setup, try with the attached script.
Thanks,
Raghavendra</summary>
    <dc:creator>Raghavendra Gutty Veeranagappa</dc:creator>
    <dc:date>2012-05-18T13:33:49Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5749400" />
    <author>
      <name>Michal Myszor</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5749400</id>
    <updated>2012-05-18T10:06:44Z</updated>
    <published>2012-05-18T10:06:44Z</published>
    <summary type="html">I replaced :
     handoff appl leg_incoming default "DESTINATION=$dest"
with :
    leg setup $dest callInfo leg_incoming

but after message call gets disconnected

debug in attachment
 
Is there a problem that I'm testing it on incoming dial-peer (from CUCM) ?
but without service applied my calls goes through..</summary>
    <dc:creator>Michal Myszor</dc:creator>
    <dc:date>2012-05-18T10:06:44Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5744027" />
    <author>
      <name>Yaw-Ming Chen</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5744027</id>
    <updated>2012-05-17T15:46:34Z</updated>
    <published>2012-05-17T15:46:34Z</published>
    <summary type="html">proc act_Setup { } {
  
     global oprtr

    puts "&gt;&gt;&gt; Tcl: proc act_Setup &lt;&lt;&lt;"
    puts "&gt;&gt;&gt; TCL:Final Dest: $oprtr &lt;&lt;&lt;"

     handoff appl leg_incoming default "DESTINATION=$oprtr"
   call close
}


If you have problem to do handoff you can try "leg setup" first to see what is the setup status. Once setup is successful then do handoff.</summary>
    <dc:creator>Yaw-Ming Chen</dc:creator>
    <dc:date>2012-05-17T15:46:34Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5745451" />
    <author>
      <name>Raghavendra Gutty Veeranagappa</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5745451</id>
    <updated>2012-05-17T09:19:51Z</updated>
    <published>2012-05-17T09:19:51Z</published>
    <summary type="html">Hi Michal,

thanks for sharing the information, BTW did you try using leg setup instead of handoff command, did it work?.

Thanks,
Raghavendra</summary>
    <dc:creator>Raghavendra Gutty Veeranagappa</dc:creator>
    <dc:date>2012-05-17T09:19:51Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5742551" />
    <author>
      <name>Michal Myszor</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5742551</id>
    <updated>2012-05-16T21:02:46Z</updated>
    <published>2012-05-16T21:02:46Z</published>
    <summary type="html">Hi, IOS image is :
c3900-universalk9-mz.SPA.151-4.M2.bin

thanks,
MM</summary>
    <dc:creator>Michal Myszor</dc:creator>
    <dc:date>2012-05-16T21:02:46Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5731221" />
    <author>
      <name>Raghavendra Gutty Veeranagappa</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5731221</id>
    <updated>2012-05-15T13:31:48Z</updated>
    <published>2012-05-15T13:31:48Z</published>
    <summary type="html">Hi Michal,

i have tested your script  didn't face any issue, are you able to place a call using "leg setup" command instead of "handoff" command.

could you please let us know the ios image  version your are using.

Thanks,
Raghavendra</summary>
    <dc:creator>Raghavendra Gutty Veeranagappa</dc:creator>
    <dc:date>2012-05-15T13:31:48Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5730760" />
    <author>
      <name>Michal Myszor</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5730760</id>
    <updated>2012-05-15T11:54:18Z</updated>
    <published>2012-05-15T11:54:18Z</published>
    <summary type="html">all that you've asked for in attachments
 
regards,
MM</summary>
    <dc:creator>Michal Myszor</dc:creator>
    <dc:date>2012-05-15T11:54:18Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5728855" />
    <author>
      <name>Raghavendra Gutty Veeranagappa</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5728855</id>
    <updated>2012-05-15T10:44:52Z</updated>
    <published>2012-05-15T10:44:52Z</published>
    <summary type="html">hi michal,

could you please share the logs by enabling below debugs, also please share your script so that it will be easy for us to look into the issue.

debug voip app

Thanks,
Raghavendra</summary>
    <dc:creator>Raghavendra Gutty Veeranagappa</dc:creator>
    <dc:date>2012-05-15T10:44:52Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5730526" />
    <author>
      <name>Michal Myszor</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5730526</id>
    <updated>2012-05-15T10:00:44Z</updated>
    <published>2012-05-15T10:00:44Z</published>
    <summary type="html">I'm trying to setup generic script which just plays message then transfers call (without specifically defined number)
I'm using Yaw-Ming Chen's first sample script, but I get this error : 

The incoming call has a global identifier already present in the list of currently handled calls. It is being refused.

what am I doing wrong - any suggestions ?

The result I'm trying to achieve is to play one message (e.g. your calls may be recorded) - catch all with one dial-peer, and then redirect it to CUCM
is it possible ?</summary>
    <dc:creator>Michal Myszor</dc:creator>
    <dc:date>2012-05-15T10:00:44Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=1975370" />
    <author>
      <name>Yaw-Ming Chen</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=1975370</id>
    <updated>2010-02-18T02:52:20Z</updated>
    <published>2010-02-18T02:52:20Z</published>
    <summary type="html">You can do "call close" as soon as you handoff the call 
But to be safe you can either use 
 handoff callappl leg_incoming default "DESTINATION=$oprtr" insetad of "appl" in this case you can know the handoff return status and do the necessary treatment
 
or use "leg setup" so you know the leg setip status
 
I modified you code a little bit
 
# initialize the parameters that configured from IOS CLI
proc init_configs { }  {
    global welcomePrompt
    global oprtr

    if [infotag get cfg_avpair_exists welcome-prompt] {
       setwelcomePrompt [string trim [infotag get cfg_avpair welwome-prompt]]
    } else {
       set welcomePrompt flash:en_bacd_welcome.au
    }
        if [infotag get cfg_avpair_exists operator] {
         set oprtr [string trim [infotag get cfg_avpair operator]]
     } else {
         set oprtr "NONE"
         puts "operator number not set"
     }
 

}
#procedure to play audio file on incoming dial peer
proc act_Media { } {
    global welcomePrompt

    leg setupack leg_incoming
    leg proceeding leg_incoming
    leg connect leg_incoming
    media play leg_incoming $welcomePrompt
}
 
# setup the call, connect caller to called party
proc act_Setup { } {
   
     global oprtr

    puts "&gt;&gt;&gt; Tcl: proc act_Setup &lt;&lt;&lt;"
    puts "&gt;&gt;&gt; TCL:Final Dest: $oprtr &lt;&lt;&lt;"

     handoff appl leg_incoming default "DESTINATION=$oprtr"
   call close
}
 
 
 </summary>
    <dc:creator>Yaw-Ming Chen</dc:creator>
    <dc:date>2010-02-18T02:52:20Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=1975131" />
    <author>
      <name>Chris Bomba</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=1975131</id>
    <updated>2010-02-18T02:09:53Z</updated>
    <published>2010-02-18T02:09:53Z</published>
    <summary type="html">[quote]This is not for transfer, just an example showing paly a meesge before connect the call.
 
You can add code to collect the digit to transfer out.
 
Thanks ![/quote]
 
Ok, I would like to use your code, but I need a paramater to set the transfer extension.  I added a couple things but still doesn't transfer for me.
 
 
# initialize the parameters that configured from IOS CLI
proc init_configs { }  {
    global welcomePrompt
    global oprtr

    if [infotag get cfg_avpair_exists welcome-prompt] {
       setwelcomePrompt [string trim [infotag get cfg_avpair welwome-prompt]]
    } else {
       set welcomePrompt flash:en_welcome.au
    }
[color=#ff0000]    if [infotag get cfg_avpair_exists operator] {
        set oprtr [string trim [infotag get cfg_avpair operator]]
    } else {
        set oprtr "NONE"
    }[/color]
}
#procedure to play audio file on incoming dial peer
proc act_Media { } {
    global dest
    global welcomePrompt
[color=#ff0000]    global oprtr
   
    set dest $oprtr[/color]

    leg setupack leg_incoming
    leg proceeding leg_incoming
    leg connect leg_incoming
    media play leg_incoming $welcomePrompt
}
 
# setup the call, connect caller to called party
proc act_Setup { } {
    global dest
    puts "&gt;&gt;&gt; Tcl: proc act_Setup &lt;&lt;&lt;"
    puts "&gt;&gt;&gt; TCL:Final Dest: $dest &lt;&lt;&lt;"
   
     handoff callappl leg_incoming default "DESTINATION=$dest"
 
     act_Cleanup
}

# disconnect the call
proc act_Cleanup { } {
    puts "&gt;&gt;&gt; Tcl: act_Cleanup &lt;&lt;&lt;"
    call close
}
init_configs
set fsm(any_state,ev_disconnected)  "act_Cleanup  same_state"
set fsm(CALL_INIT,ev_setup_indication)   "act_Media PLAYPROMPT"
set fsm(PLAYPROMPT,ev_media_done) "act_Setup PLACECALL"
set fsm(PLACECALL,ev_disconnected)      "act_Cleanup CALLDISCONNECT"
set fsm(CALLDISCONNECT,ev_disconnected)   "act_Cleanup         same_state"
set fsm(CALLDISCONNECT,ev_media_done)     "act_Cleanup         same_state"
set fsm(CALLDISCONNECT,ev_disconnect_done) "act_Cleanup         same_state"

fsm define fsm CALL_INIT
 
 
 
 
 
 
It works and I can now play the recording to the caller, and what ever I have setup for operator it will transfer to that number.   Here is the "debug voice application error" output from a call.
 
 
 
000728: Feb 17 15:08:04.494 EST: //99//TCL :/tcl_PutsObjCmd: &gt;&gt;&gt; Tcl: proc act_Setup &lt;&lt;&lt;
000729: Feb 17 15:08:04.494 EST:
000730: Feb 17 15:08:04.494 EST: //99//TCL :/tcl_PutsObjCmd: &gt;&gt;&gt; TCL:Final Dest: 55001 &lt;&lt;&lt;
000731: Feb 17 15:08:04.494 EST:
000732: Feb 17 15:08:04.494 EST: //-1//AFW_:/AFW_Module_ParseHandle: ERROR: Separator not found
000733: Feb 17 15:08:04.494 EST: //99//TCL :/tcl_PutsObjCmd: &gt;&gt;&gt; Tcl: act_Cleanup &lt;&lt;&lt;
000734: Feb 17 15:08:04.494 EST:
000735: Feb 17 15:08:04.494 EST: //99//Hand:/AFW_M_Handoff_Terminate:  Can't cleanup, 1 calls out
000736: Feb 17 15:08:04.494 EST: //-1//AFW_:/AFW_Util_GetTgCicValue: CIC Not  found for tag(56)
000737: Feb 17 15:08:05.758 EST: //99//Dest:/DestStartMediaNegotiation: Interworking Leg does not need renegotiation
000738: Feb 17 15:08:23.194 EST: //99//AFW_:/Session_HandoffReturn: Cannot return leg with connections
000739: Feb 17 15:08:23.194 EST: //99//AFW_:/Session_HandoffReturn: No incoming leg to handoff return
000740: Feb 17 15:08:23.202 EST: //99//AFW_:/Session_HandoffReturn: No incoming leg to handoff return</summary>
    <dc:creator>Chris Bomba</dc:creator>
    <dc:date>2010-02-18T02:09:53Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=1974985" />
    <author>
      <name>Yaw-Ming Chen</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=1974985</id>
    <updated>2010-02-18T01:31:49Z</updated>
    <published>2010-02-18T01:31:49Z</published>
    <summary type="html">This is not for transfer, just an example showing paly a meesge before connect the call.
 
You can add code to collect the digit to transfer out.
 
Thanks !</summary>
    <dc:creator>Yaw-Ming Chen</dc:creator>
    <dc:date>2010-02-18T01:31:49Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=1975065" />
    <author>
      <name>Chris Bomba</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=1975065</id>
    <updated>2010-02-18T01:27:49Z</updated>
    <published>2010-02-18T01:27:49Z</published>
    <summary type="html">[quote]You just like to play a message to caller before connecting to called party right ?
So you can remove most of stuff, something like the follwoing should do the job.
 
 
# initialize the parameters that configured from IOS CLI
proc init_configs { }  {
    global welcomePrompt
 

    if [infotag get cfg_avpair_exists welcome-prompt] {
       setwelcomePrompt [string trim [infotag get cfg_avpair welwome-prompt]]
    } else {
       set welcomePrompt flash:en_bacd_welcome.au
    }
 
}
#procedure to play audio file on incoming dial peer
proc act_Media { } {
    global dest
    global welcomePrompt
 
    set dest [infotag get leg_dnis]

    leg setupack leg_incoming
    leg proceeding leg_incoming
    leg connect leg_incoming
    media play leg_incoming $welcomePrompt
}
 
# setup the call, connect caller to called party
proc act_Setup { } {
    global dest
    puts "&gt;&gt;&gt; Tcl: proc act_Setup &lt;&lt;&lt;"
    puts "&gt;&gt;&gt; TCL:Final Dest: $dest &lt;&lt;&lt;"
    
    
     handoff appl leg_incoming default "DESTINATION=$dest"
 
     act_Cleanup
}
 
# disconnect the call
proc act_Cleanup { } {
    puts "&gt;&gt;&gt; Tcl: act_Cleanup &lt;&lt;&lt;"
    call close
}
init_configs
set fsm(any_state,ev_disconnected)  "act_Cleanup  same_state"
set fsm(CALL_INIT,ev_setup_indication)   "act_Media PLAYPROMPT"
set fsm(PLAYPROMPT,ev_media_done) "act_Setup PLACECALL"
set fsm(PLACECALL,ev_disconnected)      "act_Cleanup CALLDISCONNECT"
set fsm(CALLDISCONNECT,ev_disconnected)   "act_Cleanup         same_state"
set fsm(CALLDISCONNECT,ev_media_done)     "act_Cleanup         same_state"
set fsm(CALLDISCONNECT,ev_disconnect_done) "act_Cleanup         same_state"

fsm define fsm CALL_INIT[/quote]
 
 
With the above config, where would I enter the number that the calls would transfer to?  Would it be configurable in the service params or would it be hardcoded in the script?</summary>
    <dc:creator>Chris Bomba</dc:creator>
    <dc:date>2010-02-18T01:27:49Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=1974949" />
    <author>
      <name>Yaw-Ming Chen</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=1974949</id>
    <updated>2010-02-18T01:08:10Z</updated>
    <published>2010-02-18T01:06:48Z</published>
    <summary type="html">To add delay please refer to programming guide 
 
use media play %s option 
 
%s[i]time  : [/i]Amount of play silence (in ms).[b] 

example:

media play leg_incoming $welcomeprompt %s500
[/b]</summary>
    <dc:creator>Yaw-Ming Chen</dc:creator>
    <dc:date>2010-02-18T01:06:48Z</dc:date>
  </entry>
  <entry>
    <title>RE: TCL/IVR script (incoming E1, plays a message and forwards call)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=1974664" />
    <author>
      <name>Yaw-Ming Chen</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=1974664</id>
    <updated>2010-02-18T00:09:16Z</updated>
    <published>2010-02-18T00:09:16Z</published>
    <summary type="html">You just like to play a message to caller before connecting to called party right ?
So you can remove most of stuff, something like the follwoing should do the job.
 
 
# initialize the parameters that configured from IOS CLI
proc init_configs { }  {
    global welcomePrompt
 

    if [infotag get cfg_avpair_exists welcome-prompt] {
       setwelcomePrompt [string trim [infotag get cfg_avpair welwome-prompt]]
    } else {
       set welcomePrompt flash:en_bacd_welcome.au
    }
 
}
#procedure to play audio file on incoming dial peer
proc act_Media { } {
    global dest
    global welcomePrompt
 
    set dest [infotag get leg_dnis]

    leg setupack leg_incoming
    leg proceeding leg_incoming
    leg connect leg_incoming
    media play leg_incoming $welcomePrompt
}
 
# setup the call, connect caller to called party
proc act_Setup { } {
    global dest
    puts "&gt;&gt;&gt; Tcl: proc act_Setup &lt;&lt;&lt;"
    puts "&gt;&gt;&gt; TCL:Final Dest: $dest &lt;&lt;&lt;"
    
    
     handoff appl leg_incoming default "DESTINATION=$dest"
 
     act_Cleanup
}
 
# disconnect the call
proc act_Cleanup { } {
    puts "&gt;&gt;&gt; Tcl: act_Cleanup &lt;&lt;&lt;"
    call close
}
init_configs
set fsm(any_state,ev_disconnected)  "act_Cleanup  same_state"
set fsm(CALL_INIT,ev_setup_indication)   "act_Media PLAYPROMPT"
set fsm(PLAYPROMPT,ev_media_done) "act_Setup PLACECALL"
set fsm(PLACECALL,ev_disconnected)      "act_Cleanup CALLDISCONNECT"
set fsm(CALLDISCONNECT,ev_disconnected)   "act_Cleanup         same_state"
set fsm(CALLDISCONNECT,ev_media_done)     "act_Cleanup         same_state"
set fsm(CALLDISCONNECT,ev_disconnect_done) "act_Cleanup         same_state"

fsm define fsm CALL_INIT</summary>
    <dc:creator>Yaw-Ming Chen</dc:creator>
    <dc:date>2010-02-18T00:09:16Z</dc:date>
  </entry>
</feed>

