Call Register or Session Sharing

Version 1

    Subject: RE: Call Register or Session Sharing
    Replied by: Yawming Chen on 03-06-2010 02:40:03 AM
    Didn't see anything wrong.
     
    Here is an example:
     
    proc init { } {
        global param
        global matchParam

        set param(interruptPrompt) true
        set param(abortKey) *
        set param(terminationKey) #
        set matchParam(calledNum) 5001

    }

    proc act_Setup { } {
        global dest
        global beep
        global matchParam

        set beep 0

        if { ([infotag get leg_isdid]) && ([call lookup matchParam] == "")} {
            call register matchParam -i
            set dest [infotag get leg_dnis]
            leg proceeding leg_incoming
            leg setup $dest callInfo leg_incoming
            fsm setstate PLACECALL
        } elseif {([infotag get leg_isdid]) && !([call lookup matchParam] == "")} {
            set instance [call lookup matchParam]
            handoff appl leg_incoming $instance -s dest=$dest
        } else {
            leg setupack leg_incoming
            playtone leg_incoming tn_dial 

            set param(dialPlan) true
            leg collectdigits leg_incoming param
        }
    }

    Subject: RE: Call Register or Session Sharing
    Replied by: Yawming Chen on 03-06-2010 04:35:23 AM
    Actually it demonstrates "call lookup" somewhere esle does the call register too. But you are right if you look at the programming guide "By default, a matched incoming call is immediately routed to the registered application and this
    application receives an ev_setup_ind event." You need to load the application of cause.
     
    Thanks !
    This document was generated from CDN thread

    Created by: Chad Stachowicz on 03-06-2010 12:59:28 AM
    Does anyone know how to use the call register command in TCL?  It looks like what I need.
     
    What I am trying to do is when a TCL launches designate a number, that if dialed and the router sees it, the script will suck in the call leg.
     
    Either that or I am looking for a way that if I can retrieve call legs that other TCL scripts are controlling.  I believe these would be different 'sessions' 
     
     set matchParam(calledNum) 7788111
     set registerStatus [call register matchParam]
     
    always seems to return a  1, designating failure.
     
    Thanks for the help!
     
    Chad

    Subject: RE: Call Register or Session Sharing
    Replied by: Chad Stachowicz on 03-06-2010 03:39:23 AM
    is my understanding correct of what call register that what your example does is allow someone to call 5001 and this application intercept control of it... no dial peers needed? 

    Subject: RE: Call Register or Session Sharing
    Replied by: Chad Stachowicz on 03-06-2010 10:27:03 PM
    From the best I can tell, the call register command never works under any conditions, or there is some condition that must be met in order for it to work that is undocumented.
     
     
    I have tried in multiple scripts and in multiple places in scripts and call lookup always returns clear and goo to go, and call register ALWAYS fails.
     
    Can someone from cisco chime in here, should I file a bug against IOS?
     
    Thanks!
    Chad

    Subject: RE: Call Register or Session Sharing
    Replied by: Chad Stachowicz on 03-06-2010 10:28:01 PM
    also, that documentation is also wrong because if you try, tcl wont even let you use ev_setup_ind in the FSM, you need to use ev_setup_indication....

    Subject: RE: Call Register or Session Sharing
    Replied by: Chad Stachowicz on 04-06-2010 12:59:58 AM
    So just some follow up, it actually appears the documentation is incorrect.  A result of 1 means that it has registered successfully.  Aresult of 2 means that there is a duplicate already.  I got it working as I had hoed
     
    Hope this helps someone
     
    Chad