cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1765
Views
0
Helpful
9
Replies

Problem with my pin script and transfering calls

luisbethancourt
Level 1
Level 1

Good afternoon,

I have a script to ask for pin number and match it to a list of allowed pin numbers.  The script gets the active Leg, and then plays a sound on that $legID, asking to "enter the pin number followed by the pound sign"...  everything works perfect when I am making direct calls from the inside to the outside.  The problem starts when I want to transfer calls.

This is my problem:

1. I receive a call from the outside (inbound call)

2. I transfer (this puts the first half of the call on hold, while I dial the transferee number)

3. I start dialing the new number (lets say 6xxxx) (outbound call)

4. The script shows the legID information of the inbound part of the call (the incoming call), and when plays the media, it plays it to the incoming leg, that is, he plays the "enter pin" to the outside caller, instead of the person making the transfer.

Soooo the real funny thing is I tried with a new dial-peer with different destination pattern (8xxxx, instead of 6xxxx).  Everything set exactly the same, only the destination pattern differs.  And guess what?  when I redirect to this new dial-peer destination pattern, the media plays correctly where it should be playing (my leg), not to the original caller.

Any idea what is going on?

1 Accepted Solution

Accepted Solutions

Nothing like a good night sleep to clear your mind on a problem.

I added a function to handle ev_setup_done, on that function I made the handoff and it works!

This is the additional code I added to the script:

proc act_CallSetupDone { } {

    global beep

    global legID

    set status [infotag get evt_status]

    if { $status != "ls_000"} {

      call close

    }

handoff appl leg_all default

}

set fsm(any_state,ev_setup_done) "act_CallSetupDone same_state"

View solution in original post

9 Replies 9

Raghavendra G V
Cisco Employee
Cisco Employee

Hi,

are you trying to transfer call with TCL script, can you explain the call flow with more details. how did you apply tcl script is it inbound or outbound?

Thanks,

Raghavendra

Hi Raghavendra,

I found out and fixed one part of the problem,  I had a blind transfer configuration for that pattern and when I did the transfer instead of playing the media on my leg, it would make the transfer automatically and the media would play in the caller's leg, but I still have a big problem in my hands.

I have a script to collect a pin, and check if the pin is on a param list,  if it is, it allows the call, if it is not, it wont allow the call.  that works very well, but when I need to transfer this is what is happening.

1. I receive a call

2. I press transfer on the phone

3. I dial the transfer pattern

4. It picks up the correct dial-peer with the outbound application for the pin.

5. The pin collects the digits and allows the call

6. The call connects

7. I press the Transfer button again

8. Nothing happens.

I am not sure if the transfer problem is related to the script not handling transfer events.

If I move the order of the events this way, I cam make the transfer:

1. I call an external phone,

2. I get the script to collect my pin

3. I get connected with the external phone

4. I push transfer, and make a new call to a local extension.

5. I push transfer again, and the two legs (target call and transferee) are connected.

I will try having a dial-peer without the script and check if it is not a configuration problem.

Please help!

LC

Update: I did a dial-peer without pin collecting, and I can make the call.

I have been looking around and I found the app-h450-transfer.2.0.0.9.tcl script. but that script if awfully long and I am not sure how to incorporate transfer call handling in my little script.

Any help will be highly appreciated.

After much thought and some reading I think I have two ways of doing this:

1. After making the authentication and permitting the call,  I could pass handoff the leg to the default session script.  the default session script should handle the transfer without problems (but I am not even sure if this can be made at all)

2. I could add some events to handle the call transfer inside my current script.  I am reading and trying to understand the transfer script I found, but it is just too complicated.

I think It would be better to try the first approach (if it can be made) because that would also help me deal with any future problem, since the default session script should have all the handling that I am not thinking of right now.

Thanks again...

Me again here,

I am trying to pursue path 1, and I am getting an error when trying to use the following:

leg setup $new_dnis callInfo $legID

handoff appl leg_all default

This is the debug voice application errors output:

Sep  3 00:10:20.013: //-1//AFW_:/AFW_Util_CopyLegServiceCodeToCallInfoContainer: Service Code not available on Leg

Sep  3 00:10:20.013: //-1//AFW_:/AFW_Util_CopyLegRouteCodeToCallInfoContainer: Route Code not available on Leg

Sep  3 00:10:20.013: //-1//AFW_:/AFW_Util_GetTgCicValue: CIC Not  found for tag(56)

Sep  3 00:10:20.013: //-1//AFW_:/AFW_Util_CopyMLPPDataToCallInfoContainer: Voice MLPP not configured

Sep  3 00:10:20.013: //-1//AFW_:/AFW_Util_CopyMLPPDataToCallInfoContainer: Voice MLPP not configured

Sep  3 00:10:20.013: //-1//AFW_:/AFW_Util_CopyMLPPDataToCallInfoContainer: Voice MLPP not configured

Sep  3 00:10:22.441: %SRE_SM-6-STATE_CHANGE: ISM0/0 changing state from SERVICE_MODULE_STATE_STDY to SERVICE_MODULE_STATE_WREG

Sep  3 00:10:22.449: %SRE_SM-6-STATE_CHANGE: ISM0/0 changing state from SERVICE_MODULE_STATE_WREG to SERVICE_MODULE_STATE_STDY

Sep  3 00:10:22.977: //-1//AFW_:/AFW_Util_CopyLegServiceCodeToCallInfoContainer: Service Code not available on Leg

Sep  3 00:10:22.977: //-1//AFW_:/AFW_Util_CopyLegRouteCodeToCallInfoContainer: Route Code not available on Leg

Sep  3 00:10:22.977: //-1//AFW_:/AFW_Util_GetTgCicValue: CIC Not  found for tag(56)

Sep  3 00:10:22.977: //-1//AFW_:/AFW_Util_CopyMLPPDataToCallInfoContainer: Voice MLPP not configured

Sep  3 00:10:22.977: //-1//AFW_:/AFW_Util_CopyMLPPDataToCallInfoContainer: Voice MLPP not configured

Sep  3 00:10:22.977: //-1//AFW_:/AFW_Util_CopyMLPPDataToCallInfoContainer: Voice MLPP not configured

Sep  3 00:10:22.977: //-1//AFW_:/AFW_Module_ParseHandle: ERROR: Separator not found

Sep  3 00:10:22.977: //-1//Hand:/ah_handoff_core: ERROR, bag check failed

Sep  3 00:10:22.977: //112716//AFW_:/AFW_FSM_Drive: Tcl_Eval to drive FSM inside Tcl modulespace. code=1 code=ERROR

Sep  3 00:10:22.977: TCL script failure

        Result:

                         Handoff Failed

Sep  3 00:10:22.977:    TCL script failure errorInfo:

                        Handoff Failed

    while executing

"handoff appl leg_all default

    (procedure "act_Authenticated" line 32)

    invoked from within

"act_Authenticated"

So I guess I can't do it as simple as that?

LC

You can handoff to default app after call connected but not after leg setup, please raise a developer support case for this.

Thanks,

Raghavendra

Nothing like a good night sleep to clear your mind on a problem.

I added a function to handle ev_setup_done, on that function I made the handoff and it works!

This is the additional code I added to the script:

proc act_CallSetupDone { } {

    global beep

    global legID

    set status [infotag get evt_status]

    if { $status != "ls_000"} {

      call close

    }

handoff appl leg_all default

}

set fsm(any_state,ev_setup_done) "act_CallSetupDone same_state"

Good Afternoon,

I have this exact same problem.  And I tried your solution but I still get the same error.  My script is playing the usual message "Your call may be recorded....", that part all works fine.   But now the boss wants to press 1 to stop the message from playing because he is impatient.  Everything works perfectly except if the called person answers the phone on the first ring the same error occurs.  Oh, one more thing, if the caller presses 1, then the called person can answer on the first ring and everything is working correctly.

Any ideas?

Thanks,

Patrick

Never mind. I figured it out.  I had another event (ev_setup_done) firing before the ev_collectdigits_done event & it was trying to do the call hand off to early.

Have a nice day.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: