« Back to TCL-API

Early media with tcl

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hello,
 
I wish to play an announcement to the caller before the call is connected. How would I do this in TCL?
From what I understand from early media the media path should be established before the call is connected, so before the 200 OK SIP message is sent by our gateway.
 
I was thinking of something like the following in my tcl script:
 
leg setupack leg_incoming #Receives the SIP INVITTE
leg progress leg_incoming -p 8  # Sends 183 Session Progress with SDP
media play leg_incoming flash:announcement.wav #Announcement
 
Catch ev_media_done event and invoke a proc which does:
leg connect leg_incoming #Sends the 200 OK 
 
Does this count as early media?
 
Thanks,
 
Grant
Attachments:

Hi Grant,

yes, i think this is early media announcement.

Thanks,
Raghavendra

RE: Early media with tcl
Answer
2/24/12 8:42 AM as a reply to Raghavendra Gutty Veeranagappa.
Hi Raghavendra,

Okay, thank you.

I created the script and tested it and it does play the announcement before the connection is established. I'll attach the debug ccsip messages logs, if someone could verify it is actually early media, I would greatly appreciate it. I'm new to SIP so I can't really confirm if everything under the hood is also correct.

Regards,

Grant