# Add Variable Sonata Dialer

**URL:** <https://forums.vitalpbx.org/t/add-variable-sonata-dialer/1836>\
**Category:** Wish List\
**Created:** [September 30, 2022, 10:22pm UTC](https://forums.vitalpbx.org/t/add-variable-sonata-dialer/1836 "2022-09-30T22:22:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![x\_mos](https://forums.vitalpbx.org/user_avatar/forums.vitalpbx.org/x_mos/32/931_2.png) [@x\_mos](https://forums.vitalpbx.org/u/x_mos)\
**Post date:** [September 30, 2022, 10:22pm UTC](https://forums.vitalpbx.org/t/add-variable-sonata-dialer/1836/1 "2022-09-30T22:22:27Z")

</div>

If I look at the sonata dialer, when dialer make a call you create a call file like the following example and send to /var/spool/asterisk/

Channel: Local/201@sub-pbx-dialer/n  
Callerid: “Sonata Dialer | 477719890” \<477719890\>  
WaitTime: 30  
MaxRetries: 0  
RetryTime: 300  
Context: sub-pbx-dialer  
Extension: 477719890  
Priority: 1  
Setvar: TENANT=421915deea377c0d  
Setvar: COS=cos-all  
Setvar: QNAME=Q800  
Setvar: AGENT\_EXT=201  
Setvar: CAMPAIGN=1  
Setvar: CUSTOMER\_PHONE=477719890  
Setvar: FORCE\_INTERCOM=yes  
StartRetry: 1349

Maybe you can consider additional variables to be sent to ipbx.

Example :  
If I have a prospect list

Contract Number, Name, Main Phone, Phone2, Phone3  
111, John, 4444401,4444402,4444403

When uploading a prospect, I can determine from the list which field to send as a variable to ipbx

If the format is as above, the call file will be like this:

Channel: Local/201@sub-pbx-dialer/n  
Callerid: “Sonata Dialer | 4444401” \<4444401\>  
WaitTime: 30  
MaxRetries: 0  
RetryTime: 300  
Context: sub-pbx-dialer  
Extension: 4444401  
Priority: 1  
Setvar: TENANT=421915deea377c0d  
Setvar: COS=cos-all  
Setvar: QNAME=Q800  
Setvar: AGENT\_EXT=201  
Setvar: CAMPAIGN=1  
Setvar: CUSTOMER\_PHONE=4444401  
Setvar: FORCE\_INTERCOM=yes  
**Setvar: CONTRACT\_NUMBER=111**  
StartRetry: 1349

In the Agent report you can add additional variable fields that are sent, so that the format is

Contract Number, Disposition, Created At, Form Result.

And in the “Call By Agent” report you also add that field.

Contract Number, Date, Customer, Call Status, Duration
