db mysql realtime asterisk

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

db mysql realtime asterisk

troxlinux
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: db mysql realtime asterisk

Mark Sayer
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
>[hidden email]
>http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: db mysql realtime asterisk

troxlinux
yes , I am using mysql-5.0.45-7.el5

regardss

2009/4/11 Mark Sayer <[hidden email]>:
> 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?
>

--
rickygm

http://gnuforever.homelinux.com

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: db mysql realtime asterisk

Mark Sayer
So, back to my original comment - The simple answer would appear to
be that your openser.subscriber table has not been created with a
field named 'first_name'.

Mark

At 04:03 a.m. 13/04/2009, you wrote:

>yes , I am using mysql-5.0.45-7.el5
>
>regardss
>
>2009/4/11 Mark Sayer <[hidden email]>:
> > 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?
> >
>
>--
>rickygm
>
>http://gnuforever.homelinux.com


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: db mysql realtime asterisk

troxlinux
ok thank I solve my problem  ...


regardss

2009/4/12 Mark Sayer <[hidden email]>:
> So, back to my original comment - The simple answer would appear to
> be that your openser.subscriber table has not been created with a
> field named 'first_name'.
>

--
rickygm

http://gnuforever.homelinux.com

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users