Custom outbound routes for FollowMe / Ring Groups

Chilling_Silence

Joined
Sep 23, 2008
Messages
488
Likes
0
Points
0
#1
Hi all,

So Ive got a multi-tenanted box.
I've set it so that the primary outbound route is set to "fail" if they don't have a predefined custom context (So User 1 doesn't go out User 2's line & incur charges for them).

This is working brilliantly, except I'm finding myself running into a problem with:
FollowMe
Ring Groups
Callback
And potentially others too :-/

My main problem now is User 1 & User 2 each want their Desk phone to ring for 10 seconds, then to keep ringing for another 20 while it tries his Cellphone. FollowMe or Ring Groups will do just that, however they use the default context from-internal (Which fails).

I've been using the 'customcontexts' module just fine, but this really has me stumped.

I have been reading up all morning and tried another plugin or two with no joy, I'm still back at square 1.

Potential solution:
Add a "Prefix" to each external number dialed from the Ring Group or FollowMe, such as 014920|. (4920 is the last 4 digits of the destination trunk), and then add that into the Outbound Route for the trunk that ends in 4920.
Problem is it doesnt seem to work and I can see in the asterisk console its complaining that "all circuits are busy" when it tries to dial that number.

Any suggestions would be greatly appreciated

Cheers


Chill.
 

Chilling_Silence

Joined
Sep 23, 2008
Messages
488
Likes
0
Points
0
#2
Note: We've sorted the issue for Callbacks by hacking /var/lib/asterisk/bin/callback

Code:
// figure out context, exten, priority
$dest = explode(".",$callback_destination);
$callback_context = $dest[0];
$callback_exten = $dest[1];
$callback_priority = $dest[2];
//EDIT HERE
if ($callback_number == "0276599999" || $callback_number == "068449999") { //user1
        //define the args for Originate
        $channel = "Local/".$callback_number."@user1";
        //$channel = "zap/g0/".$uservm[$vmcontext][$vmextension]['options']['callme'];
}
$exten = $callback_exten;
$context = $callback_context;
$priority = $callback_priority;
$timeout = "15000";
We've basically just used multiple "IF" statements and so far its working fine .. its a little crude, but it works ;)
 

Chilling_Silence

Joined
Sep 23, 2008
Messages
488
Likes
0
Points
0
#3
Anybody have any ideas on custom contexts for Callback / FollowMe?
Ive found a few interesting posts on the FreePBX site that wiseoldowl wrote, but nothing specific to what Im after :-/

Any assistance would be greatly appreciated

Cheers


Chill.
 

Chilling_Silence

Joined
Sep 23, 2008
Messages
488
Likes
0
Points
0
#4
Have also posted on FreePBX forums:
http://freepbx.org/forum/freepbx/users/ ... om-context

However Ive just done a call using my SPA962 out (Using a customcontext trunk), and then transferred it to another external number, and it followed the customcontext trunk also. With all due respect to Philippe, I'm unsure how accurate that is about it requiring a major re-write. I know its been dead easy using a quick & crude hack ^^ to modify the callback feature.
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,887
Members
17,565
Latest member
omarmenichetti
Top