Dialog module sql server 2008 r2 database backend

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Dialog module sql server 2008 r2 database backend

bluerain
Anybody tried to use the dialog module with sql server 2008 r2 back end?

Opensips will start ok if I use mysql as db for dialog module, but as soon as I switch to sql server it give me this error in the log

Nov  7 19:59:50 OSIPIBD-2 /usr/local/sbin/opensips[16842]: INFO:dialog:mod_init: Dialog module - initializing
Nov  7 19:59:50 OSIPIBD-2 kernel: [ 3628.711987] opensips[16842]: segfault at 0 ip           (null) sp 00007ffff1abbf78 error 14 in opensips[400000+21f000]


Here is the script for my sql server dialog table:

CREATE TABLE [dbo].[dialog](
        [dlg_id] [bigint] IDENTITY(1,1) NOT NULL,
        [callid] [char](255) NOT NULL,
        [from_uri] [char](128) NOT NULL,
        [from_tag] [char](64) NOT NULL,
        [to_uri] [char](128) NOT NULL,
        [to_tag] [char](64) NOT NULL,
        [mangled_from_uri] [char](64) NULL,
        [mangled_to_uri] [char](64) NULL,
        [caller_cseq] [char](11) NOT NULL,
        [callee_cseq] [char](11) NOT NULL,
        [caller_ping_cseq] [int] NOT NULL,
        [callee_ping_cseq] [int] NOT NULL,
        [caller_route_set] [varchar](max) NULL,
        [callee_route_set] [varchar](max) NULL,
        [caller_contact] [char](128) NOT NULL,
        [callee_contact] [char](128) NOT NULL,
        [caller_sock] [char](64) NOT NULL,
        [callee_sock] [char](64) NOT NULL,
        [state] [int] NOT NULL,
        [start_time] [int] NOT NULL,
        [timeout] [int] NOT NULL,
        [vars] [varchar](max) NULL,
        [profiles] [varchar](max) NULL,
        [script_flags] [int] NOT NULL,
        [flags] [int] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

any thoughts?  Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: Dialog module sql server 2008 r2 database backend

David J.-2

I hope this does not sound silly but what driver are you using to connect to mssql? Is it just odbc? I am not sure opensips will support mssql.

On Nov 7, 2013 3:07 PM, "bluerain" <[hidden email]> wrote:
Anybody tried to use the dialog module with sql server 2008 r2 back end?

Opensips will start ok if I use mysql as db for dialog module, but as soon
as I switch to sql server it give me this error in the log

Nov  7 19:59:50 OSIPIBD-2 /usr/local/sbin/opensips[16842]:
INFO:dialog:mod_init: Dialog module - initializing
Nov  7 19:59:50 OSIPIBD-2 kernel: [ 3628.711987] opensips[16842]: segfault
at 0 ip           (null) sp 00007ffff1abbf78 error 14 in
opensips[400000+21f000]


Here is the script for my sql server dialog table:

CREATE TABLE [dbo].[dialog](
        [dlg_id] [bigint] IDENTITY(1,1) NOT NULL,
        [callid] [char](255) NOT NULL,
        [from_uri] [char](128) NOT NULL,
        [from_tag] [char](64) NOT NULL,
        [to_uri] [char](128) NOT NULL,
        [to_tag] [char](64) NOT NULL,
        [mangled_from_uri] [char](64) NULL,
        [mangled_to_uri] [char](64) NULL,
        [caller_cseq] [char](11) NOT NULL,
        [callee_cseq] [char](11) NOT NULL,
        [caller_ping_cseq] [int] NOT NULL,
        [callee_ping_cseq] [int] NOT NULL,
        [caller_route_set] [varchar](max) NULL,
        [callee_route_set] [varchar](max) NULL,
        [caller_contact] [char](128) NOT NULL,
        [callee_contact] [char](128) NOT NULL,
        [caller_sock] [char](64) NOT NULL,
        [callee_sock] [char](64) NOT NULL,
        [state] [int] NOT NULL,
        [start_time] [int] NOT NULL,
        [timeout] [int] NOT NULL,
        [vars] [varchar](max) NULL,
        [profiles] [varchar](max) NULL,
        [script_flags] [int] NOT NULL,
        [flags] [int] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

any thoughts?  Thank you!



--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Dialog-module-sql-server-2008-r2-database-backend-tp7588430.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Dialog module sql server 2008 r2 database backend

Ali Pey
You need to use ODBC and freetds. You can't directly connect to MS SQL.

It works quite well with ODBC and freetds.

Regards,
Ali Pey


On Thu, Nov 7, 2013 at 3:38 PM, David J <[hidden email]> wrote:

I hope this does not sound silly but what driver are you using to connect to mssql? Is it just odbc? I am not sure opensips will support mssql.

On Nov 7, 2013 3:07 PM, "bluerain" <[hidden email]> wrote:
Anybody tried to use the dialog module with sql server 2008 r2 back end?

Opensips will start ok if I use mysql as db for dialog module, but as soon
as I switch to sql server it give me this error in the log

Nov  7 19:59:50 OSIPIBD-2 /usr/local/sbin/opensips[16842]:
INFO:dialog:mod_init: Dialog module - initializing
Nov  7 19:59:50 OSIPIBD-2 kernel: [ 3628.711987] opensips[16842]: segfault
at 0 ip           (null) sp 00007ffff1abbf78 error 14 in
opensips[400000+21f000]


Here is the script for my sql server dialog table:

CREATE TABLE [dbo].[dialog](
        [dlg_id] [bigint] IDENTITY(1,1) NOT NULL,
        [callid] [char](255) NOT NULL,
        [from_uri] [char](128) NOT NULL,
        [from_tag] [char](64) NOT NULL,
        [to_uri] [char](128) NOT NULL,
        [to_tag] [char](64) NOT NULL,
        [mangled_from_uri] [char](64) NULL,
        [mangled_to_uri] [char](64) NULL,
        [caller_cseq] [char](11) NOT NULL,
        [callee_cseq] [char](11) NOT NULL,
        [caller_ping_cseq] [int] NOT NULL,
        [callee_ping_cseq] [int] NOT NULL,
        [caller_route_set] [varchar](max) NULL,
        [callee_route_set] [varchar](max) NULL,
        [caller_contact] [char](128) NOT NULL,
        [callee_contact] [char](128) NOT NULL,
        [caller_sock] [char](64) NOT NULL,
        [callee_sock] [char](64) NOT NULL,
        [state] [int] NOT NULL,
        [start_time] [int] NOT NULL,
        [timeout] [int] NOT NULL,
        [vars] [varchar](max) NULL,
        [profiles] [varchar](max) NULL,
        [script_flags] [int] NOT NULL,
        [flags] [int] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

any thoughts?  Thank you!



--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Dialog-module-sql-server-2008-r2-database-backend-tp7588430.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Dialog module sql server 2008 r2 database backend

bluerain
In reply to this post by David J.-2
I am using the freedts.  It is working fine.  Actually I have all of my opensips module running using sql server 2008 r2 as backend right now (e.g. avpops, sip trace, auth_db, and many others).  the only module not playing along is the dialog module.  It only likes mysql but not sql server 2008.  

Reply | Threaded
Open this post in threaded view
|

Re: Dialog module sql server 2008 r2 database backend

bluerain
In reply to this post by Ali Pey
As I stated in my reply to dave, yes I have that setup, I have all module running on sql server 2008 r2 via freetds, the only module does not load correctly is the dialog module.  That is why I am wondering what is wrong.
Reply | Threaded
Open this post in threaded view
|

Re: Dialog module sql server 2008 r2 database backend

Ali Pey
Is the problem the create table command?

Connect to your db using the isql command and run the create table command and see if it works that way? Or create the table separately on your DB directly.

There seems to be an incompatibility issue. Try to find what command or field is causing it.

Regards,
Ali Pey


On Thu, Nov 7, 2013 at 5:14 PM, bluerain <[hidden email]> wrote:
As I stated in my reply to dave, yes I have that setup, I have all module
running on sql server 2008 r2 via freetds, the only module does not load
correctly is the dialog module.  That is why I am wondering what is wrong.



--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Dialog-module-sql-server-2008-r2-database-backend-tp7588430p7588436.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Dialog module sql server 2008 r2 database backend

Ovidiu Sas
In reply to this post by bluerain
Follow the instructions provided here:
http://www.opensips.org/Documentation/TroubleShooting-Crash

Regards,
Ovidiu Sas

On Thu, Nov 7, 2013 at 3:07 PM, bluerain <[hidden email]> wrote:

> Anybody tried to use the dialog module with sql server 2008 r2 back end?
>
> Opensips will start ok if I use mysql as db for dialog module, but as soon
> as I switch to sql server it give me this error in the log
>
> Nov  7 19:59:50 OSIPIBD-2 /usr/local/sbin/opensips[16842]:
> INFO:dialog:mod_init: Dialog module - initializing
> Nov  7 19:59:50 OSIPIBD-2 kernel: [ 3628.711987] opensips[16842]: segfault
> at 0 ip           (null) sp 00007ffff1abbf78 error 14 in
> opensips[400000+21f000]
>
>
> Here is the script for my sql server dialog table:
>
> CREATE TABLE [dbo].[dialog](
>         [dlg_id] [bigint] IDENTITY(1,1) NOT NULL,
>         [callid] [char](255) NOT NULL,
>         [from_uri] [char](128) NOT NULL,
>         [from_tag] [char](64) NOT NULL,
>         [to_uri] [char](128) NOT NULL,
>         [to_tag] [char](64) NOT NULL,
>         [mangled_from_uri] [char](64) NULL,
>         [mangled_to_uri] [char](64) NULL,
>         [caller_cseq] [char](11) NOT NULL,
>         [callee_cseq] [char](11) NOT NULL,
>         [caller_ping_cseq] [int] NOT NULL,
>         [callee_ping_cseq] [int] NOT NULL,
>         [caller_route_set] [varchar](max) NULL,
>         [callee_route_set] [varchar](max) NULL,
>         [caller_contact] [char](128) NOT NULL,
>         [callee_contact] [char](128) NOT NULL,
>         [caller_sock] [char](64) NOT NULL,
>         [callee_sock] [char](64) NOT NULL,
>         [state] [int] NOT NULL,
>         [start_time] [int] NOT NULL,
>         [timeout] [int] NOT NULL,
>         [vars] [varchar](max) NULL,
>         [profiles] [varchar](max) NULL,
>         [script_flags] [int] NOT NULL,
>         [flags] [int] NOT NULL
> ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
>
> any thoughts?  Thank you!
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Dialog-module-sql-server-2008-r2-database-backend-tp7588430.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--
VoIP Embedded, Inc.
http://www.voipembedded.com

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Dialog module sql server 2008 r2 database backend

bluerain
In reply to this post by Ali Pey
no the problem is not create table command.  I simply show the sql create table command so that you guys can see what is my table (data type) definition is.  I do think there is some issue with the table definition where sql server 2008 has different then mysql, but I thought some of you know this or had this problem and fixed already, so that you can tell me what the "correct" table structure suppose to be.

Although I did compare the data type between mysql and sql server 2008, I think I have it right though.
Reply | Threaded
Open this post in threaded view
|

Re: Dialog module sql server 2008 r2 database backend

bluerain
In reply to this post by Ali Pey
Have you use sql server 2008 with usrloc module?  it seems with that I can only do db_mode 3, db_mode 2 will cause it fail.  Pleaes let me know if you are able to do db_mode 2 with usrloc module with sql server 2008 backend.

thank you1