Inbound Call Routing to "the" outbound agent - Solved

All installation and configuration problems and questions

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

Inbound Call Routing to "the" outbound agent - Solved

Postby Noah » Tue Aug 06, 2013 6:34 pm

Problem: Single Campaign outbound agent calls type of dialing is "Manual_inbound" Owner only dialing. All the settings are good to go for Outbound. Works great. The problem is on the inbound call with CIDLOOKUP as the In-Group Call Handle Method, the record is found no problem. But we want to route it back to the agent that made the outbound call.

The agents are using a shared AC-CID for outbound so a DID for each agent inbound is not really an option here.

With all the inbound routing options I'm having trouble sorting out how I can get this inbound call back to the agent that made the outbound call...??

Any Ideas?


Asterisk 1.4.44-vici built by abuild @ build09 on a i686 running Linux on 2012-12-17
VERSION: 2.6-395a
BUILD: 130221-1736
© 2013 ViciDial Group

The Preferred Solution:
1. Create an ingroup for each agent - make appropriate no agent no queueing
2. Create an ingroup for failover if the agent is not in the group
3. Write a simple php get variable page with matching mysql to do the lookup
4. Put the extension at the bottom of extensions.conf
5. DID Route calls to this extension and context
6. This will look up the record using the callerid of the party calling in and find the last user to have spoke with this caller

Example php and exten below:
[custom context name]
exten => 8889,1,answer()
exten => 8889,n,NoOp(Testing web integration)
exten => 8889,n,NoOp(Phone number is ${CALLERID(num)})
exten => 8889,n,Set(user=${CURL(http://x.x.x.x/agentlookup.php?phone=${CALLERID(num)})})
exten => 8889,n,GotoIf($["${user}" != ""]?route1)
exten => 8889,n,GotoIf($["${user}" = ""]?route2)
exten => 8889,n(route1),AGI(agi-VDAD_ALL_inbound.agi,CIDLOOKUP-----SO-----${user}-----77777777777-----${CALLERID(num)}-----park----------999----------)
exten => 8889,n(route2),AGI(agi-VDAD_ALL_inbound.agi,CIDLOOKUP-----SO-----InboundAll-----77777777777-----${CALLERID(num)}-----park----------999----------)
exten => 8889,n,Hangup()

***** Found a better way *****
Route to the Agent direct group. The last variable references the AgentDirect to route to.
agi-VDAD_ALL_inbound.agi,CIDLOOKUP-----SO-----AGENTDIRECT-----77777777777-----${CALLERID(num)}-----park----------999---------------${user})
End ***** Found a better way *****



/////agentlookup.php/////
<?php
// Grab Variables from the call
$phone=$_GET['phone'];

// echo "For testing the phone number is $phone";

// Look for Agent that should get the call
$link = $mysql = mysql_connect('x.x.x.x', 'username', 'pass', 'DBNAME') or die(mysql_error());
mysql_select_db('msgasterisk', $mysql);
$result = mysql_query("select last_local_call_time,user from vicidial_list where phone_number = $phone order by last_local_call_time desc limit 0,1;");

$row1 = mysql_fetch_array ( $result );
echo $row1['user'];
?>
Last edited by Noah on Mon Oct 28, 2013 8:42 pm, edited 2 times in total.
MyCallCloud.com - Cool Vici Customizations - Hosted - Configured - Supported
Web: https://mycallcloud.com
P: 888-663-0760
E: sales@mycallcloud.com
Noah
 
Posts: 90
Joined: Tue Feb 08, 2011 7:14 pm

Re: Inbound Call Routing to "the" outbound agent - Solved

Postby williamconley » Wed Aug 07, 2013 6:36 pm

so when you marked it as "solved", you're saying your example worked well? are you posting this to the issue tracker for inclusion? :)

it merely needs a bit of tweaking to grab the mysql credentials (and use mysqli instead of mysql because it's deprecated), but otherwise looks great if it works. :)
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!)

Re: Inbound Call Routing to "the" outbound agent - Solved

Postby Noah » Thu Aug 08, 2013 1:56 pm

Yes deprecated code will need to be updated.
This was not listed as an issue, but is a feature that is of significant importance in many client cases.
Inbound direct agent calls without having to manage hundreds of DID's for direct callback to the outbound agent.

Tested Works great...
And then on top all of the call control related functions with the "Ingroup" are now available for intelligent call routing.

Tracker Link.

http://www.vicidial.org/VICIDIALmantis/view.php?id=692
Last edited by Noah on Mon Aug 12, 2013 11:26 pm, edited 1 time in total.
MyCallCloud.com - Cool Vici Customizations - Hosted - Configured - Supported
Web: https://mycallcloud.com
P: 888-663-0760
E: sales@mycallcloud.com
Noah
 
Posts: 90
Joined: Tue Feb 08, 2011 7:14 pm

Re: Inbound Call Routing to "the" outbound agent - Solved

Postby williamconley » Thu Aug 08, 2013 4:20 pm

Not bad for 22 posts.

you should definitely add it to the issue tracker and link here. Matt may include this script in the core (especially if you release it to The Vicidial Group explicitly). Then the next time you upgrade or install ... it'll already be there.
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!)

Re: Inbound Call Routing to "the" outbound agent - Solved

Postby Noah » Mon Feb 03, 2014 5:49 pm

We've updated slightly....see exten notes below

If you choose AGENTDIRECT as the ingroup you can utilize all the ingroup settings associated, and simply pass the agent variable at the end of the string.

exten => 8889,1,answer()
exten => 8889,n,NoOp(Testing web integration)
exten => 8889,n,NoOp(Phone number is ${CALLERID(num)})
exten => 8889,n,Set(user=${CURL(http://webserverip/agentlookup.php?phone=${CALLERID(num)})})
exten => 8889,n,GotoIf($["${user}" != ""]?route1)
exten => 8889,n,GotoIf($["${user}" = ""]?route2)
exten => 8889,n(route1),AGI(agi-VDAD_ALL_inbound.agi,CIDLOOKUP-----SO-----AGENTDIRECT----------${CALLERID(num)}-----park----------999---------------${user})
exten => 8889,n(route2),AGI(agi-VDAD_ALL_inbound.agi,CIDLOOKUP-----SO-----InboundLocal----------${CALLERID(num)}-----park----------999----------)
exten => 8889,n,Hangup()
MyCallCloud.com - Cool Vici Customizations - Hosted - Configured - Supported
Web: https://mycallcloud.com
P: 888-663-0760
E: sales@mycallcloud.com
Noah
 
Posts: 90
Joined: Tue Feb 08, 2011 7:14 pm

Re: Inbound Call Routing to "the" outbound agent - Solved

Postby dreedy » Mon May 16, 2016 9:17 am

This seems like a useful item to have in the inbound routing. I see that this is an old post was there any further progress on this? I am close to the current svn up and i don't really see anything about this.
1- mysql/apache Server (ViciBox 11) Dell R640
1- Dialer (Vicibox 11) Dell R620
1- Archive Server Drobo 810n

Asterisk 16.30.0-vici |VERSION: 2.14-900a | BUILD: 231115-1636 | svn 3787 |dbschema 1702
dreedy
 
Posts: 168
Joined: Tue Nov 24, 2015 10:16 pm


Return to Support

Who is online

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