[Asterisk-Users] Realtime does not work yet, ...

Matthew Boehm mboehm at cytelcom.com
Wed Mar 16 08:00:35 MST 2005


*CLI> Urgent handler
    -- SIP Seeding peers from Astdb: '3044' at 3044 at 64.XX.XX.XX:64718 for
120
Urgent handler
    -- Registered SIP '3044' at 64.XX.XX.XX port 17524 expires 120

Codecs       : 0x10c (ulaw|alaw|g729)
Codec Order  : (g729|ulaw|alaw)

Using the following table:

CREATE TABLE customer_stations (
  name varchar(30) NOT NULL default '',
  callgroup varchar(30) default NULL,
  callerid varchar(50) default NULL,
  restrictcid char(3) default 'NO',
  canreinvite char(1) default NULL,
  context varchar(30) default NULL,
  dtmfmode varchar(7) default NULL,
  host varchar(31) NOT NULL default 'dynamic',
  mailbox varchar(50) default NULL,
  md5secret varchar(32) default NULL,
  nat varchar(5) default NULL,
  pickupgroup varchar(10) default NULL,
  port varchar(5) NOT NULL default '0',
  qualify varchar(4) default NULL,
  secret varchar(30) default NULL,
  `type` varchar(6) NOT NULL default 'friend',
  username varchar(30) default NULL,
  disallow varchar(100) default NULL,
  allow varchar(100) default NULL,
  regseconds int(11) NOT NULL default '0',
  ipaddr varchar(15) NOT NULL default '0.0.0.0',
  PRIMARY KEY  (station_id),
  KEY name (name)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

And this entry:

INSERT INTO `customer_stations` (`name`, `callgroup`, `callerid`,
`restrictcid`, `canreinvite`, `context`, `dtmfmode`, `host`, `mailbox`,
`md5secret`, `nat`, `pickupgroup`, `port`, `qualify`, `secret`, `type`,
`username`, `disallow`, `allow`, `regseconds`, `ipaddr`) VALUES ('3044',
NULL, NULL, 'NO', NULL, 'cytel-internal', NULL, 'dynamic', '3044 at cytel',
'd2756499745e254f52a224713f1a7d91', 'no', NULL, '5060', NULL, NULL,
'friend', '3044', NULL, 'g729,ulaw,alaw', 1109176184, '10.0.0.36');

Run this command from MySQL CLI: "show create table sipusers\G".  <-- 
exactly like that
If the "allow" column is 'above' the "disallow" column, then that is
probably your problem.

ARA works by returning all columns in a table (SELECT *). So your column
order is most important. If the allow column comes before disallow in the
table schema, then the allow stuff will be processed by chan_sip and THEN
the disallow will be processed.

You need to make sure that disallow is processed first.

Let me know..

-Matthew




More information about the asterisk-users mailing list