Is there a way to pass to another provider when the free minutes in the first are gone?

xclanet
Posts: 2
Member Since:
2006-08-28

Hi, all
I want to know if there is a way to change SIP Trunk to another provider when the free calls are gone on the 1st. My ideia is: i have 5 accounts on voipbuster that give me 300 minutes of free calls to land line every week, what i want to do is configure the 5 accounts on trixbox for outbound and when the 1st account as parsed 299 minutes the trixbox switches to 2nd account, etc...

Thanks in advance for any help!



global_dev
Posts: 31
Member Since:
2006-07-19
Re: Is there a way to pass to another provider when the free min

i imagine you could implement a2billing and use each account with the appropriate info.

at voxilla.com, i attempted a macro to accomplish this, never implemented it though, so i don't know if it works and no one ever commented...

http://voxilla.com/index.php?name=PNphpBB2&file=viewtopic&t=8669&...

[macro-ROLLOVERexten]

; 0 - 30 minutes
exten => s,1,NoOp(${DB(RF/SEC)}) ; (RF/SEC) prints to console
exten => s,2,GotoIf($[${DB(RF/SEC)} >= 1800]?201:3) ; tests if (RF/SEC) >= 1800
exten => s,3,Dial(SIP/gw0/${EXTEN},30,r) ; dials on gw0
exten => s,4,NoOp(CDR(${billsec})) ; call time after answer to console
exten => s,5,DB(RF/SEC)=${MATH(${(DB(RF/SEC))}+${CDR(${billsec})}),int)} ;sets (RF/SEC) to (RF/SEC) plus billsec
exten => s,6,Hangup

; 31 - 60 minutes
exten => s,201,GotoIf($[${DB(RF/SEC)} >= 3600]?202:3) ; tests if (RF/SEC) >= 3600
exten => s,3,Dial(SIP/gw1/${EXTEN},30,r) ; dials on gw1
exten => s,4,NoOp(CDR(${billsec})) ; call time after answer to console
exten => s,5,DB(RF/SEC)=${MATH(${(DB(RF/SEC))}+${CDR(${billsec})}),int)} ;sets (RF/SEC) to (RF/SEC) plus billsec
exten => s,6,Hangup

; 61 - 90 minutes
exten => s,202,GotoIf($[${DB(RF/SEC)} >= 5400]?203:3) ; tests if (RF/SEC) >= 5400
exten => s,3,Dial(SIP/gw2/${EXTEN},30,r) ; dials on gw1
exten => s,4,NoOp(CDR(${billsec})) ; call time after answer to console
exten => s,5,DB(RF/SEC)=${MATH(${(DB(RF/SEC))}+${CDR(${billsec})}),int)} ;sets (RF/SEC) to (RF/SEC) plus billsec
exten => s,6,Hangup

; 91 - 120 minutes
exten => s,203,GotoIf($[${DB(RF/SEC)} >= 7200]?204:3) ; tests if (RF/SEC) >= 7200
exten => s,3,Dial(SIP/gw3/${EXTEN},30,r) ; dials on gw3
exten => s,4,NoOp(CDR(${billsec})) ; call time after answer to console
exten => s,5,DB(RF/SEC)=${MATH(${(DB(RF/SEC))}+${CDR(${billsec})}),int)} ;sets (RF/SEC) to (RF/SEC) plus billsec
exten => s,6,Hangup

; 120+ minutes
exten => s,204,Dial(SIP/gw4/${EXTEN},30,r) ; dials on gw4
exten => s,3,Hangup

------------------------

If anyone an comment that would be great. I have not had much experience writing macros, so this was a stab in the dark, maybe it will allow you to see my thoughts though.



toddr123
Posts: 54
Member Since:
2006-07-19
Re: Is there a way to pass to another provider when the free min

Ummm, far be it for me to judge but.. Isn't this sort of abusing or taking advantage of the free provider? Isn't this the sort of thing which makes free providers shut down and or stop offering free services to everyone causing the folks who are using it as intended to lose out.

Do they allow individuals to have 5 accounts?

Seems if they wanted you to have 1500 minutes they would have just allowed 1500 on an account instead of 300? No?



global_dev
Posts: 31
Member Since:
2006-07-19
Re: Is there a way to pass to another provider when the free min

I had thought of that, but ethics are a personal matter.

My particular account is not with the free type of company as the OP's apparently is. My VSP provides a subsidized amount of minutes of int'l calling each month, each month with the bill per account. If I didn't use it efficiently, it would be dumb. I'd be paying them twice.

I was looking to figure out a counter that told me the first line used 100 minutes and would then eat up the second lines balance.

I am still looking to keep an easily accesible counter like the ast2billing app, but haven't had time to implement it.

Regardless of the difference in ethics involved, the method should be the same. People use the same tools for different things.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.