Early media with tcl

Version 1
    This document was generated from CDN thread

    Created by: Grant Bagdasarian on 23-02-2012 03:14:50 AM
    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

    Subject: RE: Early media with tcl
    Replied by: Raghavendra Gutty Veeranagappa on 23-02-2012 10:13:15 AM
    Hi Grant,

    yes, i think this is early media announcement.

    Thanks,
    Raghavendra

    Subject: RE: Early media with tcl
    Replied by: Grant Bagdasarian on 24-02-2012 02:42:29 AM
    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