Procedure To Configure Dispo_URL in VICIdial

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Procedure To Configure Dispo_URL in VICIdial

Postby Alex » Wed Mar 01, 2017 8:45 am

Hi Team. I really need support in configuring Dispo URL for sending the mail after disposing the call.

I have referred the viewtopic.php?t=22274, but not able to send mail.

I need some guidance on the mentioned code as I'm not very familiar on coding.

I have made a callmail.php with the code given & kept in /srv/www/htdocs/agc folder with full permission.

The URL i'm using in Campaign DISPO Call URL field is as below.
VARhttp://192.168.1.100/agc/callmail.ph ... on_id--B--

I'm able to send mail from server from command line "mail -s "Test subject" destination@gmail.com"

I need information like where to mention the destination mail ID & sender mail ID etc in the code.

I'm using VICIbox (VICIdial 2.14)


I also referred http://www.vicidial.org/docs/DISPO_SEND_EMAIL.txt , but not able to sort out the issue.
Last edited by Alex on Wed Mar 01, 2017 9:05 am, edited 1 time in total.
Alex
 
Posts: 53
Joined: Mon Jun 01, 2015 1:37 am

Re: Procedure To Configure Dispo_URL in VICIdial

Postby mflorell » Wed Mar 01, 2017 8:57 am

We added the "agc/dispo_send_email.php" script over a year ago to do this. It uses a Settings Container that you configure in the web GUI to hold it's settings, and you put something similar to this in one of your Dispo Call URL entries:

VARhttp://192.168.1.1/agc/dispo_send_em ... _to_file=1

# Definable Fields: (other fields should be left as they are)
# - log_to_file - (0,1) if set to 1, will create a log file in the agc directory
# - sale_status - (SALE---XSALE) a triple-dash "---" delimited list of the statuses that are to be moved
# - container_id - (999,etc...) the Settings Container ID that you want the phone number to be inserted into


Here's an example Settings Container:


; destination email (you can also use customer email with variable)
email_to => test@acme.com

; sending email address
email_from => test@test.com

; subject of the email
email_subject => Order confirmation --A--vendor_lead_code--B--

; body of the email
email_body_begin =>
Hello --A--first_name--B--,

This email is to welcome you to the wonderful ACME product-of-the-month club!

You spoke to agent --A--fullname--B--.

Here is a summary of your account information:

lead_id: --A--lead_id--B--
vendor_id: --A--vendor_id--B--
vendor_lead_code: --A--vendor_lead_code--B--
list_id: --A--list_id--B--
list_name: --A--list_name--B--
list_description: --A--list_description--B--
gmt_offset_now: --A--gmt_offset_now--B--
phone_code: --A--phone_code--B--
phone_number: --A--phone_number--B--
title: --A--title--B--
first_name: --A--first_name--B--
middle_initial: --A--middle_initial--B--
last_name: --A--last_name--B--
address1: --A--address1--B--
address2: --A--address2--B--
address3: --A--address3--B--
city: --A--city--B--
state: --A--state--B--
province: --A--province--B--
postal_code: --A--postal_code--B--
country_code: --A--country_code--B--
gender: --A--gender--B--
date_of_birth: --A--date_of_birth--B--
alt_phone: --A--alt_phone--B--
email: --A--email--B--
security_phrase: --A--security_phrase--B--
comments: --A--comments--B--
user: --A--user--B--
closer: --A--user--B--
SQLdate: --A--SQLdate--B--
source_id: --A--source_id--B--
rank: --A--rank--B--
owner: --A--owner--B--
entry_list_id: --A--entry_list_id--B--
call_id: --A--call_id--B--
entry_date: --A--entry_date--B--
fullname: --A--fullname--B--
agent_email: --A--agent_email--B--
user_custom_one: --A--user_custom_one--B--
user_custom_two: --A--user_custom_two--B--
user_custom_three: --A--user_custom_three--B--
user_custom_four: --A--user_custom_four--B--
user_custom_five: --A--user_custom_five--B--
user_group: --A--user_group--B--
--A--TABLEper_call_notes--B--

We hope you enjoy your stuff, and happy roadrunner hunting!

ACME Support Department
312-555-1212


email_body_end
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Procedure To Configure Dispo_URL in VICIdial

Postby Alex » Wed Mar 01, 2017 9:31 am

Hi Matt,
I'm using this URL now. Can you please confirm if this is OK? It is still not working for me Matt. Awaiting your kind response.

varhttp://192.168.1.100/agc/dispo_send_ ... d_id--B--&sale_status=---SALE---&call_id=--A--call_id--B--&pass=--A--pass--B--&log_to_file=1

This is my Container input

; destination email
email_to => alex@gmail.com
;email_to => --A--customer_email--B--

; sending email address
email_from => alex4321@gmail.com
;email_from => --A--agent_email--B--

; subject of the email
email_subject => Order confirmation --A--vendor_lead_code--B--

; body of the email
email_body_begin =>
Hello --A--first_name--B--,

This email is to welcome you to the wonderful ACME product-of-the-month club!

You spoke to agent --A--fullname--B--.

Here is a summary of your account information:

lead_id: --A--lead_id--B--
vendor_id: --A--vendor_id--B--
vendor_lead_code: --A--vendor_lead_code--B--
list_id: --A--list_id--B--
list_name: --A--list_name--B--
list_description: --A--list_description--B--
gmt_offset_now: --A--gmt_offset_now--B--
phone_code: --A--phone_code--B--
phone_number: --A--phone_number--B--
title: --A--title--B--
first_name: --A--first_name--B--
middle_initial: --A--middle_initial--B--
last_name: --A--last_name--B--
address1: --A--address1--B--
address2: --A--address2--B--
address3: --A--address3--B--
city: --A--city--B--
state: --A--state--B--
province: --A--province--B--
postal_code: --A--postal_code--B--
country_code: --A--country_code--B--
gender: --A--gender--B--
date_of_birth: --A--date_of_birth--B--
alt_phone: --A--alt_phone--B--
email: --A--email--B--
security_phrase: --A--security_phrase--B--
comments: --A--comments--B--
user: --A--user--B--
closer: --A--user--B--
SQLdate: --A--SQLdate--B--
source_id: --A--source_id--B--
rank: --A--rank--B--
owner: --A--owner--B--
entry_list_id: --A--entry_list_id--B--
call_id: --A--call_id--B--
entry_date: --A--entry_date--B--
fullname: --A--fullname--B--
agent_email: --A--agent_email--B--
user_custom_one: --A--user_custom_one--B--
user_custom_two: --A--user_custom_two--B--
user_custom_three: --A--user_custom_three--B--
user_custom_four: --A--user_custom_four--B--
user_custom_five: --A--user_custom_five--B--
user_group: --A--user_group--B--


We hope you enjoy your stuff, and happy roadrunner chasing!

ACME Support Department
312-555-1212


email_body_end
Alex
 
Posts: 53
Joined: Mon Jun 01, 2015 1:37 am

Re: Procedure To Configure Dispo_URL in VICIdial

Postby mflorell » Wed Mar 01, 2017 12:42 pm

What does the URL Log Report show when you dispo a call?
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Procedure To Configure Dispo_URL in VICIdial

Postby Alex » Thu Mar 02, 2017 8:22 am

This is the log I get in /var/mail/root after the disposition of call.

From root@vicibox7.suse Thu Mar 2 18:46:07 2017
Return-Path: <root@vicibox7.suse>
X-Original-To: root
Delivered-To: root@vicibox7.suse
Received: by vicibox7.suse (Postfix, from userid 0)
id 78D01140D2B; Thu, 2 Mar 2017 18:46:07 +0530 (IST)
From: "(Cron Daemon)" <root@vicibox7.suse>
To: root@vicibox7.suse
Subject: Cron <root@vicibox7> /usr/share/astguiclient/AST_CRON_audio_2_compress.pl --MP3
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
Precedence: bulk
X-Cron-Env: <XDG_SESSION_ID=303>
X-Cron-Env: <XDG_RUNTIME_DIR=/run/user/0>
X-Cron-Env: <LC_CTYPE=en_US.UTF-8>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>
Message-Id: <20170302131607.78D01140D2B@vicibox7.suse>
Date: Thu, 2 Mar 2017 18:46:07 +0530 (IST)

Warning: unsupported audio format



The Container detail is as below.

; destination email
email_to => alexdest@gmail.com
;email_to => --A--customer_email--B--

; sending email address
email_from => alexfrom@gmail.com
;email_from => --A--agent_email--B--

; subject of the email
email_subject => Order confirmation --A--vendor_lead_code--B--

; body of the email
email_body_begin =>
Hello --A--first_name--B--,

This email is to welcome you to the wonderful ACME product-of-the-month club!

You spoke to agent --A--fullname--B--.

Here is a summary of your account information:

lead_id: --A--lead_id--B--
vendor_id: --A--vendor_id--B--
vendor_lead_code: --A--vendor_lead_code--B--
list_id: --A--list_id--B--
list_name: --A--list_name--B--
list_description: --A--list_description--B--
gmt_offset_now: --A--gmt_offset_now--B--
phone_code: --A--phone_code--B--
phone_number: --A--phone_number--B--
title: --A--title--B--
first_name: --A--first_name--B--
middle_initial: --A--middle_initial--B--
last_name: --A--last_name--B--
address1: --A--address1--B--
address2: --A--address2--B--
address3: --A--address3--B--
city: --A--city--B--
state: --A--state--B--
province: --A--province--B--
postal_code: --A--postal_code--B--
country_code: --A--country_code--B--
gender: --A--gender--B--
date_of_birth: --A--date_of_birth--B--
alt_phone: --A--alt_phone--B--
email: --A--email--B--
security_phrase: --A--security_phrase--B--
comments: --A--comments--B--
user: --A--user--B--
closer: --A--user--B--
SQLdate: --A--SQLdate--B--
source_id: --A--source_id--B--
rank: --A--rank--B--
owner: --A--owner--B--
entry_list_id: --A--entry_list_id--B--
call_id: --A--call_id--B--
entry_date: --A--entry_date--B--
fullname: --A--fullname--B--
agent_email: --A--agent_email--B--
user_custom_one: --A--user_custom_one--B--
user_custom_two: --A--user_custom_two--B--
user_custom_three: --A--user_custom_three--B--
user_custom_four: --A--user_custom_four--B--
user_custom_five: --A--user_custom_five--B--
user_group: --A--user_group--B--


We hope you enjoy your stuff, and happy roadrunner chasing!

ACME Support Department
312-555-1212


email_body_end
Alex
 
Posts: 53
Joined: Mon Jun 01, 2015 1:37 am

Re: Procedure To Configure Dispo_URL in VICIdial

Postby Alex » Thu Mar 02, 2017 8:23 am

The Call Dispo URL used is

http://192.168.1.100/agc/dispo_send_ema ... _to_file=1

Please mention what I'm missing on configuration part

Still the mail is not working on Dispo. Please help me to overcome this issue. I'm trying for the first time.
Alex
 
Posts: 53
Joined: Mon Jun 01, 2015 1:37 am

Re: Procedure To Configure Dispo_URL in VICIdial

Postby mflorell » Thu Mar 02, 2017 8:49 am

That's not what I asked for.

Go to the "Reports" page
Click on the "Admin Utilities" link at the bottom of that page
Click on the "URL Log Report" link on that page
Enter in the date and time range this call happened
Paste what is shown in the report for that dispo call url
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Procedure To Configure Dispo_URL in VICIdial

Postby Alex » Sat Mar 04, 2017 1:58 am

Hi Matt,
Sorry for that. Below is the URL_Log_Report

Username: 6666
Password: vicibox7

URL1
varhttp://192.168.1.100/agc/dispo_send_ ... _to_file=1

URL1 Reponse
Thu, 02 Mar 2017 17:58:51 +0530|PHP ERROR: Type=2 - Message=file(varhttp://192.168.1.100/agc/dispo_send_ ... _to_file=1): failed to open stream: No such file or directory - Line=11793 - File=/srv/www/htdocs/agc/vdc_db_query.php


URL2
http://192.168.1.100/agc/dispo_send_ema ... _to_file=1

URL2 Response
Thu, 02 Mar 2017 18:42:26 +0530|Invalid Username/Password: ||Alex123|0|0|BAD|SELECT count(*) from vicidial_users where user='' and pass='Alex123' and user_level > 0 and active='Y' and ( (failed_login_count < 10) or (UNIX_TIMESTAMP(last_login_date) < 1488459446) )|\n

Username: Alex
Password: Alex123
Last edited by Alex on Sat Mar 04, 2017 2:23 am, edited 1 time in total.
Alex
 
Posts: 53
Joined: Mon Jun 01, 2015 1:37 am

Re: Procedure To Configure Dispo_URL in VICIdial

Postby Alex » Sat Mar 04, 2017 2:14 am

Hi Matt,
Finally...!!!! It's working fine now. 8) Thanks a lot for your support.

The URL_Log_Report helped me to figure out the error.

Mistake in the URL what I had configured in the Campaign. This is the correct URL I'm using now in Campaign for Any dispo mail.
VARhttp://192.168.1.100/agc/dispo_send_ ... _to_file=1

Thanks again for your assistance.
Alex
 
Posts: 53
Joined: Mon Jun 01, 2015 1:37 am

Re: Procedure To Configure Dispo_URL in VICIdial

Postby mflorell » Sat Mar 04, 2017 7:00 am

Thanks for posting your followup!
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Procedure To Configure Dispo_URL in VICIdial

Postby udy786 » Thu Aug 03, 2017 5:15 am

Hello,

I am trying to call Dispo URL with Custom Fields. Its working with default fields but custom fields not going. I have added &CF_uses_custom_fields=Y in URL. Same URL when I used in web Form and clicked on web form from agent interface then all valued passed but its only not going from dispo URL. I checked Disable Alter Customer Data and set as N.

When agent modify anything into custom form from agent interface on call and after doing hangup then also its working. But only its not working when agent not modifying anything from custom form. If same lead modified once then from next time its working for same agent. Reason behind always pass custom field is, we have CRM id in custom filed and if CRM will not pass then it will modify lead on CRM.

When I checked URL log report then its showing like

When Not working:-
http://server_IP/dispo.php?custom_fields=Y&CRMID=--A--CRMID--B--&phone_number=1234567998&first_name=Uday&last_name=Kumar&CF_uses_custom_fields=Y

When Working:-
http://server_IP/dispo.php?custom_fields=Y&CRMID=787ac837-ac02-fd83-0d30-598&phone_number=1234567998&first_name=Uday&last_name=Kumar&CF_uses_custom_fields=Y

Vicidial installed scratch on CentOS 6.9. Asterisk 11.22.0-vici
VERSION: 2.14-596a
BUILD: 170228-1621
© 2017 ViciDial Group
udy786
 
Posts: 148
Joined: Fri Jul 19, 2013 10:55 am

Re: Procedure To Configure Dispo_URL in VICIdial

Postby williamconley » Fri Aug 11, 2017 5:47 pm

udy786 wrote:Hello,

I am trying to call Dispo URL with Custom Fields. Its working with default fields but custom fields not going. I have added &CF_uses_custom_fields=Y in URL. Same URL when I used in web Form and clicked on web form from agent interface then all valued passed but its only not going from dispo URL. I checked Disable Alter Customer Data and set as N.

When agent modify anything into custom form from agent interface on call and after doing hangup then also its working. But only its not working when agent not modifying anything from custom form. If same lead modified once then from next time its working for same agent. Reason behind always pass custom field is, we have CRM id in custom filed and if CRM will not pass then it will modify lead on CRM.

When I checked URL log report then its showing like

When Not working:-
http://server_IP/dispo.php?custom_fields=Y&CRMID=--A--CRMID--B--&phone_number=1234567998&first_name=Uday&last_name=Kumar&CF_uses_custom_fields=Y

When Working:-
http://server_IP/dispo.php?custom_fields=Y&CRMID=787ac837-ac02-fd83-0d30-598&phone_number=1234567998&first_name=Uday&last_name=Kumar&CF_uses_custom_fields=Y

Vicidial installed scratch on CentOS 6.9. Asterisk 11.22.0-vici
VERSION: 2.14-596a
BUILD: 170228-1621
© 2017 ViciDial Group


1) Try using vendor_lead_id or source_id fields instead. That puts the value in the standard fields (and is kinda what they're for). One of them is visible to the agent, the other is not.

2) Try this on a stock system (vicibox 7.0.4) in a sandbox. If it works there ...you may have a problem with your scratch installation method.

3) I do note that while you mentioned scratch install, you did not post the URL to the instructions you used. This could be helpful if someone else used the same instructions and has the same problem. 8)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Procedure To Configure Dispo_URL in VICIdial

Postby NeftaMaturana » Fri Mar 05, 2021 7:47 am

Hello,

VICIBOX 9.0.3
SVN Version: 3347
VERSION: 2.14-784a
BUILD: 210124-0947

Make the configuration in the vicidial to send an email when the agent closes a sale, however I have not been successful, reviewing this publication validate the URL "URL Log Report"
I can see that in the URL column RESPONDS adds "amp;" inside the string the URL originates and this causes me to send an error

Code: Select all
" Thu, 04 Mar 2021 22:42:43 -0500|PHP ERROR: Type=2 - Message=file(http://192.168.0.200/agc/dispo_send_email.php?container_id=DISPO_SEND_EMAIL&amp;lead_id=700358&amp;call_id=V3042241370000700358&amp;dispo=B&amp;user=atorres&amp;pass=p727&amp;sale_status=ANGRY&amp;log_to_file=1&amp;call_notes=+): failed to open stream: operation failed - Line=15079 - File=/srv/www/htdocs/agc/vdc_db_query.php"


Additional in URL log Report, I have the URL column in which if I paste this in the browser immediately the email arrives so I think that the added text "amp;" it may be causing the inconvenience.
Code: Select all
http://192.168.0.200/agc/dispo_send_email.php?container_id=DISPO_SEND_EMAIL&lead_id=700358&call_id=V3042241370000700358&dispo=B&user=atorres&pass=p727&sale_status=ANGRY&log_to_file=1&call_notes=+
NeftaMaturana
 
Posts: 4
Joined: Thu Mar 04, 2021 10:10 pm


Return to Support

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 39 guests

cron