cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
14529
Views
5
Helpful
62
Replies

TBCT from Voice Gateway using IVR TCL

Tervis Tumbler
Level 1
Level 1

Here is my Scenario:

When call comes in to my voicegateway, normally they go to CUCM then UCCX, and people hear the prompt and the rest of story. Now, if I  redirect call to third party company from my UCCX script, two call legs are active during a call, and I loose two B channel while call is active.

Now, I talked to my career, and they can do TBCT, but this needs some TCL scripting on my voicegateway to release a call after redirection to third party company.

This is supposed to happen just if customer reaches specific phone number. So, basically if called number is for example "4444444" play a prompt to customer: " For order status press 1, For other query press 2." So if customer press 1, redirect call to another third party phone number then release call from our voicegateway, and if they press 2, normally send call to CUCM and the rest of story.

First, is there any sample script that I can look to get an idea.

Second, how do I apply this app to my dial-peer that can do the job correctly.

Any help would be appreciated.

Thank you,

62 Replies 62

As you said everyone does this different. Honestly I want to make sure that the fact that I just get a call without answering it, and then redirect it to external number does not cause TBCT to not function properly.

I really appreciate your help.

Before :

  calling A-------> PSTN------------------->TCL GW

                                                                  |              

                                         Same PRI        |

                                                                 V

  called B<------------------------------------------

(Same PSTN TBCT

enabled switch)

After :

  calling A-------> PSTN------------------->TCL GW

                              |                                                       

                              |             

                             V                                  

  called B<------------

(Same PSTN TBCT

enabled switch)

If a call coming from calling A to Tcl GW then you send the call to PSTN called B via the same PRI then it should work.

T

Thank you,

In my case :

I call from my cell to  941-441-4659  on VG, call gets connected and then  I send a call to another external 941-999-0748.

After call gets hairpinned, and I do " show voice call status" I see two call legs, both have called number are "941-999-0748", and I can see the ports for both incoming and outgoing calls are  on the same PRI.

So, basically when both are showing up on the same PRI, they should terminate to " Same PSTN TBCT enabed switch" right?

Also could you please explain what are you referring in your last reply, by saying before and after? I am little confused?

After TBCT, 2 B channels in Tcl GW are released and A and B are connected via TBCT enabled switch. (not necessary directly attached to that switch)

Although TBCT is related to call  transfer but most importantly is regarding release two B channels.

I think definition of transfer here is very loose. I interpreted as -- when you "finally" deliver the call to the party on PSTN side via the same PRI please release two B channels".

How do you instruct the GW to deliver the call to destination really doesn't matter.

Tcl can take the transfer request event or listening in-band DTMF for a special pattern (like *123,#777...etc)

And theoretically it can be just a straight call A to B.  Call is from A coming to Tcl GW and GW recognize it's external number and do the TBCT straight back to PSTN side.

Thank you,

I was able to get with our carrier, and test this yesterday. They watched the incoming call, and outgoing call, and they confirmed they are both on the same PRI. I have " isdn supp-service tbct " under the serial interface for that PRI line.

But they told me that they do not receive any request for transfer or tbct at the time call is going back to them. They just see two separate calls, one incoming, and one outgoing.

Here is a final script and dial-peer, and interface configuration, and I do not know what I am missing:

(incoming ) dial-peer voice 9 pots

incoming called-number 4659

service app_sample

port 0/0/0:23

(outgoing) dial-peer voice 30 pots

destination-pattern 89419990748

forward-digit 10

port 0/0/0:23

interface serial 0/0/0:23

isdn supp-service tbct

proc init {} {

global param

set param(interruptPrompt) true

set param(terminationKey) #

infotag set evt_report ev_transfer_request

 

}

proc act_Setup {} {

    

        

   

     leg proceeding leg_incoming

     leg connect leg_incoming

     media play leg_incoming tftp://10.172.28.134/en_enter_dest.au

}   

proc act_MediaDone {} {

     global param

     global select

     set pattern(select) .

     set callinfo(alertTime) 30   

     leg collectdigits leg_incoming param pattern

}

proc act_GotPrompt {} {

      

    global select

        set status [infotag get evt_status]

        if {$status == "cd_005"} {

        set select [infotag get evt_dcdigits]

      

        if {$select == "1"} {

        set callInfo(mode) redirect_at_connect

        set callInfo(notifyEvents) "ev_transfer_status ev_alert ev_progress"

        set callInfo(newguid) true

        leg setup 89419990748 callInfo leg_incoming

        } elseif {$select == "2"} {

        leg setup 4659 callInfo leg_incoming

        } else {

        puts "you  enter wrong number"

act_Select

        }

        } else {

         puts "you did not enter any number"

         act_Cleanup

        }

        }

     

proc act_CallSetupDone {} {

          

        set status [infotag get evt_status]

        if {$status == "ls_000"} {

        puts "call has been hairpinned"

      

        } elseif {$status == "ls_040"} {

        puts "call transfer sucessful statusis $status"

        act_Cleanup

        } else {

        puts "transfer status is %status"

        }

        }

proc act_Select {} {

     global param

     global select

     set pattern(select) .

     set callinfo(alertTime) 30   

     leg collectdigits leg_incoming param pattern

media play leg_incoming  tftp://10.172.28.134/en_enter_dest.au

fsm setstate MEDIAPLAY

}

proc act_Cleanup {} {

      call close

puts "call was disconnected"

}

init

        #state Machine

         

        set fsm(any_state,ev_disconnected) "act_Cleanup same_state"

        set fsm(CALL_INIT,ev_setup_indication) "act_Setup MEDIAPLAY1"

        set fsm(MEDIAPLAY1,ev_media_done) "act_MediaDone MEDIAPLAY"

        set fsm(MEDIAPLAY,ev_collectdigits_done) "act_GotPrompt PLACECALL"

        set fsm(PLACECALL,ev_setup_done) "act_CallSetupDone CALLACTIVE"

        set fsm(PLACECALL,ev_transfer_status) "act_CallSetupDone same_state"

        set fsm(CALLACTIVE,ev_disconnected) "act_Cleanup CALLDISCONNECT"

        set fsm(CALLDISCONNECT,ev_disconnected) "act_Cleanup same_state"

        fsm define fsm CALL_INIT

Check your IOS config

http://www.cisco.com/c/en/us/td/docs/ios/voice/ivr/configuration/guide/tcl_c.pdf#G11.1012004

You can remove the following unless you have your reason to have it

set callInfo(newguid) true

Thank you,

I checked config. All I am doing different is to not setup " Trunk Group", and that is because I am using one PRI on my voice gateway, therefore I just enabled the "tbct" under that specific serial interface.  I have two PRIs on my VG, but have dial-peer setup to get and send the call from same interface.

But if you think that would make difference, I will go ahead and add trunk group, and setup everything as it is on IOS configuration guide.

I also removed that command.

I would also try release at alert state:

set callInfo(mode)  REDIRECT_AT_ALERT

and

turn on Tcl, ccapi as well as isdn debug

You may need to config switch type and also check if you need to specify carrier id.

interface serial 0/0/0:23

isdn switch-type primary-ni

Thanks,
Raghavendra

Thank you,

OK, It worked finally.I removed the TBCT under serial interface, and re-enabled it, also removed "set callInfo(newguid) true" .  Call comes to VG then get redirected to external number and when I do " show voice call status", I do not see any call legs for incoming or outgoing call.

But, here is the question, if customer choose option 2, call goes to 4659 ( and gets hairpinned), and customer and 4659  ( DN for phone that is registered on CUCM) are talking, now 4659 realized that she needs to transfer call to external number.

I added " set fsm (CALLACTIVE,ev_transfer_request) "act_Cleanup CALLDISCONNECT"

I am doing this as start point just to see if script gets transfer request at all, but nothing happens.

Do i need to add anything else to just get transfer request.

Could you please advise.

Glad to hear that.

4659 needs to make a transfer. There are a few ways to make the transfer as mentioned before depends what protocol is used.

How 4659 makes the transfer ? What protocol is used ?

You need to add codes to handle transfer:

detect transfer event (event or DTMF digits)

destroy connection

setup new call (customer and transfer to party) -- reused the code is working now

Thank you,

4659 press the transfer button on the IP phone ( which is Cisco IP Communicator) , and enter the destination.

And, the CUCM is connected to VG with H.323 . If this is what you mean, unless I am not understanding your question.

In this case we need to make sure transfer request is received on VG.

Looks at CCAPI debug see if transfer request is received.

Also add in "ev_transfer_request" in

set callInfo(notifyEvents) "ev_transfer_status ev_alert ev_progress"

Thank you,

You said that I need to add to code to handle transfer. Should I add the code to my current script, or transfer call needs another script?

I did " debug voice ccapi all" but I do not see transfer request.

If I should use the same script, could you please tell me what I need to add to see transfer request.

I have "infotag set evt_report ev_transfer_request", in the script, but do not get transfer request, and call just bypass the script and get connect to destination.

But I got to say that I still do not have a code you mentioned.

I am kind of lost here, would you please advise.