[asterisk-users] Asterisk Database

2010-01-28 Thread ahmed magdy
Hello

I am trying to attach a database to asterisk , can anyone help me?
in extconfig.conf sipusers = mysql,general,sip
in res_mysql.conf [general]
dbhost = 192.168.50.125
dbname = asterisk
dbuser = root
dbpass = ahmed
dbport = 3306
dbsock = /tmp/mysql.sock

i created a table in MySql
CREATE TABLE `sip` (
   `name` varchar(40) NOT NULL default '',`username` varchar(40) default
'',`typee` varchar(6) NOT NULL default '',`secret` varchar(40) default '',
   `context` varchar(40) NOT NULL default '',
   `host` varchar(31) NOT NULL default 'dynamic',
   PRIMARY KEY  (`name`)
 ) TYPE=MyISAM

I insreted a data which is insert into sip values
('555','555','peer','1234','555','dynamic')
but i couldn't register from X-lite because Asterisk doesn't see this peer
please help me urgent
-- 
Ahmed Magdy Mahmoud
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Asterisk Database Configuration

2010-01-27 Thread ahmed magdy
Hello

I need to add sip extensions from my UI so without going through sip.conf so
i created table
CREATE TABLE `sipfriends` (
   `name` varchar(40) NOT NULL default '',
   `username` varchar(40) default '',
   `secret` varchar(40) NOT NULL default '',
   `context` varchar(40) NOT NULL default '',
   `ipaddr` varchar(20) NOT NULL default '',
   `port` int(6) NOT NULL default '0',
   `regseconds` int(11) NOT NULL default '0',
   PRIMARY KEY  (`name`)
 ) TYPE=MyISAM
then i put sip.conf
[general]
hostname=localhost
dbname=asterisk
table= sipfriends
password=ahmed
user=root
then i insert in sql this statment  insert into sipfriends values
('555','555','1234','555','192.168.50.149',5060,2);
i tried from Xlite to register with 555 but i couldn't
any help please

-- 
Ahmed Magdy Mahmoud
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk Database Configuration

2010-01-27 Thread Kyle Kienapfel
Can you link the howto or other documentation you are following to set this up?
What version of asterisk?
Did you edit extconfig.conf?

Heres a howto for 1.4.x
http://hostseries.com/asterisk-realtime-installation-guide/

On Wed, Jan 27, 2010 at 8:39 AM, ahmed magdy amagdy.ibra...@gmail.com wrote:
 Hello

 I need to add sip extensions from my UI so without going through sip.conf so
 i created table
 CREATE TABLE `sipfriends` (
    `name` varchar(40) NOT NULL default '',
    `username` varchar(40) default '',
    `secret` varchar(40) NOT NULL default '',
    `context` varchar(40) NOT NULL default '',
    `ipaddr` varchar(20) NOT NULL default '',
    `port` int(6) NOT NULL default '0',
    `regseconds` int(11) NOT NULL default '0',
    PRIMARY KEY  (`name`)
  ) TYPE=MyISAM
 then i put sip.conf
 [general]
 hostname=localhost
 dbname=asterisk
 table= sipfriends
 password=ahmed
 user=root
 then i insert in sql this statment  insert into sipfriends values
 ('555','555','1234','555','192.168.50.149',5060,2);
 i tried from Xlite to register with 555 but i couldn't
 any help please

 --
 Ahmed Magdy Mahmoud


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Asterisk Database

2009-04-21 Thread Sriram
My setup : Trixbox 2.6.1  TE410P running well .:

1. I need to store the CallerId of the PSTN caller with his language preference 
so that next time he is played the prompt in his language that he chose the 
first time.What would be better - storing his number in the Asterisk DB and 
using Dbput and DBget ? or storing it in MySQL from the dial plan and quering 
it everytime to see the callers record ? how many records can AstDB handle 
safely ? In my case the total records wont exceed 20,000 since there are many 
repeat callers ?


rgds
Sriram___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk Database

2009-04-21 Thread Barry L. Kline
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sriram wrote:
 
 1. I need to store the CallerId of the PSTN caller with his language
 preference so that next time he is played the prompt in his language
 that he chose the first time.What would be better - storing his number
 in the Asterisk DB and using Dbput and DBget ? or storing it in MySQL
 from the dial plan and quering it everytime to see the callers record ?
 how many records can AstDB handle safely ? In my case the total records
 wont exceed 20,000 since there are many repeat callers ?

20K records?   While I'm not sure exactly how many records AstDB could
handle it would seem to me that 20K would be a high number.   My
inclination would be to use a full database... perhaps you'd like to
store more about that callerID than just the caller's preferred
language.   Using a real DB would certainly make that easier.

Barry

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFJ7bRRCFu3bIiwtTARAqTvAJ4jS0/kZeHo33+w9gjZ88dYB3SeDACgg2+t
LhVIBsPzxyQ/g542/NjMo8U=
=d+JZ
-END PGP SIGNATURE-

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database

2009-04-21 Thread Geraint Lee
i'd use mysql... and i do use mysql for this...

2009/4/21 Sriram d_r_sri...@hotmail.com

  My setup : Trixbox 2.6.1  TE410P running well .:

 1. I need to store the CallerId of the PSTN caller with his language
 preference so that next time he is played the prompt in his language that he
 chose the first time.What would be better - storing his number in the
 Asterisk DB and using Dbput and DBget ? or storing it in MySQL from the dial
 plan and quering it everytime to see the callers record ? how many records
 can AstDB handle safely ? In my case the total records wont exceed 20,000
 since there are many repeat callers ?

 rgds
 Sriram

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk Database

2009-04-21 Thread Benny Amorsen
Sriram d_r_sri...@hotmail.com writes:

 1. I need to store the CallerId of the PSTN caller with his language
 preference so that next time he is played the prompt in his language that
 he chose the first time.What would be better - storing his number in the
 Asterisk DB and using Dbput and DBget ? or storing it in MySQL from the
 dial plan and quering it everytime to see the callers record ? how many
 records can AstDB handle safely ? In my case the total records wont exceed
 20,000 since there are many repeat callers ?

Asterisk DB is either an SQLite database or a Berkeley database, I
forget which (did it change?). Either way, 20,000 should be a problem
for the underlying database.

I'd still go for the real database (using Postgres, but I guess you
can use MySQL if you feel like it), probably using func_ODBC. With
Asterisk DB you have to go through Asterisk to view or change contents
of the database; a real database makes management easier.


/Benny


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database

2009-04-21 Thread Danny Nicholas
I second the Real database idea.  AFAIK, the Asterisk database is still a
Berkley DB.  I'm accessing Postgres using an AGI and returning dialplan
variables with what I want to process.  The Asterisk database is best for
small, non-critical information, though there are good procedures documented
for backup and reload of it.

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Benny Amorsen
Sent: Tuesday, April 21, 2009 11:39 AM
To: Sriram
Cc: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Asterisk Database

Sriram d_r_sri...@hotmail.com writes:

 1. I need to store the CallerId of the PSTN caller with his language
 preference so that next time he is played the prompt in his language that
 he chose the first time.What would be better - storing his number in the
 Asterisk DB and using Dbput and DBget ? or storing it in MySQL from the
 dial plan and quering it everytime to see the callers record ? how many
 records can AstDB handle safely ? In my case the total records wont exceed
 20,000 since there are many repeat callers ?

Asterisk DB is either an SQLite database or a Berkeley database, I
forget which (did it change?). Either way, 20,000 should be a problem
for the underlying database.

I'd still go for the real database (using Postgres, but I guess you
can use MySQL if you feel like it), probably using func_ODBC. With
Asterisk DB you have to go through Asterisk to view or change contents
of the database; a real database makes management easier.


/Benny


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database

2009-04-21 Thread Doug Lytle
Benny Amorsen wrote:
 Asterisk DB is either an SQLite database or a Berkeley database, I
   

The last I knew, it was BerkeleyDB.

Doug


-- 
 
Ben Franklin quote:

Those who would give up Essential Liberty to purchase a little Temporary 
Safety, deserve neither Liberty nor Safety.


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database

2009-04-21 Thread Steve Edwards
On Tue, 21 Apr 2009, Benny Amorsen wrote:

 Sriram d_r_sri...@hotmail.com writes:

 1. I need to store the CallerId of the PSTN caller with his language
 preference so that next time he is played the prompt in his language that
 he chose the first time.What would be better - storing his number in the
 Asterisk DB and using Dbput and DBget ? or storing it in MySQL from the
 dial plan and quering it everytime to see the callers record ? how many
 records can AstDB handle safely ? In my case the total records wont exceed
 20,000 since there are many repeat callers ?

 Asterisk DB is either an SQLite database or a Berkeley database, I
 forget which (did it change?). Either way, 20,000 should be a problem
 for the underlying database.

1.2 uses Berkeley:

file /var/lib/asterisk/astdb
/var/lib/asterisk/astdb: Berkeley DB 1.85/1.86 (Btree, version 3,
native byte-order)

 I'd still go for the real database (using Postgres, but I guess you
 can use MySQL if you feel like it), probably using func_ODBC. With
 Asterisk DB you have to go through Asterisk to view or change contents
 of the database; a real database makes management easier.

+1 for MySQL (or whatever real DB you know). Bet on your boss asking 
questions like: Can I have a web page with a pretty pie graph showing the 
breakdown of who joined with one of those calendar thingies so I can 
choose a date range?

Using the -r -x foo command line interface or talking to Asterisk's 
database behind its back both sound like bad ideas to me. Imagine if you 
muck something up and it corrupts the database and you can't restart 
Asterisk.

Thanks in advance,

Steve Edwards  sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database

2009-04-21 Thread Jeff LaCoursiere

On Tue, 21 Apr 2009, Doug Lytle wrote:

 Benny Amorsen wrote:
 Asterisk DB is either an SQLite database or a Berkeley database, I


 The last I knew, it was BerkeleyDB.

 Doug



Just to add a few cents, if the object is to store and retrieve a single 
value with a single key, Berkeley DB is perfectly suited to the task.  It 
shouldn't matter the number of rows, and is far less overhead than a 
giant SQL engine.  I don't actually recall the original question, but it 
sounded at the time that he just wanted to store a single value against a 
single key, so this may be the most efficient method of going about it, 
and is certainly the least complex...

j

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database

2009-04-21 Thread Benny Amorsen
Benny Amorsen benny+use...@amorsen.dk writes:

 Asterisk DB is either an SQLite database or a Berkeley database, I
 forget which (did it change?). Either way, 20,000 should be a problem
 for the underlying database.

Should NOT be a problem for the underlying database.

Sorry!


/Benny


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-24 Thread Matthew J. Roth
Tilghman and Jay,

Thanks for the licensing advice.  If anyone is interested in replicate, 
I'm now ready to distribute it under the GPL.

Regards,

Matthew Roth
InterMedia Marketing Solutions
Software Engineer and Systems Developer


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-22 Thread Pezhman Lali
using odbc+( postgres or mysql) is  more stable,
but at all odbc + postgres is recommended 
 
--- Sherwood McGowan [EMAIL PROTECTED]
wrote:

 Steve Prior wrote:
  Tilghman Lesher wrote:

  Correct; it's actually a workaround for a bug in
 the MySQL drivers.  It was
  discovered long after 1.2 was end-of-lifed.
 
  
 
  I got bit by MySQL reconnects on some other
 software I wrote I think when I 
  jumped from MySQL 4.* to 5.*.  If memory serves,
 here is the relevant info from 
  the official MySQL documentation:
 
  From:

http://dev.mysql.com/doc/refman/5.0/en/upgrading-from-4-1.html
 
  The reconnect flag in the MYSQL structure is set
 to 0 by mysql_real_connect(). 
  Only those client programs which did not
 explicitly set this flag to 0 or 1 
  after mysql_real_connect()  experience a change.
 Having automatic reconnection 
  enabled by default was considered too dangerous
 (due to the fact that table 
  locks, temporary tables, user variables, and
 session variables are lost after 
  reconnection).
 
 
  This may explain why this is happening in
 Asterisk.  In the case of my other 
  code the answer was not to keep a long term
 connection through idle periods.
 
  Steve
 
  ___
  -- Bandwidth and Colocation Provided by
 http://www.api-digital.com --
 
  asterisk-users mailing list
  To UNSUBSCRIBE or update options visit:


http://lists.digium.com/mailman/listinfo/asterisk-users

 That's probably why I've never had timeout issues, I
 use 
 asterisk-addons-1.4 when I do use cdr_mysql and I
 think at one point 
 there WAS a problem, but there was a published fix
 from the 
 mysql_connect vs mysql_real_connect issue
 
 ___
 -- Bandwidth and Colocation Provided by
 http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   

http://lists.digium.com/mailman/listinfo/asterisk-users
 



  

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-22 Thread Alex Balashov
Pezhman Lali wrote:

 using odbc+( postgres or mysql) is  more stable,
 but at all odbc + postgres is recommended 

Really?

-- 
Alex Balashov
Evariste Systems
Web: http://www.evaristesys.com/
Tel: (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-22 Thread Matthew J. Roth
Douglas Garstang wrote:
 Not at all, just offering a workaround.  If your master.csv is
 complete and correct then it makes sense to use that data unless
 someone can identify your problem and offer a fix.

 Unfortunately, not really feesible. I didn't design the system but we 
 are using CDR's not only for billing purposes, but also to keep state 
 on users. The state info (in a call, not in a call etc) needs to be 
 updated in as close to real time as possible. Files won't do it.
Douglas,

I've written a program named replicate that may be of interest to you.  
It replicates all writes to a file over a socket.  The core of the 
program is GNU tail, so it operates nearly in real time (it has 
inherited the --sleep-interval argument for fine-tuning).  I've been 
using it in production for over a year to push all writes to the 
queue_log to a remote reporting server and it has been rock solid.

It operates almost identically to tail -F except every new write to 
the file is written over a socket connection.  The remote end of the 
connection is responsible for sending back an acknowledgment.  If it 
doesn't, replicate will spool the write to a temporary file on the local 
machine.  Once the remote end is responding again, the spool file is 
written to it.  This allows us to have downtime (expected or unexpected) 
on the reporting server without losing any queue_log records.

I've never released replicate publicly, because I'm not sure how taking 
a program like tail and adapting it to a new purpose is handled by the 
GPL.  However, I'm sure someone on this list more knowledgeable than 
myself can help me understand that issue.

Regards,

Matthew Roth
InterMedia Marketing Solutions
Software Engineer and Systems Developer


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-22 Thread Tilghman Lesher
On Thursday 22 May 2008 09:29:24 Matthew J. Roth wrote:
 It operates almost identically to tail -F except every new write to
 the file is written over a socket connection.  The remote end of the
 connection is responsible for sending back an acknowledgment.  If it
 doesn't, replicate will spool the write to a temporary file on the local
 machine.  Once the remote end is responding again, the spool file is
 written to it.  This allows us to have downtime (expected or unexpected)
 on the reporting server without losing any queue_log records.

 I've never released replicate publicly, because I'm not sure how taking
 a program like tail and adapting it to a new purpose is handled by the
 GPL.  However, I'm sure someone on this list more knowledgeable than
 myself can help me understand that issue.

There's no problem, as long as you distribute your program under the GPL,
which means providing the source on demand to anybody to whom you distribute
a binary.

If you want to distribute under another license, then it comes down to how you
developed the code.  If you developed the code to work similarly to tail, but
you did not use any tail code (or any other GPL code) directly, then you're
pretty much free to use any license you like.  However, if you started off
with the tail codebase and altered it, it is a derivative work, and GPL is the
only way to go.

-- 
Tilghman

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-22 Thread Alex Balashov
A program like netcat?

Matthew J. Roth wrote:
 Douglas Garstang wrote:
 Not at all, just offering a workaround.  If your master.csv is
 complete and correct then it makes sense to use that data unless
 someone can identify your problem and offer a fix.
 Unfortunately, not really feesible. I didn't design the system but we 
 are using CDR's not only for billing purposes, but also to keep state 
 on users. The state info (in a call, not in a call etc) needs to be 
 updated in as close to real time as possible. Files won't do it.
 Douglas,
 
 I've written a program named replicate that may be of interest to you.  
 It replicates all writes to a file over a socket.  The core of the 
 program is GNU tail, so it operates nearly in real time (it has 
 inherited the --sleep-interval argument for fine-tuning).  I've been 
 using it in production for over a year to push all writes to the 
 queue_log to a remote reporting server and it has been rock solid.
 
 It operates almost identically to tail -F except every new write to 
 the file is written over a socket connection.  The remote end of the 
 connection is responsible for sending back an acknowledgment.  If it 
 doesn't, replicate will spool the write to a temporary file on the local 
 machine.  Once the remote end is responding again, the spool file is 
 written to it.  This allows us to have downtime (expected or unexpected) 
 on the reporting server without losing any queue_log records.
 
 I've never released replicate publicly, because I'm not sure how taking 
 a program like tail and adapting it to a new purpose is handled by the 
 GPL.  However, I'm sure someone on this list more knowledgeable than 
 myself can help me understand that issue.
 
 Regards,
 
 Matthew Roth
 InterMedia Marketing Solutions
 Software Engineer and Systems Developer
 
 
 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
Alex Balashov
Evariste Systems
Web: http://www.evaristesys.com/
Tel: (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-22 Thread Matthew J. Roth
Alex Balashov wrote:
 A program like netcat?
   
Alex,

You're not the first person to suggest nc for this purpose.  As I 
understand it, it's a TCP/UDP swiss army knife so I'm sure it's up to 
the task.  However, in reading the man page, I don't see any trivial way 
to buffer failed writes and retry them when the connection is 
reestablished.  I'd be glad to hear it if you know of a way.  As it is, 
I'm assuming that I'd have to write a script around nc to handle such 
situations.  If that's the case, I'll stick with my program because the 
development time is a sunk cost and it just works for my particular 
application.

Regards,

Matthew Roth
InterMedia Marketing Solutions
Software Engineer and Systems Developer


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-22 Thread Alex Balashov
Matthew J. Roth wrote:
 Alex Balashov wrote:
 A program like netcat?
   
 Alex,
 
 You're not the first person to suggest nc for this purpose.  As I 
 understand it, it's a TCP/UDP swiss army knife so I'm sure it's up to 
 the task.  However, in reading the man page, I don't see any trivial way 
 to buffer failed writes and retry them when the connection is 
 reestablished.  I'd be glad to hear it if you know of a way.  As it is, 
 I'm assuming that I'd have to write a script around nc to handle such 
 situations.  If that's the case, I'll stick with my program because the 
 development time is a sunk cost and it just works for my particular 
 application.

True, true.  nc does not have that capability.


-- 
Alex Balashov
Evariste Systems
Web: http://www.evaristesys.com/
Tel: (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-22 Thread Jay R. Ashworth
On Wed, May 21, 2008 at 06:02:07PM -0400, Alex Balashov wrote:
 Douglas Garstang wrote:
  We are sending CDR's to MySQL via odbc. It seems that Asterisk is 
  sometimes dropping CDR's, and they aren't being sent to the database 
  (they ARE in the Master.csv file though). We suspect that when the MySQL 
  socket is idle, it gets disconnected, either by the MySQL server or by 
  our firewall, and when Asterisk goes to send the next CDR over the 
  socket, does not re-open the database, and drops that CDR. Possibly on 
  the next call, it connects ok and sends the next CDR.
 
 Isn't there a keepalive option somewhere for cdr_mysql.conf, or failing 
 that, a keepalive mechanism that can be enabled for TCP connections on 
 the server side?

In some recent mysql update, the behaviour with which it times out
connections changed, and it bit some other project I follow as well;
MythTV, I think.  You might check their mailing list, Doug, for details.

Cheers,
-- jra
-- 
Jay R. Ashworth   Baylink  [EMAIL PROTECTED]
Designer The Things I Think   RFC 2100
Ashworth  Associates http://baylink.pitas.com '87 e24
St Petersburg FL USA  http://photo.imageinc.us +1 727 647 1274

 Those who cast the vote decide nothing.
 Those who count the vote decide everything.
   -- (Joseph Stalin)

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-22 Thread Jay R. Ashworth
On Thu, May 22, 2008 at 10:05:13AM -0500, Tilghman Lesher wrote:
  I've never released replicate publicly, because I'm not sure how taking
  a program like tail and adapting it to a new purpose is handled by the
  GPL.  However, I'm sure someone on this list more knowledgeable than
  myself can help me understand that issue.
 
 There's no problem, as long as you distribute your program under the GPL,
 which means providing the source on demand to anybody to whom you distribute
 a binary.
 
 If you want to distribute under another license, then it comes down to how you
 developed the code.  If you developed the code to work similarly to tail, but
 you did not use any tail code (or any other GPL code) directly, then you're
 pretty much free to use any license you like.  However, if you started off
 with the tail codebase and altered it, it is a derivative work, and GPL is the
 only way to go.

And of course, as long as you don't distribute it[1], then you can do
anything you like with it, GPL or not.

Cheers,
-- jra
[1]for suitable values of 'distribute', which for GPLv2 means ship,
and for GPLv3/AGPL means make available through a web service.
-- 
Jay R. Ashworth   Baylink  [EMAIL PROTECTED]
Designer The Things I Think   RFC 2100
Ashworth  Associates http://baylink.pitas.com '87 e24
St Petersburg FL USA  http://photo.imageinc.us +1 727 647 1274

 Those who cast the vote decide nothing.
 Those who count the vote decide everything.
   -- (Joseph Stalin)

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Asterisk Database Handling

2008-05-21 Thread Douglas Garstang
General Asterisk question.

We are sending CDR's to MySQL via odbc. It seems that Asterisk is sometimes 
dropping CDR's, and they aren't being sent to the database (they ARE in the 
Master.csv file though). We suspect that when the MySQL socket is idle, it gets 
disconnected, either by the MySQL server or by our firewall, and when Asterisk 
goes to send the next CDR over the socket, does not re-open the database, and 
drops that CDR. Possibly on the next call, it connects ok and sends the next 
CDR.

This was a documented problem with voicemail users in the db in some previous 
version of Asterisk 1.2, and was patched and fixed in a later version of 
Asterisk 1.2

We are using Asterisk 1.2.19.

So... surely this must be a general problem with ANY Asterisk module that uses 
the database. Do all modules use the same common database code or do they all 
use their own? If they all use their own, I guess idle database connection 
issues may be fixed in some modules and not others. If it's common Asterisk 
database code, is it all fixed in a newer version? Is it fixed in Asterisk 1.4?

Thanks,
Doug.


  ___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Alex Balashov
Douglas Garstang wrote:

 We are sending CDR's to MySQL via odbc. It seems that Asterisk is 
 sometimes dropping CDR's, and they aren't being sent to the database 
 (they ARE in the Master.csv file though). We suspect that when the MySQL 
 socket is idle, it gets disconnected, either by the MySQL server or by 
 our firewall, and when Asterisk goes to send the next CDR over the 
 socket, does not re-open the database, and drops that CDR. Possibly on 
 the next call, it connects ok and sends the next CDR.

Isn't there a keepalive option somewhere for cdr_mysql.conf, or failing 
that, a keepalive mechanism that can be enabled for TCP connections on 
the server side?

-- 
Alex Balashov
Evariste Systems
Web: http://www.evaristesys.com/
Tel: (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Sanjay Rajdev
I had a similar problem, but in my case we had a custom application that was 
throwing an segmentation exception which was causing Asterisk to Restart. And 
in that case It use to miss the log in database. 
You can determine the same by looking at the UNIQUEID being logged for the 
call. The UNIQUEID actually comprises of 2 things DateTimeString.CallNumber , 
everytime Asterisk restarts CallNumber will start from 1. So you can check the 
2-3 UNIQUEID before you missed entry in CDR table and 2-3 after the missed 
entry to determine if Asterisk Restarted. 
Other way is you can see the kernel logs to see if Asterisk has thrown any 
exception. they can be found on Linux at /var/log/messages 


Regards, 
Sanjay Rajdev 

- Original Message - 
From: Alex Balashov [EMAIL PROTECTED] 
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com 
Sent: Thursday, May 22, 2008 3:32:07 AM GMT +05:30 Chennai, Kolkata, Mumbai, 
New Delhi 
Subject: Re: [asterisk-users] Asterisk Database Handling 

Douglas Garstang wrote: 

 We are sending CDR's to MySQL via odbc. It seems that Asterisk is 
 sometimes dropping CDR's, and they aren't being sent to the database 
 (they ARE in the Master.csv file though). We suspect that when the MySQL 
 socket is idle, it gets disconnected, either by the MySQL server or by 
 our firewall, and when Asterisk goes to send the next CDR over the 
 socket, does not re-open the database, and drops that CDR. Possibly on 
 the next call, it connects ok and sends the next CDR. 

Isn't there a keepalive option somewhere for cdr_mysql.conf, or failing 
that, a keepalive mechanism that can be enabled for TCP connections on 
the server side? 

-- 
Alex Balashov 
Evariste Systems 
Web : http://www.evaristesys.com/ 
Tel : (+1) (678) 954-0670 
Direct : (+1) (678) 954-0671 
Mobile : (+1) (706) 338-8599 

___ 
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- 

asterisk-users mailing list 
To UNSUBSCRIBE or update options visit: 
http://lists.digium.com/mailman/listinfo/asterisk-users 
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Alex Balashov
Sanjay Rajdev wrote:
 I had a similar problem, but in my case we had a custom application that 
 was throwing an segmentation exception which was causing Asterisk to 
 Restart. And in that case It use to miss the log in database.
 You can determine the same by looking at the UNIQUEID being logged for 
 the call. The UNIQUEID actually comprises of 2 things 
 DateTimeString.CallNumber, everytime Asterisk restarts CallNumber will 
 start from 1. So you can check the 2-3 UNIQUEID before you missed entry 
 in CDR table and 2-3 after the missed entry to determine if Asterisk 
 Restarted.
 Other way is you can see the kernel logs to see if Asterisk has thrown 
 any exception. they can be found on Linux at /var/log/messages

There is no such thing as a segmentation exception.  C does not have 
exception handling, and Asterisk does not throw any exceptions.

There is, however, a segmentation fault.  That is a memory condition 
that causes the operating system to terminate the process, in absence of 
a signal handler for it.

None of these can or should be characterised as exceptions, and have 
absolutely nothing to do with them.

-- 
Alex Balashov
Evariste Systems
Web: http://www.evaristesys.com/
Tel: (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Douglas Garstang
I couldn't find one for cdr_mysql.conf.
We're using odbc anyway. MySQL directly might be an option if it works.
Don't think we want to modify the server.



- Original Message 
From: Alex Balashov [EMAIL PROTECTED]
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com
Sent: Wednesday, May 21, 2008 3:02:07 PM
Subject: Re: [asterisk-users] Asterisk Database Handling

Douglas Garstang wrote:

 We are sending CDR's to MySQL via odbc. It seems that Asterisk is 
 sometimes dropping CDR's, and they aren't being sent to the database 
 (they ARE in the Master.csv file though). We suspect that when the MySQL 
 socket is idle, it gets disconnected, either by the MySQL server or by 
 our firewall, and when Asterisk goes to send the next CDR over the 
 socket, does not re-open the database, and drops that CDR. Possibly on 
 the next call, it connects ok and sends the next CDR.

Isn't there a keepalive option somewhere for cdr_mysql.conf, or failing 
that, a keepalive mechanism that can be enabled for TCP connections on 
the server side?

-- 
Alex Balashov
Evariste Systems
Web: http://www.evaristesys.com/
Tel: (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users



  ___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Alex Balashov
Douglas Garstang wrote:

 I couldn't find one for cdr_mysql.conf.
 We're using odbc anyway. MySQL directly might be an option if it works.
 Don't think we want to modify the server.

Perhaps there's a keepalive option to be set on the UnixODBC DSN, then?

-- 
Alex Balashov
Evariste Systems
Web: http://www.evaristesys.com/
Tel: (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Steve Totaro
On Wed, May 21, 2008 at 5:37 PM, Douglas Garstang [EMAIL PROTECTED] wrote:
 General Asterisk question.

 We are sending CDR's to MySQL via odbc. It seems that Asterisk is sometimes
 dropping CDR's, and they aren't being sent to the database (they ARE in the
 Master.csv file though). We suspect that when the MySQL socket is idle, it
 gets disconnected, either by the MySQL server or by our firewall, and when
 Asterisk goes to send the next CDR over the socket, does not re-open the
 database, and drops that CDR. Possibly on the next call, it connects ok and
 sends the next CDR.

 This was a documented problem with voicemail users in the db in some
 previous version of Asterisk 1.2, and was patched and fixed in a later
 version of Asterisk 1.2

 We are using Asterisk 1.2.19.

 So... surely this must be a general problem with ANY Asterisk module that
 uses the database. Do all modules use the same common database code or do
 they all use their own? If they all use their own, I guess idle database
 connection issues may be fixed in some modules and not others. If it's
 common Asterisk database code, is it all fixed in a newer version? Is it
 fixed in Asterisk 1.4?

 Thanks,
 Doug.


I have no answer, just a potential work around if you get no good answers.

I guess you could just pipe the master.csv into your database (similar
to how queuemetrics does queue_log)

Thanks,
Steve Totaro

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Douglas Garstang
- Original Message 

From: Alex Balashov [EMAIL PROTECTED]
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com
Sent: Wednesday, May 21, 2008 3:30:06 PM
Subject: Re: [asterisk-users] Asterisk Database Handling

Douglas Garstang wrote:

 I couldn't find one for cdr_mysql.conf.
 We're using odbc anyway. MySQL directly might be an option if it works.
 Don't think we want to modify the server.

Perhaps there's a keepalive option to be set on the UnixODBC DSN, then?

I already searched. Could not find one.


  ___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Douglas Garstang


 So... surely this must be a general problem with ANY Asterisk module that
 uses the database. Do all modules use the same common database code or do
 they all use their own? If they all use their own, I guess idle database
 connection issues may be fixed in some modules and not others. If it's
 common Asterisk database code, is it all fixed in a newer version? Is it
 fixed in Asterisk 1.4?

 Thanks,
 Doug.


I have no answer, just a potential work around if you get no good answers.

I guess you could just pipe the master.csv into your database (similar
to how queuemetrics does queue_log)

Are you saying this is a known problem?


  ___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Sherwood McGowan
Douglas Garstang wrote:
 I couldn't find one for cdr_mysql.conf.
 We're using odbc anyway. MySQL directly might be an option if it works.
 Don't think we want to modify the server.


 - Original Message 
 From: Alex Balashov [EMAIL PROTECTED]
 To: Asterisk Users Mailing List - Non-Commercial Discussion 
 asterisk-users@lists.digium.com
 Sent: Wednesday, May 21, 2008 3:02:07 PM
 Subject: Re: [asterisk-users] Asterisk Database Handling

 Douglas Garstang wrote:

  We are sending CDR's to MySQL via odbc. It seems that Asterisk is
  sometimes dropping CDR's, and they aren't being sent to the database
  (they ARE in the Master.csv file though). We suspect that when the 
 MySQL
  socket is idle, it gets disconnected, either by the MySQL server or by
  our firewall, and when Asterisk goes to send the next CDR over the
  socket, does not re-open the database, and drops that CDR. Possibly on
  the next call, it connects ok and sends the next CDR.

 Isn't there a keepalive option somewhere for cdr_mysql.conf, or failing
 that, a keepalive mechanism that can be enabled for TCP connections on
 the server side?

 -- 
 Alex Balashov
 Evariste Systems
 Web: http://www.evaristesys.com/
 Tel: (+1) (678) 954-0670
 Direct : (+1) (678) 954-0671
 Mobile : (+1) (706) 338-8599

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

 

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
I personally can tell you I've never had a problem with either the 
PostgreSQL or MySQL cdr apps themselves losing records. However, I can't 
say personally how well the ODBC method works. I'll just stick to saying 
that if you're considering using the cdr_mysql addon, I would highly 
suggest it as I've used it with MUCH success on high load servers.

Sherwood McGowan

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Steve Totaro
On Wed, May 21, 2008 at 6:42 PM, Douglas Garstang [EMAIL PROTECTED] wrote:

 So... surely this must be a general problem with ANY Asterisk module that
 uses the database. Do all modules use the same common database code or do
 they all use their own? If they all use their own, I guess idle database
 connection issues may be fixed in some modules and not others. If it's
 common Asterisk database code, is it all fixed in a newer version? Is it
 fixed in Asterisk 1.4?

 Thanks,
 Doug.


I have no answer, just a potential work around if you get no good answers.

I guess you could just pipe the master.csv into your database (similar
to how queuemetrics does queue_log)

 Are you saying this is a known problem?



Not at all, just offering a workaround.  If your master.csv is
complete and correct then it makes sense to use that data unless
someone can identify your problem and offer a fix.

Thanks,
Steve Totaro

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Alex Balashov
Sherwood McGowan wrote:

 I personally can tell you I've never had a problem with either the 
 PostgreSQL or MySQL cdr apps themselves losing records. However, I can't 
 say personally how well the ODBC method works. I'll just stick to saying 
 that if you're considering using the cdr_mysql addon, I would highly 
 suggest it as I've used it with MUCH success on high load servers.

I would tend to strongly concur here.

ODBC is nice, but it's not nearly as well-supported or mature as the 
native database interfaces.  Doesn't mean it works badly, just that I 
have lower expectations for it than I do for cdr_{nativeDB}.

-- 
Alex Balashov
Evariste Systems
Web: http://www.evaristesys.com/
Tel: (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Douglas Garstang
I personally can tell you I've never had a problem with either the 

PostgreSQL or MySQL cdr apps themselves losing records. However, I can't 
say personally how well the ODBC method works. I'll just stick to saying 
that if you're considering using the cdr_mysql addon, I would highly 
suggest it as I've used it with MUCH success on high load servers.

It's interesting you say that Sherwood. Does your MySQL server have some sort 
of keep alive setting? I suspect this is a general problem that would affect 
any and all Asterisk database connectivity.

Doug.


  ___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Steve Totaro
On Wed, May 21, 2008 at 7:00 PM, Douglas Garstang [EMAIL PROTECTED] wrote:
I personally can tell you I've never had a problem with either the
PostgreSQL or MySQL cdr apps themselves losing records. However, I can't
say personally how well the ODBC method works. I'll just stick to saying
that if you're considering using the cdr_mysql addon, I would highly
suggest it as I've used it with MUCH success on high load servers.

 It's interesting you say that Sherwood. Does your MySQL server have some
 sort of keep alive setting? I suspect this is a general problem that would
 affect any and all Asterisk database connectivity.

 Doug.


A quote from Tilghman Lesher from a previous post.

That's fine, but I have had the most horrid results using any distribution-
supplied ODBC drivers.  The best results are obtained by source-compiling
the latest ODBC drivers, whether they be the MySQL ODBC Connector 3.51 or
PsqlODBC.  UnixODBC is fairly safe to use from distribution channels, however.

Thanks,
Steve Totaro

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Alex Balashov
Douglas Garstang wrote:

 It's interesting you say that Sherwood. Does your MySQL server have some 
 sort of keep alive setting? I suspect this is a general problem that 
 would affect any and all Asterisk database connectivity.

I would actually expect it to affect only specific types of database 
connections.

While there may exist in the source code a general database abstraction 
layer, it would only be a wrapper for interfaces to particular databases 
implemented using native APIs elsewhere in the code (i.e. the MySQL 
protocol, the Postgres protocol, the ODBC interchange protocol, etc.)


-- 
Alex Balashov
Evariste Systems
Web: http://www.evaristesys.com/
Tel: (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Douglas Garstang
I personally can tell you I've never had a problem with either the 

PostgreSQL or MySQL cdr apps themselves losing records. However, I can't 
say personally how well the ODBC method works. I'll just stick to saying 
that if you're considering using the cdr_mysql addon, I would highly 
suggest it as I've used it with MUCH success on high load servers.

Oh... Also... does your system have idle periods? You said your servers where 
under high load. The issue seems to be that Asterisk does not re-establish the 
database connection after it is disconnected do to being idle. If you don't 
have idle periods, you'd never see this problem anyway. 



  ___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Douglas Garstang
Not at all, just offering a workaround.  If your master.csv is

complete and correct then it makes sense to use that data unless
someone can identify your problem and offer a fix.

Unfortunately, not really feesible. I didn't design the system but we are using 
CDR's not only for billing purposes, but also to keep state on users. The state 
info (in a call, not in a call etc) needs to be updated in as close to real 
time as possible. Files won't do it.


  ___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Steve Totaro
On Wed, May 21, 2008 at 7:11 PM, Douglas Garstang [EMAIL PROTECTED] wrote:
Not at all, just offering a workaround.  If your master.csv is
complete and correct then it makes sense to use that data unless
someone can identify your problem and offer a fix.

 Unfortunately, not really feesible. I didn't design the system but we are
 using CDR's not only for billing purposes, but also to keep state on users.
 The state info (in a call, not in a call etc) needs to be updated in as
 close to real time as possible. Files won't do it.



A named pipe would write in realtime but if broken would cause big problems.

http://www.mail-archive.com/asterisk-users@lists.digium.com/msg203863.html

This thread may be of help.

Thanks,
Steve Totaro

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Alex Balashov
Douglas Garstang wrote:
  Not at all, just offering a workaround.  If your master.csv is
  complete and correct then it makes sense to use that data unless
  someone can identify your problem and offer a fix.
 
 Unfortunately, not really feesible. I didn't design the system but we 
 are using CDR's not only for billing purposes, but also to keep state on 
 users. The state info (in a call, not in a call etc) needs to be updated 
 in as close to real time as possible. Files won't do it.

The Manager API can get that information out for you in even more 
real-time, although I've had some problems with its accuracy (vide 
disconnect events, etc).

But, I agree, it's easier to just get the CDRs working.  :-)


-- 
Alex Balashov
Evariste Systems
Web: http://www.evaristesys.com/
Tel: (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Sherwood McGowan
Douglas Garstang wrote:
 I personally can tell you I've never had a problem with either the
 PostgreSQL or MySQL cdr apps themselves losing records. However, I can't
 say personally how well the ODBC method works. I'll just stick to saying
 that if you're considering using the cdr_mysql addon, I would highly
 suggest it as I've used it with MUCH success on high load servers.

 Oh... Also... does your system have idle periods?
oh and yes, overnight there is NO load or next to no load on our server 
at my current project, but in the morning nothing needs to be done to 
have the pgsql cdrs work just fine.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Sherwood McGowan
Douglas Garstang wrote:
 I personally can tell you I've never had a problem with either the
 PostgreSQL or MySQL cdr apps themselves losing records. However, I can't
 say personally how well the ODBC method works. I'll just stick to saying
 that if you're considering using the cdr_mysql addon, I would highly
 suggest it as I've used it with MUCH success on high load servers.

 Oh... Also... does your system have idle periods? You said your 
 servers where under high load. The issue seems to be that Asterisk 
 does not re-establish the database connection after it is disconnected 
 do to being idle. If you don't have idle periods, you'd never see this 
 problem anyway.

 

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
True, I should have also mentioned that I have used it on low load 
testing servers and it did not have a problem with reconnecting. Like I 
said, I haven't used the ODBC method, but the cdr_mysql addon 
reconnected for me. Currently, however, I'm operating a high load (1K 
calls per hour or more) server with cdr_pgsql with no keep alive, but as 
far as I remember I never had to institute a keep_alive of any sort on 
my other servers. However, don't take this as gold, it's been more than 
6 months since I worked with a low load server.

Sherwood McGowan

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Tilghman Lesher
On Wednesday 21 May 2008 17:02:07 Alex Balashov wrote:
 Douglas Garstang wrote:
  We are sending CDR's to MySQL via odbc. It seems that Asterisk is
  sometimes dropping CDR's, and they aren't being sent to the database
  (they ARE in the Master.csv file though). We suspect that when the MySQL
  socket is idle, it gets disconnected, either by the MySQL server or by
  our firewall, and when Asterisk goes to send the next CDR over the
  socket, does not re-open the database, and drops that CDR. Possibly on
  the next call, it connects ok and sends the next CDR.

 Isn't there a keepalive option somewhere for cdr_mysql.conf, or failing
 that, a keepalive mechanism that can be enabled for TCP connections on
 the server side?

Please check the 'idlecheck' option in res_odbc.conf.

-- 
Tilghman

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Tilghman Lesher
On Wednesday 21 May 2008 17:52:45 Alex Balashov wrote:
 Sherwood McGowan wrote:
  I personally can tell you I've never had a problem with either the
  PostgreSQL or MySQL cdr apps themselves losing records. However, I can't
  say personally how well the ODBC method works. I'll just stick to saying
  that if you're considering using the cdr_mysql addon, I would highly
  suggest it as I've used it with MUCH success on high load servers.

 I would tend to strongly concur here.

 ODBC is nice, but it's not nearly as well-supported or mature as the
 native database interfaces.  Doesn't mean it works badly, just that I
 have lower expectations for it than I do for cdr_{nativeDB}.

Most of the CDR backends suck.  The ODBC backend has gotten a
complete workover in 1.6, though.  The adaptive ODBC CDR backend
should make it easier to log anything that people might want in their
CDRs.

-- 
Tilghman

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Douglas Garstang
Looks like an Asterisk 1.4 option?


- Original Message 
From: Tilghman Lesher [EMAIL PROTECTED]
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com
Sent: Wednesday, May 21, 2008 4:39:24 PM
Subject: Re: [asterisk-users] Asterisk Database Handling

On Wednesday 21 May 2008 17:02:07 Alex Balashov wrote:
 Douglas Garstang wrote:
  We are sending CDR's to MySQL via odbc. It seems that Asterisk is
  sometimes dropping CDR's, and they aren't being sent to the database
  (they ARE in the Master.csv file though). We suspect that when the MySQL
  socket is idle, it gets disconnected, either by the MySQL server or by
  our firewall, and when Asterisk goes to send the next CDR over the
  socket, does not re-open the database, and drops that CDR. Possibly on
  the next call, it connects ok and sends the next CDR.

 Isn't there a keepalive option somewhere for cdr_mysql.conf, or failing
 that, a keepalive mechanism that can be enabled for TCP connections on
 the server side?

Please check the 'idlecheck' option in res_odbc.conf.

-- 
Tilghman

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users



  ___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Tilghman Lesher
On Wednesday 21 May 2008 19:03:25 Douglas Garstang wrote:
 On Wednesday, May 21, 2008 4:39:24 PM, Tilghman Lesher wrote: 
  On Wednesday 21 May 2008 17:02:07 Alex Balashov wrote:
   Douglas Garstang wrote:
We are sending CDR's to MySQL via odbc. It seems that Asterisk is
sometimes dropping CDR's, and they aren't being sent to the database
(they ARE in the Master.csv file though). We suspect that when the
MySQL socket is idle, it gets disconnected, either by the MySQL
server or by our firewall, and when Asterisk goes to send the next
CDR over the socket, does not re-open the database, and drops that
CDR. Possibly on the next call, it connects ok and sends the next
CDR.
  
   Isn't there a keepalive option somewhere for cdr_mysql.conf, or failing
   that, a keepalive mechanism that can be enabled for TCP connections on
   the server side?
 
  Please check the 'idlecheck' option in res_odbc.conf.

 Looks like an Asterisk 1.4 option?

Correct; it's actually a workaround for a bug in the MySQL drivers.  It was
discovered long after 1.2 was end-of-lifed.

-- 
Tilghman

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Steve Prior


Tilghman Lesher wrote:
 Correct; it's actually a workaround for a bug in the MySQL drivers.  It was
 discovered long after 1.2 was end-of-lifed.
 

I got bit by MySQL reconnects on some other software I wrote I think when I 
jumped from MySQL 4.* to 5.*.  If memory serves, here is the relevant info from 
the official MySQL documentation:

From: http://dev.mysql.com/doc/refman/5.0/en/upgrading-from-4-1.html

The reconnect flag in the MYSQL structure is set to 0 by mysql_real_connect(). 
Only those client programs which did not explicitly set this flag to 0 or 1 
after mysql_real_connect()  experience a change. Having automatic reconnection 
enabled by default was considered too dangerous (due to the fact that table 
locks, temporary tables, user variables, and session variables are lost after 
reconnection).


This may explain why this is happening in Asterisk.  In the case of my other 
code the answer was not to keep a long term connection through idle periods.

Steve

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Tilghman Lesher
On Wednesday 21 May 2008 19:36:11 Steve Prior wrote:
 Tilghman Lesher wrote:
  Correct; it's actually a workaround for a bug in the MySQL drivers.  It
  was discovered long after 1.2 was end-of-lifed.

 I got bit by MySQL reconnects on some other software I wrote I think when I
 jumped from MySQL 4.* to 5.*.  If memory serves, here is the relevant info
 from the official MySQL documentation:

 From: http://dev.mysql.com/doc/refman/5.0/en/upgrading-from-4-1.html

 The reconnect flag in the MYSQL structure is set to 0 by
 mysql_real_connect(). Only those client programs which did not explicitly
 set this flag to 0 or 1 after mysql_real_connect()  experience a change.
 Having automatic reconnection enabled by default was considered too
 dangerous (due to the fact that table locks, temporary tables, user
 variables, and session variables are lost after reconnection).


 This may explain why this is happening in Asterisk.  In the case of my
 other code the answer was not to keep a long term connection through idle
 periods.

No, actually, we're using that flag to try to get automatic reconnection, and
we're getting a segmentation fault from the MySQL drivers.  It would be one
thing if queries simply failed, but that's not the case.  Note also that we're
not only not using any of those items which could be lost after a
reconnection, we're actually re-preparing the statement handle after each
reconnect.

However, once I added the idlecheck timeout, I have yet to have gotten the
segmentation fault related to this MySQL driver bug.

Interestingly, the segfault only happens on the second statement run after
a reconnect, which leads me to believe that there is some shared structure
which is getting properly reallocated in one place, leaving a stale handle to
another, which when dereferenced causes the segmentation fault.  However,
not being familiar with the driver code, I haven't gone any further in trying
to track this bug down.

-- 
Tilghman

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Database Handling

2008-05-21 Thread Sherwood McGowan
Steve Prior wrote:
 Tilghman Lesher wrote:
   
 Correct; it's actually a workaround for a bug in the MySQL drivers.  It was
 discovered long after 1.2 was end-of-lifed.

 

 I got bit by MySQL reconnects on some other software I wrote I think when I 
 jumped from MySQL 4.* to 5.*.  If memory serves, here is the relevant info 
 from 
 the official MySQL documentation:

 From: http://dev.mysql.com/doc/refman/5.0/en/upgrading-from-4-1.html

 The reconnect flag in the MYSQL structure is set to 0 by 
 mysql_real_connect(). 
 Only those client programs which did not explicitly set this flag to 0 or 1 
 after mysql_real_connect()  experience a change. Having automatic 
 reconnection 
 enabled by default was considered too dangerous (due to the fact that table 
 locks, temporary tables, user variables, and session variables are lost after 
 reconnection).


 This may explain why this is happening in Asterisk.  In the case of my other 
 code the answer was not to keep a long term connection through idle periods.

 Steve

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
   
That's probably why I've never had timeout issues, I use 
asterisk-addons-1.4 when I do use cdr_mysql and I think at one point 
there WAS a problem, but there was a published fix from the 
mysql_connect vs mysql_real_connect issue

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [asterisk-users] asterisk database

2006-07-21 Thread Douglas Garstang
When you find out, let us know, because it isn't documented anywhere! We had to 
drop ARA because it's behaviour was very unpredictable. 

-Original Message- 
From: unplug [mailto:[EMAIL PROTECTED] 
Sent: Thu 7/20/2006 7:49 PM 
To: Asterisk Users Mailing List - Non-Commercial Discussion 
Cc: 
Subject: Re: [asterisk-users] asterisk database



As I see in ast DB, there are register information about every UA
(external IP, port and internal IP, port in NAT mode).  In ARA, there
is only external IP, port stored.  In such case, when there is a call
coming to an UA, asterisk will look for the ARA to get the external
IP,port and then look for ast DB to get the internal ip, port of the
UA in NAT mode to construct a channel.  Am I right?


On 7/21/06, Russell Bryant [EMAIL PROTECTED] wrote:


 The Asterisk database is not accessed on every single SIP message.  
Information about registrations is stored there, though.

 There is currently no way to replace the internal Asterisk database.

 --
 Russell Bryant
 Software Developer
 Digium, Inc.

 ___
 --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

___
--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


___
--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


Re: [asterisk-users] asterisk database

2006-07-21 Thread unplug

Do you mean to drop AST DB?  It is what I found in my previous mail.

NAT enabled
Register method:
1. log external IP and port in ARA DB
2. log external IP and port, internal IP and port in AST DB

invite (out bound) method:
1. construct a invite message using AST, (not sure it will involve ARA).

invite (in bound) method:
1. look for the external IP and port in ARA
2. look for the internal IP and port in AST based on the external IP
and port found in step 1
3. contact the UA

Any comment?

On 7/21/06, Douglas Garstang [EMAIL PROTECTED] wrote:

When you find out, let us know, because it isn't documented anywhere! We had to 
drop ARA because it's behaviour was very unpredictable.

-Original Message-
From: unplug [mailto:[EMAIL PROTECTED]
Sent: Thu 7/20/2006 7:49 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Cc:
Subject: Re: [asterisk-users] asterisk database



As I see in ast DB, there are register information about every UA
(external IP, port and internal IP, port in NAT mode).  In ARA, there
is only external IP, port stored.  In such case, when there is a call
coming to an UA, asterisk will look for the ARA to get the external
IP,port and then look for ast DB to get the internal ip, port of the
UA in NAT mode to construct a channel.  Am I right?


On 7/21/06, Russell Bryant [EMAIL PROTECTED] wrote:


 The Asterisk database is not accessed on every single SIP message.  
Information about registrations is stored there, though.

 There is currently no way to replace the internal Asterisk database.

 --
 Russell Bryant
 Software Developer
 Digium, Inc.

 ___
 --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

___
--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



___
--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




___
--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


[asterisk-users] asterisk database

2006-07-20 Thread unplug

Hi,
Does asterisk will reference to asterisk database in every action
(register, invite, ...)?  Can I use ARA to replace asterisk database
totally?  How?
___
--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


Re: [asterisk-users] asterisk database

2006-07-20 Thread Russell Bryant

- unplug [EMAIL PROTECTED] wrote:
 Does asterisk will reference to asterisk database in every action
 (register, invite, ...)?  Can I use ARA to replace asterisk database
 totally?  How?

The Asterisk database is not accessed on every single SIP message.  Information 
about registrations is stored there, though.

There is currently no way to replace the internal Asterisk database.

-- 
Russell Bryant
Software Developer
Digium, Inc.

___
--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


Re: [asterisk-users] asterisk database

2006-07-20 Thread unplug

As I see in ast DB, there are register information about every UA
(external IP, port and internal IP, port in NAT mode).  In ARA, there
is only external IP, port stored.  In such case, when there is a call
coming to an UA, asterisk will look for the ARA to get the external
IP,port and then look for ast DB to get the internal ip, port of the
UA in NAT mode to construct a channel.  Am I right?


On 7/21/06, Russell Bryant [EMAIL PROTECTED] wrote:



The Asterisk database is not accessed on every single SIP message.  Information 
about registrations is stored there, though.

There is currently no way to replace the internal Asterisk database.

--
Russell Bryant
Software Developer
Digium, Inc.

___
--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


___
--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


[asterisk-users] Asterisk Database

2006-07-13 Thread Tomislav Parčina
Hi list!

I'm planning do use LookupCIDName application. TO use it I need to input CID 
data to internal asterisk DB. Question is, how much data can I store to 
Asterisk DB? Is there any maximum? Does outing to much (how much is too much?) 
data in DB effects work of * in any way?

Please share your experience.


--
Tomislav Parčina
Lama Computers Split
Stinice 12, 21000 Split
Tel.: +385(21)495148
Mob.: +385(91)1212148
SIP: [EMAIL PROTECTED]
e-mail: tparcina#lama.hr
http://www.lama.hr
___
--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


Re: [asterisk-users] Asterisk Database

2006-07-13 Thread William Piper
Why not use mysql?Do something like this: exten = s,1,MYSQL(SELECT * FROM whatever)bpOn 7/13/06, 
Tomislav Parčina [EMAIL PROTECTED] wrote:
Hi list!I'm planning do use LookupCIDName application. TO use it I need to input CID data to internal asterisk DB. Question is, how much data can I store to Asterisk DB? Is there any maximum? Does outing to much (how much is too much?) data in DB effects work of * in any way?
Please share your experience.--Tomislav ParčinaLama Computers SplitStinice 12, 21000 SplitTel.: +385(21)495148Mob.: +385(91)1212148SIP: [EMAIL PROTECTED]
e-mail: tparcina#lama.hrhttp://www.lama.hr___--Bandwidth and Colocation provided by Easynews.com
 --asterisk-users mailing listTo UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users

___
--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


[Asterisk-Users] Asterisk Database

2004-06-23 Thread Senad Jordanovic
Anyone know is there a limition on size of asterisk database...


___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] Asterisk Database

2004-05-28 Thread Ed Devine
I'd like to be able to add additional fields to the the Asterisk
database. I'm using Mysql for most of my data lookup and manipulation,
and it seems to work pretty well. In keeping with what I know how to do,
it would be very handy to be able to insert say a call forward number
into a customer record. That way, I could automatically route calls to
extensions to a forwarded number. Any suggestions on how this can be
done?

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Asterisk Database

2004-05-28 Thread Fran Boon
On Fri, 2004-05-28 at 16:10, Ed Devine wrote:
 I'd like to be able to add additional fields to the the Asterisk
 database. I'm using Mysql for most of my data lookup and manipulation,
 and it seems to work pretty well. In keeping with what I know how to do,
 it would be very handy to be able to insert say a call forward number
 into a customer record. That way, I could automatically route calls to
 extensions to a forwarded number. Any suggestions on how this can be
 done?

http://voip-info.org/wiki-Asterisk+configuration+from+database
I use method 2 to #include sections into my user configs  dialplan

I complement this with app_dbodbc to do lookups in my dial macro:
http://voip-info.org/wiki-Asterisk+app_dbodbc

Dial macro then ensures that users' original voicemail is accessed if
the fwd'd extension is busy.

F

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] asterisk database support

2004-04-17 Thread gaillac harry
Hello,

Is it possible to use a database for provisionning sip clients?

CVS provides sip-friends.sql in order to create tables (not database)
what may i do with that tables?

Regards

Harry

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] asterisk database support

2004-04-17 Thread Brancaleoni Matteo
I hear some echo there  :)

simply, you can define sip friends from a database.
just create the table, enable SIP_FRIENDS into channels
Makefile and read chan_sip.c how to set
db access (db access data must be into sip.conf)

but, firstofall, you must be familiar with sip.conf
and friends/user/peer definition in order to understand
how it works...

matteo

Il sab, 2004-04-17 alle 17:21, gaillac harry ha scritto:
 Hello,
 
 Is it possible to use a database for provisionning sip clients?
 
 CVS provides sip-friends.sql in order to create tables (not database)
 what may i do with that tables?
 
 Regards
 
 Harry
 
 ___
 Asterisk-Users mailing list
 [EMAIL PROTECTED]
 http://lists.digium.com/mailman/listinfo/asterisk-users
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
Brancaleoni Matteo [EMAIL PROTECTED]
Espia - Emmegi Srl

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] asterisk database support

2004-04-17 Thread gaillac harry
Sorry for echo I just wait for a reply :)

I looked at Voip-info but does a GUI is provided to insert datas in
tables ???


Le sam 17/04/2004 à 17:36, Brancaleoni Matteo a écrit :
 I hear some echo there  :)
 
 simply, you can define sip friends from a database.
 just create the table, enable SIP_FRIENDS into channels
 Makefile and read chan_sip.c how to set
 db access (db access data must be into sip.conf)
 
 but, firstofall, you must be familiar with sip.conf
 and friends/user/peer definition in order to understand
 how it works...
 
 matteo
 
 Il sab, 2004-04-17 alle 17:21, gaillac harry ha scritto:
  Hello,
  
  Is it possible to use a database for provisionning sip clients?
  
  CVS provides sip-friends.sql in order to create tables (not database)
  what may i do with that tables?
  
  Regards
  
  Harry
  
  ___
  Asterisk-Users mailing list
  [EMAIL PROTECTED]
  http://lists.digium.com/mailman/listinfo/asterisk-users
  To UNSUBSCRIBE or update options visit:
 http://lists.digium.com/mailman/listinfo/asterisk-users

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users