Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

VAD Templates?

Discussion in 'CRM / Helpdesk / App Integration' started by cknott2243, Jul 6, 2010.

Thread Status:
Not open for further replies.
  1. cknott2243

    Joined:
    Jul 6, 2010
    Messages:
    49
    Likes Received:
    0
    Hello Everyone, I am new to 3CX and really love it. I am trying to migrate from my existing Asterisk server which is woefully incapable of handling our business needs.

    The only hold up is a specific operation we have on our current Asterisk box. We have contract customers who use the phone system to validate them against a MySQL database and if the code they entered matches then it routes them to a specific queue, if invalid it will route them to sales.

    Looking at the VAD, it can do exactly this. My only problem is I was the one who originally setup this and Voice applications are not really my thing. Does anyone know of any templates or information for doing this exact operation?

    What I would want is when calling in the customer have an IVR option for support (option 2) and then when entering this sub-menu they are prompted with two options, 1. to enter their contract number or 2. to speak with a sales agent to purchase a contract.

    Option 2. looks pretty easy to pull off, if using option 1 then the call would be routed to this custom app ( or so I would think) and it would then play a recording (please enter your contract number) and when entered it would then query a MySQL DB to see if it matches any of the listed numbers. If it does then it moves to a call queue and if invalid routes them back to sales.

    It seems easy enough and something they mention as possible on the first page of the manual so just wanted to see if there was anything that would help me out being that my skill level with this sort of thing is low.

    Thanks for any advice.
     
  2. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    Hi,

    Well, this is something really easy to do with the VAD.

    In order to access a MySQL database, you need to setup an entry in ODBC, and use an ODBC database connection with the Database Access component.

    To get started with the VAD, you can check out some training videos about the VAD available here:
    http://www.3cx.com/blog/training-videos/

    Also, what you need to do (verify a customer number against a database) is the topic covered by the following training video:
    http://www.3cx.com /blog/voip-nuggets/creating-a-sample-application/ - NO LONGER AVAILABLE

    I hope this information help you going further, and fell free to ask anything about the VAD in this forum.

    Regards,
     
  3. cknott2243

    Joined:
    Jul 6, 2010
    Messages:
    49
    Likes Received:
    0
    I have tried following the video for this and I still cannot get my APP working correctly. I am not sure if it's an issue with the DB side of things or what. Is there any other resources out there for this creating this sort of APP? Or maybe anyone that specialize in creating these for a fee?

    Any additional help or insight anyone could offer would be greatly appreciated.

    Thanks.
     
  4. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    What's the error that you're getting?

    There are 2 places to look for error messages:
    1) The log file located at %ProgramData%\3CX\Data\Logs\3CXIvrServer.log
    2) The database access error description file located at %ProgramData%\3CX\Data\Http\Interface\ivr\ProjectName_BuildNumber\Errors_DatabaseAccess.log

    Can you check those files and tell me what you find?

    Thanks,
     
  5. cknott2243

    Joined:
    Jul 6, 2010
    Messages:
    49
    Likes Received:
    0
    Thanks so much for the reply.

    This is what I see in the 3CXIvrServer.log

    17:01:37.482|2572|.\PbxMedia\IVREngine.cpp(1349):IvrService, IVREngine::RegisterLines(), Registering of lines done.
    17:01:37.997|2572|.\PbxMedia\IVREngine.cpp(1228):IvrService, IVREngine::RegisterLines(), Registering of lines...127.0.0.1:5060127.0.0.1:50609999[8000,851][1003,1006,1005,1002,1001,1004][EndCall,IVRForward,MakeCall]
    17:01:37.997|2572|.\PbxMedia\IVREngine.cpp(1349):IvrService, IVREngine::RegisterLines(), Registering of lines done.
    17:04:41.782|2572|.\PbxMedia\IVREngine.cpp(1228):IvrService, IVREngine::RegisterLines(), Registering of lines...127.0.0.1:5060127.0.0.1:50609999[8000,851,857][1003,1006,1005,1002,1001,1004][EndCall,IVRForward,MakeCall]
    17:04:41.782|2572|.\PbxMedia\IVREngine.cpp(1284):IvrService, IVREngine::RegisterLines(), Registering IVR:857
    17:04:41.782|2572|.\PbxMedia\IVREngine.cpp(1349):IvrService, IVREngine::RegisterLines(), Registering of lines done.

    I also do not see any DB error log in that location. I have looked all over in other locations as well and do not see this.

    Is there anything else I can look for? I have also tried debugging it but it never seems to create a debug file. The APP was deployed and shows in the DR as DEBUG but no file seems to be created when I dial that extension.

    3CX has been such a breeze until this last part so hopefully this is just a rookie mistake by me.

    Thanks again for the help.
     
  6. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    Please, tell me what version of 3CX and VAD are you using.
    And what WebServer (Cassini, IIS, Abyss)?
    Are you using the VAD in the same machine than 3CX or remotely?
    Is this something related to database only? Is the problem being reproduced only when using the database component? Can you create a callflow with just a prompt playback component?
    Thanks,
     
  7. cknott2243

    Joined:
    Jul 6, 2010
    Messages:
    49
    Likes Received:
    0
    Thanks again.

    I am running 3CX version 8 and VAD ver.2.0.3559.0.

    I can hear the prompt but it just always states invalid option when I try to enter the PIN. It did get odd though after I built the debug build it either just kept transferring me back to the operator instead of the APP or just transferred to the APP but no prompt was played, it seems sporadic as I have heard the prompt, not heard it, and then just only received the operator. Is there a way I could post my APP?

    Thanks again for helping a newbie.
     
  8. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    Strage, the logs don't show any IVR activity...

    You can upload the app here, so we can take a look at it. Please, remove any sensitive information from the project before uploading it.
     
  9. cknott2243

    Joined:
    Jul 6, 2010
    Messages:
    49
    Likes Received:
    0
    I have uploaded the project build file, audio folder, and output folder just in case you needed it all.

    Here is the latest IVR log.

    10:05:07.149|2572|.\PbxMedia\IVREngine.cpp(1269):IvrService, IVREngine::RegisterLines(), Unregistering DN:857
    10:05:07.149|2572|.\PbxMedia\IVREngine.cpp(1349):IvrService, IVREngine::RegisterLines(), Registering of lines done.
    10:05:08.694|2572|.\PbxMedia\IVREngine.cpp(1228):IvrService, IVREngine::RegisterLines(), Registering of lines...127.0.0.1:5060127.0.0.1:50609999[8000][1003,1006,1005,1002,1001,1004][EndCall,IVRForward,MakeCall]
    10:05:08.694|2572|.\PbxMedia\IVREngine.cpp(1269):IvrService, IVREngine::RegisterLines(), Unregistering DN:858
    10:05:08.694|2572|.\PbxMedia\IVREngine.cpp(1349):IvrService, IVREngine::RegisterLines(), Registering of lines done.
    10:05:39.067|2572|.\PbxMedia\IVREngine.cpp(1228):IvrService, IVREngine::RegisterLines(), Registering of lines...127.0.0.1:5060127.0.0.1:50609999[8000,858][1003,1006,1005,1002,1001,1004][EndCall,IVRForward,MakeCall]
    10:05:39.067|2572|.\PbxMedia\IVREngine.cpp(1284):IvrService, IVREngine::RegisterLines(), Registering IVR:858
    10:05:39.067|2572|.\PbxMedia\IVREngine.cpp(1349):IvrService, IVREngine::RegisterLines(), Registering of lines done.

    I unregistered and removed the APP and then recreated it and deployed it again. I call into and receive the initial prompt but then just receive the invalid option message no matter what I do.

    I looked for any error logs but nothing was generated and there is also no DEBUG log generated even though this is a debug build.

    Thanks again for all of the help. I am sure it is something I am missing or doing incorrectly.
     
  10. cknott2243

    Joined:
    Jul 6, 2010
    Messages:
    49
    Likes Received:
    0
    I do not see the attachment uploaded so just in case here is a direct URL to the ZIP file.

    http://email.icewarp.com/VAD_Project.zip

    Thanks again.
     
  11. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    Hi,

    I downloaded the ZIP, but there are 2 files missing:
    pin.comp
    user_pin.flow

    Can you prepare a new ZIP containing those files?

    Thanks,
     
  12. cknott2243

    Joined:
    Jul 6, 2010
    Messages:
    49
    Likes Received:
    0
    Sorry about that, didn't realize that would be in the root folder. I added those files into the ZIP.

    http://email.icewarp.com/VAD_Project.zip

    Thanks.
     
  13. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    I still see the same contents. Can you create a new ZIP file with a different name? Just in case some cache is playing arround with us...
    Thanks,
     
  14. cknott2243

    Joined:
    Jul 6, 2010
    Messages:
    49
    Likes Received:
    0
    Ok, I uploaded a new one.

    http://email.icewarp.com/project.zip

    Thanks again.
     
  15. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    Hi,

    I have been looking at your project, and have some comments:
    1) In the "pin.comp" component, the Database Access component named "VerifyCustomerPin" needs to have the DataSource property quoted, as I think that you want to enter a constant string value there, right? You should enter 'PinCode' (with single quotes) there.
    2) In the "pin.comp" component, the Variable Assignmente component named "VerifiedUsers" has an invalid expression. If you open the expression editor you will first see a VAD function "EQUAL", then opening the expression editor for the second parameter you will see a second VAD function "GET_TABLE_ROW_COUNT", and the parameter for that funcion is incorrect. You're setting the value "loadCustomerData QueryResult" there (without the quotes), and I think you should change it to "VerifyCustomerPin.QueryResult" (without the quotes).
    3) In the "user_pin.flow" callflow you have a UserInput component with an audio message that should be used in a Menu component. You're offering to press 1, 2, etc. but the UserIpnut component is configured with MinDigits=4, so if you just enter the digit 1, you will have the InvalidInput error message. Maybe this is what you're experiencing.

    Please, try changing that and let me know if you get it working or need additional help.

    Regards,
     
  16. cknott2243

    Joined:
    Jul 6, 2010
    Messages:
    49
    Likes Received:
    0
    I will try this and let me know what is then seen.

    Thanks again for all the help, it is greatly appreciated.
     
  17. cknott2243

    Joined:
    Jul 6, 2010
    Messages:
    49
    Likes Received:
    0
    Ok, Definitely seems like we are making progress now. There still seems to be a very oddities though.

    I moved the user input underneath a menu and that seems to be working, when hitting option 2 it transfers to sales as it should. The problem I am still seeing is this I never seem to be able to enter the PIN code. I assume (and might be wrong) that choosing to allow barge in means that I can stop the recorded message by say hitting option "1" and then enter the pin code, this never seems to work, it seems like the message has to be played in it's entirety before anything happens, in fact it seems it plays twice.

    So it seems the input is not really responding to anything. I have repackaged the project after making the changes you alluded to.

    Let me know what you think.

    http://email.icewarp.com/3cx.zip

    Thanks again.
     
  18. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    Well, the project seems to be much better now. You will need to change the SQL statement to use the entered PIN instead of the hardcoded value 1234.

    In regards to your comments about the IVR not detecting your entry, in the logs I see a timeout message (as if you would not entered anything at all). I suggest you 2 things here to get more feedback:

    1) Change the log level for the 3CXIvrServer.log file to verbose, so we have more detailed information about what's happening. With verbose logs we can see DTMF digits detected, etc.

    To change the log level to verbose you need to adjust the values from the file %ProgramData%\3CX\Bin\3CXLogger.ini in the following section:
    [3CXIvrServer\Logger\Outputs\LogFile]
    Level=8
    Severity=Log Error Critical Trace
    Format=$ShortDT|$ThreadID|$FileLine:
    KeepBackup=0
    File=C:\Documents and Settings\All Users\Application Data\3CX\Data\Logs\3CXIvrServer.log
    MaxFileSizeKB=2048


    2) Add InvalidDigit and Timeout prompts to the first menu, so you hear the error message. Now you're hearing the prompt again, but that's happening because it does not detect any digit, I can see that because of the warning message in the 3CXIvrServer.log file:
    Warning! Ignoring TTS in (text/plain;charset=wchar_t). Text is ' Sorry, I didn't hear you. '

    When you don't specify a timeout message, that TTS is automatically generated, but the IVR does not support TTS, so it is ignored. But it seems that it is not detecting the DTMF digit...

    Please, make those changes and try again. Then send me the verbose log file and any other feedback you get.

    Thanks,
     
  19. cknott2243

    Joined:
    Jul 6, 2010
    Messages:
    49
    Likes Received:
    0
    Wow, you have been a great help. It seems the problem with the initial input is due to the phone I am using. I am using a GrandStream GXP2000 and it was not recognizing the digits. I switched to the 3CX softphone and it then took the input.

    So where I am at now is, I can all in, go to the APP, here the initial prompt, press 1 to go to enter the pin code, I then hear the message to enter my PIN code but this is where it then stops. I then continue to hear this message even after trying to enter the pin of 1234# (this is my test pin and only record in the DB as of now). After I put the pin in and press # it just goes back and starts the message again.

    I see this in the IVR log.

    14:35:19.890|2572|.\PbxMedia\IVREngine.cpp(1228):IvrService, IVREngine::RegisterLines(), Registering of lines...127.0.0.1:5060127.0.0.1:50609999[858,8000][1003,1006,1005,1002,1004,1001][EndCall,IVRForward,MakeCall]
    14:35:19.890|2572|.\PbxMedia\IVREngine.cpp(1349):IvrService, IVREngine::RegisterLines(), Registering of lines done.
    14:35:21.435|2572|.\PbxMedia\IVREngine.cpp(1228):IvrService, IVREngine::RegisterLines(), Registering of lines...127.0.0.1:5060127.0.0.1:50609999[858,8000][1003,1006,1005,1002,1004,1001][EndCall,IVRForward,MakeCall]
    14:35:21.435|2572|.\PbxMedia\IVREngine.cpp(1349):IvrService, IVREngine::RegisterLines(), Registering of lines done.
    14:35:25.553|2572|.\PbxMedia\IVREngine.cpp(1228):IvrService, IVREngine::RegisterLines(), Registering of lines...127.0.0.1:5060127.0.0.1:50609999[858,8000][1003,1006,1005,1002,1004,1001][EndCall,IVRForward,MakeCall]
    14:35:25.553|2572|.\PbxMedia\IVREngine.cpp(1349):IvrService, IVREngine::RegisterLines(), Registering of lines done.
    14:35:43.181|2968|(0):Error! Module '3CX.com.OSBinet'. Error ID 302. URLhttp://localhost:5484/(S(ygzd3j55somhuv455ez2ehzs))/dr.aspx?dr=8000&to=8000&from=1205
    14:35:47.689|2968|(0):Error! Module '3CX.com.OSBinet'. Error ID 302. URLhttp://localhost:5484/(S(ygzd3j55somhuv455ez2ehzs))/dr.aspx?dr=858&Action_8=1&act=8&transfToIVR=1
    14:36:03.757|2968|(0):Error! Module '3CX.com.OSBjsi'. Error ID 501. errmsgmissing ; before statementline1linetxt127.0.0.1tokentxt.0.1
    14:36:03.757|2968|(0):Error! Module '3CX.com.OSBjsi'. Error ID 501. errmsgSyntaxError: missing ; before statementline1linetxt127.0.0.1tokentxt.0.1

    I am not sure if this much more verbose then it was before but I set it to lvl 8 in the INI file. Here my file.

    [3CXIvrServer\Logger\Outputs\LogFile]
    Level=8
    Severity=Log Error Critical Trace
    Format=$ShortDT|$ThreadID|$FileLine:
    KeepBackup=1
    File=3CXIvrServer.log
    MaxFileSizeKB=2048

    I tested it numerous times and each time those same errors were seen in the IVR log with ID's 501 and 302.

    It's feel like we are so close as 80% of it is working, only items left are to validate the pin and then transfer.

    Thanks again.
     
  20. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    Hi,

    Did you restart 3CX services after changing the log level? You should have much more information there.

    Error code 501 seems to be a javascript error, but it is not clear where is the error. With verbose level you shoul see much more information.

    Try restarting the services and test it again.

    In regards to the Grandstream phone, take a look at the DTMF configuration. Those phones are preconfigured to send digits in band, and you should change it to use RFC2833.

    Thanks,
     
Thread Status:
Not open for further replies.