Return to LanScape's home page Go back a page...       Active TopicsActive Topics   Display List of Forum MembersMember List   Knowledge Base SearchSearch   HelpHelp  RegisterRegister  LoginLogin

SIP Proxy and Media Proxy - Technical Support
 LanScape Support Forum -> SIP Proxy and Media Proxy - Technical Support
Subject Topic: Bad response when registrar mysql Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
alberto007
Intermediate
Intermediate


Joined: February 04 2014
Location: Spain
Posts: 13
Posted: February 10 2014 at 7:56am | IP Logged Quote alberto007

Hello,

I've set up my centrex proxy to use a mysql database as
registrar db, instead of the memory cache.
But when I do this, clients can no longer register, I get
a '400 Bad request' response.

I use the following connection string:
Driver={MySQL ODBC 5.2 ANSI Driver};
Server=localhost;
Database=registrardatabase;
User=mydbuser;
Password=mydbpassword;
Option=4;

The DB works, because I click the "Test connection"
button and I get: "The connection to the DB succeeded".

If I go back to Memory Cache registrar DB, clients
register successfully again.

Do you know what could be happening?
Thank you very much. Best regards,

Alberto
Back to Top View alberto007's Profile Search for other posts by alberto007
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: February 11 2014 at 9:06am | IP Logged Quote support

Hi Alberto,

Not sure why you are seeing a 400 SIP response. I tested here using ODBC driver 3.51 and I have no issues. I used a similar connect string:

Code:

Driver={MySQL ODBC 3.51 Driver};
Server=localhost;
Database=registrardatabase;
User=myusername;
Password= mypassword;
Option=4;



Strange... if the DB connection test passed you should be OK.

Event though you are getting a 400 SIP response, have you looked at the MySQL registrar database table to see if the registration occurred? I am curious.

Try to register again. You will get your 400 response. Then look at the registrar table named registereduseragents in the DB named registrardatabase.

Issue the following MySQL command to see what registrar entries are in your table:

Code:

select * from `registrardatabase`.`registereduseragents` limit 0, 5000




If I remember, your install is using a “Custom Plug In” DLL. Is this correct? If you are, maybe there is something in the DLL that may be causing the register to fail.


RJ

Back to Top View support's Profile Search for other posts by support Visit support's Homepage
 
alberto007
Intermediate
Intermediate


Joined: February 04 2014
Location: Spain
Posts: 13
Posted: February 11 2014 at 9:37am | IP Logged Quote alberto007

Hi,

In this moment we have the custom plugin disabled.
I did what you say and the table is empty.
I used the included script to create the table, this one:

Code:

CREATE TABLE 'registereduseragents' (
  'RegistrationName' CHAR(50) NOT NULL DEFAULT '',
  'IpAddressStr' CHAR(16) DEFAULT NULL,
  'Port' INT(11) DEFAULT NULL,
  'ExpireTimeSeconds' INT(11) UNSIGNED DEFAULT NULL,
  'IsNated' INT(11) DEFAULT NULL,
  'UserAgent' CHAR(255) NOT NULL DEFAULT '',
  'DomainName' CHAR(255) NOT NULL DEFAULT '',
  'ProxyServerPort' INT(11) DEFAULT NULL,
  PRIMARY KEY  ('RegistrationName')
) ENGINE=INNODB DEFAULT CHARSET=latin1;


Maybe this is not the correct table structure and the query to insert users is failing...
Does the proxy have logs to see this?
I'm using mysql server 5.6 on Windows. Do you know where can I find it's logs for error queries?

Thank you! Regards,

Alberto
Back to Top View alberto007's Profile Search for other posts by alberto007
 
support
Administrator
Administrator


Joined: January 26 2005
Location: United States
Posts: 1666
Posted: February 11 2014 at 1:20pm | IP Logged Quote support

Alberto,

1)
Check the version of the following DLL:

RegistrarDatabaseDriver.dll       v2.6.2.4

It is located here (your path may be slightly different):
“C:\Program Files\LanScape\Centrex Proxy Server Enterprise\Database Driver”

Let me know if you have some other version. I will assume you have the above version.


2)
You may already know the following information but I will go over it anyway…

See this install directory (your path may be slightly different):

“C:\Program Files\LanScape\Centrex Proxy Server Enterprise\Database Driver\Empty Registrar Databases\MySQL”

This directory holds the MySQL stuff we need.

CreateRegDb.bat
You can run this batch file to create a new MySQL empty database for the proxy server.

The batch file uses the “Empty_MySQL_registrardatabase.sql” file for database creation.

A database field may be missing from your *.sql file. Edit your *.sql file to add the “ExternalDomainName” line below:

Code:

DROP TABLE IF EXISTS `registereduseragents`;
CREATE TABLE `registereduseragents` (
  `RegistrationName` char(50) NOT NULL default '',
  `IpAddressStr` char(16) default NULL,
  `Port` int(11) default NULL,
  `ExpireTimeSeconds` int(11) unsigned default NULL,
  `IsNated` int(11) default NULL,
  `UserAgent` char(255) NOT NULL default '',
  `DomainName` char(255) NOT NULL default '',
  `ExternalDomainName` char(255) NOT NULL default '',
  `ProxyServerPort` int(11) default NULL,
  PRIMARY KEY  (`RegistrationName`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



Once you make the change to the *.sql file, run the batch file and retry your registrations.

Let me know if this fixes the issue.

Thanks,

RJ

Back to Top View support's Profile Search for other posts by support Visit support's Homepage
 
alberto007
Intermediate
Intermediate


Joined: February 04 2014
Location: Spain
Posts: 13
Posted: February 12 2014 at 9:43am | IP Logged Quote alberto007

Great!

The field

`ExternalDomainName` char(255) NOT NULL default '',

was missing. Now, clients register successfully.

Thank you very much!!

Alberto
Back to Top View alberto007's Profile Search for other posts by alberto007
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum






Contact LanScape Hear what the Lawyers have to say How youm may use this site Read your privacy rights