How to implement time conditions for outbound routes?

Hi Everyone,

I am trying to find the best way to implement time conditions for outbound routes.

Time conditions on the asterisk works fine for the inbound routes. Please give your great ideas.

Thank you very much in advance. :smile:

“time conditions” being a feature of FreePBX ? you could ask the developers of FreePBX if they plan to implement a module to do the same for outbound routing, or even look at the patches repository … someone might already have developed one.

other than that, it’s delving into the dialplan and duplicating the functionality that’s already there. you won’t have control via the web interface that way though.

Hi

I assume this is so that it will use different carriers depending on time of day, correct ?

Its very simple.

in the context that the phone is defined as you set it up as follows

[quote]include => mobileiax|6:00-18:00|mon-fri||
include => mobile
include => trunkldday|6:00-18:00|mon-fri||
include => trunkld[/quote]

so mobile numbers will use the mobileiax between 6am to 6pm and the same goes for national call.

Using this does mean you have to set up your dial plan correctly as numbers need to pass through in the correct order for the lookup to work

This example is using fixed times, to use defined ones means using the internal database and setting the varibles

Ian

Thank you very much baconbuttie and ianplain for replying for my query.

ianplain help on include has done the trick… thanks a ton ian.