Variable Assignment for States

Discussion in 'CRM / Helpdesk / App Integration' started by akmag47, Feb 25, 2015.

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

    Joined:
    Feb 21, 2015
    Messages:
    15
    Likes Received:
    0
    I encountered an issue on 3cx vad where when assigning "AK" to the expression parameter in the Variable Assignment component, it returns to me the string "Alaska".

    The other states such as Nevada, Washington, California, Texas are returning the correct expressions to me after setting them such as NV, WA, CA and TX. The only issue is the Alaska variable.

    The reason this is important is because I'm sending these parameters as part of the web service I'm trying to use to get information. The information, if retrieving the parameters correctly, would give listings. I can't do it with listings on Alaska though because of this issue.

    Any ideas?
     
  2. VAD_Support

    VAD_Support Active Member

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

    I'm not sure to understand completely what you mean, but if you need to set the string value "AK" to a variable, you need to set it with single quotes:
    'AK'

    If you just enter
    AK

    Then you're referring to a variable with that name. If that variable exists, then you will get the value into it, for example the string "Alaska".

    If you want constant string values, use single quotes when the field is an expression.

    Kind regards.
     
  3. akmag47

    Joined:
    Feb 21, 2015
    Messages:
    15
    Likes Received:
    0
    I used single quotes and I also tried it with double quotes. It still returns "Alaska" instead of "AK" which was what I set in the expression field of variable assignment.

    The way I'm checking it is I set a prompt after assigning the variable and play it. Is there another way to check it?
     
  4. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    You can use the built-in debugger to check the value of the variables.

    If you're using Text to Speech to reproduce the value, then the TTS engine can "say" what it considers convenient for each written text. Specially with acronyms, this could not be very accurate.

    So, if you want to check a variable value, use the debugger, or check the 3CXIvrServer.log file.

    Regards.
     
  5. akmag47

    Joined:
    Feb 21, 2015
    Messages:
    15
    Likes Received:
    0
    Ok. I checked in debugger and it's showing "AK" value on the variable I set it onto at the beginning of the mainflow. I guess that's just how the TTS feature works.

    I'm trying to check the changes to my callflow through the debugger but it doesn't seem to be tracking the changes thoughout the call. I'm only getting "red" changes on the variables that I set early on the callflow but when it comes to the components I created, I'm not getting anything, such as on the menu component I named as "Disclaimer" or the user input component I named as "PromptCaseNum".

    Here is a sample of my results from the debugger:

    session
    ani 408
    callid From _408_...
    dnis 840

    ...

    Disclaimer
    Result undefined

    PromptCaseNum
    Result undefined
    Buffer undefined

    ...
     
  6. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    The debugger should show the variable changes in red when you go step by step. Don't you see that? Can you describe the procedure you're following to debug the app? Paste some screenshots?
    Thanks.
     
  7. akmag47

    Joined:
    Feb 21, 2015
    Messages:
    15
    Likes Received:
    0
    Sorry if I'm unclear, I'm fairly new to 3CX VAD. I hope this can clear things up:

    I do see the variables change in red. However, it does not reflect the ones from the user input.

    Let's say, I placed an option 1 on the SelectState menu component. This conforms to Arizona or "AZ". Then I try to assign it to the public variable, "State", that I declared at the beginning of the callflow using a Variable Assignment component. However, the debugger still shows the initial value I set it with, which was "AK".

    Here is my step-by-step procedure:
    So after I'm finished with my changes, I do Build -> Debug Build. Then I deploy the project to the 3cx phone system by Build -> Deploy...

    I call the debug extension to verify my changes and after my call, I do Debug -> Start Debugging

    These are my screenshots:



    Debug pics:
     

    Attached Files:

  8. VAD_Support

    VAD_Support Active Member

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

    Thanks for the detailed feedback.

    It seems that you're not going forward when debugging. In that case the debugger will always show you the state when the call started. I see that in every screenshot the highlighted component is the first one, so you're not moving...

    This is what you need to do:
    - After start debugging, you may have 3 buttons available in the toolbar: Step into, Step Over, Step out
    - Press those buttons to move on. For example, the first time you should press Step Over, and then Step Into in order to get into the User Input component.
    - You will see that the component highlighted with yellow background will move. And the variables will change the value as you go.

    Please give it a try and let me know if you see any change.

    Kind regards.
     
  9. akmag47

    Joined:
    Feb 21, 2015
    Messages:
    15
    Likes Received:
    0
    I understand now. After those instructions, I was able to see the digits on the userinput buffer, the changes on state, etc.
    Thanks for clearing that up!
     
Thread Status:
Not open for further replies.