Asterisk RealTime H323 (chan_h323)
The realtime code was merged into trunk more then a year ago but still no documentation on that. So I decided to fill this vacuum.
Asterisk realtime for chan_h323 is configured in same ways as SIP and IAX2 tables. Below you can find a simple guide how to implement this.
Configure Asterisk to load peers via realtime
Add the following lines in extconfig.conf:
h323 => mysql,billing,h323_peer
We use MySQL database so we define database connection in res_mysql.conf:
dbhost = 127.0.0.1
dbname = billing
dbuser = user
dbpass = pass
dbport = 3306
Database structure
h323_peer table has the following structure
DROP TABLE IF EXISTS h323_peer;
CREATE TABLE h323_peer(
id BIGINT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(128) NOT NULL UNIQUE,
host VARCHAR(15) DEFAULT NULL ,
secret VARCHAR(64) DEFAULT NULL,
context VARCHAR(64) NOT NULL,
type VARCHAR(6) NOT NULL,
port INT DEFAULT NULL,
permit VARCHAR(128) DEFAULT NULL,
deny VARCHAR(128) DEFAULT NULL,
mailbox VARCHAR(128) DEFAULT NULL,
e164 VARCHAR(128) DEFAULT NULL,
prefix VARCHAR(128) DEFAULT NULL,
allow VARCHAR(128) DEFAULT NULL,
disallow VARCHAR(128) DEFAULT NULL,
dtmfmode VARCHAR(128) DEFAULT NULL,
accountcode INT DEFAULT NULL,
amaflags varchar(13) DEFAULT NULL,
INDEX idx_name(name),
INDEX idx_host(host)
);
That’s all, folks.