Sebastian Report post Posted 12/11/2015 09:04 AM Hi, How to detect callstatus in blind transfer (busy, connected, unalocated) as $RV? How to get connection timestamp (pick up call by called number) as $RV?We want to start recording call when callee number pick up the phone in blind transfer. How can we get this functionality? Share this post Link to post
SupportTeam Report post Posted 12/11/2015 09:46 AM EDIT: the simplest approach is outlined here: http://voiceguide.com/forums/index.php?showtopic=12194&do=findComment&comment=41288 http://voiceguide.com/forums/index.php?showtopic=12194&do=findComment&comment=41286 ----------------------------------- If using ISDN or VoIP lines then the status of the call on any line can be determined using $RV_CALLSTATE $RV_STATUSDISPLAYED can also be used. Cause codes of an outgoing call fail are right now not available as an $RV. Timestamp of when the outgoing call was picked up is right now not available as an $RV. If you want to start recording when call is answered then an approach you can try looking into is : starting a script on the outgoing leg of the call immediately after the blind transfer is initiated. and in that script wait for events that are fired to script upon outgoing call answer, and start call recording process from that script that is running on the outgoing leg of call. Please contact sales@voiceguide.com if you have any requests for $RVs to be added to the software. Share this post Link to post
invoso.com Report post Posted 12/14/2015 11:29 AM Hi, We tested you suggestions. $RV_CALLSTATE showing only 'Connected' status even in CDR status was: NOTCONTACTED (not valid subscriber number), DISCONNECTED (subscriber not reachable) How to reach status like in cdr's Share this post Link to post
SupportTeam Report post Posted 12/14/2015 08:34 PM The status that is saved in CDR can be accessed using this $RV: $RV[OutDial_Result] Share this post Link to post
Sebastian Report post Posted 12/15/2015 11:27 AM We performed tests and unfortunately given variable is empty. 091455.868 7 37 13 state [status_test] Evaluate [$RV[OutDial_Result]] 091455.868 7 37 13 rv replace start [$RV[OutDial_Result]] 091455.868 7 rv dbg rv_retrieve did not find [OutDial_Result] ( 4f 75 74 44 69 61 6c 5f 52 65 73 75 6c 74) 091455.869 7 37 13 rv replace end [] 091455.869 7 37 13 eval [] 091455.869 7 37 13 objReturn is NULL for input=[], try with Cstr In CDR we have: DISCONNECTED or NOANSWER. Share this post Link to post
SupportTeam Report post Posted 12/15/2015 01:46 PM Could you please post the full trace that captures the entire call? Share this post Link to post
Sebastian Report post Posted 12/15/2015 02:07 PM file in attachment. Calling numer was 222030028 and the called number: 727701727. 1215_1450_vgEngine.zip Share this post Link to post
SupportTeam Report post Posted 12/17/2015 08:31 AM Looks like you must be referring to this call: 145905.016 7 46 16 state [Dialout_Transfer_Target_blind] Blind Dial and Connect to 9500209727701727 ... 145905.032 7 122 41 ktTel_MakeCall_Enqueue([9500209727701727],CONNECT_IMMEDIATELY, 60,0,46,222333444,<calltype>DialAndConf</calltype><CallerId>222333444</CallerId>) The $RV[OutDial_Result] must be read from the line on which the outgoing call is made. Trace shows that script is repeatedly trying to read $RV[OutDial_Result], but it is not reading it from LineId 122. Line 245068: 145905.087 7 46 16 state [status_test] Evaluate [$RV[OutDial_Result]] Line 246202: 145908.085 7 46 16 state [status_test] Evaluate [$RV[OutDial_Result]] Line 247859: 145911.202 7 46 16 state [status_test] Evaluate [$RV[OutDial_Result]] Line 249327: 145913.793 7 46 16 state [status_test] Evaluate [$RV[OutDial_Result]] Line 250145: 145916.788 7 46 16 state [status_test] Evaluate [$RV[OutDial_Result]] Line 251061: 145919.908 7 46 16 state [status_test] Evaluate [$RV[OutDial_Result]] Line 253922: 145923.028 7 46 16 state [status_test] Evaluate [$RV[OutDial_Result]] Line 254544: 145926.151 7 46 16 state [status_test] Evaluate [$RV[OutDial_Result]] Line 256096: 145929.269 7 46 16 state [status_test] Evaluate [$RV[OutDial_Result]] Line 257379: 145931.733 7 46 16 state [status_test] Evaluate [$RV[OutDial_Result]] Line 258501: 145934.853 7 46 16 state [status_test] Evaluate [$RV[OutDial_Result]] And you can see how on LineId 122 the $RV[OutDial_Result] value is updated as call progresses: 145905.032 7 122 41 rvns add OutDial_Result|NOTCONTACTED 145905.032 7 122 41 ktTel_MakeCall_Enqueue([9500209727701727],CONNECT_IMMEDIATELY, 60,0,46,222333444,<calltype>DialAndConf</calltype><CallerId>222333444</CallerId>) call ... 145910.782 21 122 41 ev Dialogic 2081,GCEV_ALERTING, crn=2980111, 2081,0,0,,, 145910.782 21 122 41 rvns add OutDial_Result|NOANSWER ... 145930.586 7 122 41 state [Dialout_Transfer_Target_blind] out_leg 16 <=> 41 9500209727701727 ... connected 145930.586 7 122 41 rvns add OutDial_Result|ANSWERED Share this post Link to post
Sebastian Report post Posted 12/17/2015 08:41 AM Is the value of this variable, we can get only by VB Script? Is there any other way? Share this post Link to post
SupportTeam Report post Posted 12/17/2015 08:53 AM If you want to get the value of a variable from another line from within a VoiceGuide script then using the "Run VBScript" module is the most straightforward way of doing that. The VBScript should make a call to the "RvGet" function: http://www.voiceguide.com/vghelp/source/html/com_rvget.htm and use the LineId of the line from which the RV value is to be retrieved. Share this post Link to post
Sebastian Report post Posted 12/17/2015 09:48 AM We performed a test according to the given example but the value of the variable is empty. 104120.443 28 107 36 task runscr Run_VBS vgm=159, file=, engine=[ClearScriptV8] 104120.443 28 107 36 runscr strIni_moduleRunScript_Engine=ClearScriptV8 104120.443 28 107 36 state [get_status] RunScript, wait=1, onhold= 104120.443 28 107 36 rv replace start ------------------------------ set vg = CreateObject("vgServices.CommandLink") sReturnValue = vg.RvGet($RV[Conf_LineId_2], "$RV[OutDial_Result]") vg.Run_ResultReturn $RV_LINEID, "Success" set vg = Nothing ------------------------------ 104120.443 28 rv dbg rv_retrieve did not find [OutDial_Result] ( 4f 75 74 44 69 61 6c 5f 52 65 73 75 6c 74) 104120.443 28 107 36 rv replace end [set vg = CreateObject("vgServices.CommandLink") sReturnValue = vg.RvGet(149, "") vg.Run_ResultReturn 107, "Success" set vg = Nothing] 104120.443 28 107 36 not saving script (strIni_moduleRunScript_SaveToFile is False|0) 104120.443 28 107 36 runscr waiting. wait=1 104120.443 28 107 36 moh file not specified 104120.443 28 107 36 runscr call ClearScript Execute 104120.443 28 107 36 runscr new VBScriptEngine call 104120.444 28 107 36 runscr .Execute call Share this post Link to post
SupportTeam Report post Posted 12/17/2015 09:55 AM Please change: sReturnValue = vg.RvGet($RV[Conf_LineId_2], "$RV[OutDial_Result]") to: sReturnValue = vg.RvGet($RV[Conf_LineId_2], "RV[OutDial_Result]") ie: remove the "$" Otherwise, fully formed RVs are replaced before VBScript is executed by the "Run VBScript" module. Please see the "RvGet" function documentation: http://www.voiceguid...l/com_rvget.htm Share this post Link to post
SupportTeam Report post Posted 12/17/2015 10:19 AM Also, keep in mind that as you are doing a "Dial and Conference" type transfer here, the original line will be informed of call progress of the call on another line. Call progress events will be sent to the original line. So to detect if outgoing call has been answered (in situations where a "Dial and Conference" type transfer is done) you can just wait for events that will be sent to line that initiated the transfer. (instead of repeatedly polling an $RV from the outgoing line) You can see in vgEngine trace the OTHER_LEG_GCEV_ALERTING and OTHER_LEG_CONNECTED events that are sent to originating line as the outgoing call progresses: 145910.782 7 46 16 se OTHER_LEG_GCEV_ALERTING 2081 2081|0|0 || LineState=LS_PLAY_PLAYMSGFINISHED145930.588 7 46 16 se OTHER_LEG_CONNECTED 0 0|0|0 || LineState=LS_PLAY_PLAYMSGFINISHED145930.589 7 46 16 se XFER_ANN_ACCEPTED 0 0|0|0 || LineState=LS_PLAY_PLAYMSGFINISHED The path to use from the module that is waiting for outgoing call outcome would be: on {OTHER_LEG_CONNECTED} goto [Handle Connected Call] Share this post Link to post
SupportTeam Report post Posted 12/17/2015 10:54 AM And as a "Call Transfer" module is being used here then an even simpler approach would be to just have the script wait in the "Dial and Conference" module. Select "Monitored" transfer instead of "Blind". The script will then wait in the module, and then on call answer a 'Success' path will be taken, and if outgoing call is not answered then a 'Fail' path will be taken. Share this post Link to post
invoso.com Report post Posted 12/18/2015 10:45 AM Sorry, but it don't working. Can You create and test VBscript working to get data from other channel? 113508.182 29 95 32 task runscr Run_VBS vgm=161, file=, engine=[ClearScriptV8]113508.182 29 95 32 runscr strIni_moduleRunScript_Engine=ClearScriptV8113508.183 29 95 32 state [get_status] RunScript, wait=1, onhold=113508.183 29 95 32 rv replace start------------------------------set vg = CreateObject("vgServices.CommandLink")sReturnValue = vg.RvGet($RV[Conf_LineId_2], "RV[OutDial_Result]")vg.Run_ResultReturn $RV_LINEID, "Success"set vg = Nothing------------------------------113508.183 29 95 32 rv replace end [set vg = CreateObject("vgServices.CommandLink")sReturnValue = vg.RvGet(155, "RV[OutDial_Result]")vg.Run_ResultReturn 95, "Success"set vg = Nothing]113508.183 29 95 32 not saving script (strIni_moduleRunScript_SaveToFile is False|0)113508.183 29 95 32 runscr waiting. wait=1113508.183 29 95 32 moh file not specified113508.183 29 95 32 runscr call ClearScript Execute113508.183 29 95 32 runscr new VBScriptEngine call113508.184 29 95 32 runscr .Execute call113508.188 3 rem remoting link constructor activated: vgServices_CommandLink113508.190 3 155 52 rem RvGet RV[OutDial_Result]113508.190 3 155 52 rv replace start [$RV[OutDial_Result]]113508.190 3 155 52 rv replace end [NOANSWER]113508.193 3 95 32 rem Run_ResultReturn [success] 7113508.193 3 95 32 q_scr + cmdRun_ResultReturn 0113508.193 7 95 32 q_scr run cmdRun_ResultReturn sCode=[] iActionID=0, crn=0 [0|0|0|0|0][success|||||] 00:00:00 max:7|00:00:00.2530144113508.193 7 95 32 rv add get_status_ResultReturn|Success113508.193 7 95 32 path {Success} found (at offset 3)113508.193 7 95 32 FindNextVgmTitleInPathList: next module title is=[status_test_80]113508.194 7 95 32 module's runwait=1, WavPlayWasStarted=0, WavPlayHasNowFinished=0, iRunWait_ExeResult_NextVgm=160113508.194 29 95 32 engineVbs dispose call113508.194 29 95 32 runscr .Execute returned. iRunWait=1113508.194 29 95 32 runscr RunWait_1 script completed113508.194 29 95 32 runscr sModuleClearScriptProcessWasCalledFrom is current module get_status, clearing setting113508.194 29 95 32 runscr RunWait_1 bScriptHasSetNextModule was set. exiting thread.113508.194 7 95 32 t timer clear (force=False)113508.194 7 95 32 RunModule start Evaluate, [status_test_80], iModuleIdx=160, previous: vgm=161, vgs=10:10113508.194 7 95 32 state [status_test_80] Evaluate [$RV[OutDial_Result]]113508.194 7 95 32 rv replace start [$RV[OutDial_Result]]113508.194 7 rv dbg rv_retrieve did not find [OutDial_Result] ( 4f 75 74 44 69 61 6c 5f 52 65 73 75 6c 74)113508.194 7 95 32 rv replace end []113508.195 7 95 32 eval []113508.195 7 95 32 objReturn is NULL for input=[], try with Cstr113508.196 7 95 32 eval InvokeMember Eval returned113508.196 7 95 32 rvns add status_test_80_Input|113508.196 7 95 32 rvns add status_test_80|113508.196 7 95 32 creating new (non-global) rv : call_status_rv113508.196 7 95 32 rvns add call_status_rv|113508.197 7 95 32 Eval Expr result:[] stored in RV[call_status_rv]113508.197 7 95 32 matching path not found [], try boolean paths. Share this post Link to post
SupportTeam Report post Posted 12/18/2015 11:06 AM The VBScript that you are using is not making any use of the sReturnValue variable that should hold the RvGet function response. suggest that you change vg.Run_ResultReturn $RV_LINEID, "Success" to: vg.Run_ResultReturn $RV_LINEID, "[TheOtherLinesDialOutcome]{ " & sReturnValue & "}" and then look at $RV[TheOtherLinesDialOutcome] later in the script. Share this post Link to post
invoso.com Report post Posted 12/21/2015 10:55 AM Hi, I reached small success using set vg = CreateObject("vgServices.CommandLink")sReturnValue = vg.RvGet($RV[Conf_LineId_2], "RV[OutDial_Result]")vg.Run_ResultReturn $RV_LINEID, "[OutDial_Result__2]{ " & sReturnValue & "}"'vg.Run_ResultReturn $RV_LINEID, "Success"set vg = Nothing but problem is, I detect OutDial_Result after transfer or still monitoring status (loop with OutDial_Result detection) it can be too much for VG because still VG script working. I made script using loop (RvGet => check OutDial_Result__2 value = > fake play module (silence) => timeout 3 seconds and repeat RvGet) to be sure last dialout status. Using this loop I reached real dialout status, but VG have to make lot of VBscript threats. Question is: How to detect last OutDial_Result status in termination script and write this to database? How to make it with lowest resources cost? I don't know what happen when VG terminating call, how to be sure in termination script using VBScript get data from second line (maybe used by other call). Share this post Link to post
SupportTeam Report post Posted 12/21/2015 11:11 AM Please see comments here: http://voiceguide.com/forums/index.php?showtopic=12194&do=findComment&comment=41286 and here: http://voiceguide.com/forums/index.php?showtopic=12194&do=findComment&comment=41288 the above outline a better way to react to outgoing leg of the call being connected. Share this post Link to post
invoso.com Report post Posted 12/21/2015 12:01 PM Problem is because we don't see cause's and in case "target not reachable", "wrong number", 'target temporary unavailable or many other statuses We don't know what exactly happen on other line, so solution is to make blind transfer and allow caller to hear target provider prompts. In this case we need to store other leg connection status. Have You idea how to store last other leg call status not using loop (maybe other kind of change status detection)? needed data is stored in cdr_out file where we have CDR_user data with call_ID. Share this post Link to post
invoso.com Report post Posted 12/21/2015 01:49 PM Generally VG identify only 4 dial out statuses : ANSWERED, NOANSWER, DISCONNECTED, NOTCONTACTED. I think: ANSWERED mean transfer success with any effect (answering machine, human ...) NOANSWER call without any response from other side, only calling signal, no reaction from other side. Can You describe causes used in DISCONNECTED, NOTCONTACTED statuses? (to match BUSY, TARGET NOT AVAILABLE, INCORRECT SUBSCRIBER NUMBER ...) Share this post Link to post
SupportTeam Report post Posted 12/22/2015 12:16 AM The "OTHER_LEG_" events will still arrive on original line that initiated the transfer, even when the blind transfer is used. The "OTHER_LEG_" events on ISDN system will reflect the ISDN messages received on the outgoing leg. The cause values associated with the "DISCONNECTED" events are not reported. All of the "BUSY, TARGET NOT AVAILABLE, INCORRECT SUBSCRIBER NUMBER" situations result in a DISCONNECTED ISDN event. The NOTCONTACTED is a CDR Dispostion state for outgoing calls that were sent out but never received any ISDN progress messages in reponse (no 'RINGING/ALERING', no 'DISCONNECTED'. nothing.) If you are seeing NOTCONTACTED in your outgoing CDR records then this means that your telephony service provided never replied to that outgoing call request. Share this post Link to post
invoso.com Report post Posted 12/29/2015 09:15 AM Can You explain, which "OTHER_LEG_???" data is available? Share this post Link to post
SupportTeam Report post Posted 12/29/2015 10:13 AM Please see the post made earlier in this thread: http://voiceguide.com/forums/index.php?showtopic=12194&do=findComment&comment=41286 The two OTHER_LEG events that can be listened for are listed there. Share this post Link to post