[Asterisk-Users] Sip Realtime Configs Samples with MySQL

Sean Cook scook at kinex.net
Fri Mar 3 06:50:07 MST 2006


I haven't tried sip yet... been finishing voicemail, but the principal
is the same.


res_mysql.conf

[general]
dbhost = localhost
dbname = asterisk
dbuser = someuser
dbpass = somepass
dbport = 3306
dbsock = /var/run/mysqld/mysqld.sock

extconfig.conf
voicemail => mysql,asterisk,voicemail
; i would assume that sip would be 
sippeers => mysql,asterisk,sip
sipusers => mysql,asterisk,sip

Table....

CREATE TABLE `sip` ( 
 `id` int(11) NOT NULL auto_increment,
 `name` varchar(80) NOT NULL default '',
 `accountcode` varchar(20) default NULL,
 `amaflags` varchar(13) default NULL,
 `callgroup` varchar(10) default NULL,
 `callerid` varchar(80) default NULL,
 `canreinvite` char(3) default 'yes',
 `context` varchar(80) default NULL,
 `defaultip` varchar(15) default NULL,
 `dtmfmode` varchar(7) default NULL,
 `fromuser` varchar(80) default NULL,
 `fromdomain` varchar(80) default NULL,
 `fullcontact` varchar(80) default NULL,
 `host` varchar(31) NOT NULL default '',
 `insecure` varchar(4) default NULL,
 `language` char(2) default NULL,
 `mailbox` varchar(50) default NULL,
 `md5secret` varchar(80) default NULL,
 `nat` varchar(5) NOT NULL default 'no',
 `deny` varchar(95) default NULL,
 `permit` varchar(95) default NULL,
 `mask` varchar(95) default NULL,
 `pickupgroup` varchar(10) default NULL,
 `port` varchar(5) NOT NULL default '',
 `qualify` char(3) default NULL,
 `restrictcid` char(1) default NULL,
 `rtptimeout` char(3) default NULL,
 `rtpholdtimeout` char(3) default NULL,
 `secret` varchar(80) default NULL,
 `type` varchar(6) NOT NULL default 'friend',
 `username` varchar(80) NOT NULL default '',
 `disallow` varchar(100) default 'all',
 `allow` varchar(100) default 'g729;ilbc;gsm;ulaw;alaw',
 `musiconhold` varchar(100) default NULL,
 `regseconds` int(11) NOT NULL default '0',
 `ipaddr` varchar(15) NOT NULL default '',
 `regexten` varchar(80) NOT NULL default '',
 `cancallforward` char(3) default 'yes',
 `setvar` varchar(100) NOT NULL default '',
 PRIMARY KEY  (`id`),
 UNIQUE KEY `name` (`name`),
 KEY `name_2` (`name`)
) TYPE=MyISAM ROW_FORMAT=DYNAMIC; 



On Thu, 2006-03-02 at 16:10 -0500, jr.richardson at cox.net wrote:
> Guys,
> 
> I'm having a hellava time getting realtime to work, focused on sipusers right now, followed the wiki and other examples but still no luck.  Using mysql on a seperate server, asterisk actually sees the database and can poll the table "realtime load sipusers" at the cli but asterisk realtime engine is no pulling the user info.  I'm using 1.2.4 stable and have the database info in sip.conf, extconfig.conf and res_mysql.conf.  Can anyone using mysql send me sample configs and some insight to getting this going?
> 
> Thanks.
> 
> JR
> 
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list