Callback - Specifc Outbound Route with Inbound CID

** Numbers are just for Example **

  • Caller Number is 00000000 => Inbound CID
  • Inbound Route number is 11111111 => Set Destination: Callback
  • 00000000 calls to 11111111 and is redirected to Callback. => Hangup and make the Callback
  • Callback => Set Destination -> Extension 100
  • Callback needs to dial to 00000000 with the Extension 100 Registered

Ok… So far, so good.

  • I have TWO Outbound Routes.
  • Outbound Route 1 - Prepend 1000#
  • Outbound Route 2 - Prepend 2000#
  • 1000# Comes first, 2000# comes after.

The Problem:

  • Even if i set the Extension 100 to use a Custom Context / Class of Service to use ONLY the Route 2,
    the callback completelly ignores it and uses the first Outbound Route on the list.

The same happens with Follow Me, does’nt matter how the Class of Service / Custom Class is configured ( Deny All, Allow All )
Tested everything.

The difference is: I can adapt multiple Follow Me with Different Outbound Routes using Prefix and Prepend.
The same can not be done with Callback, since if u put anything in the field “Callback Number” it’ll ignore the Inbound CID
and dial to the number in that box “Callback Number”.

I’m not sure that I understand your situation; here is a guess:

In Applications -> Set CallerID, add one named Route2. Set the CallerID Number to 2000#${CALLERID(num)} (whatever you would dial to call the user via Outbound Route 2). Set the Destination to your Callback.

Then, in the Inbound Route for 11111111, Set Destination: Set CallerID, Route2.

If that’s not what you want, please explain the big picture: Is the DID 11111111 dedicated as a callback trigger number? If not, please explain the inbound routes for that DID.

Is Outbound Route 2 a ‘premium’ route, e.g. because your usual route to that country doesn’t pass reverse DTMF correctly? Or, is it a ‘cheaper’ route, e.g. because these are long calls and you’ve determined that quality to the callback users is adequate? Or, some other reason for the alternate route?

How many callback users do you have? If it’s only a few, you could solve the problem by creating a separate Callback for each user, with a separate Inbound Route for 11111111 that sends each user to his own Callback. Each Callback would have the Callback Number set to reach that user via the best route.

  1. Is the DID 11111111 dedicated as a callback trigger number?
    R. It’s just a number. It’s the same in any situation, if it’s a common number through FXO, special number, mobile, DDR. Does’nt matter.

  2. Is Outbound Route 2 a ‘premium’ route, e.g. because your usual route to that country doesn’t pass reverse DTMF correctly?
    R. This has nothing to do with it.

3.Please explain the big picture
R. It’s pretty simple actualy. I have 2 Callbacks. I need them to dial to the Incoming CallerID.
That’s it.

It’s already working, if i only use 1 Oubound Route…
The problem is that i have 2 Outbound Routes and each Callback needs to dial from a different Route to the Incoming CallerID.
The 2 Callbacks always dial from the same Outbound Route.
Even if my Extension has a Custom Context / Class of Service configured, it ignores completely and select a different Route that is’nt even allowed.

Sorry if I didn’t make myself clear. If someone on a normal extension (one not using a custom context) dials 00000000 manually, I assume that the call would go via Outbound Route 1. So if you do nothing special, Callback1 will also do the callback leg using Outbound Route 1.

Now, you need to add a dial pattern to Outbound Route 2 so there is a way that a normal extension user can make a call with that route. For example, dialing 99900000000 would select Outbound Route 2 and pass 00000000 to the trunk (with a code prepended if needed).

Then, the Inbound Route for Callback2 has a Destination of Set CallerID. That app rewrites the incoming caller ID of 00000000 by prefixing 999, changing it to 99900000000. The destination of the app is Callback2, so as far as Callback is concerned, the call came from 99900000000. When it tries to call that number, Outbound Route 2 strips off the 999 and the callback actually goes to 00000000.

I hope that this will work for you. If not, please provide details of why not or what went wrong.

Yes, that’s exactly the case. ALMOST…
See:

The Callback needs to dial to the number that dialed to my virtual number in Inbound Routes.
How do i add the “Prepend” to the Inbound Caller ID that dialed to my Virtual Number ?

Ex: I called to Number #1 in Inbound Routes.
My number is: 5541999999999
The callback needs to dial to 5541999999999
But it uses the WRONG Outbound Route when doing that.
How can i add the Prepend to the Inbound Caller ID that dialed to the Number in the Inbound Route?

Again… I understand what u’re saying. I made this strategy with FollowMe. It works perfectly, because with FollowMe the same thing happened… It ignored the Route specified in the Class of Service of the Extension.
But since FollowMe is a Single Number, i could be able easily to use the Prepend to use multiple routes to multiple FollowMes.

The only problem is, still, that i could’nt find any option that allowed me to insert a “Prefix” or “Prepend” to the Inbound Caller ID that dialed to my number.

Will i need to do that editing /var/lib/asterisk/bin/callback, maybe ?

Look at this Image: https://i.imgur.com/7OthwMm.jpg

You should not have to modify any code.

Create a Set CallerID application, for example name it AltRoute.
In CallerID Number, put 000${CALLERID(num)}
In Destination, select your second Callback object.
Change the Inbound Route for your second callback number to go to Set CallerID -> AltRoute.

When someone calls the second callback number, their number will be rewritten to show 0005541999999999.
So, the Callback application will try to call them back on 0005541999999999.

Then, in your second Outbound Route, add a new Dial Pattern with a Prefix of 000 and the other fields as desired. So, when the Callback application makes the call to 0005541999999999, the second route will be selected, the 000 will be removed and the call to 5541999999999 will be placed with whatever trunk, caller ID, etc. are specified by the second route.

If that is still not clear, please explain why that will not work for you, or what is going wrong.

@Stewart1 Thanks a lot man.
You really helped me… It worked like a charm. Thank you so much…
This is how i did it, based on what you said:

You made my day. :slight_smile:

Ok. So, i had another problem but i was able to solve it…
Here’s what happened:
On Callback Number i inserted: 0070${CALLERID(num)}
When i configured the destination to a Extension, it worked like a charm.

But when i directed to a Queue, it did’nt work.
I decided to take another look today…

The problem is:
The queue ANSWERs the call… So the call wont go to the Caller ID.
You have to enable Queue No Answer.
Also, even if u enable Queue No Answer, it’ll still not work if u have Music on Hold.
You have to set the queue also to “Ring Only”. Otherwise it’ll not work.

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