Is there a way to limit the minutes for an account ?
Is there a way to limit the minutes for an account ?
I have switched to SipSorcery and I was wondering if there is a way to communicate between the dial plan and the call logs I want to restrict the number of minutes to a specific country to x minutes
Can this be done ?
thanks
Can this be done ?
thanks
I think this can be done but never tryed it
the new dial string format will alow it i think
If you can do it for a country I don't know
maybe if you can combine it with
DBWrite(string key, string value)
Writes a keyed value to the database.
DBRead(string key)
Reads a keyed value from database.
dt: Delay call initialisation time,
nt: No response timeout,
pt: Processing (ringing) timeout,
al: Answered call time limit,
rm: Redirect mode, a=Add to current call, r=replace current call.
take a look at this treat
http://www.mysipswitch.com/forum/viewtopic.php?t=1180
Hope this helps
the new dial string format will alow it i think
If you can do it for a country I don't know
maybe if you can combine it with
DBWrite(string key, string value)
Writes a keyed value to the database.
DBRead(string key)
Reads a keyed value from database.
sys.Dial("${dst}@provider[al=300]- Answered call limit, this option would set the limit on the duration of an answered call. It would cause the call manager to keep track of the length of the call and once the limit was reached it would automatically generate the BYE requests to hang up each end of the call,
dt: Delay call initialisation time,
nt: No response timeout,
pt: Processing (ringing) timeout,
al: Answered call time limit,
rm: Redirect mode, a=Add to current call, r=replace current call.
take a look at this treat
http://www.mysipswitch.com/forum/viewtopic.php?t=1180
Hope this helps
thank you but this looks more like a way to limit the number of minutes per call rather than the total number of minutes.jvwelzen wrote:I think this can be done but never tryed it
the new dial string format will alow it i think
If you can do it for a country I don't know
maybe if you can combine it with
DBWrite(string key, string value)
Writes a keyed value to the database.
DBRead(string key)
Reads a keyed value from database.
sys.Dial("${dst}@provider[al=300]- Answered call limit, this option would set the limit on the duration of an answered call. It would cause the call manager to keep track of the length of the call and once the limit was reached it would automatically generate the BYE requests to hang up each end of the call,
dt: Delay call initialisation time,
nt: No response timeout,
pt: Processing (ringing) timeout,
al: Answered call time limit,
rm: Redirect mode, a=Add to current call, r=replace current call.
take a look at this treat
http://www.mysipswitch.com/forum/viewtopic.php?t=1180
Hope this helps
Thanks
This looks interesting did you reach anything with this ? I have access to a DB and website. Maybe we can share our effortsjvwelzen wrote: was trying something today with
WebGet(string)
if you have access to a website and a database
you problaby keep track for it yourself
but you have to write some scripts for it
To both,
I haven't found anything regarding the DBWrite and DBread methods, I have tried them and it is giving me "Dial Plan Missing Method"
I was playing with a sort of prepaid system
example (I am not using a database for now I just made a php page)
But I don't know If you can detect the duration of a call
example (I am not using a database for now I just made a php page)
Code: Select all
saldo = sys.WebGet("http://www.huizenwireless.nl/new/saldo.php") # Saldo = 111 for testing
if "#{saldo}" >= "099"
sys.Dial("${dst}@provider1")
else
sys.Respond("You do not have enough credit !")
end
But I don't know If you can detect the duration of a call
This is workingI haven't found anything regarding the DBWrite and DBread methods, I have tried them and it is giving me "Dial Plan Missing Method"
Code: Select all
write = sys.DBWrite("1", "opgeslagen")
sys.Log("write : #{write}")
read = sys.DBRead("1")
sys.Log("read : #{read}")