CCNA Voice Lab Manual PSTN TCL Scripts
killuah72
Member Posts: 60 ■■□□□□□□□□
Has anyone successfully used the TCL scripts in this book to play the audio files when dialed?
I can call across the PSTN to the other site just fine but when I try to dial the numbers in the PSTN, the music never plays. Was pretty excited to call 911 / 9911 and hear some badass music play..
Here's the script:
PSTN_Simulator#more hq_911.tcl
proc init { } {
global param
set param(interruptPrompt) true
set param(abortKey) *
set param(terminationKey) #
}
proc act_Setup { } {
global dest
leg setupack leg_incoming
leg proceeding leg_incoming
media play leg_incoming flash:hq_911.au
fsm setstate CALLDISCONNECTED
}
proc act_Cleanup { } {
call close
}
init
set callfsm(CALL_INIT,ev_setup_indication) "act_Setup,CALLDISCONNECTED"
set callfsm(CALLDISCONECCTED,ev_disconnected) "act_Cleanup,same_state"
set callfsm(CALLDISCONNECTED,ev_disconnected) "act_Cleanup,same_state"
set callfsm(CALLDISCONNECTED,ev_media_done) "act_Cleanup,same_state"
set callfsm(CALLDISCONNECTED,ev_disconnect_done) "act_Cleanup,same_state"
set callfsm(CALLDISCONNECTED,ev_leg_timer) "act_Cleanup,same_state"
fsm define callfsm CALL_INIT
The hq_911.au file is in flash: and the music is about 1m30s long.
Here's the debug when I dial 9911:
PSTN_Simulator# debug voip application tclcommands
voip application tcl commands debugging is on
PSTN_Simulator#
*Sep 22 14:35:09.718: //52//TCL :/tcl_LegObjCmd: leg setupack leg_incoming
*Sep 22 14:35:09.718: //52//TCL :/tcl_LegSetupAckObjCmd: setupack leg_incoming
*Sep 22 14:35:09.718: //52//AFW_:/vtd_lg_incoming: argc 2
*Sep 22 14:35:09.718: //52//AFW_:/vtd_lg_incoming: Legs [52 ]
*Sep 22 14:35:09.718: //52//Tcl :/tcl_parseCallID_vartagObj: VARTAG Translation Leg Count=1
*Sep 22 14:35:09.718: //52//TCL :/tcl_LegObjCmd: leg proceeding leg_incoming
*Sep 22 14:35:09.718: //52//TCL :/tcl_LegProceedObjCmd: proceeding leg_incoming
*Sep 22 14:35:09.718: //52//AFW_:/vtd_lg_incoming: argc 2
*Sep 22 14:35:09.718: //52//AFW_:/vtd_lg_incoming: Legs [52 ]
*Sep 22 14:35:09.718: //52//Tcl :/tcl_parseCallID_vartagObj: VARTAG Translation Leg Count=1
*Sep 22 14:35:09.718: //52//PACK:/tcl_MediaObjCmd: media play leg_incoming flash:hq_911.au
*Sep 22 14:35:09.718: //52//PACK:/tcl_MediaPlayObjCmd: play leg_incoming flash:hq_911.au
*Sep 22 14:35:09.718: //52//AFW_:/vtd_lg_incoming: argc 3
*
PSTN_SimulatorSep 22 14:35:09.718: //52//AFW_:/vtd_lg_incoming: Legs [52 ]
*Sep 22 14:35:09.718: //52//Tcl :/tcl_parseCallID_vartagObj: VARTAG Translation Leg Count=1
*Sep 22 14:35:09.718: //52//PACK:/Media_Play_Start:
*Sep 22 14:35:09.718: //52//TCL :/tcl_FSMObjCmd: fsm setstate CALLDISCONNECTED
*Sep 22 14:35:09.718: //52//TCL :/tcl_FSMSetStateObjCmd: setstate setstate CALLDISCONNECTED
*Sep 22 14:35:09.722: %ISDN-6-CONNECT: Interface Serial0/0:5 is now connected to 5105555003 N/A
*Sep 22 14:35:09.726: //52//TCL :/tcl_CallObjCmd: call close
*Sep 22 14:35:09.726: //52//TCL :/tcl_CallCloseObjCmd: close
*Sep 22 14:35:09.726: %ISDN-6-CONNECT: Interface Serial0/0:5 is now connected to 5105555003 N/A#
And here is the config in case you are curious:
application
service us_900 flash:us_900.tcl
!
service intl flash:international.tcl
!
service info flash:info.tcl
!
service local flash:mrrogers.tcl
!
service us_800 flash:us_800.tcl
!
service ld flash:ld.tcl
!
service 911 flash:hq_911.tcl
!
!
Hope someone can help!
-Kenny
I can call across the PSTN to the other site just fine but when I try to dial the numbers in the PSTN, the music never plays. Was pretty excited to call 911 / 9911 and hear some badass music play..
Here's the script:
PSTN_Simulator#more hq_911.tcl
proc init { } {
global param
set param(interruptPrompt) true
set param(abortKey) *
set param(terminationKey) #
}
proc act_Setup { } {
global dest
leg setupack leg_incoming
leg proceeding leg_incoming
media play leg_incoming flash:hq_911.au
fsm setstate CALLDISCONNECTED
}
proc act_Cleanup { } {
call close
}
init
set callfsm(CALL_INIT,ev_setup_indication) "act_Setup,CALLDISCONNECTED"
set callfsm(CALLDISCONECCTED,ev_disconnected) "act_Cleanup,same_state"
set callfsm(CALLDISCONNECTED,ev_disconnected) "act_Cleanup,same_state"
set callfsm(CALLDISCONNECTED,ev_media_done) "act_Cleanup,same_state"
set callfsm(CALLDISCONNECTED,ev_disconnect_done) "act_Cleanup,same_state"
set callfsm(CALLDISCONNECTED,ev_leg_timer) "act_Cleanup,same_state"
fsm define callfsm CALL_INIT
The hq_911.au file is in flash: and the music is about 1m30s long.
Here's the debug when I dial 9911:
PSTN_Simulator# debug voip application tclcommands
voip application tcl commands debugging is on
PSTN_Simulator#
*Sep 22 14:35:09.718: //52//TCL :/tcl_LegObjCmd: leg setupack leg_incoming
*Sep 22 14:35:09.718: //52//TCL :/tcl_LegSetupAckObjCmd: setupack leg_incoming
*Sep 22 14:35:09.718: //52//AFW_:/vtd_lg_incoming: argc 2
*Sep 22 14:35:09.718: //52//AFW_:/vtd_lg_incoming: Legs [52 ]
*Sep 22 14:35:09.718: //52//Tcl :/tcl_parseCallID_vartagObj: VARTAG Translation Leg Count=1
*Sep 22 14:35:09.718: //52//TCL :/tcl_LegObjCmd: leg proceeding leg_incoming
*Sep 22 14:35:09.718: //52//TCL :/tcl_LegProceedObjCmd: proceeding leg_incoming
*Sep 22 14:35:09.718: //52//AFW_:/vtd_lg_incoming: argc 2
*Sep 22 14:35:09.718: //52//AFW_:/vtd_lg_incoming: Legs [52 ]
*Sep 22 14:35:09.718: //52//Tcl :/tcl_parseCallID_vartagObj: VARTAG Translation Leg Count=1
*Sep 22 14:35:09.718: //52//PACK:/tcl_MediaObjCmd: media play leg_incoming flash:hq_911.au
*Sep 22 14:35:09.718: //52//PACK:/tcl_MediaPlayObjCmd: play leg_incoming flash:hq_911.au
*Sep 22 14:35:09.718: //52//AFW_:/vtd_lg_incoming: argc 3
*
PSTN_SimulatorSep 22 14:35:09.718: //52//AFW_:/vtd_lg_incoming: Legs [52 ]
*Sep 22 14:35:09.718: //52//Tcl :/tcl_parseCallID_vartagObj: VARTAG Translation Leg Count=1
*Sep 22 14:35:09.718: //52//PACK:/Media_Play_Start:
*Sep 22 14:35:09.718: //52//TCL :/tcl_FSMObjCmd: fsm setstate CALLDISCONNECTED
*Sep 22 14:35:09.718: //52//TCL :/tcl_FSMSetStateObjCmd: setstate setstate CALLDISCONNECTED
*Sep 22 14:35:09.722: %ISDN-6-CONNECT: Interface Serial0/0:5 is now connected to 5105555003 N/A
*Sep 22 14:35:09.726: //52//TCL :/tcl_CallObjCmd: call close
*Sep 22 14:35:09.726: //52//TCL :/tcl_CallCloseObjCmd: close
*Sep 22 14:35:09.726: %ISDN-6-CONNECT: Interface Serial0/0:5 is now connected to 5105555003 N/A#
And here is the config in case you are curious:
application
service us_900 flash:us_900.tcl
!
service intl flash:international.tcl
!
service info flash:info.tcl
!
service local flash:mrrogers.tcl
!
service us_800 flash:us_800.tcl
!
service ld flash:ld.tcl
!
service 911 flash:hq_911.tcl
!
!
Hope someone can help!
-Kenny
Comments
-
pitviper Member Posts: 1,376 ■■■■■■■□□□Do you have a VOIP Dial-Peer on the PSTN router to the TCL in flash? Off the top of my head, something like this:
dial-peer voice 911 voip
service 911 <- TCL Script name
destination-pattern 911
session target ipv4:1.2.3.4 <- PSTN Router IP (itself)
incoming called-number 911
dtmf-relay h245-alphanumeric
codec g711ulaw
no vadCCNP:Collaboration, CCNP:R&S, CCNA:S, CCNA:V, CCNA, CCENT -
killuah72 Member Posts: 60 ■■□□□□□□□□This is what I configured per the book:
R1:
dial-peer voice 911 pots
description Emergency Services
destination-pattern 911
port 0/0/0:23
prefix 911
dial-peer voice 9911 pots
description Emergency Services
destination-pattern 9911
port 0/0/0:23
prefix 911
PSTN:
dial-peer voice 911 pots
service 911
incoming called-number 911 -
pitviper Member Posts: 1,376 ■■■■■■■□□□Make sure that the application is running:
show call application sessions
You can also try to start/stop the TCL, and manually load the prompt file:
call application session stop id 50A0 <- obtained from the show command
call application voice load 911
audio-prompt load flash:hq_911.auCCNP:Collaboration, CCNP:R&S, CCNA:S, CCNA:V, CCNA, CCENT -
killuah72 Member Posts: 60 ■■□□□□□□□□That show command doesn't give me anything. Maybe that's the issue.
PSTN_Simulator#show call application sessions
PSTN_Simulator#call application voice load 911
PSTN_Simulator#
Aug 5 15:24:14.402: //-1//HIFS:/hifs_ifs_cb: hifs ifs file read succeeded. size=799, url=flash:hq_911.tcl
Aug 5 15:24:14.402: //-1//HIFS:/hifs_free_idata: hifs_free_idata: 0x66F4FBBC
Aug 5 15:24:14.402: //-1//HIFS:/hifs_hold_idata: hifs_hold_idata: 0x66F4FBBC
PSTN_Simulator#
PSTN_Simulator#audio-prompt load flash:hq_911.au
Reload of flash:hq_911.au successful
PSTN_Simulator#
Aug 5 15:24:42.207: %ISDN-6-CONNECT: Interface Serial0/0:5 is now connected to 5105555003 N/A
Aug 5 15:24:42.211: %ISDN-6-CONNECT: Interface Serial0/0:5 is now connected to 5105555003 N/A
PSTN_Simulator#
PSTN_Simulator#show call application sessions
PSTN_Simulator# -
Shomare Registered Users Posts: 1 ■□□□□□□□□□I think I found a resolution, but I don't fully understand it (see notes), so hopefully someone else can explain some of these things?
First, when you type the below service commands:
application
service ld flash:ld.tcl <--these are case sensitive. Use "dir flash:" to make sure of the name.
service <add more> <---the writer made it seem like you need to exit each time...you don't.
Make SURE they all say "SUCEEDED" as below. Mine were saying failed for various reasons.
*Sep 11 20:35:30.062: //-1//HIFS:/hifs_ifs_cb: hifs ifs file read succeeded. size=770, url=flash:ld.tcl
*Sep 11 20:35:30.062: //-1//HIFS:/hifs_free_idata: hifs_free_idata: 0x4B4335FC
*Sep 11 20:35:30.062: //-1//HIFS:/hifs_hold_idata: hifs_hold_idata: 0x4B4335FC
show call application sessions <---Should get nothing here still, just like after following book
session <--This is what the book left out...enter this session command
start <name of instance> <name of app> <---This is the command structure
start ld ld <---This is what I used
Started instance ld of application ld
NOTE: Make sure each time you start one, it says "Started". Again, these can fail for various reasons. Also, not sure what "name of instance" is, so maybe someone can explain that. However, I know for sure that app has to be the same as the service name, not the .tcl name (just in case you named them differently, like 911 and hq_911.tcl. Use 911, not hq_911).
show call application sessions
Stopped Sessions
Instance Name App Name State
international international stopped
service_codes service_codes stopped
ld ld stopped
911 911 stopped
toll_free_800 toll_free_800 stopped
Finally, we have some output here! However, I am not sure why they say "stopped", unless that is like an "idle" thing, where they move to a start/run/? state when actually in use. I haven't gotten that far due to a bad VWIC-2MFT-T1 card that wasted a good day of off and on troubleshooting my setup trying to find what blew up.