How to set Vicidial Lead fields as a Variable in asterisk dialplan - CloudsDial

  • In vicidial you might required the vicidial lead fields as asterisk dialplan variable to do some other stuffs like checking the database with customer phone number before dial, or run an api within dialplan etc, to get the vicidial lead fields as asterisk dialplan variable vicidial team by default provided a agi script (agi-set_variables.agi) in there latest svn version, you can use this agi after the call log dialplan in carrier like

    exten => _91NXXNXXXXXX,1,AGI(agi://
    exten => _91NXXNXXXXXX,n,AGI(agi-set_variables.agi)
    exten => _91NXXNXXXXXX,n,Dial(${TESTSIPTRUNK}/${EXTEN:2},,tTor)
    exten => _91NXXNXXXXXX,n,Hangup

    Later in dialplan you can use the vicidial variable eg for customer number use  ${phone_number} name ${first_name}
    Below are the list of vicidial lead fields set as varaible in asterisk by the agi script.

    A variable is a placeholder for an actual value. Exactly what that value is depends on the kind of variable. In Asterisk, variables can contain numbers, letters and strings. Variables are useful because they let us create rules for call flow that apply in changing circumstances and make it easier to accommodate future changes in the telephone application or system

    The value of a variable can be obtained using the syntax ${VARIABLENAME}. There are variables that are automatically set by Asterisk. For example, the called number is always stored in the Asterisk system variable ${EXTEN}, calling party callerid ${CALLERID(num)} etc.

    Vicidial Lead fields:

    Below are the list of vicidial lead fields which we can set as a variable in asterisk


    Thanks for reading our content. to know more about our services, kindly visit our website:

    CloudsDial Solutions Pvt Ltd
    Mail: [email protected]
    Skype ID: sivakumar.s07
    Youtube Link:


    NO:85 3rd FLOOR,
    PORUR, CHENNAI 600116.
    Contact-No: 8608522333