Hi
I would like to have more DBWrite and DBRead keys and values to read and write from dialplan
DBWrite(string key, string key1, string value, string value1, string value2)
DBRead(string key, string key1, string value, string value1, string value2)
Is it easy to change the source for myself if so do we only have to change DialPlanScriptHelper.cs or are there more files that we have to change
Thanks in advance
More DBWrite and DBRead keys and values
Please Explain ?
or do you mean this
For now I am playing with
or do you mean this
Code: Select all
case req.URI.User.to_s
when /^\*(..)(..*)$/
parms = $2.split('*')
case $1
Code: Select all
res = sys.DBExecuteScalar("MySQL", "Database=sipsorcery;Data Source=127.0.0.1;User Id=username;Password=password", "select * from sipadres where customer = #{sys.Username}")
I think Mike meant something like this,
Or with some additions that can facilitate your indexing.
Code: Select all
#Write
sys.DBWrite(name, [value1, value2, ...].join("|||")) # "|||" or any appropriate separator
#Read
value = sys.DBRead(name).to_s.split("|||")
value1 = value[0]
value2 = value[1]
...
Re: More DBWrite and DBRead keys and values
Yes DialPlanScriptHelper.cs is the only class file you would need to modify for that. 99% the dialplan logic and 100% of the dialplan application logic is in the SIPSorcery.AppServer.DialPlan assembly. If you or anyone else want to add or fix existing applications that's the only code you need to understand.jvwelzen wrote:Hi
I would like to have more DBWrite and DBRead keys and values to read and write from dialplan
DBWrite(string key, string key1, string value, string value1, string value2)
DBRead(string key, string key1, string value, string value1, string value2)
Is it easy to change the source for myself if so do we only have to change DialPlanScriptHelper.cs or are there more files that we have to change
Thanks in advance
If you do come up with a patch that you want to contribute feel free to submit it http://sipsorcery.codeplex.com/SourceCo ... hList.aspx.
Regards,
Aaron