TCL script to correlate SIP Refer to FXO hook flash

Version 1

    Subject: RE: TCL script to correlate SIP Refer to FXO hook flash
    Replied by: Yaw-Ming Chen on 01-03-2012 08:48:28 PM
    Do you mean when Cisco voice gateway received a SIP REFER you want to send to analog as a hook flash ?
    If so answer is yes. But once Tcl is involved Tcl has the call control so it depends on rest of things you like to do.

    Thanks !

    Subject: RE: TCL script to correlate SIP Refer to FXO hook flash
    Replied by: Yaw-Ming Chen on 01-03-2012 09:50:16 PM
    Looks like I am missing something and looks like we don't need to send hook flash.

    Say incoming leg is A to a SIP dial-peer then to SIP IVR (leg SIP IVR send REFER to GW
    Now we have leg A, leg B, transfer to number. Which leg you like to connect to transfer to number ?

    At this moment we can do leg A <-> refer_to or leg B <--> refer_to. Is this something you like to do ?

    Thanks !

    Subject: RE: TCL script to correlate SIP Refer to FXO hook flash
    Replied by: Yaw-Ming Chen on 01-03-2012 11:35:24 PM
    Phone A -->(key system)-->FXO(GW)SIP dialpeer<-->SIP IVR (not on GW) answers
    Phone A <-->(key system)<-->FXO(GW)SIP dialpeer <--(refer xxxx) SIP IVR (not on GW)

    PHone A and B (key system)<--FXO(GW) Hook Flash dial xxxx  
    <----- hook flash send to phone A ?Where is this B coming from ?

    Phone A and B are talkiing (key system)


    Do you mean send "key system" "hookflash+dtmf digit" and "key system" will take it from there. As soon as GW(Tcl) send "hookflash+dtmf" Tcl can exit the call control ?
    (like analog version of TBCT)


    Subject: RE: TCL script to correlate SIP Refer to FXO hook flash
    Replied by: Yaw-Ming Chen on 02-03-2012 12:46:07 AM
    Yes it can be done. we investigated exactly the same scenario before.
    If you cannot do it by yourself check out Cisco Developer Services
    http://developer.cisco.com/web/devservices

    Or send an email to developer-support@cisco.com for detail.
    This document was generated from CDN thread

    Created by: John Watkins on 01-03-2012 08:04:19 PM
    Hello, we are using and cisco 2921 as an analog to SIP gateway. Calls from an very old key system comes into the 2921 via an FXO port and are PLAR'd to the an Voip Dial peer configured with SIP to an IVR application. IF an user dials 0 to go to an operator this send a SIP refer back to the 2921 with the extension to refer too, the 2921 creates a new call leg and "hair pins" the call using two FXO ports. I would like to know if there is a way to correlate and SIP Refer to analog hook flash, if not possible are there other creative ways to acheive this with an intercepting TCL or VXML script?

    Subject: RE: TCL script to correlate SIP Refer to FXO hook flash
    Replied by: John Watkins on 01-03-2012 09:37:36 PM
    Yaw-Ming,

    Thanks for the quic reply!

    "Do you mean when Cisco voice gateway received a SIP REFER you want to send to analog as a hook flash ?"

    Yes, the orignal call leg is an FXO port that than goes to a SIP dial-peer, when the SIP IVR send an SIP refer back to the gateway, I would like the gateway to perform a hookflash on the originating FXO call leg, dial the REFER To digits and disconnect the FXO call leg.

    very similar to http://www.cisco.com/en/US/docs/ios-xml/ios/voice/sip/configuration/15-1mt/Configuring_SIP_Support_for_Hookflash.html#GUID-563DBC62-75C1-4039-838E-AF3AE0956CB7 only with FXO and in reverse.

    Subject: RE: TCL script to correlate SIP Refer to FXO hook flash
    Replied by: John Watkins on 01-03-2012 10:00:51 PM
    Now we have leg A, leg B, transfer to number. Which leg you like to connect to transfer to number ?

    Leg A would hook flash and transfer to extension XXXX leaving no call legs in GW.

    At this moment we can do leg A <-> refer_to or leg B <--> refer_to. Is this something you like to do ?

    Not following....
     
     
    (key system)-->FXO(GW)SIP dialpeer-->SIP IVR (not on GW)
     
    Phone A -->(key system)-->FXO(GW)SIP dialpeer<-->SIP IVR (not on GW) answers
    Phone A <-->(key system)<-->FXO(GW)SIP dialpeer <--(refer xxxx) SIP IVR (not on GW)
    PHone A and B (key system)<--FXO(GW) Hook Flash dial xxxx
    Phone A and B are talkiing (key system)

    Subject: RE: TCL script to correlate SIP Refer to FXO hook flash
    Replied by: John Watkins on 02-03-2012 12:08:09 AM
    Yes hook flash is sent to key system. Both phones A and b are phones on the key system.

    Do you mean send "key system" "hookflash+dtmf digit" and "key system" will take it from there. As soon as GW(Tcl) send "hookflash+dtmf" Tcl can exit the call control ? Yes

    Subject: RE: TCL script to correlate SIP Refer to FXO hook flash
    Replied by: John Watkins on 08-03-2012 12:35:31 AM
    Hi Yaw-Ming, thanks for the guidance.

    We are unable to find any good examples on how to execute on the leg sendhookflash. can you provide any guidance on usage? for example after leg_sendhookflash we don't see any new call legs to play dtmf (media play? senddigits?).

    Thanks in advance.

    Subject: RE: TCL script to correlate SIP Refer to FXO hook flash
    Replied by: Anusha Kannappan on 08-03-2012 02:54:40 AM
    Hi John,

    Using Leg sendhookflash you are just going to transmit a hook flash on the specified call leg.

    You can refer to the programming guide under the recent downloads section of the home page
    http://developer.cisco.com/web/vgapi/home

    What exactly you are trying to do after sendhookflash? Could you please share your sample code for explaining your scenario?

    Also to seek more guidance you can contact our Cisco Developer Services
    http://developer.cisco.com/web/devservices

    Thanks,
    Anusha

    Subject: RE: TCL script to correlate SIP Refer to FXO hook flash
    Replied by: Raghavendra Gutty Veeranagappa on 09-03-2012 01:18:48 AM
    HI John,

    please raise developer support case with your complete script we will look into this issue.

    for more information you can refer below link.
    http://developer.cisco.com/web/devservices


    Thanks,
    Raghavendra

    Subject: RE: TCL script to correlate SIP Refer to FXO hook flash
    Replied by: John Watkins on 08-03-2012 02:12:52 PM
    Hi,

    I guess I'm not sure how to proceed after sending a hook flash to the fxo port. tried sending leg proceed but, the call disconnects.
    proc act_GetDest { } {

        puts "\n We have entered into the act_GetDest Procedure after receiving ev_media_done event"
        puts "\n Now collect digits from the user"
        set param(dialPlan) true
        set param(dialPlanTerm) true
        leg collectdigits leg_incoming param
    }

    proc act_GotDest { } {
        global dest
      global DisconnectedLegId
      global ActiveCallType
      global CONNECTION
      global HANDOFF
      global LEG
        puts "\n We have entered into the act_GotDest Procedure after receiving ev_collectdigits_done event"
        set status [infotag get evt_status]
        puts "\n DIGIT COLLECT STATUS = $status"
        set dest [infotag get evt_dcdigits]         
        puts "\n The destination you want to connect is: $dest"
        # leg setup $dest callInfo
        # leg setupack leg_incoming
        # leg proceeding leg_incoming CallInfo
    media play leg_incoming flash:en_enter_dest.au
    fsm setstate same_state
    log "Sending hookflash"
         leg sendhookflash leg_incoming
    set LEG(NEW) [string trim [infotag get evt_legs]]
        leg proceeding  $LEG(NEW) -f