The warning appears mainly when connecting or disconnecting sip users. I tried to play with fields and compared with many examples but cant find root cause.
This appears to be the number of parameters provided for a parameterized SQL statement doesn’t match the number of parameter markers found in the template statement. Without knowing the actual call that failed, I’m not sure I can go any further:
Thanks a lot David, I tried to tracing queries and its coming like in below and I cant check what kind of data sending.
Tried also to passing varchar(180) its maximum length but anyway its not help.
Indeed, MsSQL is not a database that we really support. Any support for it has come from the community, so something may have changed or become broken since the last push for supporting it.
Yes indeed SQL Server is not proper way but we already developed CRM and many things related to SQL Server features. I tried to trace queries but unfortunately data is coming as variables.
Mainly error appears when executing this two query:
UPDATE _sips SET ipaddr=@P1, fullcontact=@P2, lastms=@P3, useragent=@P4, username=@P5, regseconds=@P6, port=@P7 WHERE name=@P8
I don’t think the table contact is relevant. You need to see the parameters to the, internal, function ast_update_realtime, and what it then calls. NB this function has a variable argument list.
The code should be setting up some sort of request structure, which includes the values for P1, P2…, and there is something wrong with that structure, that makes SQL Server think there are not 8 parameters in the first example, and not two in the second.
If you can reproduce this easily, you should build a debug version of Asterisk, and set a breakpoint on the line indicated in the error message. Unfortunately, the variable structures will mean that you won’t be able to see the fine details in a backtrace, and will need to, manually, decompose parameter lists and SQL requests.