Guest IVR_Newbie Report post Posted 04/18/2004 04:27 PM Please help advise if there is a smart solution for my task below: I need to route calls to different programmes according to Caller ID (e.g if caller ID is '99299299' then I would run 'C:\Voice Guide\99299299.vgs') Originally I have thought about using a database table and using SQL query to get the script name, but I realise the high performance cost incurred. Then I'm happy to re-read the VG Help File to see that Example 1 of the Evaluate Expression Module should help. The problem is that the example uses a static approach; e.g. On {5625551234} Goto [say Hi to Mum] What I desire is: e.g. On {$RV_CIDNUMBER} Goto [c:\Voice Guide\$RV_CIDNUMBER.vgs|Main] (I could hardly code the paths statically as many hundreds of numbers are involved!) My questions are: 1. Is the above syntax acceptable in VoiceGuide --- i.e. using $RV in the 'path' section as above? 2. Even if it works, there is still a problem --- it needs the call to be handled by a 'generic' programme module if there are no scripts defined for the Caller ID. In Example 1, there is no problem as it can use on {True} goto [GenericCall] on {False} goto [NoCallerId] However, with the 'On {$RV_CIDNUMBER}' syntax, the CallerID will always be matched and the 'on {True}' statement will never be invoked. When there is no program defined for the Caller ID, VG will probably issue an error. My feeling is that there should be a smart way to twist the Evaluate Expression method a little to make this work, as I really do not want to have to resort back to the SQL method. Thanks for your smart suggestion! Share this post Link to post
SupportTeam Report post Posted 04/19/2004 07:46 AM You should be able to use the ... Goto [c:\Voice Guide\$RV_CIDNUMBER.vgs|Main] as the destination I'm not sure under what conditions you want to have VG take this path? Whenever CallerID has been supplied? If that's the case then will you have a script prepared for all different possible CallerIDs? It may be a good idea to first check in a VBScript module if the script for the current CallerId exists and if so then branch to that script using the Script_Goto COMJ command - else branch to some generic script. There are not restrictions on using RVs in either the 'trigger' or the 'destination' part of paths. Share this post Link to post