VoiceGuide IVR Software Main Page
Jump to content

Joining Channels When One On Hold

Recommended Posts

we are creating PBX functionality forwarding call to other agent using vbscript

 

1. disconnect caller and agent 1.

set vg = CreateObject("vgServices.CommandLink")
vg.Record_Stop $RV[Conf_LineId_1]
vg.Bridge_Disconnect $RV_LINEID, $RV[Conf_LineId_2]
vg.Script_Goto $RV[Conf_LineId_2],"kolejkowanie.vgs|caller_lineid","", ""
vg.Run_ResultReturn $RV_LINEID, "success"
vg.Run_ResultReturn $RV[Conf_LineId_2], "forward"
set vg = Nothing

caller ("success" path) is forwarded to play module to wait to next step (connection with agent 1 or 2)

 

2. after short conversation between agents, agent choosing 1. to back to client or 2. to connect Agent 2 wit client.

 

option connect with agent 2 working properly (connecting immediately):

set vg = CreateObject("vgServices.CommandLink")
vg.RvSet_RvList $RV[caller_lineid], "[other_agent_tel]{$RV[other_agent_tel]}[other_agent_line_id]{$RV[Conf_LineId_2]}"
vg.Bridge_Disconnect $RV_LINEID, $RV[Conf_LineId_2]
vg.Bridge_Connect $RV[caller_lineid], $RV[Conf_LineId_2]
vg.Script_Goto $RV[caller_lineid],"kolejkowanie.vgs","forward_to_other_agent", ""
vg.Script_Goto $RV_LINEID,"termination.vgs","", ""
set vg = Nothing

 

 

but back connection Agent 1 to client working only after play all prompts (5 replays) in play module (MoH)

 

set vg = CreateObject("vgServices.CommandLink")
vg.Bridge_Disconnect $RV_LINEID, $RV[Conf_LineId_2]
vg.Script_Goto $RV[Conf_LineId_2],"kolejkowanie.vgs","drop_call", ""
vg.Bridge_Connect $RV_LINEID, $RV[caller_lineid]
vg.Admin_TraceLogAdd $RV_LINEID, 0, "rec_2lines $RV[session_id] call"
strRet = vg.Record_2Lines_Start($RV_LINEID, $RV_LINEID, $RV[caller_lineid], "$RV[session_id]_rd.wav", "")
vg.Admin_TraceLogAdd $RV_LINEID, 0, "rec_2lines $RV[session_id] returned"
vg.Run_ResultReturn $RV_LINEID, "Success"
set vg = Nothing

Can You explain why in second option vbscript waiting until end of prompts in play module?

 

Share this post


Link to post

In the first script the line:

vg.Run_ResultReturn $RV[Conf_LineId_2], "forward"

should probably be removed. A 'Script_Goto' was jsut before issued to that line, and most likely the Run_ResultReturn is ignored anyway, but removing the Run_ResultReturn call will make it clearer what is happening in that script.

It is a bit hard to comment on your last question without seeing the script itself and the vgEngine trace file capturing the call, but most likely you would should issue a "Play_Stop" on $RV_LINEID, and then perhaps use a "Script_Goto" as well instead of the:

vg.Run_ResultReturn $RV_LINEID, "Success"

 

In general, when doing this type of operations from VBScript module, using "Script_Goto" is better as you can see in the VBScript code itself as to what module the scirpt will move onto next. So probably better if you just remove the Run_ResultReturn calls from your VBScript code and only use "Script_Goto" calls instead.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×