How to set Vicidial Lead fields as Variable in asterisk dialplan
Vicidial Lead fields as variable in Asterisk Dialplan or AGI
Topic: How to set Vicidial Lead fields as Variable in asterisk dialplan
Overview: Vicidial lead data as Asterisk variable
Popose of Setting Lead data as variable
In vicidial you might require the lead fields in asterisk dialplan for the stuffs like checking the database with customer phone number before dial, or run an api within dialplan, sending sms - etc,
By default you will get the callee (${EXTEN)}) or caller number(${CALLERID(num)}) as variable in dialplan, but in this article you will learn how to set lead datas like name, address ,country, dob, comments, owner, postal code etc in asterisk dialplan as a variable ie:${first_name}.
Variables: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
Workaround:
In Vicidial ,The Lead data's in asterisk dialplan variable is set by using th agi script called agi-set_variables.agi
Vicidial Latest svn version by default comes with agi script agi-set_variables.agi
For downloading the latest version of Vicidial,use the svn checkout link
svn checkout svn://svn.eflo.net/agc_2-X/trunk
You need to use agi-set_variables.agi in your dialplan as shown below while dialing out
Dialplan
exten => _91NXXNXXXXXX,n,AGI(agi-set_variables.agi)
exten => _91NXXNXXXXXX,n,Dial(${TESTSIPTRUNK}/${EXTEN:2},,tTor)
exten => _91NXXNXXXXXX,n,Hangup
The vicidial Lead Field values are set as variable as shown below
${lead_id}
${first_name}
${phone_number}
${address1}
To debug or see the values in the asterisk CLI you can use the asterisk dialplan function Noop as show below
exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91NXXNXXXXXX,n,AGI(agi-set_variables.agi)
exten => _91NXXNXXXXXX,n,NoOp(Customer Name is ${first_name})
exten => _91NXXNXXXXXX,n,NoOp(Lead id is ${lead_id})
exten => _91NXXNXXXXXX,n,NoOp(Customer phone number ${phone_number}
exten => _91NXXNXXXXXX,n,Dial(${TESTSIPTRUNK}/${EXTEN:2},,tTor)
exten => _91NXXNXXXXXX,n,Hangup
Vicidial Lead fields Variable name
Below are the list of vicidial lead fields name ,which are assigned in asterisk dialplan ,which will be retrieved with variable format that is ${variable_name}
lead_id
entry_date
modify_date
status
user
vendor_lead_code
source_id
list_id
phone_number
title
first_name
middle_initial
last_name
address1
address2
address3
city
state
province
postal_code
country_code
gender
date_of_birth
alt_phone
security_phrase
comments
called_count
last_local_call_time
rank
owner
campaign_id
dialed_number
Conclusion:
Hope this article is helpful ,if you like this article share and like, for any professional support reach me at skype:striker24x7
vicidial how to add vicidial leads fields in dialplan as variable.
vicidial insert leads data in asterisk dialplan as variable.
Amazing .. You saved my day,
Thanks
Please Make a blog on web form of vicidial.. &Thank you so much for taught me vicidial from basic now i am handling a call center of 150 seats once again thanks sir.