Re: [asterisk-users] mysql phonebook

2016-09-15 Thread A J Stiles
On Thursday 15 Sep 2016, tux john wrote:
> hi. i am running asterisk 11 and i am using astdb to store all my contacts
> and their numbers. so everytime they call me, i can see their name on the
> screen of the phone. i am making use of the following to retrieve the name
> from the astdb exten =>
> WhatEverIsMyDID,1,Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})})
> exten => WhatEverIsMyDID,n,Answer()
>  
> in the same machine i have mysql. i would like to make use of mysql to
> store and retrieve phonebook as well create blacklist of numbers. i
> thought of creating 2 databases
> -phonebook, will contain name, number
> -blacklist, will contain name, number
>  
> once i update all the database fiels how can i see the names whenever
> someone calls? regarding the blacklist, i would like to send them to hear
> a sound (eg tt-monkeys) or simply hangup. 

Write an AGI script that expects a phone number as its parameter, performs a 
database lookup on the number and sets some channel variables with the 
caller's name and whether or not they are blacklisted.  You probably need only 
one table, really; use VARCHAR() fields for the number and name and something 
like a TINYINT(1) for indicating whether or not the number is blacklisted.  
After the script exits, the dialplan will see any variables it set.  So you 
can do something like this;

exten => s,1,Set(from=${CALLERID(num)})
exten => s,n,(Incoming call from ${from})
exten => s,n,AGI(lookup_caller.agi,${from})
; /var/lib/asterisk/agi-bin/lookup_caller.agi sets variables `blocked` to true
; if the caller is blocked, and `callername` to the caller's name
exten => s,n,GotoIf(${blocked}?unwelcome:permitted)
exten => s,n(permitted),NoOp(This call is allowed)
exten => s,n,Set(CALLERID(name)=${callername})
; we can maybe do something else funky with callername here
exten => s,n,Dial(${ALL_EXTS})
exten => s,n,Hangup()
; tell unwanted callers where to stick that phone
exten => s,n(unwelcome),MP3player(/songs/kevin_bloody_wilson/dicktaphone.mp3)
exten => s,n,Hangup()


I used some simple example code to implement a little daemon on users' 
workstations; which listened on a UDP port, and created system notifications 
informing the user of an incoming call.  As this was all on the inside of a 
firewall, I also included the capability to open up a web page.  The AGI script 
was able not only to notified the workstation adjacent to the phone of the 
incoming call; but if the number was recognised as belonging to a user within 
our system, would bring up their details on screen  (all the work was done 
through a custom web application).

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] mysql phonebook

2016-09-15 Thread Doug Lytle
I do this.  I connect back to the mysql server via odbc, and as you, I have two 
databases for this, one called blacklisted and the other called speeddials.

My dialplan code below:


exten => _5X,1,Answer()
exten => _5X,n,Gosub(check_blacklist,s,1)
exten => _5X,n,Gosub(get_callerid,s,1)


[check_blacklist]

exten => s,1,GotoIf($["${CALLERID(number)}" = "" ]?2:3)
exten => s,n,Set(CALLERID(all)=Restricted <0>)
exten => s,n,Set(ARRAY(flag,note)=${ODBC_BLACKLIST(${CALLERID(number)})})
exten => s,n,GotoIf($["${flag}" = "YES"]?blacklisted,s,1)
exten => s,n,NoOP(Caller not blacklisted)
exten => s,n,Return

[blacklisted]

exten => s,1,NoOP(Caller: ${CALLERID(number)} is on the black list)
exten => s,n,NoOP(NOTE: ${note})
exten => s,n,Set(CDR(userfield)=Blacklisted)
exten => s,n,Zapateller(answer)
exten => s,n,Hangup(2)


The ODBC query is:

[BLACKLIST]
dsn=MySQL-blacklisted
readsql=SELECT flag, note FROM [putyourdatabasenamehere] WHERE 
phone=${SQL_ESC("${ARG1}")}


[get_callerid]

exten => 
s,1,Set(ARRAY(speed.dial,speed.name)=${ODBC_GET_CALLERID(${CALLERID(num)})})
exten => s,n,Set(CALLERID(name)=${speed.name})
exten => s,n,Return()

The ODBC query is:

[GET_CALLERID]
dsn=MySQL-speeddials
readsql=SELECT phone, name, code FROM [putyourdatabasenamehere] WHERE phone = 
${ARG2}

Doug

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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


[asterisk-users] mysql phonebook

2016-09-15 Thread tux john
hi. i am running asterisk 11 and i am using astdb to store all my contacts and their numbers. so everytime they call me, i can see their name on the screen of the phone.
 i am making use of the following to retrieve the name from the astdb

exten => WhatEverIsMyDID,1,Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})})
exten => WhatEverIsMyDID,n,Answer()

 

in the same machine i have mysql. i would like to make use of mysql to store and retrieve phonebook as well create blacklist of numbers.

i thought of creating 2 databases

-phonebook, will contain name, number

-blacklist, will contain name, number

 

once i update all the database fiels how can i see the names whenever someone calls?

regarding the blacklist, i would like to send them to hear a sound (eg tt-monkeys) or simply hangup.

 

Some advice please?

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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Mysql PJSIP realtime > 13.10?

2016-09-12 Thread George Joseph
On Mon, Sep 12, 2016 at 3:51 PM, Carlos Chavez 
wrote:

> On 9/12/16 4:21 PM, George Joseph wrote:
>
>
>
> On Mon, Sep 12, 2016 at 3:01 PM, Carlos Chavez 
> wrote:
>
>> On 9/12/16 3:39 PM, George Joseph wrote:
>>
>>
>>
>> On Mon, Sep 12, 2016 at 2:31 PM, George Joseph 
>> wrote:
>>
>>>
>>>
>>> On Mon, Sep 12, 2016 at 2:14 PM, Carlos Chavez 
>>> wrote:
>>>
 Has anyone successfully used Mysql realtime PJSIP with Asterisk
 13.11?  I have tried 13.11, 13.11.1 and 13.11.2 but I always get the
 following error now:

 Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 require_mysql:
 Realtime table general@ps_contacts: column 'qualify_timeout' cannot be
 type 'int(10)' (need char)
 [Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162
 require_mysql: Realtime table general@ps_contacts: column
 'expiration_time' cannot be type 'bigint(20)' (need char)
 [Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1246
 require_mysql: Possibly unsupported column type 'enum('yes','no')' on
 column 'authenticate_qualify'
 [Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162
 require_mysql: Realtime table general@ps_contacts: column 'via_port'
 cannot be type 'int(11)' (need char)
 [Sep 12 14:42:35] ERROR[24498]: res_pjsip_registrar.c:411
 register_aor_core: Unable to bind contact 'sip:2001@192.168.2.165:5060
 ;transport=udp' to AOR '2001'
   == Contact 2001/sip:2001@192.168.2.165:5060;transport=udp has been
 deleted

 Up until 13.10 everything was working despite the warnings about
 field types.  Now my phones will not register.  I can make calls but not
 receive.  All database modifications are done through alembic so they are
 supposed to be up to date.  The only way I can find to solve this issue
 right now is to restore a 13.10 backup for both the database and Asterisk.

>>>
>>> res_config_mysql has been in "extended" support for some time now and
>>> it's possible it just will no longer work.  We only test alembic changes
>>> with postgres or odbc now.  Your best bet is to convert to res_odbc.
>>>
>>
>> Oh yeah, if you really do need res_config_mysql, go ahead and open an
>> issue at issues.asterisk.org and we'll take a look.  Since we don't test
>> with it though, we might not notice if it gets broken again in the future
>> unless someone reports it.
>>
>>
>>
>> I have solved the problem for the moment by changing the ps_contacts
>> table with the "recommendations" res_config_mysql is giving.  I just
>> modified all the fields to varchar and now my phones are registering.
>> Obviously this is not a solution as the database needs to be modified by
>> alembic on future versions and it will keep breaking.
>>
>> I tried to migrate to res_config_odbc about 6 months ago but my
>> Asterisk kept crashing.  I was told that the crashes were due to the
>> version of ODBC distributed by CentOS 7 and that I would have to compile my
>> own to be able to solve the issue.  Has this been solved?  Is the RPM ODBC
>> package included with CentOS 7 still bugged?  I try to avoid using packages
>> not included in the distribution as they make upgrades a pain later on.
>>
>
> Although CentOS7 is still on 2.3.1 for unixodbc, there were changes made
> in 13.10.0 that should prevent the crashes.
> http://lists.digium.com/pipermail/asterisk-dev/2016-June/075582.html
>
>
> Ok, thank you for the help.  I'll be trying out ODBC later today and
> test it for a few days.  You should probably mark res_config_mysql as
> deprecated now since it will not work with anything higher than 13.10 as is.
>
>
I created an issue for it anyway:
https://issues.asterisk.org/jira/browse/ASTERISK-26362


> --
>
> Telecomunicaciones Abiertas de México S.A. de C.V.
> Carlos Chávez
> +52 (55)9116-91161
>
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
>   http://www.asterisk.org/community/astricon-user-conference
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
George Joseph
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
  

Re: [asterisk-users] Mysql PJSIP realtime > 13.10?

2016-09-12 Thread Carlos Chavez

On 9/12/16 4:21 PM, George Joseph wrote:




On Mon, Sep 12, 2016 at 3:01 PM, Carlos Chavez 
> wrote:


On 9/12/16 3:39 PM, George Joseph wrote:




On Mon, Sep 12, 2016 at 2:31 PM, George Joseph
> wrote:



On Mon, Sep 12, 2016 at 2:14 PM, Carlos Chavez
> wrote:

  Has anyone successfully used Mysql realtime PJSIP with
Asterisk 13.11?  I have tried 13.11, 13.11.1 and 13.11.2
but I always get the following error now:

Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162
require_mysql: Realtime table general@ps_contacts: column
'qualify_timeout' cannot be type 'int(10)' (need char)
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162
require_mysql: Realtime table general@ps_contacts: column
'expiration_time' cannot be type 'bigint(20)' (need char)
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1246
require_mysql: Possibly unsupported column type
'enum('yes','no')' on column 'authenticate_qualify'
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162
require_mysql: Realtime table general@ps_contacts: column
'via_port' cannot be type 'int(11)' (need char)
[Sep 12 14:42:35] ERROR[24498]: res_pjsip_registrar.c:411
register_aor_core: Unable to bind contact
'sip:2001@192.168.2.165:5060
;transport=udp' to
AOR '2001'
  == Contact 2001/sip:2001@192.168.2.165
:5060;transport=udp has
been deleted

Up until 13.10 everything was working despite the
warnings about field types.  Now my phones will not
register.  I can make calls but not receive.  All
database modifications are done through alembic so they
are supposed to be up to date.  The only way I can find
to solve this issue right now is to restore a 13.10
backup for both the database and Asterisk.


res_config_mysql has been in "extended" support for some time
now and it's possible it just will no longer work.  We only
test alembic changes with postgres or odbc now. Your best bet
is to convert to res_odbc.


Oh yeah, if you really do need res_config_mysql, go ahead and
open an issue at issues.asterisk.org 
and we'll take a look.  Since we don't test with it though, we
might not notice if it gets broken again in the future unless
someone reports it.



I have solved the problem for the moment by changing the
ps_contacts table with the "recommendations" res_config_mysql is
giving.  I just modified all the fields to varchar and now my
phones are registering.  Obviously this is not a solution as the
database needs to be modified by alembic on future versions and it
will keep breaking.

I tried to migrate to res_config_odbc about 6 months ago but
my Asterisk kept crashing.  I was told that the crashes were due
to the version of ODBC distributed by CentOS 7 and that I would
have to compile my own to be able to solve the issue.  Has this
been solved?  Is the RPM ODBC package included with CentOS 7 still
bugged?  I try to avoid using packages not included in the
distribution as they make upgrades a pain later on.


Although CentOS7 is still on 2.3.1 for unixodbc, there were changes 
made in 13.10.0 that should prevent the crashes.

http://lists.digium.com/pipermail/asterisk-dev/2016-June/075582.html


Ok, thank you for the help.  I'll be trying out ODBC later today 
and test it for a few days.  You should probably mark res_config_mysql 
as deprecated now since it will not work with anything higher than 13.10 
as is.



--


Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez
+52 (55)9116-91161

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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Mysql PJSIP realtime > 13.10?

2016-09-12 Thread George Joseph
On Mon, Sep 12, 2016 at 3:01 PM, Carlos Chavez 
wrote:

> On 9/12/16 3:39 PM, George Joseph wrote:
>
>
>
> On Mon, Sep 12, 2016 at 2:31 PM, George Joseph  wrote:
>
>>
>>
>> On Mon, Sep 12, 2016 at 2:14 PM, Carlos Chavez 
>> wrote:
>>
>>> Has anyone successfully used Mysql realtime PJSIP with Asterisk
>>> 13.11?  I have tried 13.11, 13.11.1 and 13.11.2 but I always get the
>>> following error now:
>>>
>>> Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 require_mysql:
>>> Realtime table general@ps_contacts: column 'qualify_timeout' cannot be
>>> type 'int(10)' (need char)
>>> [Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 require_mysql:
>>> Realtime table general@ps_contacts: column 'expiration_time' cannot be
>>> type 'bigint(20)' (need char)
>>> [Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1246 require_mysql:
>>> Possibly unsupported column type 'enum('yes','no')' on column
>>> 'authenticate_qualify'
>>> [Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 require_mysql:
>>> Realtime table general@ps_contacts: column 'via_port' cannot be type
>>> 'int(11)' (need char)
>>> [Sep 12 14:42:35] ERROR[24498]: res_pjsip_registrar.c:411
>>> register_aor_core: Unable to bind contact 
>>> 'sip:2001@192.168.2.165:5060;transport=udp'
>>> to AOR '2001'
>>>   == Contact 2001/sip:2001@192.168.2.165:5060;transport=udp has been
>>> deleted
>>>
>>> Up until 13.10 everything was working despite the warnings about
>>> field types.  Now my phones will not register.  I can make calls but not
>>> receive.  All database modifications are done through alembic so they are
>>> supposed to be up to date.  The only way I can find to solve this issue
>>> right now is to restore a 13.10 backup for both the database and Asterisk.
>>>
>>
>> res_config_mysql has been in "extended" support for some time now and
>> it's possible it just will no longer work.  We only test alembic changes
>> with postgres or odbc now.  Your best bet is to convert to res_odbc.
>>
>
> Oh yeah, if you really do need res_config_mysql, go ahead and open an
> issue at issues.asterisk.org and we'll take a look.  Since we don't test
> with it though, we might not notice if it gets broken again in the future
> unless someone reports it.
>
>
>
> I have solved the problem for the moment by changing the ps_contacts
> table with the "recommendations" res_config_mysql is giving.  I just
> modified all the fields to varchar and now my phones are registering.
> Obviously this is not a solution as the database needs to be modified by
> alembic on future versions and it will keep breaking.
>
> I tried to migrate to res_config_odbc about 6 months ago but my
> Asterisk kept crashing.  I was told that the crashes were due to the
> version of ODBC distributed by CentOS 7 and that I would have to compile my
> own to be able to solve the issue.  Has this been solved?  Is the RPM ODBC
> package included with CentOS 7 still bugged?  I try to avoid using packages
> not included in the distribution as they make upgrades a pain later on.
>

Although CentOS7 is still on 2.3.1 for unixodbc, there were changes made in
13.10.0 that should prevent the crashes.
http://lists.digium.com/pipermail/asterisk-dev/2016-June/075582.html




>
> --
> Telecomunicaciones Abiertas de México S.A. de C.V.
> Carlos Chávez
> +52 (55)9116-91161
>
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
>   http://www.asterisk.org/community/astricon-user-conference
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
George Joseph
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Mysql PJSIP realtime > 13.10?

2016-09-12 Thread Annus Fictus

Hello Carlos,

I'm testing CentOS 7 ODBC packages with PJSIP Realtime without problems.

Maybe you use a different configuration?

Regards

El 12/09/2016 a las 16:01, Carlos Chavez escribió:


On 9/12/16 3:39 PM, George Joseph wrote:




On Mon, Sep 12, 2016 at 2:31 PM, George Joseph > wrote:




On Mon, Sep 12, 2016 at 2:14 PM, Carlos Chavez
> wrote:

Has anyone successfully used Mysql realtime PJSIP with
Asterisk 13.11?  I have tried 13.11, 13.11.1 and 13.11.2 but
I always get the following error now:

Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162
require_mysql: Realtime table general@ps_contacts: column
'qualify_timeout' cannot be type 'int(10)' (need char)
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162
require_mysql: Realtime table general@ps_contacts: column
'expiration_time' cannot be type 'bigint(20)' (need char)
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1246
require_mysql: Possibly unsupported column type
'enum('yes','no')' on column 'authenticate_qualify'
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162
require_mysql: Realtime table general@ps_contacts: column
'via_port' cannot be type 'int(11)' (need char)
[Sep 12 14:42:35] ERROR[24498]: res_pjsip_registrar.c:411
register_aor_core: Unable to bind contact
'sip:2001@192.168.2.165:5060
;transport=udp' to AOR '2001'
  == Contact 2001/sip:2001@192.168.2.165
:5060;transport=udp has been
deleted

Up until 13.10 everything was working despite the
warnings about field types.  Now my phones will not
register.  I can make calls but not receive.  All database
modifications are done through alembic so they are supposed
to be up to date.  The only way I can find to solve this
issue right now is to restore a 13.10 backup for both the
database and Asterisk.


res_config_mysql has been in "extended" support for some time now
and it's possible it just will no longer work.  We only test
alembic changes with postgres or odbc now.  Your best bet is to
convert to res_odbc.


Oh yeah, if you really do need res_config_mysql, go ahead and open an 
issue at issues.asterisk.org  and we'll 
take a look.  Since we don't test with it though, we might not notice 
if it gets broken again in the future unless someone reports it.



I have solved the problem for the moment by changing the 
ps_contacts table with the "recommendations" res_config_mysql is 
giving.  I just modified all the fields to varchar and now my phones 
are registering.  Obviously this is not a solution as the database 
needs to be modified by alembic on future versions and it will keep 
breaking.


I tried to migrate to res_config_odbc about 6 months ago but my 
Asterisk kept crashing.  I was told that the crashes were due to the 
version of ODBC distributed by CentOS 7 and that I would have to 
compile my own to be able to solve the issue.  Has this been solved?  
Is the RPM ODBC package included with CentOS 7 still bugged?  I try to 
avoid using packages not included in the distribution as they make 
upgrades a pain later on.

--
Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez
+52 (55)9116-91161




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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Mysql PJSIP realtime > 13.10?

2016-09-12 Thread Carlos Chavez

On 9/12/16 3:39 PM, George Joseph wrote:




On Mon, Sep 12, 2016 at 2:31 PM, George Joseph > wrote:




On Mon, Sep 12, 2016 at 2:14 PM, Carlos Chavez
> wrote:

Has anyone successfully used Mysql realtime PJSIP with
Asterisk 13.11?  I have tried 13.11, 13.11.1 and 13.11.2 but I
always get the following error now:

Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162
require_mysql: Realtime table general@ps_contacts: column
'qualify_timeout' cannot be type 'int(10)' (need char)
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162
require_mysql: Realtime table general@ps_contacts: column
'expiration_time' cannot be type 'bigint(20)' (need char)
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1246
require_mysql: Possibly unsupported column type
'enum('yes','no')' on column 'authenticate_qualify'
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162
require_mysql: Realtime table general@ps_contacts: column
'via_port' cannot be type 'int(11)' (need char)
[Sep 12 14:42:35] ERROR[24498]: res_pjsip_registrar.c:411
register_aor_core: Unable to bind contact
'sip:2001@192.168.2.165:5060
;transport=udp' to AOR '2001'
  == Contact 2001/sip:2001@192.168.2.165
:5060;transport=udp has been
deleted

Up until 13.10 everything was working despite the warnings
about field types.  Now my phones will not register.  I can
make calls but not receive.  All database modifications are
done through alembic so they are supposed to be up to date. 
The only way I can find to solve this issue right now is to

restore a 13.10 backup for both the database and Asterisk.


res_config_mysql has been in "extended" support for some time now
and it's possible it just will no longer work.  We only test
alembic changes with postgres or odbc now.  Your best bet is to
convert to res_odbc.


Oh yeah, if you really do need res_config_mysql, go ahead and open an 
issue at issues.asterisk.org  and we'll 
take a look.  Since we don't test with it though, we might not notice 
if it gets broken again in the future unless someone reports it.



I have solved the problem for the moment by changing the 
ps_contacts table with the "recommendations" res_config_mysql is 
giving.  I just modified all the fields to varchar and now my phones are 
registering.  Obviously this is not a solution as the database needs to 
be modified by alembic on future versions and it will keep breaking.


I tried to migrate to res_config_odbc about 6 months ago but my 
Asterisk kept crashing.  I was told that the crashes were due to the 
version of ODBC distributed by CentOS 7 and that I would have to compile 
my own to be able to solve the issue.  Has this been solved?  Is the RPM 
ODBC package included with CentOS 7 still bugged?  I try to avoid using 
packages not included in the distribution as they make upgrades a pain 
later on.


--
Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez
+52 (55)9116-91161

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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Mysql PJSIP realtime > 13.10?

2016-09-12 Thread Carlos Chavez

On 9/12/16 3:21 PM, Annus Fictus wrote:


Hello,

is there any reason you don't use ODBC with MySQL?

Regards


El 12/09/2016 a las 15:14, Carlos Chavez escribió:
Has anyone successfully used Mysql realtime PJSIP with Asterisk 
13.11?  I have tried 13.11, 13.11.1 and 13.11.2 but I always get the 
following error now:


Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 
require_mysql: Realtime table general@ps_contacts: column 
'qualify_timeout' cannot be type 'int(10)' (need char)
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 
require_mysql: Realtime table general@ps_contacts: column 
'expiration_time' cannot be type 'bigint(20)' (need char)
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1246 
require_mysql: Possibly unsupported column type 'enum('yes','no')' on 
column 'authenticate_qualify'
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 
require_mysql: Realtime table general@ps_contacts: column 'via_port' 
cannot be type 'int(11)' (need char)
[Sep 12 14:42:35] ERROR[24498]: res_pjsip_registrar.c:411 
register_aor_core: Unable to bind contact 
'sip:2001@192.168.2.165:5060;transport=udp' to AOR '2001'
  == Contact 2001/sip:2001@192.168.2.165:5060;transport=udp has been 
deleted


Up until 13.10 everything was working despite the warnings about 
field types.  Now my phones will not register.  I can make calls but 
not receive.  All database modifications are done through alembic so 
they are supposed to be up to date.  The only way I can find to solve 
this issue right now is to restore a 13.10 backup for both the 
database and Asterisk.






Unless you use non packaged odbc on CentOS 7, Asterisk keeps crashing.

--
Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez
+52 (55)9116-91161


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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
 http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Mysql PJSIP realtime > 13.10?

2016-09-12 Thread George Joseph
On Mon, Sep 12, 2016 at 2:31 PM, George Joseph  wrote:

>
>
> On Mon, Sep 12, 2016 at 2:14 PM, Carlos Chavez 
> wrote:
>
>> Has anyone successfully used Mysql realtime PJSIP with Asterisk
>> 13.11?  I have tried 13.11, 13.11.1 and 13.11.2 but I always get the
>> following error now:
>>
>> Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 require_mysql:
>> Realtime table general@ps_contacts: column 'qualify_timeout' cannot be
>> type 'int(10)' (need char)
>> [Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 require_mysql:
>> Realtime table general@ps_contacts: column 'expiration_time' cannot be
>> type 'bigint(20)' (need char)
>> [Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1246 require_mysql:
>> Possibly unsupported column type 'enum('yes','no')' on column
>> 'authenticate_qualify'
>> [Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 require_mysql:
>> Realtime table general@ps_contacts: column 'via_port' cannot be type
>> 'int(11)' (need char)
>> [Sep 12 14:42:35] ERROR[24498]: res_pjsip_registrar.c:411
>> register_aor_core: Unable to bind contact 
>> 'sip:2001@192.168.2.165:5060;transport=udp'
>> to AOR '2001'
>>   == Contact 2001/sip:2001@192.168.2.165:5060;transport=udp has been
>> deleted
>>
>> Up until 13.10 everything was working despite the warnings about
>> field types.  Now my phones will not register.  I can make calls but not
>> receive.  All database modifications are done through alembic so they are
>> supposed to be up to date.  The only way I can find to solve this issue
>> right now is to restore a 13.10 backup for both the database and Asterisk.
>>
>
> res_config_mysql has been in "extended" support for some time now and it's
> possible it just will no longer work.  We only test alembic changes with
> postgres or odbc now.  Your best bet is to convert to res_odbc.
>

Oh yeah, if you really do need res_config_mysql, go ahead and open an issue
at issues.asterisk.org and we'll take a look.  Since we don't test with it
though, we might not notice if it gets broken again in the future unless
someone reports it.



>
>
>>
>> --
>> Telecomunicaciones Abiertas de México S.A. de C.V.
>> Carlos Chávez
>> +52 (55)9116-91161
>>
>>
>> --
>> _
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
>>  http://www.asterisk.org/community/astricon-user-conference
>>
>> New to Asterisk? Start here:
>>  https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
>
>
> --
> George Joseph
> Digium, Inc. | Software Developer
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
> Check us out at: www.digium.com & www.asterisk.org
>
>


-- 
George Joseph
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Mysql PJSIP realtime > 13.10?

2016-09-12 Thread George Joseph
On Mon, Sep 12, 2016 at 2:14 PM, Carlos Chavez 
wrote:

> Has anyone successfully used Mysql realtime PJSIP with Asterisk
> 13.11?  I have tried 13.11, 13.11.1 and 13.11.2 but I always get the
> following error now:
>
> Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 require_mysql:
> Realtime table general@ps_contacts: column 'qualify_timeout' cannot be
> type 'int(10)' (need char)
> [Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 require_mysql:
> Realtime table general@ps_contacts: column 'expiration_time' cannot be
> type 'bigint(20)' (need char)
> [Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1246 require_mysql:
> Possibly unsupported column type 'enum('yes','no')' on column
> 'authenticate_qualify'
> [Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 require_mysql:
> Realtime table general@ps_contacts: column 'via_port' cannot be type
> 'int(11)' (need char)
> [Sep 12 14:42:35] ERROR[24498]: res_pjsip_registrar.c:411
> register_aor_core: Unable to bind contact 
> 'sip:2001@192.168.2.165:5060;transport=udp'
> to AOR '2001'
>   == Contact 2001/sip:2001@192.168.2.165:5060;transport=udp has been
> deleted
>
> Up until 13.10 everything was working despite the warnings about field
> types.  Now my phones will not register.  I can make calls but not
> receive.  All database modifications are done through alembic so they are
> supposed to be up to date.  The only way I can find to solve this issue
> right now is to restore a 13.10 backup for both the database and Asterisk.
>

res_config_mysql has been in "extended" support for some time now and it's
possible it just will no longer work.  We only test alembic changes with
postgres or odbc now.  Your best bet is to convert to res_odbc.


>
> --
> Telecomunicaciones Abiertas de México S.A. de C.V.
> Carlos Chávez
> +52 (55)9116-91161
>
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
>  http://www.asterisk.org/community/astricon-user-conference
>
> New to Asterisk? Start here:
>  https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users




-- 
George Joseph
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Mysql PJSIP realtime > 13.10?

2016-09-12 Thread Annus Fictus

Hello,

is there any reason you don't use ODBC with MySQL?

Regards


El 12/09/2016 a las 15:14, Carlos Chavez escribió:
Has anyone successfully used Mysql realtime PJSIP with Asterisk 
13.11?  I have tried 13.11, 13.11.1 and 13.11.2 but I always get the 
following error now:


Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 
require_mysql: Realtime table general@ps_contacts: column 
'qualify_timeout' cannot be type 'int(10)' (need char)
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 
require_mysql: Realtime table general@ps_contacts: column 
'expiration_time' cannot be type 'bigint(20)' (need char)
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1246 
require_mysql: Possibly unsupported column type 'enum('yes','no')' on 
column 'authenticate_qualify'
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 
require_mysql: Realtime table general@ps_contacts: column 'via_port' 
cannot be type 'int(11)' (need char)
[Sep 12 14:42:35] ERROR[24498]: res_pjsip_registrar.c:411 
register_aor_core: Unable to bind contact 
'sip:2001@192.168.2.165:5060;transport=udp' to AOR '2001'
  == Contact 2001/sip:2001@192.168.2.165:5060;transport=udp has been 
deleted


Up until 13.10 everything was working despite the warnings about 
field types.  Now my phones will not register.  I can make calls but 
not receive.  All database modifications are done through alembic so 
they are supposed to be up to date.  The only way I can find to solve 
this issue right now is to restore a 13.10 backup for both the 
database and Asterisk.





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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
 http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] Mysql PJSIP realtime > 13.10?

2016-09-12 Thread Carlos Chavez
Has anyone successfully used Mysql realtime PJSIP with Asterisk 
13.11?  I have tried 13.11, 13.11.1 and 13.11.2 but I always get the 
following error now:


Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 require_mysql: 
Realtime table general@ps_contacts: column 'qualify_timeout' cannot be 
type 'int(10)' (need char)
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 require_mysql: 
Realtime table general@ps_contacts: column 'expiration_time' cannot be 
type 'bigint(20)' (need char)
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1246 require_mysql: 
Possibly unsupported column type 'enum('yes','no')' on column 
'authenticate_qualify'
[Sep 12 14:42:35] WARNING[24498]: res_config_mysql.c:1162 require_mysql: 
Realtime table general@ps_contacts: column 'via_port' cannot be type 
'int(11)' (need char)
[Sep 12 14:42:35] ERROR[24498]: res_pjsip_registrar.c:411 
register_aor_core: Unable to bind contact 
'sip:2001@192.168.2.165:5060;transport=udp' to AOR '2001'
  == Contact 2001/sip:2001@192.168.2.165:5060;transport=udp has been 
deleted


Up until 13.10 everything was working despite the warnings about 
field types.  Now my phones will not register.  I can make calls but not 
receive.  All database modifications are done through alembic so they 
are supposed to be up to date.  The only way I can find to solve this 
issue right now is to restore a 13.10 backup for both the database and 
Asterisk.


--
Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez
+52 (55)9116-91161


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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
 http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] mysql CDRs in web based tool

2013-09-26 Thread adamk

but i do not know how to interface the CDRs.
has anyone used this tool or any other similar tool?



how about something like this:

pbx@pbx:~$ grep -v ^; /etc/asterisk/cdr_mysql.conf
[global]
hostname=localhost
dbname=dbname
table=tablename
password=password
user=username
port=3306
sock=/tmp/mysql.sock
timezone=CET ; Previously called usegmtime
[columns]
alias start = calldate

pbx@pbx:~$

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

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


Re: [asterisk-users] mysql CDRs in web based tool

2013-09-26 Thread vortex

Στις 26/9/2013 2:48 μμ, ο/η ad...@3a.hu έγραψε:

but i do not know how to interface the CDRs.
has anyone used this tool or any other similar tool?



how about something like this:

pbx@pbx:~$ grep -v ^; /etc/asterisk/cdr_mysql.conf
[global]
hostname=localhost
dbname=dbname
table=tablename
password=password
user=username
port=3306
sock=/tmp/mysql.sock
timezone=CET ; Previously called usegmtime
[columns]
alias start = calldate

pbx@pbx:~$



It seems nice, but ho do u use it?

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

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

[asterisk-users] mysql CDRs in web based tool

2013-09-25 Thread binary dreamer
Hi. i am running asterisk 11.5.1 in my system (debian squeeze) and i do get
the CDRs through the csv file, that asterisk creates.
i would like to have the CDRs in a nice web based tool and after some
search i have found
http://acdr.com.au/
i do have it installed with all the dependencies (apache, php, mysql), but
i do not know how to interface the CDRs.
has anyone used this tool or any other similar tool?


Sincerely yours,
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] mysql CDRs in web based tool

2013-09-25 Thread Doug Lytle
 but i do not know how to interface the CDRs. has anyone used this tool or 
 any other similar tool? 

It expects your CDR to be located in a mysql database. You'll either need to 
figure out how to import your .csv into mysql, or have Asterisk send the CDR 
directly to the mysql database. 

Doug 

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] mysql CDRs in web based tool

2013-09-25 Thread Bob Kyeyune
i have uploaded two files for you
one is the php script that reads Master.csv  and loads data in the database
you have to change

$locale_db_name = 'databasename';
$locale_db_login = 'user';
$locale_db_pass = 'password';

this how you run the script
php /path/cdrmysql.php /var/log/asterisk/cdr-csv/Master.csv

path is the location where your cdrmysql.php is located


second is the database already truncated for you


hope this helps

Regards.
Kyeyune Bob
VOIP Engineer
+256 774 702 258






On Wed, Sep 25, 2013 at 5:02 PM, Doug Lytle supp...@drdos.info wrote:

  but i do not know how to interface the CDRs.  has anyone used this tool
 or any other similar tool?

 It expects your CDR to be located in a mysql database.  You'll either need
 to figure out how to import your .csv into mysql, or have Asterisk send the
 CDR directly to the mysql database.

 Doug


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

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



database.sql
Description: Binary data
attachment: cdrmysql.php
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] Mysql Support int Asterik-11

2013-07-24 Thread Prashant Abhang


Hi,


I was having question about mysql driver support ( not odbc).

Do we still need the asterisk-add-on to be installed for mysql support.  If 
yes, Which version should be used and from where I should get it?


Thanks in adavance.


Thanks  Regards,
PrashantAbhang--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Mysql Support int Asterik-11

2013-07-24 Thread Thorsten Göllner

Why not use ODBC?

Am 24.07.2013 13:41, schrieb Prashant Abhang:


Hi,

I was having question about mysql driver support ( not odbc).

Do we still need the asterisk-add-on to be installed for mysql 
support.  If yes, Which version should be used and from where I should 
get it?


Thanks in adavance.

Thanks  Regards,
PrashantAbhang


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Mysql Support int Asterik-11

2013-07-24 Thread Prashant Abhang
I have done using odbc.. 

but I was curious to know ..whether it directly possible using mysql so I can 
avoid installation of unixodbc pkg.


 

Thanks  Regards,
PrashantAbhang



 From: Thorsten Göllner t...@ovm-group.com
To: Prashant Abhang abhang_prash...@yahoo.co.in; Asterisk Users Mailing List 
- Non-Commercial Discussion asterisk-users@lists.digium.com 
Sent: Wednesday, 24 July 2013 5:57 PM
Subject: Re: [asterisk-users] Mysql Support int Asterik-11
 


Why not use ODBC?


Am 24.07.2013 13:41, schrieb Prashant Abhang:



Hi,


I was having question about mysql driver support (
not odbc).

Do we still need the asterisk-add-on to be installed
for mysql support.  If yes, Which version should be
used and from where I should get it?



Thanks in adavance.


Thanks  Regards,
PrashantAbhang--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Mysql Support int Asterik-11

2013-07-24 Thread Carlos Rojas
Hi

Asterisk 1.6 and old versions, were using asterisk-addons, since asterisk
1.8 asterisk addon, is included in the asterisk code, you must select it in
menu select.

Kind Regards

Carlos


On Wed, Jul 24, 2013 at 8:36 AM, Prashant Abhang 
abhang_prash...@yahoo.co.in wrote:

 I have done using odbc..

 but I was curious to know ..whether it directly possible using mysql so I
 can avoid installation of unixodbc pkg.



 
 Thanks  Regards,
 Prashant Abhang

   --
  *From:* Thorsten Göllner t...@ovm-group.com
 *To:* Prashant Abhang abhang_prash...@yahoo.co.in; Asterisk Users
 Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com

 *Sent:* Wednesday, 24 July 2013 5:57 PM
 *Subject:* Re: [asterisk-users] Mysql Support int Asterik-11

  Why not use ODBC?

 Am 24.07.2013 13:41, schrieb Prashant Abhang:


  Hi,

 I was having question about mysql driver support ( not odbc).

 Do we still need the asterisk-add-on to be installed for mysql support.
 If yes, Which version should be used and from where I should get it?

  Thanks in adavance.
  
 Thanks  Regards,
 Prashant Abhang





 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL InnoDB or MyISAM for CDR

2012-10-03 Thread Lenz Emilitri
Another option that seems to be very good for handling logs where you write
quite a lot is Cassandra - http://cassandra.apache.org/ - but of course you
lose the SQL layer on top - unless you go for something like
http://blog.mariadb.org/announcing-the-cassandra-storage-engine/

This may not be completely off topic here because you get high data
security / crash protection and parallel cluster writes, so you could
insert tens/hundreds of thousands of events per second on a suitably
dimensioned cluster for an Asterisk server cluster of similar size :)
l.


2012/9/28 Leif Madsen leif.mad...@asteriskdocs.org

 On 27/09/12 11:45 AM, Matt Hamilton wrote:


 Date: Thu, 27 Sep 2012 10:23:35 +0200
 From: lenz.lo...@gmail.com
 To: asterisk-users@lists.digium.com
 Subject: Re: [asterisk-users] MySQL InnoDB or MyISAM for CDR

 I'd go for MyISAM and would set up a remote replica if data integrity is
 important.

 If you have like 1000 calls of (say) 30 seconds avg length, and you
 create 10 events per call, you would expect an event every three seconds.
 This is about 300 inserts per second. Say 600 at peaks. This should be
 feasible with server-grade hardware without much difficulty. Also as you
 always INSERT it behaves as a log file (no seeking, no locking) if the
 table is optimized.
 l.


 We decided to go with MyISAM since it supports concurrent
  inserts (as you suggested). Data integrity (a slight loss of
 call records) is something we can live by. Right now we use DRBD for
 replication, but I guess with MyISAM it doesn't make much sense if the db
 crashes. We are looking into other options as well.


 This may or may not be relevant, but you can also check out
 MySQL/Galera[0] for clustering solutions. Not sure if that gets you closer
 or further from your goal though :)  It uses a modified InnoDB to allow a
 multi-master MySQL cluster.

 I used a chef cookbook to deploy it[1].

 [0] http://www.codership.com/content/using-galera-cluster
 [1]
 http://support.severalnines.com/entries/21453521-opscode-s-chef-mysql-galera-and-clustercontrol


 --
 Leif Madsen
 http://www.oreilly.com/catalog/asterisk


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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




-- 
Loway - home of QueueMetrics - http://queuemetrics.com
Test-drive WombatDialer beta @ http://wombatdialer.com
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL InnoDB or MyISAM for CDR

2012-09-28 Thread Leif Madsen

On 27/09/12 11:45 AM, Matt Hamilton wrote:


Date: Thu, 27 Sep 2012 10:23:35 +0200
From: lenz.lo...@gmail.com
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] MySQL InnoDB or MyISAM for CDR

I'd go for MyISAM and would set up a remote replica if data integrity is 
important.

If you have like 1000 calls of (say) 30 seconds avg length, and you create 10 
events per call, you would expect an event every three seconds. This is about 
300 inserts per second. Say 600 at peaks. This should be feasible with 
server-grade hardware without much difficulty. Also as you always INSERT it 
behaves as a log file (no seeking, no locking) if the table is optimized.
l.


We decided to go with MyISAM since it supports concurrent
 inserts (as you suggested). Data integrity (a slight loss of call 
records) is something we can live by. Right now we use DRBD for replication, 
but I guess with MyISAM it doesn't make much sense if the db crashes. We are 
looking into other options as well.


This may or may not be relevant, but you can also check out 
MySQL/Galera[0] for clustering solutions. Not sure if that gets you 
closer or further from your goal though :)  It uses a modified InnoDB to 
allow a multi-master MySQL cluster.


I used a chef cookbook to deploy it[1].

[0] http://www.codership.com/content/using-galera-cluster
[1] 
http://support.severalnines.com/entries/21453521-opscode-s-chef-mysql-galera-and-clustercontrol



--
Leif Madsen
http://www.oreilly.com/catalog/asterisk

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

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


Re: [asterisk-users] MySQL InnoDB or MyISAM for CDR

2012-09-27 Thread Lenz Emilitri
I'd go for MyISAM and would set up a remote replica if data integrity is
important.

If you have like 1000 calls of (say) 30 seconds avg length, and you create
10 events per call, you would expect an event every three seconds. This is
about 300 inserts per second. Say 600 at peaks. This should be feasible
with server-grade hardware without much difficulty. Also as you always
INSERT it behaves as a log file (no seeking, no locking) if the table is
optimized.
l.


2012/9/26 Matt Hamilton mistral9...@hotmail.com

 Our top priority is the raw Write (INSERT) performance, Read (SELECT)
 performance is not important. Strict ACID compliance is not necessary
 either. MySQL (on a separate database server) should be able to handle
 inserting CDR records (approximately up to 10 records for each call) for
 about 1000 concurrent calls coming from an Asterisk cluster.

 Matt



-- 
Loway - home of QueueMetrics - http://queuemetrics.com
Test-drive WombatDialer beta @ http://wombatdialer.com
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL InnoDB or MyISAM for CDR

2012-09-27 Thread Matt Hamilton

Date: Thu, 27 Sep 2012 10:23:35 +0200
From: lenz.lo...@gmail.com
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] MySQL InnoDB or MyISAM for CDR

I'd go for MyISAM and would set up a remote replica if data integrity is 
important.

If you have like 1000 calls of (say) 30 seconds avg length, and you create 10 
events per call, you would expect an event every three seconds. This is about 
300 inserts per second. Say 600 at peaks. This should be feasible with 
server-grade hardware without much difficulty. Also as you always INSERT it 
behaves as a log file (no seeking, no locking) if the table is optimized.
l.


We decided to go with MyISAM since it supports concurrent
inserts (as you suggested). Data integrity (a slight loss of call 
records) is something we can live by. Right now we use DRBD for replication, 
but I guess with MyISAM it doesn't make much sense if the db crashes. We are 
looking into other options as well.

Thanks.
  --
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL InnoDB or MyISAM for CDR

2012-09-26 Thread A J Stiles
On Tuesday 25 September 2012, Matt Hamilton wrote:
 Which one (InnoDB or MyISAM) is preferred for CDR as far as write
 performance is concerned?
 
 Thanks,
 Matt

MyISAM is faster  (on Linux anyway);  but you'd better have a UPS on the 
machine, because it is not very tolerant of unclean shutdowns.

-- 
AJS

Answers come *after* questions.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] MySQL InnoDB or MyISAM for CDR

2012-09-26 Thread Mitch Claborn
If I remember correctly, INNODB offers row level locking while MyISAM 
does not.



On 09/26/2012 05:18 AM, Thorsten Göllner wrote:

Am 26.09.2012 10:45, schrieb A J Stiles:

On Tuesday 25 September 2012, Matt Hamilton wrote:

Which one (InnoDB or MyISAM) is preferred for CDR as far as write
performance is concerned?

Thanks,
Matt

MyISAM is faster  (on Linux anyway);  but you'd better have a UPS on the
machine, because it is not very tolerant of unclean shutdowns.


You should not havy any problem on inserting into MyISAM or InnoDB - for
my opinion. How many calls do you expect? And consider the following:
the insert query is done by atserisk after hagnup. So your user will not
notice it.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

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

[asterisk-users] MySQL InnoDB or MyISAM for CDR

2012-09-25 Thread Matt Hamilton
Which one (InnoDB or MyISAM) is preferred for CDR as far as write performance 
is concerned?

Thanks,
Matt
  --
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL InnoDB or MyISAM for CDR

2012-09-25 Thread Logan Bibby
MyISAM would be best, in my opinion. The features that cause the little bit
of performance overhead in InnoDB wouldn't be necessary for CDR storage.

- Logan
On Sep 25, 2012 4:15 PM, Matt Hamilton mistral9...@hotmail.com wrote:

 Which one (InnoDB or MyISAM) is preferred for CDR as far as write
 performance is concerned?

 Thanks,
 Matt

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL InnoDB or MyISAM for CDR

2012-09-25 Thread Patrick Lists

On 09/25/2012 11:18 PM, Logan Bibby wrote:

MyISAM would be best, in my opinion. The features that cause the little
bit of performance overhead in InnoDB wouldn't be necessary for CDR storage.


Iirc InnoDB is ACID compliant so might be preferable if MyISAM is not. 
More information here:


http://en.wikipedia.org/wiki/ACID

https://blogs.oracle.com/MySQL/entry/comparing_innodb_to_myisam_performance

Regards,
Patrick


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

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


Re: [asterisk-users] MySQL InnoDB or MyISAM for CDR

2012-09-25 Thread Logan Bibby
Very good point. For revenue critical data like CDRs, being ACID compliant
is important.

MyISAM is compliant. And like InnoDB, can have the features making it
compliant turned off.
On Sep 25, 2012 6:12 PM, Patrick Lists asterisk-l...@puzzled.xs4all.nl
wrote:

 On 09/25/2012 11:18 PM, Logan Bibby wrote:

 MyISAM would be best, in my opinion. The features that cause the little
 bit of performance overhead in InnoDB wouldn't be necessary for CDR
 storage.


 Iirc InnoDB is ACID compliant so might be preferable if MyISAM is not.
 More information here:

 http://en.wikipedia.org/wiki/**ACID http://en.wikipedia.org/wiki/ACID

 https://blogs.oracle.com/**MySQL/entry/comparing_innodb_**
 to_myisam_performancehttps://blogs.oracle.com/MySQL/entry/comparing_innodb_to_myisam_performance

 Regards,
 Patrick


 --
 __**__**_
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL InnoDB or MyISAM for CDR

2012-09-25 Thread Matt Hamilton
Our top priority is the raw Write (INSERT) performance, Read (SELECT) 
performance is not important. Strict ACID compliance is not necessary either. 
MySQL (on a separate database server) should be able to handle inserting CDR 
records (approximately up to 10 records for each call) for about 1000 
concurrent calls coming from an Asterisk cluster. 
 
Matt


Date: Tue, 25 Sep 2012 18:19:50 -0500
From: lo...@keobi.com
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] MySQL InnoDB or MyISAM for CDR

Very good point. For revenue critical data like CDRs, being ACID compliant is 
important.
MyISAM is compliant. And like InnoDB, can have the features making it compliant 
turned off. 
On Sep 25, 2012 6:12 PM, Patrick Lists asterisk-l...@puzzled.xs4all.nl 
wrote:

On 09/25/2012 11:18 PM, Logan Bibby wrote:


MyISAM would be best, in my opinion. The features that cause the little

bit of performance overhead in InnoDB wouldn't be necessary for CDR storage.




Iirc InnoDB is ACID compliant so might be preferable if MyISAM is not. More 
information here:



http://en.wikipedia.org/wiki/ACID



https://blogs.oracle.com/MySQL/entry/comparing_innodb_to_myisam_performance



Regards,

Patrick





--

_

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

New to Asterisk? Join us for a live introductory webinar every Thurs:

  http://www.asterisk.org/hello



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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] MySQL Query : Calls Answered for 5 sec

2012-09-14 Thread RSCL Mumbai
Hello,

I am trying to construct MySQL query(s) to get a list of calls which lasted
for less than 5 seconds between a given date range.
Any help is appreciated.


Thank you in advance.

Regards,
Sans
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL Query : Calls Answered for 5 sec

2012-09-14 Thread Danny Nicholas
Select * from cdr where duration  5 and (calldate= date1 and calldate = 
date2)

 

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of RSCL Mumbai
Sent: Friday, September 14, 2012 11:16 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] MySQL Query : Calls Answered for  5 sec

 

Hello,

I am trying to construct MySQL query(s) to get a list of calls which lasted for 
less than 5 seconds between a given date range.
Any help is appreciated.


Thank you in advance.

Regards,
Sans

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL Query : Calls Answered for 5 sec

2012-09-14 Thread Mitul Limbani
question worth asking in mysql user list then here !!

Regards,
Mitul Limbani,
Chief Architech  Founder,
Enterux Solutions Pvt. Ltd.
110 Reena Complex, Opp. Nathani Steel,
Vidyavihar (W), Mumbai - 400 086. India
http://www.enterux.com/
http://www.entvoice.com/
email: mi...@enterux.in
DID: +91-22-71967121
Cell: +91-9820332422




On Fri, Sep 14, 2012 at 9:46 PM, RSCL Mumbai rscl.mum...@gmail.com wrote:

 Hello,

 I am trying to construct MySQL query(s) to get a list of calls which
 lasted for less than 5 seconds between a given date range.
 Any help is appreciated.


 Thank you in advance.

 Regards,
 Sans

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL Query : Calls Answered for 5 sec

2012-09-14 Thread Raj Mathur (राज माथुर)
On Friday 14 Sep 2012, RSCL Mumbai wrote:
 I am trying to construct MySQL query(s) to get a list of calls which
 lasted for less than 5 seconds between a given date range.
 Any help is appreciated.

On the CDR database, to get all calls that lasted  5 seconds between 
2012-09-01 and 2012-09-07 (inclusive), the MySQL query would be:

select * from cdr
where calldate = '2012-09-01' and calldate  '2012-09-08'
and duration  5;

Regards,

-- Raj
-- 
Raj Mathur  || r...@kandalaya.org   || GPG:
http://otheronepercent.blogspot.com || http://kandalaya.org || CC68
It is the mind that moves   || http://schizoid.in   || D17F

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] MySQL Query : Calls Answered for 5 sec

2012-09-14 Thread RSCL Mumbai
The following query gives me calls with disposition NO ANSWER



On Fri, Sep 14, 2012 at 9:50 PM, Danny Nicholas da...@debsinc.com wrote:

 Select * from cdr where duration  5 and (calldate= date1 and calldate =
 date2)

 ** **

 *From:* asterisk-users-boun...@lists.digium.com [mailto:
 asterisk-users-boun...@lists.digium.com] *On Behalf Of *RSCL Mumbai
 *Sent:* Friday, September 14, 2012 11:16 AM
 *To:* Asterisk Users Mailing List - Non-Commercial Discussion
 *Subject:* [asterisk-users] MySQL Query : Calls Answered for  5 sec

 ** **

 Hello,

 I am trying to construct MySQL query(s) to get a list of calls which
 lasted for less than 5 seconds between a given date range.
 Any help is appreciated.


 Thank you in advance.

 Regards,
 Sans

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL Query : Calls Answered for 5 sec

2012-09-14 Thread RSCL Mumbai
@Raj

I tried your query and variation by using replacing duration with billsec.
In both cases, I get results including disposition NO ANSWER




On Fri, Sep 14, 2012 at 9:58 PM, Raj Mathur (राज माथुर) 
r...@linux-delhi.org wrote:

 On Friday 14 Sep 2012, RSCL Mumbai wrote:
  I am trying to construct MySQL query(s) to get a list of calls which
  lasted for less than 5 seconds between a given date range.
  Any help is appreciated.

 On the CDR database, to get all calls that lasted  5 seconds between
 2012-09-01 and 2012-09-07 (inclusive), the MySQL query would be:

 select * from cdr
 where calldate = '2012-09-01' and calldate  '2012-09-08'
 and duration  5;

 Regards,

 -- Raj
 --
 Raj Mathur  || r...@kandalaya.org   || GPG:
 http://otheronepercent.blogspot.com || http://kandalaya.org || CC68
 It is the mind that moves   || http://schizoid.in   || D17F

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL Query : Calls Answered for 5 sec

2012-09-14 Thread Danny Nicholas
Change to this:

select * from cdr
where calldate = '2012-09-01' and calldate  '2012-09-08'
and duration  5 and disposition’NO ANSWER’;



 

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of RSCL Mumbai
Sent: Friday, September 14, 2012 11:34 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] MySQL Query : Calls Answered for  5 sec

 

@Raj

I tried your query and variation by using replacing duration with billsec.
In both cases, I get results including disposition NO ANSWER





On Fri, Sep 14, 2012 at 9:58 PM, Raj Mathur (राज माथुर) r...@linux-delhi.org 
wrote:

On Friday 14 Sep 2012, RSCL Mumbai wrote:
 I am trying to construct MySQL query(s) to get a list of calls which
 lasted for less than 5 seconds between a given date range.
 Any help is appreciated.

On the CDR database, to get all calls that lasted  5 seconds between
2012-09-01 and 2012-09-07 (inclusive), the MySQL query would be:

select * from cdr
where calldate = '2012-09-01' and calldate  '2012-09-08'
and duration  5;

Regards,

-- Raj
--
Raj Mathur  || r...@kandalaya.org   || GPG:
http://otheronepercent.blogspot.com || http://kandalaya.org || CC68
It is the mind that moves   || http://schizoid.in   || D17F


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL Query : Calls Answered for 5 sec

2012-09-14 Thread Warren Selby
On Fri, Sep 14, 2012 at 11:33 AM, RSCL Mumbai rscl.mum...@gmail.com wrote:

 @Raj

 I tried your query and variation by using replacing duration with billsec.
 In both cases, I get results including disposition NO ANSWER



If you don't want the NO ANSWER disposition, add an AND NOT DISPOSITION =
'NO ANSWER' to your query.  This is all pretty basic SQL Query writing, not
specific to asterisk...

-- 
Thanks,
--Warren Selby, dCAP
http://www.SelbyTech.com http://www.selbytech.com
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL Query : Calls Answered for 5 sec

2012-09-14 Thread RSCL Mumbai
I need a list of calls Answered and Disconnected in less than 5 sec.

Thx



On Fri, Sep 14, 2012 at 10:07 PM, Warren Selby wcse...@selbytech.comwrote:

 On Fri, Sep 14, 2012 at 11:33 AM, RSCL Mumbai rscl.mum...@gmail.comwrote:

 @Raj

 I tried your query and variation by using replacing duration with billsec.
 In both cases, I get results including disposition NO ANSWER



 If you don't want the NO ANSWER disposition, add an AND NOT DISPOSITION
 = 'NO ANSWER' to your query.  This is all pretty basic SQL Query writing,
 not specific to asterisk...

 --
 Thanks,
 --Warren Selby, dCAP
 http://www.SelbyTech.com http://www.selbytech.com


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL Query : Calls Answered for 5 sec

2012-09-14 Thread Phil Frost

On 09/14/2012 12:45 PM, RSCL Mumbai wrote:

I need a list of calls Answered and Disconnected in less than 5 sec.


http://dev.mysql.com/doc/refman/5.6/en/select.html
http://www.google.com/search?q=sql+tutorial
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Mysql identifier not found

2012-05-07 Thread Jonas Kellens

Hello;

is it normal that connid and resutid have values of 73 and 74 ??

How come this value increases ? What does this mean for values 1 to 70 ??


[May  7 08:52:41] -- Executing [h@sub:10] NoOp(SIP/kal3-024f, 
) in new stack
[May  7 08:52:41] -- Executing [h@sub:11] NoOp(SIP/kal3-024f, 
clear MySQL-connections) in new stack
[May  7 08:52:41] -- Executing [h@sub:12] MYSQL(SIP/kal3-024f, 
Clear 74) in new stack
[May  7 08:52:41] WARNING[15003]: app_mysql.c:194 find_identifier: 
Identifier 74, identifier_type 2 not found in identifier list
[May  7 08:52:41] WARNING[15003]: app_mysql.c:510 aMYSQL_clear: Invalid 
result identifier 74 passed in aMYSQL_clear
[May  7 08:52:41] -- Executing [h@sub:13] MYSQL(SIP/kal3-024f, 
Disconnect 73) in new stack
[May  7 08:52:41] WARNING[15003]: app_mysql.c:194 find_identifier: 
Identifier 73, identifier_type 1 not found in identifier list
[May  7 08:52:41] WARNING[15003]: app_mysql.c:527 aMYSQL_disconnect: 
Invalid connection identifier 73 passed in aMYSQL_disconnect
[May  7 08:52:41] -- Executing [h@sub:14] NoOp(SIP/kal3-024f, 
clear MySQL-connections) in new stack
[May  7 08:52:41] -- Executing [h@sub:15] NoOp(SIP/kal3-024f, 
end) in new stack



There are currently only 8 calls going on...



Kind regards,
Jonas.


 Original Message 
Subject:Re: [asterisk-users] Mysql identifier not found
Date:   Sat, 05 May 2012 12:06:38 +0200
From:   Jonas Kellens jonas.kell...@telenet.be
To: 	Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com




I ask this because I find the MySQL status information a bit alarming 
(2946 connections) :



mysql status
--
mysql  Ver 14.12 Distrib 5.0.95, for redhat-linux-gnu (x86_64) using 
readline 5.1


Connection id:2922
Current database:
Current user:root@localhost
SSL:Not in use
Current pager:stdout
Using outfile:''
Using delimiter:;
Server version:5.0.95 Source distribution
Protocol version:10
Connection:Localhost via UNIX socket
Server characterset:latin1
Db characterset:latin1
Client characterset:latin1
Conn.  characterset:latin1
UNIX socket:/var/lib/mysql/mysql.sock
Uptime:6 hours 54 min 31 sec

Threads: 3  Questions: 4919496  Slow queries: 0  Opens: 47  Flush 
tables: 1  Open tables: 41  Queries per second avg: 197.800

--

mysql show status like 'Conn%';
+---+---+
| Variable_name | Value |
+---+---+
| Connections   | 2946  |
+---+---+
1 row in set (0.00 sec)



Jonas.


On 05/05/2012 11:53 AM, Jonas Kellens wrote:

Hello,

notice in the console output beneath that there is a resultid 6 but it 
can not be cleared :



[May  5 11:46:27] -- Executing [s@sub:3] 
MYSQL(SIP/vart-0336, Connect connid localhost dialplan host 
Asterisk) in new stack
[May  5 11:46:27] -- Executing [s@sub:4] 
MYSQL(SIP/vart-0336, Query resultid 4 DELETE FROM pickuptbl 
WHERE pickmark LIKE %SIP/vart2-0336%) in new stack
[May  5 11:46:27] -- Executing [s@sub:5] 
MYSQL(SIP/vart-0336, Clear 6) in new stack
[May  5 11:46:27] WARNING[17803]: app_mysql.c:194 find_identifier: 
Identifier 6, identifier_type 2 not found in identifier list
[May  5 11:46:27] WARNING[17803]: app_mysql.c:510 aMYSQL_clear: 
Invalid result identifier 6 passed in aMYSQL_clear
[May  5 11:46:27] -- Executing [s@sub:6] 
MYSQL(SIP/vart-0336, Disconnect 4) in new stack
[May  5 11:46:27] -- Executing [s@sub:7] 
Return(SIP/vart-0336, ) in new stack



How come ??


Kind regards,
Jonas.


--
_
-- Bandwidth and Colocation Provided byhttp://www.api-digital.com  --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] Mysql identifier not found

2012-05-05 Thread Jonas Kellens

Hello,

notice in the console output beneath that there is a resultid 6 but it 
can not be cleared :



[May  5 11:46:27] -- Executing [s@sub:3] MYSQL(SIP/vart-0336, 
Connect connid localhost dialplan host Asterisk) in new stack
[May  5 11:46:27] -- Executing [s@sub:4] MYSQL(SIP/vart-0336, 
Query resultid 4 DELETE FROM pickuptbl WHERE pickmark LIKE 
%SIP/vart2-0336%) in new stack
[May  5 11:46:27] -- Executing [s@sub:5] MYSQL(SIP/vart-0336, 
Clear 6) in new stack
[May  5 11:46:27] WARNING[17803]: app_mysql.c:194 find_identifier: 
Identifier 6, identifier_type 2 not found in identifier list
[May  5 11:46:27] WARNING[17803]: app_mysql.c:510 aMYSQL_clear: Invalid 
result identifier 6 passed in aMYSQL_clear
[May  5 11:46:27] -- Executing [s@sub:6] MYSQL(SIP/vart-0336, 
Disconnect 4) in new stack
[May  5 11:46:27] -- Executing [s@sub:7] Return(SIP/vart-0336, 
) in new stack



How come ??


Kind regards,
Jonas.
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Mysql identifier not found

2012-05-05 Thread Jonas Kellens
I ask this because I find the MySQL status information a bit alarming 
(2946 connections) :



mysql status
--
mysql  Ver 14.12 Distrib 5.0.95, for redhat-linux-gnu (x86_64) using 
readline 5.1


Connection id:2922
Current database:
Current user:root@localhost
SSL:Not in use
Current pager:stdout
Using outfile:''
Using delimiter:;
Server version:5.0.95 Source distribution
Protocol version:10
Connection:Localhost via UNIX socket
Server characterset:latin1
Db characterset:latin1
Client characterset:latin1
Conn.  characterset:latin1
UNIX socket:/var/lib/mysql/mysql.sock
Uptime:6 hours 54 min 31 sec

Threads: 3  Questions: 4919496  Slow queries: 0  Opens: 47  Flush 
tables: 1  Open tables: 41  Queries per second avg: 197.800

--

mysql show status like 'Conn%';
+---+---+
| Variable_name | Value |
+---+---+
| Connections   | 2946  |
+---+---+
1 row in set (0.00 sec)



Jonas.


On 05/05/2012 11:53 AM, Jonas Kellens wrote:

Hello,

notice in the console output beneath that there is a resultid 6 but it 
can not be cleared :



[May  5 11:46:27] -- Executing [s@sub:3] 
MYSQL(SIP/vart-0336, Connect connid localhost dialplan host 
Asterisk) in new stack
[May  5 11:46:27] -- Executing [s@sub:4] 
MYSQL(SIP/vart-0336, Query resultid 4 DELETE FROM pickuptbl 
WHERE pickmark LIKE %SIP/vart2-0336%) in new stack
[May  5 11:46:27] -- Executing [s@sub:5] 
MYSQL(SIP/vart-0336, Clear 6) in new stack
[May  5 11:46:27] WARNING[17803]: app_mysql.c:194 find_identifier: 
Identifier 6, identifier_type 2 not found in identifier list
[May  5 11:46:27] WARNING[17803]: app_mysql.c:510 aMYSQL_clear: 
Invalid result identifier 6 passed in aMYSQL_clear
[May  5 11:46:27] -- Executing [s@sub:6] 
MYSQL(SIP/vart-0336, Disconnect 4) in new stack
[May  5 11:46:27] -- Executing [s@sub:7] 
Return(SIP/vart-0336, ) in new stack



How come ??


Kind regards,
Jonas.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MYSQL INSERT QUESTION IN DIALPLAN

2012-04-10 Thread lists65
-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Noah
Engelberth
Sent: Monday, April 09, 2012 9:52 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] MYSQL INSERT QUESTION IN DIALPLAN

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of
list...@gmail.com
Sent: Monday, April 09, 2012 8:34 PM
To: asterisk-users@lists.digium.com
Subject: [asterisk-users] MYSQL INSERT QUESTION IN DIALPLAN

I am not a programmer and I have learned so much from examples and the
list.
Perhaps someone could tell me what I am doing wrong in my example below:

I am getting the caller ID and caller name from my local POTS line and I
want to add it into a sql table.  I am trying with the following code but
the data never gets put into the table.

Can anyone correct my syntax and tell me what I am doing wrong?


[callerinfo]
exten = s,1,MYSQL(Connect connid localhost myuser mypassword cnam) exten
= s,n,MYSQL(Query resultid ${connid} INSERT INTO `calleridcapture`
(`number`,`name`) VALUES (${CALLERID(num)},${CALLERID(name)})
exten = s,n,MYSQL(Clear ${resultid})
exten = s,n,MYSQL(Disconnect ${connid}) exten = s,n,NoOp(Callerid Name
${CALLERID(name)}) exten = s,n,NoOp(Callerid Number  ${CALLERID(num)})


The NoOP does show the correct CALLERID name  number when I test it.  The
information just doesn't go into my calleridcapture table in the cnam
database.

Thanks very much for your help
Again I am not a programmer and I am sure my syntax is wrong.

This is Asterisk 1.8.10.0


As the previous two posters alluded, you need to encapsulate your values in
quotes.  I think you can get by without the backticks, not 100% sure as I've
converted from MYSQL to func_odbc.  If you're not going to go with Steve's
recommendation of AGI, I would highly recommend  switching from func_mysql
to func_odbc; func_odbc is much more straightforward in my opinion, and you
definitely get much better error messages within the CLI as you're watching
your code execute.  ofps.oreilly.com/titles/9780596517342/asterisk-DB.html
is a good resource for setting up odbc.

Noah


Thanks for your responses.

Well, the AGI piece sounds good, but again I am not a programmer but I
certainly will try and try to find some code that I could piece together and
try to make it work.

I will check out Oreilly's stuff, they always seem to have good books when
you are trying to learn something new.

Thanks again, I really appreciate your resonse.



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] MYSQL INSERT QUESTION IN DIALPLAN

2012-04-10 Thread lists65


-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve Edwards
Sent: Monday, April 09, 2012 9:43 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] MYSQL INSERT QUESTION IN DIALPLAN

On Mon, 9 Apr 2012, list...@gmail.com wrote:

 I am getting the caller ID and caller name from my local POTS line and 
 I want to add it into a sql table.  I am trying with the following 
 code but the data never gets put into the table.

 Can anyone correct my syntax and tell me what I am doing wrong?

 [callerinfo]
 exten = s,1,MYSQL(Connect connid localhost myuser mypassword cnam) 
 exten = s,n,MYSQL(Query resultid ${connid} INSERT INTO 
 `calleridcapture`
 (`number`,`name`) VALUES (${CALLERID(num)},${CALLERID(name)})
 exten = s,n,MYSQL(Clear ${resultid})
 exten = s,n,MYSQL(Disconnect ${connid}) exten = s,n,NoOp(Callerid 
 Name  ${CALLERID(name)}) exten = s,n,NoOp(Callerid Number  
 ${CALLERID(num)})

 The NoOP does show the correct CALLERID name  number when I test it. 
 The information just doesn't go into my calleridcapture table in the 
 cnam database.

I'm just a 1.2 Luddite, but I am a reasonably skilled c programmer. I've
never used the mysql() application because it seems ugly, limited and
'hackish' to me.

If it were me, I'd code it up as an AGI in a 'real' language where you have
access to 'real' error codes and messages and you don't need a bunch of
quoting hocus-pocus. (Supposedly, the quoting nonsense has gotten better
since 1.2.)

You say you're not a programmer so that may not be an option for you -- but
you got this far :)

The first thing I'd do (aside from using verbose() instead of noop()) would
be to display the result from each step. If the connection is failing,
looking farther is pointless.

Don't you need to put single or double quotes around your individual values?
Change 'mysql' to 'echo' on your 'select' line and see if the statement is
valid at the MySQL command line.

Then, I'd drop the backticks in the 'hail-mary' hope that they are confusing
mysql() somehow.

Then, I'd crack open another beer and reach for a book on c or PHP or Perl.

--
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 -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Thanks for your help and comments.  Again I am not a programmer but you did
give me some direction and I will see if I can find some examples that will
work for my needs.  I have seen AGI before and you are right it does seem to
work very well.

Thanks for your help and comments.  I hope to figure this out.  The SQL is
new to me but I really like the database stuff.





--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] MYSQL INSERT QUESTION IN DIALPLAN

2012-04-10 Thread lists65


-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Doug Lytle
Sent: Monday, April 09, 2012 9:26 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] MYSQL INSERT QUESTION IN DIALPLAN

list...@gmail.com wrote:
 exten =  s,n,MYSQL(Query resultid ${connid} INSERT INTO 
 `calleridcapture`
 (`number`,`name`) VALUES (${CALLERID(num)},${CALLERID(name)})


Here is an example of one of my inserts:

exten = s,n,MYSQL(Query resultid ${connid} INSERT INTO Indianapolis set
phone=${CALLERID(number)} \, flag=YES \, note=Blacklisted by
Tele-Torture - ${TODAY})

Doug

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Thank you Doug.  I did see some examples with the \ but I was confused
because I thought you didn't have to do that with 1.8 (maybe I misread that
some where along the line).  I will look at your example and see if I can
adapt what I am doing to make it work for me.

I appreciate your help and comments as well.  That's what is so good about
this list, seems like there is always someone that can help.  I really like
this stuff, I wished that I had got into programming a long time ago so I
could start to understand syntax better.  I missed out when I didn't pick up
learning how to code.




--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


[asterisk-users] MYSQL INSERT QUESTION IN DIALPLAN

2012-04-09 Thread lists65
I am not a programmer and I have learned so much from examples and the list.
Perhaps someone could tell me what I am doing wrong in my example below:

I am getting the caller ID and caller name from my local POTS line and I
want to add it into a sql table.  I am trying with the following code but
the data never gets put into the table.

Can anyone correct my syntax and tell me what I am doing wrong?


[callerinfo]
exten = s,1,MYSQL(Connect connid localhost myuser mypassword cnam)
exten = s,n,MYSQL(Query resultid ${connid} INSERT INTO `calleridcapture`
(`number`,`name`) VALUES (${CALLERID(num)},${CALLERID(name)})
exten = s,n,MYSQL(Clear ${resultid})
exten = s,n,MYSQL(Disconnect ${connid})
exten = s,n,NoOp(Callerid Name  ${CALLERID(name)})
exten = s,n,NoOp(Callerid Number  ${CALLERID(num)})


The NoOP does show the correct CALLERID name  number when I test it.  The
information just doesn't go into my calleridcapture table in the cnam
database.

Thanks very much for your help
Again I am not a programmer and I am sure my syntax is wrong.

This is Asterisk 1.8.10.0




--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] MYSQL INSERT QUESTION IN DIALPLAN

2012-04-09 Thread Steve Edwards

On Mon, 9 Apr 2012, list...@gmail.com wrote:

I am getting the caller ID and caller name from my local POTS line and I 
want to add it into a sql table.  I am trying with the following code 
but the data never gets put into the table.


Can anyone correct my syntax and tell me what I am doing wrong?

[callerinfo]
exten = s,1,MYSQL(Connect connid localhost myuser mypassword cnam)
exten = s,n,MYSQL(Query resultid ${connid} INSERT INTO `calleridcapture`
(`number`,`name`) VALUES (${CALLERID(num)},${CALLERID(name)})
exten = s,n,MYSQL(Clear ${resultid})
exten = s,n,MYSQL(Disconnect ${connid})
exten = s,n,NoOp(Callerid Name  ${CALLERID(name)})
exten = s,n,NoOp(Callerid Number  ${CALLERID(num)})

The NoOP does show the correct CALLERID name  number when I test it. 
The information just doesn't go into my calleridcapture table in the 
cnam database.


I'm just a 1.2 Luddite, but I am a reasonably skilled c programmer. I've 
never used the mysql() application because it seems ugly, limited and 
'hackish' to me.


If it were me, I'd code it up as an AGI in a 'real' language where you 
have access to 'real' error codes and messages and you don't need a bunch 
of quoting hocus-pocus. (Supposedly, the quoting nonsense has gotten 
better since 1.2.)


You say you're not a programmer so that may not be an option for you -- 
but you got this far :)


The first thing I'd do (aside from using verbose() instead of noop()) 
would be to display the result from each step. If the connection is 
failing, looking farther is pointless.


Don't you need to put single or double quotes around your individual 
values? Change 'mysql' to 'echo' on your 'select' line and see if the 
statement is valid at the MySQL command line.


Then, I'd drop the backticks in the 'hail-mary' hope that they are 
confusing mysql() somehow.


Then, I'd crack open another beer and reach for a book on c or PHP or 
Perl.


--
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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

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


Re: [asterisk-users] MYSQL INSERT QUESTION IN DIALPLAN

2012-04-09 Thread Noah Engelberth
-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of list...@gmail.com
Sent: Monday, April 09, 2012 8:34 PM
To: asterisk-users@lists.digium.com
Subject: [asterisk-users] MYSQL INSERT QUESTION IN DIALPLAN

I am not a programmer and I have learned so much from examples and the list.
Perhaps someone could tell me what I am doing wrong in my example below:

I am getting the caller ID and caller name from my local POTS line and I want 
to add it into a sql table.  I am trying with the following code but the data 
never gets put into the table.

Can anyone correct my syntax and tell me what I am doing wrong?


[callerinfo]
exten = s,1,MYSQL(Connect connid localhost myuser mypassword cnam) exten = 
s,n,MYSQL(Query resultid ${connid} INSERT INTO `calleridcapture`
(`number`,`name`) VALUES (${CALLERID(num)},${CALLERID(name)})
exten = s,n,MYSQL(Clear ${resultid})
exten = s,n,MYSQL(Disconnect ${connid}) exten = s,n,NoOp(Callerid Name  
${CALLERID(name)}) exten = s,n,NoOp(Callerid Number  ${CALLERID(num)})


The NoOP does show the correct CALLERID name  number when I test it.  The 
information just doesn't go into my calleridcapture table in the cnam database.

Thanks very much for your help
Again I am not a programmer and I am sure my syntax is wrong.

This is Asterisk 1.8.10.0


As the previous two posters alluded, you need to encapsulate your values in 
quotes.  I think you can get by without the backticks, not 100% sure as I've 
converted from MYSQL to func_odbc.  If you're not going to go with Steve's 
recommendation of AGI, I would highly recommend  switching from func_mysql to 
func_odbc; func_odbc is much more straightforward in my opinion, and you 
definitely get much better error messages within the CLI as you're watching 
your code execute.  ofps.oreilly.com/titles/9780596517342/asterisk-DB.html is a 
good resource for setting up odbc.

Noah
The message does not contain any threats
AVG for MS Exchange Server (2012.0.1913 - 2411/4924)--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] MySql Custom CDR issues

2011-12-12 Thread silent sayz
hello ,

I have been working hard to solve the issue of custom CDR in the Asterik
with Mysql but in vain.

I searched google for complete 2 hours but in vain.

What i want to achieve is CDR(customcolumn)=anyvaluealthough we can
achieve it through other ways like making a script that runs when a call
ends and modify the cdr and insert in custom value BUT is there any way to
make this work ?

Thank you in advance
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySql Custom CDR issues

2011-12-12 Thread Robert-IPhone
Are you using FreePBX or another packaged Asterisk?

Sent from my iPhone 4S

On Dec 12, 2011, at 9:23 AM, silent sayz silent.s...@gmail.com wrote:

 hello ,
  
 I have been working hard to solve the issue of custom CDR in the Asterik with 
 Mysql but in vain.
  
 I searched google for complete 2 hours but in vain.
  
 What i want to achieve is CDR(customcolumn)=anyvaluealthough we can 
 achieve it through other ways like making a script that runs when a call ends 
 and modify the cdr and insert in custom value BUT is there any way to make 
 this work ?
  
 Thank you in advance
 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello
 
 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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] MySql Custom CDR issues

2011-12-12 Thread silent sayz
Hi!
I am using Asterisk 1.6.2.20  with elastix

  -- Forwarded message --
 From: Robert-IPhone rhuddles...@gmail.com
 Date: Mon, Dec 12, 2011 at 5:45 PM
 Subject: Re: [asterisk-users] MySql Custom CDR issues
 To: Asterisk Users Mailing List - Non-Commercial Discussion 
 asterisk-users@lists.digium.com
 Cc: Asterisk Users Mailing List - Non-Commercial Discussion 
 asterisk-users@lists.digium.com


 Are you using FreePBX or another packaged Asterisk?

 Sent from my iPhone 4S


 On Dec 12, 2011, at 9:23 AM, silent sayz silent.s...@gmail.com wrote:

  hello ,
 
  I have been working hard to solve the issue of custom CDR in the Asterik
 with Mysql but in vain.
 
  I searched google for complete 2 hours but in vain.
 
  What i want to achieve is CDR(customcolumn)=anyvaluealthough we can
 achieve it through other ways like making a script that runs when a call
 ends and modify the cdr and insert in custom value BUT is there any way to
 make this work ?
 
  Thank you in advance
  --
  _
  -- Bandwidth and Colocation Provided by http://www.api-digital.com --
  New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
 
  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 --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySql Custom CDR issues

2011-12-12 Thread silent sayz
Hello,

I installed asterisk addons package and it is solved. Thank you.

On Mon, Dec 12, 2011 at 5:55 PM, silent sayz silent.s...@gmail.com wrote:

  Hi!
 I am using Asterisk 1.6.2.20  with elastix

  -- Forwarded message --
 From: Robert-IPhone rhuddles...@gmail.com
 Date: Mon, Dec 12, 2011 at 5:45 PM
 Subject: Re: [asterisk-users] MySql Custom CDR issues
 To: Asterisk Users Mailing List - Non-Commercial Discussion 
 asterisk-users@lists.digium.com
 Cc: Asterisk Users Mailing List - Non-Commercial Discussion 
 asterisk-users@lists.digium.com


 Are you using FreePBX or another packaged Asterisk?

 Sent from my iPhone 4S


 On Dec 12, 2011, at 9:23 AM, silent sayz silent.s...@gmail.com wrote:

  hello ,
 
  I have been working hard to solve the issue of custom CDR in the
 Asterik with Mysql but in vain.
 
  I searched google for complete 2 hours but in vain.
 
  What i want to achieve is CDR(customcolumn)=anyvaluealthough we can
 achieve it through other ways like making a script that runs when a call
 ends and modify the cdr and insert in custom value BUT is there any way to
 make this work ?
 
  Thank you in advance
  --
  _
  -- Bandwidth and Colocation Provided by http://www.api-digital.com --
  New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
 
  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 --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] Mysql dialplan statement not executed

2011-09-14 Thread Jonas Kellens

Hello,

I do the following in a macro in the dialplan :

exten = s,n,MYSQL(Connect connid localhost user password AsteriskDB)
exten = s,n,MYSQL(Query resultid ${connid} UPDATE custDB SET active=1 
WHERE routeID=${ARG1} AND nr=1)

exten = s,n,MYSQL(Disconnect ${connid})

But nothing changes in my database...

This is the CLI :

[Sep 14 16:41:04] -- Executing [s@macro-bal:15] 
MYSQL(SIP/vc5-000b, Connect connid localhost user password 
AsteriskDB) in new stack
[Sep 14 16:41:04] -- Executing [s@macro-bal:16] 
MYSQL(SIP/vc5-000b, Query resultid 15 UPDATE custDBSET active=1 
WHERE routeID=195 AND nr=1) in new stack
[Sep 14 16:41:04] -- Executing [s@macro-bal:17] 
MYSQL(SIP/vc5-000b, Disconnect 15) in new stack


Seems OK, no warnings. But the update has not taken place.


Kind regards,
Jonas.
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Mysql dialplan statement not executed

2011-09-14 Thread Sam Govind
I expect that your same query when executed directly on MySQL console
executes successfully ! Normally errors in DB queries are printed on CLI but
apparently there is nothing wrong.

On Wed, Sep 14, 2011 at 5:51 PM, Jonas Kellens jonas.kell...@telenet.bewrote:

 **
 Hello,

 I do the following in a macro in the dialplan :

 exten = s,n,MYSQL(Connect connid localhost user password AsteriskDB)
 exten = s,n,MYSQL(Query resultid ${connid} UPDATE custDB SET active=1
 WHERE routeID=${ARG1} AND nr=1)
 exten = s,n,MYSQL(Disconnect ${connid})

 But nothing changes in my database...

 This is the CLI :

 [Sep 14 16:41:04] -- Executing [s@macro-bal:15]
 MYSQL(SIP/vc5-000b, Connect connid localhost user password
 AsteriskDB) in new stack
 [Sep 14 16:41:04] -- Executing [s@macro-bal:16]
 MYSQL(SIP/vc5-000b, Query resultid 15 UPDATE custDB SET active=1
 WHERE routeID=195 AND nr=1) in new stack
 [Sep 14 16:41:04] -- Executing [s@macro-bal:17]
 MYSQL(SIP/vc5-000b, Disconnect 15) in new stack

 Seems OK, no warnings. But the update has not taken place.


 Kind regards,
 Jonas.

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Mysql dialplan statement not executed

2011-09-14 Thread Jonas Kellens

On 09/14/2011 02:51 PM, Jonas Kellens wrote:

Hello,

I do the following in a macro in the dialplan :

exten = s,n,MYSQL(Connect connid localhost user password AsteriskDB)
exten = s,n,MYSQL(Query resultid ${connid} UPDATE custDB SET active=1 
WHERE routeID=${ARG1} AND nr=1)

exten = s,n,MYSQL(Disconnect ${connid})

But nothing changes in my database...


OK I clearly need to use , like this :

exten = s,n,MYSQL(Query resultid ${connid} UPDATE custDB SET active='1' 
WHERE routeID=${ARG1} AND nr=1)


Solved.
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] mysql call stored procedure

2011-05-18 Thread Borin
MYSQL(Nextresult resultid ${connid}) after MySQL(Fetch fetchid ${resultid}
pass) helped to resolve this.
you should  always get all results sp produce otherwise mysql returns error.

On Tue, May 17, 2011 at 4:36 PM, Borin katerin.bo...@gmail.com wrote:

 Hi Guys,
 I am getting an error when executing another mysql query in dialplan after
 calling stored procedure.
 If calling the procedure from mysql cli it gives a result like:
 mysql call call_control(78236721,1000,1233);
 +--+
 | pass |
 +--+
 |1 |
 +--+
 So I need asterisk to recognize this pass and take some actions based on
 what the pass value is.
 Dialplan looks like this:

 MYSQL(Connect connid ${DBDefaultHost} ${DBuser} ${DBpass} ${DBname})
 MySQL(Query resultid ${connid} CALL call_control(78236721,1000,1233))
 MySQL(Fetch fetchid ${resultid} pass)
 MYSQL(clear ${resultid})
 MySQL(Query resultid ${connid} SELECT/INSERT whatever from table)

 So, it gives me this pass value correct, but if I execute some other query
 INSERT or SELECT after clearing the result, it gives me an error
 [May 17 16:16:13] WARNING[19572]: app_addon_sql_mysql.c:374 aMYSQL_query:
 aMYSQL_query: mysql_query failed. Error: Commands out of sync; you can't run
 this command now
 The error disappears if I reconnect to mysql after calling the stored
 procedure but it seams not right to me to connect to mysql 2 times for 1
 call.

 Did anyone have the same issue?


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] mysql call stored procedure

2011-05-17 Thread Borin
Hi Guys,
I am getting an error when executing another mysql query in dialplan after
calling stored procedure.
If calling the procedure from mysql cli it gives a result like:
mysql call call_control(78236721,1000,1233);
+--+
| pass |
+--+
|1 |
+--+
So I need asterisk to recognize this pass and take some actions based on
what the pass value is.
Dialplan looks like this:

MYSQL(Connect connid ${DBDefaultHost} ${DBuser} ${DBpass} ${DBname})
MySQL(Query resultid ${connid} CALL call_control(78236721,1000,1233))
MySQL(Fetch fetchid ${resultid} pass)
MYSQL(clear ${resultid})
MySQL(Query resultid ${connid} SELECT/INSERT whatever from table)

So, it gives me this pass value correct, but if I execute some other query
INSERT or SELECT after clearing the result, it gives me an error
[May 17 16:16:13] WARNING[19572]: app_addon_sql_mysql.c:374 aMYSQL_query:
aMYSQL_query: mysql_query failed. Error: Commands out of sync; you can't run
this command now
The error disappears if I reconnect to mysql after calling the stored
procedure but it seams not right to me to connect to mysql 2 times for 1
call.

Did anyone have the same issue?
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] mySQL connection testing

2011-03-04 Thread Andrew Thomas
Danny - Thanks, but that wouldn't work either - as I am fetching
multiple rows (not in that example - but I do in a production
environment).

Steve - If mySQL in the dialplan is so bad - why did Digium include it
in the first place?  JFYI - I use mySQL in the dialplan all the time -
and it always works a treat - first time, every time.  I do use AGI for
'other' things (eg. I've completely re-written the AgentCallbackLogin
feature in php) and that also works a treat. Each to their own I guess.

Anyway - back to the question (repeated in case it got lost amongst all
this) Is there a way to check if a specific MYSQL connection id is
connected or not?.

BTW - using a 'disconnect {connid}' twice doesn't actually break
anything - it just causes an error on the console.  So I can live with a
'no' answer.

Thanks


-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve
Edwards
Sent: 03 March 2011 17:23
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] mySQL connection testing


On Thu, 3 Mar 2011, Andrew Thomas wrote:

 Gentlemen, can we please not turn this in to an Asterisk and DB 
 commands
 bashing thread?

I'm just suggesting that maybe you are 'swimming upstream' trying to use

MySQL within the dialplan.

Much the same as if you were proposing an office system using a 'tin
cans 
and string' mesh with carrier pigeons for out of band call signaling and

having a problem with poop buildup on the endpoints -- I might propose 
using 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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


 If you have received this communication in error we would appreciate
you advising us either by telephone or return of e-mail. The contents
of this message, and any attachments, are the property of DataVox,
and are intended for the confidential use of the named recipient only.
If you are not the intended recipient, employee or agent responsible
for delivery of this message to the intended recipient, take note that
any dissemination, distribution or copying of this communication and
its attachments is strictly prohibited, and may be subject to civil or
criminal action for which you may be liable.
Every effort has been made to ensure that this e-mail or any attachments
are free from viruses. While the company has taken every reasonable
precaution to minimise this risk, neither company, nor the sender can
accept liability for any damage which you sustain as a result of viruses.
It is recommended that you should carry out your own virus checks
before opening any attachments. 

Registered in England. No. 27459085.



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] mySQL connection testing

2011-03-04 Thread Tilghman Lesher
On Thursday 03 March 2011 08:42:42 Andrew Thomas wrote:
 Does anybody know of a way to test whether a mySQL connection invoked
 from the dialplan is current or not?

There is no way to test it.  If you want this, you should track the
information yourself or don't disconnect anywhere but in the h
extension.

BTW, the disconnect is not strictly needed in all versions of the addons
since 1.4.9.  Due to the possibility of a memory leak, the connections
are tracked and deleted when the channel is destroyed.

See this issue (and the patch) for more information:
https://issues.asterisk.org/view.php?id=14757

-- 
Tilghman

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] mySQL connection testing

2011-03-04 Thread Tilghman Lesher
On Friday 04 March 2011 02:47:56 Andrew Thomas wrote:
 If mySQL in the dialplan is so bad - why did Digium include it
 in the first place?

Digium is not responsible for everything that appears in Asterisk.  This is
a community project, and community volunteers have written large swaths
of Asterisk, including the MYSQL command.

-- 
Tilghman

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] mySQL connection testing

2011-03-04 Thread Andrew Thomas
Thanks Tilghman - this is exactly what I wanted to hear.  As for the
'inclusion' bit - true, but it's still infused in to the addons package
at the Digium end (isn't it?).

Anyway, I'll go create a mysql.conf file now :)

Cheers

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Tilghman
Lesher
Sent: 04 March 2011 08:54
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] mySQL connection testing


On Thursday 03 March 2011 08:42:42 Andrew Thomas wrote:
 Does anybody know of a way to test whether a mySQL connection invoked 
 from the dialplan is current or not?

There is no way to test it.  If you want this, you should track the
information yourself or don't disconnect anywhere but in the h
extension.

BTW, the disconnect is not strictly needed in all versions of the addons
since 1.4.9.  Due to the possibility of a memory leak, the connections
are tracked and deleted when the channel is destroyed.

See this issue (and the patch) for more information:
https://issues.asterisk.org/view.php?id=14757

-- 
Tilghman

-- _
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


 If you have received this communication in error we would appreciate
you advising us either by telephone or return of e-mail. The contents
of this message, and any attachments, are the property of DataVox,
and are intended for the confidential use of the named recipient only.
If you are not the intended recipient, employee or agent responsible
for delivery of this message to the intended recipient, take note that
any dissemination, distribution or copying of this communication and
its attachments is strictly prohibited, and may be subject to civil or
criminal action for which you may be liable.
Every effort has been made to ensure that this e-mail or any attachments
are free from viruses. While the company has taken every reasonable
precaution to minimise this risk, neither company, nor the sender can
accept liability for any damage which you sustain as a result of viruses.
It is recommended that you should carry out your own virus checks
before opening any attachments. 

Registered in England. No. 27459085.



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] mySQL connection testing

2011-03-04 Thread Tilghman Lesher
On Friday 04 March 2011 03:03:41 Andrew Thomas wrote:
 Thanks Tilghman - this is exactly what I wanted to hear.  As for the
 'inclusion' bit - true, but it's still infused in to the addons package
 at the Digium end (isn't it?).

While Digium hosts the repository and the project head (Russell) is a
Digium employee, what winds up in the repository is largely up to the
Asterisk community, including many non-Digium developers with commit
access.  While Digium does contribute a great deal to the releases,
suggesting that Digium is responsible for everything that ends up in a
release is reductionist and diminutive of the many contributions made by
the community.

-- 
Tilghman

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


[asterisk-users] mySQL connection testing

2011-03-03 Thread Andrew Thomas
Does anybody know of a way to test whether a mySQL connection invoked
from the dialplan is current or not?

For example:

extensions.conf
===
[context]
exten = _X.,1,MYSQL(Connect connid localhost user pass db)
exten = _X.,n,MYSQL(Query resultid ${connid} SELECT `something` FROM
`table` WHERE `number` = ${EXTEN})
exten = _X.,n,MYSQL(Fetch foundRow ${resultid} something)
exten = _X.,n,MYSQL(Clear ${resultid})
exten = _X.,n,Wait(10) ; just for fun
exten = _X.,n,MYSQL(Disconnect ${connid})
exten = _X.,n,Hangup()

exten = h,1,MYSQL(Disconnect ${connid})


Now if the caller hangs up before the 10 second timeout - then all is
well.  But, if they don't, Asterisk tries to disconnect an already
disconnected connection.  I need a way of detecting that the connection
has already been disconnected - so I don't try and disconnect it again.

Something like: exten = h,1,ExecIf(CHECK IF CONNECTION STILL OPEN - IN
CASE CALLER HUNG UP AFTER TIME-OUT)?MYSQL(Disconnect ${connid}))

Any ideas?

Ta


 If you have received this communication in error we would appreciate
you advising us either by telephone or return of e-mail. The contents
of this message, and any attachments, are the property of DataVox,
and are intended for the confidential use of the named recipient only.
If you are not the intended recipient, employee or agent responsible
for delivery of this message to the intended recipient, take note that
any dissemination, distribution or copying of this communication and
its attachments is strictly prohibited, and may be subject to civil or
criminal action for which you may be liable.
Every effort has been made to ensure that this e-mail or any attachments
are free from viruses. While the company has taken every reasonable
precaution to minimise this risk, neither company, nor the sender can
accept liability for any damage which you sustain as a result of viruses.
It is recommended that you should carry out your own virus checks
before opening any attachments. 

Registered in England. No. 27459085.



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] mySQL connection testing

2011-03-03 Thread Doug Lytle

Andrew Thomas wrote:

exten =  _X.,n,MYSQL(Clear ${resultid})
exten =  _X.,n,Wait(10) ; just for fun
exten =  _X.,n,MYSQL(Disconnect ${connid})
   


You should be doing the wait after the disconnect.

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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

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


Re: [asterisk-users] mySQL connection testing

2011-03-03 Thread Andrew Thomas
The wait is there as a test.  This gives the 'tester' the option of
hanging up before the disconnect or not.

Either way - a connection can still be left open if the caller hangs up
before the first disconnect.

This is my problem.  See the 'h' line.



-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Doug Lytle
Sent: 03 March 2011 14:52
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] mySQL connection testing


Andrew Thomas wrote:
 exten =  _X.,n,MYSQL(Clear ${resultid})
 exten =  _X.,n,Wait(10) ; just for fun
 exten =  _X.,n,MYSQL(Disconnect ${connid})


You should be doing the wait after the disconnect.

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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


 If you have received this communication in error we would appreciate
you advising us either by telephone or return of e-mail. The contents
of this message, and any attachments, are the property of DataVox,
and are intended for the confidential use of the named recipient only.
If you are not the intended recipient, employee or agent responsible
for delivery of this message to the intended recipient, take note that
any dissemination, distribution or copying of this communication and
its attachments is strictly prohibited, and may be subject to civil or
criminal action for which you may be liable.
Every effort has been made to ensure that this e-mail or any attachments
are free from viruses. While the company has taken every reasonable
precaution to minimise this risk, neither company, nor the sender can
accept liability for any damage which you sustain as a result of viruses.
It is recommended that you should carry out your own virus checks
before opening any attachments. 

Registered in England. No. 27459085.



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] mySQL connection testing

2011-03-03 Thread Doug Lytle

Andrew Thomas wrote:

The wait is there as a test.  This gives the 'tester' the option of
hanging up before the disconnect or not.
   


And the purpose for that would be to share available connections?

I've always considered it bad to leave a connection open and have always 
closed them down after a query.


Either way, I test for mysql connection errors by:

exten = s,n,GotoIf($[${MYSQL_STATUS} = -1]?mysql_failed,s,1)

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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

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


Re: [asterisk-users] mySQL connection testing

2011-03-03 Thread Andrew Thomas
MYSQL_STATUS???

Is this documented anywhere (as I can't seem to find anything about this
variable)?

Remember, I need to test whether a specific {connid} is still connected
or not - not the whole mySQL connection.

As for the 'wait' command in my example - it is there purely for testing
purposes - otherwise you'd have to be damn quick to beat the disconnect
(but it's not impossible)!



-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Doug Lytle
Sent: 03 March 2011 15:03
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] mySQL connection testing


Andrew Thomas wrote:
 The wait is there as a test.  This gives the 'tester' the option of 
 hanging up before the disconnect or not.


And the purpose for that would be to share available connections?

I've always considered it bad to leave a connection open and have always

closed them down after a query.

Either way, I test for mysql connection errors by:

exten = s,n,GotoIf($[${MYSQL_STATUS} = -1]?mysql_failed,s,1)

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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


 If you have received this communication in error we would appreciate
you advising us either by telephone or return of e-mail. The contents
of this message, and any attachments, are the property of DataVox,
and are intended for the confidential use of the named recipient only.
If you are not the intended recipient, employee or agent responsible
for delivery of this message to the intended recipient, take note that
any dissemination, distribution or copying of this communication and
its attachments is strictly prohibited, and may be subject to civil or
criminal action for which you may be liable.
Every effort has been made to ensure that this e-mail or any attachments
are free from viruses. While the company has taken every reasonable
precaution to minimise this risk, neither company, nor the sender can
accept liability for any damage which you sustain as a result of viruses.
It is recommended that you should carry out your own virus checks
before opening any attachments. 

Registered in England. No. 27459085.



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] mySQL connection testing

2011-03-03 Thread Doug Lytle

Andrew Thomas wrote:

MYSQL_STATUS???

Is this documented anywhere (as I can't seem to find anything about this
variable)?
   


core show application mysql
hylafax*CLI
  -= Info about application 'MYSQL' =-

[Synopsis]
Do several mySQLy things

[Description]
MYSQL():  Do several mySQLy things
Syntax:


MySQL.
  On exit, always returns 0. Sets MYSQL_STATUS to 0 on success and -1 
on error.


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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

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


Re: [asterisk-users] mySQL connection testing

2011-03-03 Thread Andrew Thomas
I found that after I typed :)

Trouble is - that variable gets triggered after every MYSQL command -
not just the disconnect one.  So it's no good to me I'm afraid.

Thanks for trying.


-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Doug Lytle
Sent: 03 March 2011 16:15
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] mySQL connection testing


Andrew Thomas wrote:
 MYSQL_STATUS???

 Is this documented anywhere (as I can't seem to find anything about 
 this variable)?


core show application mysql
hylafax*CLI
   -= Info about application 'MYSQL' =-

[Synopsis]
Do several mySQLy things

[Description]
MYSQL():  Do several mySQLy things
Syntax:


MySQL.
   On exit, always returns 0. Sets MYSQL_STATUS to 0 on success and -1 
on error.

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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


 If you have received this communication in error we would appreciate
you advising us either by telephone or return of e-mail. The contents
of this message, and any attachments, are the property of DataVox,
and are intended for the confidential use of the named recipient only.
If you are not the intended recipient, employee or agent responsible
for delivery of this message to the intended recipient, take note that
any dissemination, distribution or copying of this communication and
its attachments is strictly prohibited, and may be subject to civil or
criminal action for which you may be liable.
Every effort has been made to ensure that this e-mail or any attachments
are free from viruses. While the company has taken every reasonable
precaution to minimise this risk, neither company, nor the sender can
accept liability for any damage which you sustain as a result of viruses.
It is recommended that you should carry out your own virus checks
before opening any attachments. 

Registered in England. No. 27459085.



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] mySQL connection testing

2011-03-03 Thread Steve Edwards

On Thu, 3 Mar 2011, Andrew Thomas wrote:

Does anybody know of a way to test whether a mySQL connection invoked 
from the dialplan is current or not?


I've never been a fan of using database commands in the dialplan. I prefer 
to wrap up all the database cruft into a nice little black box, an AGI, 
where I have full access to the database API and real debugging tools.


I think database commands in the dialplan are just ugly.

--
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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

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


Re: [asterisk-users] mySQL connection testing

2011-03-03 Thread Danny Nicholas
-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve Edwards
Sent: Thursday, March 03, 2011 10:23 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] mySQL connection testing

On Thu, 3 Mar 2011, Andrew Thomas wrote:

 Does anybody know of a way to test whether a mySQL connection invoked 
 from the dialplan is current or not?

I've never been a fan of using database commands in the dialplan. I prefer 
to wrap up all the database cruft into a nice little black box, an AGI, 
where I have full access to the database API and real debugging tools.

I think database commands in the dialplan are just ugly.

Not to mention that Asterisk is developmental and a moving target.  If
you read 1000 posts on this forum, you'll come across 10-15 items where it
worked then, but it doesn't now. If it's in an AGI, you have a much better
chance of surviving version changes.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] mySQL connection testing

2011-03-03 Thread Andrew Thomas
That's your opinion - and your entitled to it sir.

However, this still doesn't answer my question.

Cheers

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve
Edwards
Sent: 03 March 2011 16:23
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] mySQL connection testing


On Thu, 3 Mar 2011, Andrew Thomas wrote:

 Does anybody know of a way to test whether a mySQL connection invoked
 from the dialplan is current or not?

I've never been a fan of using database commands in the dialplan. I
prefer 
to wrap up all the database cruft into a nice little black box, an AGI, 
where I have full access to the database API and real debugging tools.

I think database commands in the dialplan are just ugly.

-- 
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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


 If you have received this communication in error we would appreciate
you advising us either by telephone or return of e-mail. The contents
of this message, and any attachments, are the property of DataVox,
and are intended for the confidential use of the named recipient only.
If you are not the intended recipient, employee or agent responsible
for delivery of this message to the intended recipient, take note that
any dissemination, distribution or copying of this communication and
its attachments is strictly prohibited, and may be subject to civil or
criminal action for which you may be liable.
Every effort has been made to ensure that this e-mail or any attachments
are free from viruses. While the company has taken every reasonable
precaution to minimise this risk, neither company, nor the sender can
accept liability for any damage which you sustain as a result of viruses.
It is recommended that you should carry out your own virus checks
before opening any attachments. 

Registered in England. No. 27459085.



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] mySQL connection testing

2011-03-03 Thread Doug Lytle

Danny Nicholas wrote:

Not to mention that Asterisk is developmental and a moving target.


And that's why I'm still on 1.4.

And, I have no experience with AGI, nor have I had the time to tackle it 
in the last 6 months.


When I finally do move over to 1.8 series, I plan on looking into ODBC.

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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

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


Re: [asterisk-users] mySQL connection testing

2011-03-03 Thread Andrew Thomas
Gentlemen, can we please not turn this in to an Asterisk and DB commands
bashing thread?

All I want is a simple answer to a simple question - not a debate on
using AGI/AMI or any other methods.

Thanks for your co-operation.


-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Doug Lytle
Sent: 03 March 2011 16:32
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] mySQL connection testing


Danny Nicholas wrote:
 Not to mention that Asterisk is developmental and a moving target.

And that's why I'm still on 1.4.

And, I have no experience with AGI, nor have I had the time to tackle it

in the last 6 months.

When I finally do move over to 1.8 series, I plan on looking into ODBC.

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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


 If you have received this communication in error we would appreciate
you advising us either by telephone or return of e-mail. The contents
of this message, and any attachments, are the property of DataVox,
and are intended for the confidential use of the named recipient only.
If you are not the intended recipient, employee or agent responsible
for delivery of this message to the intended recipient, take note that
any dissemination, distribution or copying of this communication and
its attachments is strictly prohibited, and may be subject to civil or
criminal action for which you may be liable.
Every effort has been made to ensure that this e-mail or any attachments
are free from viruses. While the company has taken every reasonable
precaution to minimise this risk, neither company, nor the sender can
accept liability for any damage which you sustain as a result of viruses.
It is recommended that you should carry out your own virus checks
before opening any attachments. 

Registered in England. No. 27459085.



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] mySQL connection testing

2011-03-03 Thread Danny Nicholas
-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Andrew Thomas
Sent: Thursday, March 03, 2011 10:38 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] mySQL connection testing

Gentlemen, can we please not turn this in to an Asterisk and DB commands
bashing thread?

All I want is a simple answer to a simple question - not a debate on
using AGI/AMI or any other methods.

Thanks for your co-operation.

Sorry for the comment/flames
This might do what you want (untested since I don't use MYSQL)
[context]
exten = _X.,1,MYSQL(Connect connid localhost user pass db)
exten = _X.,n,MYSQL(Query resultid ${connid} SELECT `something` FROM
`table` WHERE `number` = ${EXTEN})
exten = _X.,n,MYSQL(Fetch foundRow ${resultid} something)
exten = _X.,n,MYSQL(Clear ${resultid})
exten = _X.,n,Wait(10) ; just for fun
exten = _X.,n,MYSQL(Fetch foundRow ${resultid} something)
exten = _X.,n,Gotoif(${resultid} = 0?7:8)
exten = _X.,n,MYSQL(Disconnect ${connid})
exten = _X.,n,Hangup()


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] mySQL connection testing

2011-03-03 Thread Steve Edwards

On Thu, 3 Mar 2011, Andrew Thomas wrote:

Gentlemen, can we please not turn this in to an Asterisk and DB commands 
bashing thread?


I'm just suggesting that maybe you are 'swimming upstream' trying to use 
MySQL within the dialplan.


Much the same as if you were proposing an office system using a 'tin cans 
and string' mesh with carrier pigeons for out of band call signaling and 
having a problem with poop buildup on the endpoints -- I might propose 
using 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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

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


Re: [asterisk-users] MySQL and Channel Event Logging

2010-10-16 Thread Sherwood McGowan
Hey, Murph! Good to see you're still active 'round these parts!

I actually have not delved too far into CEL, I had just started looking into
it when I noticed that there wasn't anything for MySQL and so I began
searching and finally making this inquiry :)

I will take a peek at the source code for the other backends and see if I
can't hack something together to submit to the community.

Past that, once I've learned a bit more about CEL in general, I'll let you
know how I plan on using that table (sorry, I currently have no idea
what's in the table yet, but I'll learn).

Thanks, by the way, for your work on CEL (I remember drooling over a blog
post or two of yours that mentioned the beginnings of work on CEL), on AEL
v2, and last but not least, listening to my suggestions and whatnot
regarding AEL :)

Cheers,
Sherwood McGowan

On Wed, Oct 13, 2010 at 11:17 PM, Steve Murphy m...@parsetree.com wrote:



 On Wed, Oct 13, 2010 at 9:52 PM, Sherwood McGowan 
 sherwood.mcgo...@gmail.com wrote:



 On Wed, Oct 13, 2010 at 9:53 PM, Paul Belanger 
 paul.belan...@polybeacon.com wrote:

 On Wed, Oct 13, 2010 at 9:31 PM, Sherwood McGowan
 sherwood.mcgo...@gmail.com wrote:
  Hey all, sorry if this has been covered, but I've not found anything
 after a
  couple hours' worth of googling. I can see (and I'm familiar with) all
 the
  usual MySQL addon apps once I install Asterisk 1.8.x, but I cannot find
 any
  reference to MySQL and the new CEL logging tool other than ODBC. Is
 this the
  only method available to use MySQL with CEL at this time?
 
 Looking at the CEL config files, I don't see one specifically for
 MySQL.  I do have it up and running via ODBC, for what it's worth.

 --
 Paul Belanger | dCAP

 Thanks mate, I appreciate the reply. That's what I've seen from looking at
 the configs right now.


 When I wrote the CEL backends, I probably skipped the MySQL stuff, because
 it would be in the addons stuff
 for Asterisk.

 But, if you look at the similarities between the CEL backends, and the CDR
 backends, you'll probably
 notice that you could pump out a myseql backend with the same mods in a
 short amount of time.

 I would be curious to see how you plan to use that table! Have you mapped
 out your sql statements yet?

 murf



 --
 Steve Murphy
 ParseTree Corp


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] MySQL and Channel Event Logging

2010-10-13 Thread Sherwood McGowan
Hey all, sorry if this has been covered, but I've not found anything after a
couple hours' worth of googling. I can see (and I'm familiar with) all the
usual MySQL addon apps once I install Asterisk 1.8.x, but I cannot find any
reference to MySQL and the new CEL logging tool other than ODBC. Is this the
only method available to use MySQL with CEL at this time?

Thanks,
Sherwood
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL and Channel Event Logging

2010-10-13 Thread Paul Belanger
On Wed, Oct 13, 2010 at 9:31 PM, Sherwood McGowan
sherwood.mcgo...@gmail.com wrote:
 Hey all, sorry if this has been covered, but I've not found anything after a
 couple hours' worth of googling. I can see (and I'm familiar with) all the
 usual MySQL addon apps once I install Asterisk 1.8.x, but I cannot find any
 reference to MySQL and the new CEL logging tool other than ODBC. Is this the
 only method available to use MySQL with CEL at this time?

Looking at the CEL config files, I don't see one specifically for
MySQL.  I do have it up and running via ODBC, for what it's worth.

-- 
Paul Belanger | dCAP
Polybeacon | Consultant
Jabber: paul.belan...@polybeacon.com | IRC: pabelanger (Freenode)
blog.polybeacon.com

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] MySQL and Channel Event Logging

2010-10-13 Thread Sherwood McGowan
On Wed, Oct 13, 2010 at 9:53 PM, Paul Belanger paul.belan...@polybeacon.com
 wrote:

 On Wed, Oct 13, 2010 at 9:31 PM, Sherwood McGowan
 sherwood.mcgo...@gmail.com wrote:
  Hey all, sorry if this has been covered, but I've not found anything
 after a
  couple hours' worth of googling. I can see (and I'm familiar with) all
 the
  usual MySQL addon apps once I install Asterisk 1.8.x, but I cannot find
 any
  reference to MySQL and the new CEL logging tool other than ODBC. Is this
 the
  only method available to use MySQL with CEL at this time?
 
 Looking at the CEL config files, I don't see one specifically for
 MySQL.  I do have it up and running via ODBC, for what it's worth.

 --
 Paul Belanger | dCAP
 Polybeacon | Consultant
 Jabber: paul.belan...@polybeacon.com | IRC: pabelanger (Freenode)
 blog.polybeacon.com

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Thanks mate, I appreciate the reply. That's what I've seen from looking at
the configs right now.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL and Channel Event Logging

2010-10-13 Thread Steve Murphy
On Wed, Oct 13, 2010 at 9:52 PM, Sherwood McGowan 
sherwood.mcgo...@gmail.com wrote:



 On Wed, Oct 13, 2010 at 9:53 PM, Paul Belanger 
 paul.belan...@polybeacon.com wrote:

 On Wed, Oct 13, 2010 at 9:31 PM, Sherwood McGowan
 sherwood.mcgo...@gmail.com wrote:
  Hey all, sorry if this has been covered, but I've not found anything
 after a
  couple hours' worth of googling. I can see (and I'm familiar with) all
 the
  usual MySQL addon apps once I install Asterisk 1.8.x, but I cannot find
 any
  reference to MySQL and the new CEL logging tool other than ODBC. Is this
 the
  only method available to use MySQL with CEL at this time?
 
 Looking at the CEL config files, I don't see one specifically for
 MySQL.  I do have it up and running via ODBC, for what it's worth.

 --
 Paul Belanger | dCAP

 Thanks mate, I appreciate the reply. That's what I've seen from looking at
 the configs right now.


When I wrote the CEL backends, I probably skipped the MySQL stuff, because
it would be in the addons stuff
for Asterisk.

But, if you look at the similarities between the CEL backends, and the CDR
backends, you'll probably
notice that you could pump out a myseql backend with the same mods in a
short amount of time.

I would be curious to see how you plan to use that table! Have you mapped
out your sql statements yet?

murf



-- 
Steve Murphy
ParseTree Corp
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] MYSQL ADDON INSTALLATION ERROR

2010-10-06 Thread Rizwan Hisham
Hi All,
Please refresh my memory. I am trying to install asterisk after 2 years. I
hav'nt used it since 2008 (version 1.4.2). Now I am trying to install
1.8.0-rc2 on centos 5.5 but getting the following errors.

app_mysql.c:33:25: error: mysql/mysql.h: No such file or directory
app_mysql.c: In function ‘mysql_ds_destroy’:
app_mysql.c:135: warning: implicit declaration of function ‘mysql_close’
app_mysql.c:138: warning: implicit declaration of function
‘mysql_free_result’
app_mysql.c: In function ‘aMYSQL_connect’:
app_mysql.c:319: error: ‘MYSQL’ undeclared (first use in this function)
app_mysql.c:319: error: (Each undeclared identifier is reported only once
app_mysql.c:319: error: for each function it appears in.)
app_mysql.c:319: error: ‘mysql’ undeclared (first use in this function)

I think i have seen these errors before and did manage to get rid of them
but I cant remember how i did it and even dont remember the reason for these
errors. Looks like a header file for mysql addon is missing which is
actually missing (i have checked). How am I suppose to find it?

Plz help.

-- 
Best Regards
Rizwan Qureshi
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MYSQL ADDON INSTALLATION ERROR

2010-10-06 Thread Gareth Blades
Rizwan Hisham wrote:
 Hi All,
 Please refresh my memory. I am trying to install asterisk after 2 years. 
 I hav'nt used it since 2008 (version 1.4.2). Now I am trying to install 
 1.8.0-rc2 on centos 5.5 but getting the following errors.
 
 app_mysql.c:33:25: error: mysql/mysql.h: No such file or directory
 app_mysql.c: In function ‘mysql_ds_destroy’:
 app_mysql.c:135: warning: implicit declaration of function ‘mysql_close’
 app_mysql.c:138: warning: implicit declaration of function 
 ‘mysql_free_result’
 app_mysql.c: In function ‘aMYSQL_connect’:
 app_mysql.c:319: error: ‘MYSQL’ undeclared (first use in this function)
 app_mysql.c:319: error: (Each undeclared identifier is reported only once
 app_mysql.c:319: error: for each function it appears in.)
 app_mysql.c:319: error: ‘mysql’ undeclared (first use in this function)
 
 I think i have seen these errors before and did manage to get rid of 
 them but I cant remember how i did it and even dont remember the reason 
 for these errors. Looks like a header file for mysql addon is missing 
 which is actually missing (i have checked). How am I suppose to find it?
 
 Plz help.
 
 -- 
 Best Regards
 Rizwan Qureshi
 
 

Make sure you have the mysql-devel package installed.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] MYSQL ADDON INSTALLATION ERROR

2010-10-06 Thread Muhammad Nuzaihan Kamalluddin
Hi Ridwan,

You would need to install mysql-devel via yum.

Best Regards,
Muhammad Nuzaihan Kamal
Network Consultant
Mobile: +65 97473874

Asfa Systems Pte Ltd
91, Alps Avenue. #03-10. Singapore 498787

Tel:  +65 62538211
Fax: +65 62504814
www.asfasystems.com.sg

pub   4096R/36630777 2010-07-10
  Key fingerprint = 670A 4D60 0A2D 43A1 2FE0  DFDA D3A9 3F32 3663 0777
uid  Muhammad Nuzaihan Kamalluddin (Asfa Systems Pte. Ltd.) 
muham...@asfasystems.com
sub   4096R/97E5CBBD 2010-07-10



On 06-Oct-2010, at 6:35 PM, Rizwan Hisham wrote:

 Hi All,
 Please refresh my memory. I am trying to install asterisk after 2 years. I 
 hav'nt used it since 2008 (version 1.4.2). Now I am trying to install 
 1.8.0-rc2 on centos 5.5 but getting the following errors.
 
 app_mysql.c:33:25: error: mysql/mysql.h: No such file or directory
 app_mysql.c: In function ‘mysql_ds_destroy’:
 app_mysql.c:135: warning: implicit declaration of function ‘mysql_close’
 app_mysql.c:138: warning: implicit declaration of function ‘mysql_free_result’
 app_mysql.c: In function ‘aMYSQL_connect’:
 app_mysql.c:319: error: ‘MYSQL’ undeclared (first use in this function)
 app_mysql.c:319: error: (Each undeclared identifier is reported only once
 app_mysql.c:319: error: for each function it appears in.)
 app_mysql.c:319: error: ‘mysql’ undeclared (first use in this function)
 
 I think i have seen these errors before and did manage to get rid of them but 
 I cant remember how i did it and even dont remember the reason for these 
 errors. Looks like a header file for mysql addon is missing which is actually 
 missing (i have checked). How am I suppose to find it?
 
 Plz help.
 
 -- 
 Best Regards
 Rizwan Qureshi
 
 
 -- 
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello
 
 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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MYSQL ADDON INSTALLATION ERROR

2010-10-06 Thread Steve Howes

On 6 Oct 2010, at 11:35, Rizwan Hisham wrote:

 Hi All,
 Please refresh my memory. I am trying to install asterisk after 2 years. I 
 hav'nt used it since 2008 (version 1.4.2). Now I am trying to install 
 1.8.0-rc2 on centos 5.5 but getting the following errors.
 snip
 Plz help.

You need mysql-devel. You might also find that most things are case sensitive, 
maybe your malfunctioning caps-lock is causing problems? ;)

S
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] MYSQL ADDON INSTALLATION ERROR

2010-10-06 Thread Rizwan Hisham
Thank you all. It is now installed.

On Wed, Oct 6, 2010 at 5:04 PM, Steve Howes steve-li...@geekinter.netwrote:


 On 6 Oct 2010, at 11:35, Rizwan Hisham wrote:

  Hi All,
  Please refresh my memory. I am trying to install asterisk after 2 years.
 I hav'nt used it since 2008 (version 1.4.2). Now I am trying to install
 1.8.0-rc2 on centos 5.5 but getting the following errors.
  snip
  Plz help.

 You need mysql-devel. You might also find that most things are case
 sensitive, maybe your malfunctioning caps-lock is causing problems? ;)

 S
 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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




-- 
Best Regards
Rizwan Qureshi
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL Connect problem...

2010-08-19 Thread Sherwood McGowan
On Wed, Aug 18, 2010 at 3:59 PM, Geraint Lee gera...@gmail.com wrote:
 This is what I ended up doing, working fine now.
 Cheers

 On 18 August 2010 08:52, Nasir Iqbal na...@ictinnovations.com wrote:

 Avoid to use MySQL dialplan application, instead write an AGI script for
 this purpose


LOL, I hate to say this but writing an AGI script just adds yet
another application layer to your total solution. OP, if you'd like to
figure out WHY that was happening instead of abandoning the ship, I'd
be glad to work with you to discover the cause. I've been using the
MySQL Addon since the early days of ViaTalk back when 1.4 was still
trunk code and the ARA was considered VERY experimental. I've never
come across a problem with it that I couldn't figure out within a day
so long as I stepped back and worked the logical path model of
problem solving...

Drop me a line, I think that I can figure it out within 20 questions
and maybe a peek at a log ;-)

Slainte,
Sherwood McGowan

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL Connect problem...

2010-08-19 Thread Geraint Lee
I would like to figure out why but can't really switch back now it works
since to replicate the problem... whatever it may be... i'd need to leave it
running live and wait for the live system to die... which obviously isn't
what i really want to happen :)

On 19 August 2010 08:11, Sherwood McGowan sherwood.mcgo...@gmail.comwrote:

 On Wed, Aug 18, 2010 at 3:59 PM, Geraint Lee gera...@gmail.com wrote:
  This is what I ended up doing, working fine now.
  Cheers
 
  On 18 August 2010 08:52, Nasir Iqbal na...@ictinnovations.com wrote:
 
  Avoid to use MySQL dialplan application, instead write an AGI script for
  this purpose
 

 LOL, I hate to say this but writing an AGI script just adds yet
 another application layer to your total solution. OP, if you'd like to
 figure out WHY that was happening instead of abandoning the ship, I'd
 be glad to work with you to discover the cause. I've been using the
 MySQL Addon since the early days of ViaTalk back when 1.4 was still
 trunk code and the ARA was considered VERY experimental. I've never
 come across a problem with it that I couldn't figure out within a day
 so long as I stepped back and worked the logical path model of
 problem solving...

 Drop me a line, I think that I can figure it out within 20 questions
 and maybe a peek at a log ;-)

 Slainte,
 Sherwood McGowan

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL Connect problem...

2010-08-19 Thread Sherwood McGowan
On Thu, Aug 19, 2010 at 4:27 AM, Geraint Lee gera...@gmail.com wrote:
 I would like to figure out why but can't really switch back now it works
 since to replicate the problem... whatever it may be... i'd need to leave it
 running live and wait for the live system to die... which obviously isn't
 what i really want to happen :)
 On 19 August 2010 08:11, Sherwood McGowan sherwood.mcgo...@gmail.com
 wrote:

 On Wed, Aug 18, 2010 at 3:59 PM, Geraint Lee gera...@gmail.com wrote:
  This is what I ended up doing, working fine now.
  Cheers
 
  On 18 August 2010 08:52, Nasir Iqbal na...@ictinnovations.com wrote:
 
  Avoid to use MySQL dialplan application, instead write an AGI script
  for
  this purpose
 

 LOL, I hate to say this but writing an AGI script just adds yet
 another application layer to your total solution. OP, if you'd like to
 figure out WHY that was happening instead of abandoning the ship, I'd
 be glad to work with you to discover the cause. I've been using the
 MySQL Addon since the early days of ViaTalk back when 1.4 was still
 trunk code and the ARA was considered VERY experimental. I've never
 come across a problem with it that I couldn't figure out within a day
 so long as I stepped back and worked the logical path model of
 problem solving...

 Drop me a line, I think that I can figure it out within 20 questions
 and maybe a peek at a log ;-)

 Slainte,
 Sherwood McGowan

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

 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 --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

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


Totally understandable mate, trust me, I know how telecom/voip
works..if it's working right now, DONT SCREW IT UP!

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL Connect problem...

2010-08-19 Thread Steve Edwards

On 18 August 2010 08:52, Nasir Iqbal na...@ictinnovations.com wrote:


Avoid to use MySQL dialplan application, instead write an AGI script 
for this purpose



On Wed, Aug 18, 2010 at 3:59 PM, Geraint Lee gera...@gmail.com wrote:



This is what I ended up doing, working fine now. Cheers


On Thu, 19 Aug 2010, Sherwood McGowan wrote:

LOL, I hate to say this but writing an AGI script just adds yet another 
application layer to your total solution.


Yes, another layer, but a layer where you will have full access to what's 
going on -- like what errors are being returned by MySQL and can be 
debugged completely external from Asterisk via the shell command line.


--
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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL Connect problem...

2010-08-19 Thread Sherwood McGowan
On Thu, Aug 19, 2010 at 6:05 PM, Steve Edwards
asterisk@sedwards.com wrote:
 On 18 August 2010 08:52, Nasir Iqbal na...@ictinnovations.com wrote:

 Avoid to use MySQL dialplan application, instead write an AGI script for
 this purpose

 On Wed, Aug 18, 2010 at 3:59 PM, Geraint Lee gera...@gmail.com wrote:

 This is what I ended up doing, working fine now. Cheers

 On Thu, 19 Aug 2010, Sherwood McGowan wrote:

 LOL, I hate to say this but writing an AGI script just adds yet another
 application layer to your total solution.

 Yes, another layer, but a layer where you will have full access to what's
 going on -- like what errors are being returned by MySQL and can be debugged
 completely external from Asterisk via the shell command line.

 --
 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 --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

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


I'll just leave this be...I'm in an irate mood, and I've been using
the MySQL addons since 2005...I don't have problems like this, and you
CAN see what MySQL is saying...THERE'S LOGS ON BOTH SYSTEMS..


I'll leave the Surely you thought of checking THIS discussion for
when I'm a little less likely to spill Jameson and/or Guiness on me
lappy

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL Connect problem...

2010-08-18 Thread Nasir Iqbal
Avoid to use MySQL dialplan application, instead write an AGI script for
this purpose

On Tue, Aug 17, 2010 at 4:59 PM, Geraint Lee gera...@gmail.com wrote:

 Right, I'm baffled.

 I have:
 exten = s,1,MYSQL(Connect DB1 127.0.0.1 geraint xxx amis2)
 exten = s,n,MYSQL(Query NORESULT ${DB1} INSERT\ INTO\ recordings\
 (caller_number\,called_number\,date_created\,date_started\,in_use\,server_id)\
 VALUES\ (\'${CALLERID(number)}\'\,\'${ARG1}\'\,NOW()\,NOW()\,\'Yes\'\,12))
 exten = s,n,MYSQL(Query RESULT1 ${DB1} SELECT\ LAST_INSERT_ID())
 exten = s,n,MYSQL(Fetch FOUND1 ${RESULT1} VALUE1)
 exten = s,n,MYSQL(Clear ${RESULT1})
 exten = s,n,MYSQL(Disconnect ${DB1})
 exten = s,n,MixMonitor(${VALUE1}.wav)
 exten = s,n,Set(CALLERID(all)=xxx)
 exten = s,n,Dial(SIP/prov1/${ARG1})

 in a macro to dial numbers...

 Every few hours or so every call hangs on the s,1 MYSQL(Connect) and won't
 work until i restart asterisk.

 The mysql server has a maximum connections of 2048 (of which around 90 are
 in use) so it's not a mysql connection limit problem from what i can tell
 since while asterisk is stuck i can still log in to mysql just fine, as
 can the web server.

 Does anyone have any suggestions what could be causing asterisk to get
 stuck here? i don't see anything in cli and core show channels just shows
 everyone stuck in state ring on the connect string with no errors.

 Cheers

 Geraint

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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




-- 
Nasir Iqbal

ICT Innovations
http://www.ictinnovations.com/
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] MySQL Connect problem...

2010-08-18 Thread Geraint Lee
This is what I ended up doing, working fine now.

Cheers

On 18 August 2010 08:52, Nasir Iqbal na...@ictinnovations.com wrote:

 Avoid to use MySQL dialplan application, instead write an AGI script for
 this purpose

 On Tue, Aug 17, 2010 at 4:59 PM, Geraint Lee gera...@gmail.com wrote:

 Right, I'm baffled.

 I have:
 exten = s,1,MYSQL(Connect DB1 127.0.0.1 geraint xxx amis2)
 exten = s,n,MYSQL(Query NORESULT ${DB1} INSERT\ INTO\ recordings\
 (caller_number\,called_number\,date_created\,date_started\,in_use\,server_id)\
 VALUES\ (\'${CALLERID(number)}\'\,\'${ARG1}\'\,NOW()\,NOW()\,\'Yes\'\,12))
 exten = s,n,MYSQL(Query RESULT1 ${DB1} SELECT\ LAST_INSERT_ID())
 exten = s,n,MYSQL(Fetch FOUND1 ${RESULT1} VALUE1)
 exten = s,n,MYSQL(Clear ${RESULT1})
 exten = s,n,MYSQL(Disconnect ${DB1})
 exten = s,n,MixMonitor(${VALUE1}.wav)
 exten = s,n,Set(CALLERID(all)=xxx)
 exten = s,n,Dial(SIP/prov1/${ARG1})

 in a macro to dial numbers...

 Every few hours or so every call hangs on the s,1 MYSQL(Connect) and won't
 work until i restart asterisk.

 The mysql server has a maximum connections of 2048 (of which around 90 are
 in use) so it's not a mysql connection limit problem from what i can tell
 since while asterisk is stuck i can still log in to mysql just fine, as
 can the web server.

 Does anyone have any suggestions what could be causing asterisk to get
 stuck here? i don't see anything in cli and core show channels just shows
 everyone stuck in state ring on the connect string with no errors.

 Cheers

 Geraint

 --

 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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




 --
 Nasir Iqbal

 ICT Innovations
 http://www.ictinnovations.com/


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] MySQL Connect problem...

2010-08-17 Thread Geraint Lee
Right, I'm baffled.

I have:
exten = s,1,MYSQL(Connect DB1 127.0.0.1 geraint xxx amis2)
exten = s,n,MYSQL(Query NORESULT ${DB1} INSERT\ INTO\ recordings\
(caller_number\,called_number\,date_created\,date_started\,in_use\,server_id)\
VALUES\ (\'${CALLERID(number)}\'\,\'${ARG1}\'\,NOW()\,NOW()\,\'Yes\'\,12))
exten = s,n,MYSQL(Query RESULT1 ${DB1} SELECT\ LAST_INSERT_ID())
exten = s,n,MYSQL(Fetch FOUND1 ${RESULT1} VALUE1)
exten = s,n,MYSQL(Clear ${RESULT1})
exten = s,n,MYSQL(Disconnect ${DB1})
exten = s,n,MixMonitor(${VALUE1}.wav)
exten = s,n,Set(CALLERID(all)=xxx)
exten = s,n,Dial(SIP/prov1/${ARG1})

in a macro to dial numbers...

Every few hours or so every call hangs on the s,1 MYSQL(Connect) and won't
work until i restart asterisk.

The mysql server has a maximum connections of 2048 (of which around 90 are
in use) so it's not a mysql connection limit problem from what i can tell
since while asterisk is stuck i can still log in to mysql just fine, as
can the web server.

Does anyone have any suggestions what could be causing asterisk to get stuck
here? i don't see anything in cli and core show channels just shows everyone
stuck in state ring on the connect string with no errors.

Cheers

Geraint
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] mysql realtime schema

2010-04-29 Thread Vasiliy G Tolstov
Hello. Where i can find complete realtime mysql schema for asterisk 1.6?
Google get results to some tables.
I want to do all 
iaxusers
iaxpeers
sipusers
sippeers
sipregs
voicemail
extensions
meetme
queues
queue_members
musiconhold
queue_log

in separate mysql tables.


-- 
Vasiliy G Tolstov v.tols...@selfip.ru
Selfip.Ru


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] MYSQL problem

2010-01-28 Thread David Gibbons
snip
However, if you're going to be doing
massive joins for reporting, you're better off using something else (or
running individual MySQL slaves, whose purpose is to run those complex queries
and doing nothing else).  In a past life, our MySQL database ran circles
around Oracle, Informix, and DB2... until someone ran a massive join on the
same server, which caused MySQL to crawl.
/snip

Good distinction to make. I should have been more clear.

I believe mysql has read only slave capabilities within a clustered 
environment, so your point about the slaves isn't out of the question.

However I don't believe in database engines doing really anything other than 
transaction processing. That's why IMHO there should always be a distinction 
between the database backend and whatever software you're using to generate 
OLAP data (this software should NOT be the database engine). I know this is not 
a common opinion, but if we keep the database engine doing what it's good at 
and leave any report processing to external software, we're generally able to 
get better performance out of each individual piece...

-Dave

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


  1   2   3   4   5   6   >