Inbound Routes Destination

Hi, I have 200 call centers users which they call many new numbers every day, so sometimes customers not answering and after a couple of hours or days they call back and the reception can’t figure out where should forward this customer, So I need a solution to forward this call to call center user which he tried to call him, depend on FreePBX CDR.
is there any solution to achieve this?

Instead of 1 caller ID, have each agent have their own.

You can pass extensions on the CNAME part of the Caller ID for the extensions, like this:

Caller ID: “800-555-1212 X 5125” <8005551212>

It might get ignored at the remote end. You could also try:

Caller ID: “800-555-1212 X 5125” <80055512125125>

Our sip provider force us to use a specific number in Caller ID,
so if I use the bellow, how the caller will be transferred automatically?

we planing to arrange a did number for each users , but I am trying to find a solution right now , with a few did numbers …

Through an IVR?
Through an announcement like “If you know the party’s extension, please dial it now.”?

There’s no way to “automate” the dialing of the extension from outside, so your only real approach is to get a block of DIDs and associate them with extensions. In the short term, though, something like sending the extension in the CNAME would have to do.

1 Like

As a starting point, an odbc query :-

SELECT substring_index(substring_index(channel, ‘/’, -1),’-’, 1) from cdr WHERE dst=${Caller ID(num)} AND lastapp=‘Dial’ ORDER BY calldate DESC limit 1;

would return the last extension to call that number. You could add that as an obdc function and call it on an incoming call

2 Likes

sounds good solution , is there any articles to help me achieve that , because I didn’t do that before!

Use google , you are looking for using “func_odbc.conf” for your query, then you will be looking for how to add that to FreePBX without upsetting it. You can use the pre-configured dsn “MySQL-asteriskcdrdb”

Another less elegant way but McGyver way is to use AGI(. . . .) in your dialplan, from bash the script might look like

#!/bin/bash
mysql -bsN -u root  asteriskcdrdb -e "SELECT substring_index(substring_index(channel, '/', -1), '-', 1)  from cdr WHERE dst='$1' AND lastapp='Dial' ORDER BY calldate  limit 1;"

and called with

scriptname 3235551212

it will return the extension that last called that number or nothing if there is no record.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.