[asterisk-bugs] [Asterisk 0015918]: SIP Realtime appears to be completely broken

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Sep 18 14:17:06 CDT 2009


The following issue has been SUBMITTED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15918 
====================================================================== 
Reported By:                viniciusfontes
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15918
Category:                   Addons/res_config_mysql
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.2.0-rc2 
JIRA:                        
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-09-18 14:17 CDT
Last Modified:              2009-09-18 14:17 CDT
====================================================================== 
Summary:                    SIP Realtime appears to be completely broken
Description: 
SIP Realtime doesn't work at all. I get the following on CLI when I try to
register a SIP extension:


[Sep 18 16:09:52] WARNING[2767]: res_config_mysql.c:325 realtime_mysql:
MySQL RealTime: Invalid database specified: realtime
[Sep 18 16:09:52] WARNING[2767]: res_config_mysql.c:325 realtime_mysql:
MySQL RealTime: Invalid database specified: realtime
[Sep 18 16:09:52] WARNING[2767]: res_config_mysql.c:325 realtime_mysql:
MySQL RealTime: Invalid database specified: realtime
[Sep 18 16:09:52] NOTICE[2767]: chan_sip.c:21006 handle_request_register:
Registration from '<sip:1001 at 192.168.0.151;transport=UDP>' failed for
'192.168.0.69' - No matching peer found


Here's my extconfig.conf:

[settings]
sipusers => mysql,realtime,sip
sippeers => mysql,realtime,sip
sipregs => mysql,realtime,sip

And my res_mysql.conf:

[general]
dbhost = 192.168.0.151
dbname = realtime
dbuser = root
dbpass = canall321
dbport = 3306
dbsock = /tmp/mysql.sock
;requirements=warn ; or createclose or createchar
requirements=createclose


And a dump of the database used:

-- phpMyAdmin SQL Dump
-- version 2.11.8.1deb5+lenny1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tempo de Geração: Set 18, 2009 as 04:15 PM
-- Versão do Servidor: 5.0.51
-- Versão do PHP: 5.2.6-1+lenny3

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Banco de Dados: `realtime`
--
CREATE DATABASE `realtime` DEFAULT CHARACTER SET latin1 COLLATE
latin1_swedish_ci;
USE `realtime`;

-- --------------------------------------------------------

--
-- Estrutura da tabela `sip`
--

CREATE TABLE IF NOT EXISTS `sip` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(80) NOT NULL default '',
  `host` varchar(31) NOT NULL default 'dynamic',
  `nat` varchar(5) NOT NULL default 'no',
  `type` enum('user','peer','friend') NOT NULL default 'friend',
  `accountcode` varchar(20) default NULL,
  `amaflags` varchar(13) default NULL,
  `call-limit` smallint(5) unsigned default NULL,
  `callgroup` varchar(10) default NULL,
  `callerid` varchar(80) default NULL,
  `cancallforward` char(3) default 'yes',
  `canreinvite` char(3) default 'no',
  `context` varchar(80) default 'interno',
  `defaultip` varchar(15) default NULL,
  `dtmfmode` varchar(7) default NULL,
  `fromuser` varchar(80) default NULL,
  `fromdomain` varchar(80) default NULL,
  `insecure` varchar(4) default NULL,
  `language` char(2) default NULL,
  `mailbox` varchar(50) default NULL,
  `md5secret` varchar(80) default NULL,
  `deny` varchar(95) default NULL,
  `permit` varchar(95) default NULL,
  `mask` varchar(95) default NULL,
  `musiconhold` varchar(100) default NULL,
  `pickupgroup` varchar(10) default NULL,
  `qualify` char(3) default 'yes',
  `regexten` varchar(80) default NULL,
  `restrictcid` char(3) default NULL,
  `rtptimeout` char(3) default NULL,
  `rtpholdtimeout` char(3) default NULL,
  `secret` varchar(80) default 'asterisk',
  `setvar` varchar(100) default NULL,
  `disallow` varchar(100) default 'all',
  `allow` varchar(100) default 'alaw',
  `fullcontact` varchar(80) NOT NULL default '',
  `ipaddr` varchar(15) NOT NULL default '',
  `port` smallint(5) unsigned NOT NULL default '0',
  `regserver` varchar(100) default NULL,
  `regseconds` int(11) NOT NULL default '0',
  `lastms` int(11) NOT NULL default '0',
  `username` varchar(80) NOT NULL default '',
  `defaultuser` varchar(80) NOT NULL default '',
  `subscribecontext` varchar(80) default NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name` (`name`),
  KEY `name_2` (`name`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
AUTO_INCREMENT=7 ;

--
-- Extraindo dados da tabela `sip`
--

INSERT INTO `sip` (`id`, `name`, `host`, `nat`, `type`, `accountcode`,
`amaflags`, `call-limit`, `callgroup`, `callerid`, `cancallforward`,
`canreinvite`, `context`, `defaultip`, `dtmfmode`, `fromuser`,
`fromdomain`, `insecure`, `language`, `mailbox`, `md5secret`, `deny`,
`permit`, `mask`, `musiconhold`, `pickupgroup`, `qualify`, `regexten`,
`restrictcid`, `rtptimeout`, `rtpholdtimeout`, `secret`, `setvar`,
`disallow`, `allow`, `fullcontact`, `ipaddr`, `port`, `regserver`,
`regseconds`, `lastms`, `username`, `defaultuser`, `subscribecontext`)
VALUES
(1, '1001', 'dynamic', 'no', 'friend', 'lupa01', NULL, 10, NULL, NULL,
'yes', 'no', 'interno', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, 'yes', NULL, NULL, NULL, NULL, 'asterisk',
NULL, 'all', 'alaw', '', '0.0.0.0', 0, '', 1253220319, -1, '1001', '',
NULL),
(2, '1002', 'dynamic', 'no', 'friend', 'lupa01', NULL, NULL, NULL, '',
'yes', 'no', 'interno', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, 'yes', NULL, NULL, NULL, NULL, 'asterisk',
NULL, 'all', 'alaw', '', '', 0, NULL, 0, 0, '', '', NULL),
(3, '2001', 'dynamic', 'no', 'friend', NULL, NULL, NULL, NULL, NULL,
'yes', 'no', 'interno', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, 'yes', NULL, NULL, NULL, NULL, 'asterisk',
NULL, 'all', 'alaw', '', '0.0.0.0', 0, NULL, 1253217556, 0, '2001', '',
NULL),
(4, '2002', 'dynamic', 'no', 'friend', NULL, NULL, NULL, NULL, NULL,
'yes', 'no', 'interno', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, 'yes', NULL, NULL, NULL, NULL, 'asterisk',
NULL, 'all', 'alaw', '', '', 0, NULL, 0, 0, '', '', NULL),
(5, '3001', 'dynamic', 'no', 'friend', NULL, NULL, NULL, NULL, NULL,
'yes', 'no', 'interno', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, 'yes', NULL, NULL, NULL, NULL, 'asterisk',
NULL, 'all', 'alaw', '', '0.0.0.0', 0, NULL, 1253206687, 0, '3001', '',
NULL),
(6, '3002', 'dynamic', 'no', 'friend', NULL, NULL, NULL, NULL, NULL,
'yes', 'no', 'interno', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, 'yes', NULL, NULL, NULL, NULL, 'asterisk',
NULL, 'all', 'alaw', '', '', 0, NULL, 0, 0, '', '', NULL);


This very database (and configuration, with few tweaks) used to work on
1.6.0.15 flawlessly.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-09-18 14:17 viniciusfontes New Issue                                    
2009-09-18 14:17 viniciusfontes Asterisk Version          => 1.6.2.0-rc2     
2009-09-18 14:17 viniciusfontes Regression                => No              
2009-09-18 14:17 viniciusfontes SVN Branch (only for SVN checkouts, not tarball
releases) => N/A             
======================================================================




More information about the asterisk-bugs mailing list