[OpenSIPS-Users] db mysql realtime asterisk

Mark Sayer datapipes at avtb.co.nz
Sun Apr 12 06:22:36 CEST 2009


The simple answer would appear to be that your openser.subscriber 
table has not been created with a field named 'first_name'. Are you 
using mysql 5.x?

Mark

At 11:46 a.m. 12/04/2009, you wrote:
>Hi list , I am trying to integrate opensips with asterisk realtime,
>but when I want to create the asterisk charts in mysql it throws me an
>error:
>
>ERROR 1054 (42S22) at line 21: Unknown column 'first_name' in 'field list'
>
>this is the line 21
>
>CREATE VIEW vmusers AS
>
>
>realtime.sql
>
>use asterisk;
>
>CREATE TABLE `voicemessages` (
>   `id` int(11) NOT NULL auto_increment,
>   `msgnum` int(11) NOT NULL default '0',
>   `dir` varchar(80) default '',
>   `context` varchar(80) default '',
>   `macrocontext` varchar(80) default '',
>   `callerid` varchar(40) default '',
>   `origtime` varchar(40) default '',
>   `duration` varchar(20) default '',
>   `mailboxuser` varchar(80) default '',
>   `mailboxcontext` varchar(80) default '',
>   `recording` longblob,
>   PRIMARY KEY  (`id`),
>   KEY `dir` (`dir`)
>) ENGINE=InnoDB;
>
>CREATE VIEW vmusers AS
>SELECT id as uniqueid,
>   username as customer_id,
>   'netsoluciones' as context,
>   username as mailbox,
>   vmail_password as password,
>   CONCAT(first_name,' ',last_name) as fullname,
>   email_address as email,
>   NULL as pager,
>   datetime_created as stamp
>FROM opensips.subscriber;
>
>CREATE VIEW sipusers AS
>SELECT username as name,
>   username,
>   'friend' as type,
>   NULL as secret,
>   domain as host,
>   CONCAT(rpid, ' ','<',username,'>') as callerid,
>   'netsoluciones' as context,
>   username as mailbox,
>   'yes' as nat,
>   'yes' as qualify,
>   username as fromuser,
>   NULL as authuser,
>   domain as fromdomain,
>   NULL as insecure,
>   'no' as canreinvite,
>   NULL as disallow,
>   NULL as allow,
>   NULL as restrictcid,
>   domain as defaultip,
>   domain as ipaddr,
>   '5060' as port,
>NULL as regseconds
>FROM opensips.subscriber;
>
>
>
>I am following this tutorial this works me perfect with the version of
>openser 1.3.3
>
>http://www.voip-info.org/wiki/view/Realtime+Integration+Of+Asterisk+1.4+With+OpenSER+1.3
>
>any idea?
>
>regards
>
>--
>rickygm
>
>http://gnuforever.homelinux.com
>
>_______________________________________________
>Users mailing list
>Users at lists.opensips.org
>http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list