Jump to content

< Back to Forum


Comparing Rv In Vbs

  • Please log in to reply

#1 Maciej 25 November 2016 - 12:30 AM

Can You help me to create procedure


we use in pbx script:

vg.Bridge_Disconnect $RV[caller_lineid], $RV[agent1_line_id]

to disconnect caller and agent


after some steps we want to reconnect agent $RV[agent1_line_id] - active path - to client but we need to be sure that client is still connected



we need to compare $RV[session_id] on both lines using e.g.

sReturnValue = vg.RvGet($RV[SecondLineId], "$RV[session_id]")

IF caller_lineid $RV[session_id] = agent1_line_id $RV[agent1_line_id] 
   THEN (
vg.Bridge_Disconnect $RV[caller_lineid], $RV[agent1_line_id]
        vg.Script_Goto $RV[agent1_line_id], "path"

ELSE vg.Script_Goto $RV[agent1_line_id], "path"


#2 SupportTeam 27 November 2016 - 02:18 AM

Please see below. Please let us know if you have any questions:



set vg = CreateObject("vgServices.CommandLink")


sSessionCaller = vg.RvGet($RV[caller_lineid], "RV[session_id]")

sSessionAgent = vg.RvGet($RV[agent1_line_id], "RV[session_id]")


If sSessionCaller = sSessionAgent Then

  vg.Bridge_Connect $RV[caller_lineid], $RV[agent1_line_id]
  vg.Script_Goto $RV[agent1_line_id], "path"


  vg.Script_Goto $RV[agent1_line_id], "path"

End If


set vg = Nothing