cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6270
Views
2
Helpful
9
Replies

TCL script to play greeting x seconds into call in progress

Erick Bergquist
Level 6
Level 6

Hi,

I am trying to use the media play leg_incoming steps and leg_outgoing seteps to play a audio file from flash on inbound/outbound calls on a CUBE (SIP-SIP). I can get it to play a greeting to caller when call first is answered but not with both parties on phone at same time.

I want the call to ring through the called number and after the call is connected and the people are talking for the cube to play a message on the outbound call leg then have the call continue on.

9 Replies 9

yawming
Cisco Employee
Cisco Employee

We cannot play media to either leg if both legs are "in conference" (bridged). When call just answered we only have one leg so we can play media to that. After both parties are "in conference" (talking), we need to break two legs by using "connection destroy" command  so we can use "media play" to one or both legs. After finishing "media play" command  then we can use "connection create" to re-bridge two legs.

Hope this helps.

Thanks.

Do you know of a sample TCL script that can play a audio file than transfer to the DID called? I'm having trouble piecing one together from the sample TCL scripts I was able to find out there. AA, BACD, etc.  I stripped out all the options from AA TCL and just have media play and setup dnis steps but it isn't working. I'm using 15.3T on IOS (CUBE).  Could I use VXML for similar solution?

I have a solution in place using UCCX for the moment but would like to move this completely to the CUBE if possible. Call comes in and plays a quick greeting from flash then transfers to CUCM.

I uploaded a simple script, hope it helps.

https://communities.cisco.com/docs/DOC-51361

Thanks for the sample.

I have been trying to use it but having problem.

Here are snippets from config, I am trying to play greeting on calls to certain numbers inbound so am applying this to the outbound dial peer going to CUCM.

IOS version 15.3(2)T3

application

service greeting flash0:greeting.tcl

  param name prompt1

  paramspace english language en

  paramspace english index 0

  paramspace media prompt1 flash0:recording.au

  paramspace english location flash0:

  param prompt1 recording.au

  paramspace english prompt1 flash0:recording.au

dial-peer voice 1234 voip

huntstop

preference 1

service greeting out-bound

destination-pattern 5551234567

session protocol sipv2

session target ipv4:1.2.3.4

voice-class codec 1

dtmf-relay rtp-nte

fax-relay sg3-to-g3

fax rate 14400

ip qos dscp cs3 signaling

no vad

Your Tcl application should be placed in incoming dial-peer because it's written in that way.

Hi,

One dummy question related to this topic: In order to play an audio file at call init on the CUBE (SIP-SIP or ISDN-ISDN), is it required to have a DSP in the cisco router?

Indeed we are running the same script and when we place the call (SIP-SIP) we don't hear the audio file (but we have to wait for the duration of the audio before speaking)

Hi,

I think DSP's are not used for prompt play.

Audio prompts played to an incoming VoIP call leg must use the same codec as the codec used for the VoIP call setup. If the codec of the audio file is different from the codec negotiated for the call, the audio prompt playout fails and an error is generated.

Thanks,

Raghavendra

Hi,

I confirm. We only forgot to put the config line "codec g711ulaw" in the dial-peer.

Thanks for the hint which let us find out the issue.

Thibault

Can you provide an example of how this would look? Basically I need a user to make a call to gateway, gateway bridges a call to paging system, gateway plays an audio file over the paging system (user does not need to hear audio file), then transfers call back to user for them to speak after the audio file plays.