Variable Lifetime/Scope

Discussion in 'CRM / Helpdesk / App Integration' started by telis, Sep 24, 2014.

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

    telis New Member

    Joined:
    Aug 13, 2007
    Messages:
    147
    Likes Received:
    21
    Hi,

    I want to set a variable to a certain value within one callflow - (the variable will be a mobile phone number) and then use that variable within another callflow that will be accessed by another call maybe hours or days later (to transfer a caller to that mobile phone number).

    I have tested this and the variable seems to be reset after each call. What is the intended scope of lifetime of a VAD variable? Do I need to persist the variable in an external database or in the 3CX config.?

    Many thanks.
     
  2. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    Each call has its own scope. Otherwise if you have multiple calls at the same time it would be a mess.

    So, each time a call ends, variables are gone. All the calls start with the default values for every variable.

    If you need to persist information between calls, you need to use external storage. It could be a text file, a database, or whatever you want.

    Kind regards.
     
  3. telis

    telis New Member

    Joined:
    Aug 13, 2007
    Messages:
    147
    Likes Received:
    21
    OK - thanks for the info:)
     
Thread Status:
Not open for further replies.