Dynamic routing based on CDR analysis!

Hello, (for the second time, p_lindheimer should be my jesus !)

Let me explain you my idea :

when you configure a route, at the end you have to tell asterisk which trunk to use in priority, then you tell him the fallback trunks (from the least expenssive to most expenssive). Until here everything is OK.

My idea :

In some cases we have free minutes on a GSM subscription, in my case 2000 min/month

let assume this :

GSM 1 on Trunk 1
GSM 2 on Trunk 2

i’d like to dynamically change the priority of the trunks when the first one reaches 2000 minute of outbound calls (because after this point i pay for the additionnal minute) and switch the priority to GSM2 (trunk 2).

Because otherwise i will loose my free minutes on the second trunk !

After the second trunk reaches the the 2000 minutes, the route return to normal priorities.

Hope that i was enough clear !

If somebody understand my need, i’ll realy appreciate the help.

I’m not asking for a hole php GUI interface (would apreciate) but at least how to design this special dialplan directly in extension.conf (IMPORTANT Asterisk 1.4)

thanks thanks