Dial Plan Variables

Discussions about development of VICIDIAL and astGUIclient

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

Dial Plan Variables

Postby callcrazy » Mon Sep 13, 2010 3:38 pm

GoAutoDial CE 2.0 RC2 | Vicidial 2.2.1-237 Build 100510-2015 | Asterisk 1.4.27.1-1 | Single Server | Sangoma A104D (not used yet) | phpmyadmin installed after installation.

------


When an agent has a call on park and is dialing a number to transfer the call manually. Is there any way from the dial plan to know what agent or phone is initiating the call?

I'm trying to change CID based on the number being dialed. I've got this 50% finished, but when an agent is making the transfer I need to be able to see what the number they have parked so that I can set that number as the CID for the transfer dial.

The functionality would be similar to using

Variable: UserID=agent001

in the originate command being used to place the call with AMI. Then this variable can be used for the AGI lookup in the dial plan.

Any clues/tips ?
callcrazy
 
Posts: 122
Joined: Fri Sep 10, 2010 11:30 am
Location: MI

Postby williamconley » Mon Sep 13, 2010 4:16 pm

the ability to use the CID of the Prospect is already in VICIdial in the campaign definition (in detail view: 3-Way Call Outbound CallerID)

also: what language are you looking for? do you want access to the parked call's CID in asterisk dialplan language, agi, perl?

much of it is in the channel variables, but you will likely need to also get information from the live tables in mysql to "cross-reference" and find the rest of it. (if you don't want to use the campaign setting)

PS: Thanks for posting you entire spec line :)
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: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby callcrazy » Mon Sep 13, 2010 6:11 pm

The 3-Way Call Outbound CallerID is for sure a good Plan B in my setup.

What makes it not as optimal is that some transfers (clients) require the phone number that was parked and some don't (depends on their phone system). So I'm needing a way to, in a sense, turn that option on and off per transfer.

The way I can determine this is by performing a lookup through AGI and seeing if the current EXTEN (transferred to) is on the list or not.

My hold up is that I'm not sure what the most efficient/best way to find the parked calls phone number that was dialed (Line1). My plan is to start hacking together a script to determine this but any pointers would be appreciated.

Perhaps a table that can be referenced at dial time (agi) to pull the phone number that '3-way call outbound callerid' setting would use using if the setting is checked? Or something similar to get same result.
callcrazy
 
Posts: 122
Joined: Fri Sep 10, 2010 11:30 am
Location: MI

Postby williamconley » Mon Sep 13, 2010 7:05 pm

i'd try to modify the 3-way call outbound callerid method and add a "check" to that function.
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: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby callcrazy » Tue Sep 14, 2010 12:17 pm

Thanks for the help. I'll put my hack on here if anyone is curious what was modified to get things working in the manner described above.

1) Added in a new option called CUSTOM for the 3-way CID drop down to vicidial/admin.php

2) Added a new enumerated value CUSTOM in the vicidial_campaigns table to the three_way_call_cid field.

3) Modified agc/index.php around line 3039 put an additional if statement to check for the custom setting:

if (three_way_call_cid == 'CUSTOM')
{threeway_cid = "CUSTOM_" + document.vicidial_form.phone_number.value + "_" + campaign_cid; }

4) Modified agc/manager_send.php around line 405 [above the if(strlen($outbound_cid)>1)] to accept the custom style CID, explode out the values, perform the check, set CID to customer or campaign.

$custom_cid = explode("_",$outbound_cid);
if(!empty($custom_cid[1]) && !empty($custom_cid[2])) {
// Whatever is needed to perform check
// Set $outbound_cid = $custom_cid[1]; // customer
// OR $outbound_cid = $custom_cid[2]; // campaign default cid
}
callcrazy
 
Posts: 122
Joined: Fri Sep 10, 2010 11:30 am
Location: MI

Postby mflorell » Tue Sep 14, 2010 1:16 pm

If you post patch files for this in the Issue Tracker then we can possibly incorporate it into the official codebase.
mflorell
Site Admin
 
Posts: 18341
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Development

Who is online

Users browsing this forum: No registered users and 22 guests