Jump to content

Timed plans


UKenGB

Recommended Posts

Something that seems to me to be an obvious requirement is to be able to use times and days in a dial plan.

 

It is quite likely that different trunks will have different costs associated with the calls (at least if they are to different providers), but that can vary at different times on different days. E.g. there may be free evening and weekend calls on a PSTN trunk, but with cheaper calling at all other times via a VOIP trunk. How can this be done?

 

I am sure that this facility is not readily available in dial plans (although as I say, I cannot for the life of me think why it is always omitted) or is it?

 

Failing that, is there any other way to achieve this, like some form of external control (e.g. cron and shell scripts etc) to provide different dial plans according to a schedule?

Link to comment
Share on other sites

Something that seems to me to be an obvious requirement is to be able to use times and days in a dial plan.

 

It is quite likely that different trunks will have different costs associated with the calls (at least if they are to different providers), but that can vary at different times on different days. E.g. there may be free evening and weekend calls on a PSTN trunk, but with cheaper calling at all other times via a VOIP trunk. How can this be done?

 

I am sure that this facility is not readily available in dial plans (although as I say, I cannot for the life of me think why it is always omitted) or is it?

 

Failing that, is there any other way to achieve this, like some form of external control (e.g. cron and shell scripts etc) to provide different dial plans according to a schedule?

 

I don't think there is a way to do it through the interface but yes you can script it.... It takes a little bit to setup but once you get it setup you just have to have something hit a specific URL at the times you want it to change....

 

You can get all the required information from by viewing the source of your current dial plan...

 

Example with my setup here is an example URL that would configure all my trunk lines:

 

http://admin:password@pbx.com/dom_dialplan_edit.htm?dialplan=1&name=Standard+Dialplan&global=true&dpz0=0&dpa0=100&dpb0=&dpc0=&dpd0=&dpz6=13&dpa6=24&dpb6=%2B&dpc6=%3F%3F%3F%3F&dpd6=&dpz2=9&dpa2=25&dpb2=%2B&dpc2=8%3F%3F%3F%3F&dpd2=&dpz1=8&dpa1=50&dpb1=7&dpc1=*&dpd1=&dpz3=10&dpa3=51&dpb3=10&dpc3=*&dpd3=&dpz4=11&dpa4=52&dpb4=9&dpc4=*&dpd4=&dpz5=12&dpa5=54&dpb5=11&dpc5=*&dpd5=&savedial=Save&dialed=&dialresult=

 

So to break it down for one of my trunks:

 

&dpz5=12&dpa5=54&dpb5=11&dpc5=*&dpd5=

 

That currently has a Pref of 54 and is Trunk ID 11 and the Pattern is *

 

Lets say I wanted to make it Pref 49 to I would just have to change the 54 to 49:

 

&dpz5=12&dpa5=49&dpb5=11&dpc5=*&dpd5=

 

Hope this helps...

 

This is probably not by any means an official way to do it but it works :angry:

 

-Adam

Link to comment
Share on other sites

Great, at least it is possible. Couple of things though:-

 

So you're saying set up the alternative routes as dial plans with different priorities and then change the priorities to switch routes?

 

Dial plans are stored as XML files are they not? Couldn't you therefore just swap files? Or would it not see the change until a restart?

 

Otherwise, how could one automate the URL method? Just pondering here, but how could you get cron to kick that off? I'm thinking you could use telnet to 'deliver' the URL. That's all that is required isn't it, just hit that URL? What is the response if you do this in a browser? Does it indicate success or otherwise?

 

I want something that is truly automated, so the dial plan is adjusted automatically and calls are directed as required with no further manual intervention.

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...