« Back to TCL-API

Zero experienced programmer need example

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hi guys,
 
I am zero experienced in TCL programming and faced the following issue.
 
My customer has a specific international traffic flow scheme. All local traffic flows by regular dialpeers. But to place international call there is a need to dial a specific local number where the call is authenticated by ANI then after the tone an international number must be dialed without an outside access code.
 
I believe this can be done by TCL script. And I believe that it is a pretty simple task. But I have no experience in TCL programming.
 
Could somebody provide me with any example close to my task?
 
Thanks!
 
Regards,
Yuriy.

Hi,
 
You can check debit card application(app-debit-callback.2.0.0.1.zip) for authentication purpose from the following link.
 
http://www.cisco.com/cgi-bin/tablebuild.pl/tclware
 
You can also take a look at the sample scripts in the forums
 
https://developer.cisco.com/web/vgapi/docs
 
Thanks
Vijay

Hi,
 
I have some progress in TCL. But I am still facing the debugging issues. Could somebody help me in debugging? Couple of days I can't overcome the following.
 
I see that debugs look different. It depens on wherther I dial the number digit by digit or I press Redial on IPPhone. Or it depends on the speed I enter the digits. May be it depends on something else. I don't know. Once I even placed the successfull call. But couldn't reproduce it. What is true - it works unstable and call disconnects. Three debugs are attached.
 
My lab environment is the following:
 
IPPhone1---CME1---ISDN---CME2---IPPhone2
 
IPPhone1 - 5102
CME2 number - 4000
IPPhone2 - 5212009
 
CME1 config:
===
application
service script1 flash:script1.tcl
 
dial-peer voice 4000 pots
destination-pattern 4000
port 0/1/0:15
 
telephony-service
application script1
===
 
Thank you.
 
Yuriy.
Attachments:

Hi,
 
I have went through your traces and found only debug_slow has the sucessful traces.
 
It seems to be that ISDN is sending disconnect message just after the ev_connected event.
 
Can you add the following debugs and send me the traces.
 
debug isdn q931
debug isdn error
debug isdn events
Thanks
Vijay

Hello Vijay,
 
Thank you for your reply.
 
I've got several traces of the debugs isdn q931, isdn events, isdn errors and voip application. All of them look different but every time I made absolutely the same sequence - slowly dialed 5212009.
 
Yuriy.
Attachments:

Hi Yuriy,
 
The logs show that the "DEST IS - 5212009" what is the digit you trying to send? Is it 5 or 9 using the leg senddigit? 
 
Also please check the following points under senddigit
Digit transmission fails if the leg senddigit verb is executed and the negotiated DTMF relay is either rtp-nte or cisco-rtp.
In-band transmission of digits is not supported. Digit transmission fails if leg senddigit is executed and DTMF relay is not negotiated.
 
 
Thanks,
Anusha

>The logs show that the "DEST IS - 5212009" what is the digit you trying to send? Is it 5 or 9 using the leg senddigit?
I am trying to send all of them in cycle. You can check it through my script.

Hi guys,
 
I have some progress on my script but still facing the issues. I found out that I have to insert pauses between digits sent by DTMF. So I've redesigned my script to have the following logic:
 
1. Acknowledge a call setup, provide a dial tone and collect digits. And transfer to GOTDIGITS state.
2. Check whether the call is international or not. If it is not just place the call to destination and proceed with CALLACTIVE state. If it is international place the call to the local service number. And transfer to PLACECALL state.
3. After the call setup done check if status it ls_000 (call is active or was successful). If it is not - close the call. If it is - play 2 seconds silence. And transfer to PAUSESENT state.
4. Wait for ev_media_done (after playing 2 seconds silence) and send first digit. Then play 400 msec silence. Remain in the same state until last digit. Then transfer to CALLACTIVE state.
 
Fourth proc should do "media play leg_outgoing %s400" and the ev_media_done after it should trigger it again until all digits are sent. But this is not happen. According to debug script fails on third proc trying to play 2 seconds silence. Specifically it doesn't like "media play leg_outgoing %s2000" step.
 
I've attache both current version of the script and output of "debug voip application". If somebody has any ideas I would appreciate it.
 
Yuriy.
Attachments:

 
The media play command cannot be applied to a leg that is part of a connection(ls_000). The connection
must be destroyed (use connection destroy command)  then the media play can run and the connection can be re-created (use connection create command)
 
Thanks
 

Hi,
 
You can check debit card application(app-debit-callback.2.0.0.1.zip) for authentication purpose from the following link.
 
http://www.cisco.com/cgi-bin/tablebuild.pl/tclware
 
You can also take a look at the sample scripts in the forums
 
https://developer.cisco.com/web/vgapi/docs
 
Thanks
Vijay

Is it possible you can email me that zip file? for some reason I dont have permission to download it. How do I get access to download file by the way?
 
vinh.nguyen@rongvangvttc.com
 
Thanks.

Hi,
 
Can you please provide the link you had trouble to download ?
 
Thanks,
 
Yawming