Re: [asterisk-users] CLI flood : requested media update control 26

2013-04-18 Thread Jonas Kellens

On 04/02/2013 05:42 PM, Matthew Jordan wrote:

On 04/02/2013 06:37 AM, Jonas Kellens wrote:

On 04/02/2013 12:50 PM, A J Stiles wrote:

(Message re-ordered for readability.  The beginning is *not* the right place
for your response -- answers come *after* questions, or *between* points.)

On Tuesday 02 April 2013, Jonas Kellens wrote:

On 04/02/2013 12:35 PM, A J Stiles wrote:

On Tuesday 02 April 2013, Jonas Kellens wrote:

Hello,

any idea why the Asterisk CLI gets flooded by these messages ? How can
the SIP peer /vita3/ cause this flood ?

First question:  What is "vita3" ?  A hardware SIP phone, a softphone, an
ATA or something else?

The SIP peer vita3 is a realtime sip peer, installed in a hardware
IP-phone (Siemens Gigaset N510 pro).

Have you any other Siemens Gigaset N510 pro phones in your setup?


Yes there are. But I want to know what these messages on the CLI mean ?


The device communicating with Asterisk over SIP channel
SIP/vita3-10af had a change in the media source (26 ==
AST_CONTROL_SRCCHANGE). This occurs when the SSRC in an RTP packet sent
by that device changed.

When in the middle of a dialling operation, we tend to log out when one
of the parties passes information to the other party. In general, this
wouldn't flood the CLI, as a party shouldn't be passing much information
off to the other parties involved in the dial.

I'm not sure why a device in the middle of a 'normal' dialling operation
(regardless of it being either the caller/peer) would switch its SSRC
rapidly in such a fashion. A pcap should show the changes in SSRC and
might illustrate what's occurring.

Matt


Hello,

I don't think it's related to the IP-phone because I notice my 
Asterisk-server also gets these messages from my SIP-provider.


The call goes : IPphone --> Asterisk --> SIP-provider

It does not occur always when calling from the same IP-phone. It can be 
any IP-phone and phone type. It can also occur at any time : when there 
are few calls and when there are many calls.


The negative side when this occurs is that there is no audio when the 
calls gets answered. These messages flood the CLI untill the call gets 
answered. Then it stops, but there is no-way-audio.


I have a second Asterisk-server (same version : 1.8.12.2) and there I 
see that this messages occurs just 1 time in a call.



Could it be an issue of Asterisk ? Timing issue ? Any idea which issue 
and how to tune it ?



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


[asterisk-users] ODBC dialplan looping problem

2013-04-18 Thread Pat Collins
All,

Thank you in advance for any help.

I have a customer in need of a conferencing system.  A requirement is for
users to each have their own PIN for the same bridge.

So, I put the list of users, PINs bridges into a MYSQL DB and used an ODBC
connector to parse the table.

Asterisk is connected and reads the rows as expected.  The problem is that
if a user enters a PIN that is NOT in the table, asterisk goes crazy and
continues to loop forever.

Please have a look and tell me where I went so wrong.

Func_odbc.conf looks like this:

[PIN]

dsn=BRIDGE

mode=multirow

readsql=SELECT pin from users WHERE confid='${SQL_ESC(${CONF_ID})}'

 

extensions.conf section:

[infromhost] ;Host dials  over SIP trunk exten=,1,Answer

exten=,n,Background(conf-getconfno)

exten=,n,WaitExten(10)

exten=,n,Hangup

exten=_XX,1,Set(GLOBAL(CONF_ID)=${EXTEN})

exten=_XX,n,GoTo(rooms,${EXTEN},1)

;

[rooms]

exten=_XX,1,Set(CONF_ID=${EXTEN})

exten=_XX,n,Background(conf-getpin)

exten=_XX,n,WaitExten(5)

exten=_XX,n,Hangup

exten=_1X,1,Goto(getpin,${EXTEN},1)

exten=_2X,1,Goto(getpin,${EXTEN},1)

exten=_3X,1,Goto(getpin,${EXTEN},1)

exten=_4X,1,Goto(getpin,${EXTEN},1)

exten=_5X,1,Goto(getpin,${EXTEN},1)

exten=_6X,1,Goto(getpin,${EXTEN},1)

exten=_7X,1,Goto(getpin,${EXTEN},1)

exten=_8X,1,Goto(getpin,${EXTEN},1)

exten=_9X,1,Goto(getpin,${EXTEN},1)

exten=i,1,Goto(getpin,${CONF_PIN},1)

;

[getpin]

exten=_XX,1,Set(GLOBAL(CONF_PIN)=${EXTEN})

exten=_XX,n,Set(ODBC_ID=${ODBC_PIN(1)})

exten=_XX,n(loop_start),NoOp()

exten=_XX,n,Set(ROW_RESULT=${ODBC_FETCH(${ODBC_ID})})

exten=_XX,n,GotoIf($["${ODBC_FETCH}" = "FAILURE"]?cleanup,1) 

exten=_XX,n,GotoIf($["${ROW_RESULT}" = "${CONF_PIN}"]?good_exten,1)

exten=_XX,n,Goto(loop_start)

;

exten=cleanup,1,Verbose(1,Finish up)

same=n,Verbose(1,PIN not found)

same=n,ODBCFinish(${ODBC_ID})

same=n,playback(conf-invalidpin)

same=n,Goto(rooms,${CONF_ID}1)

same=n,Hangup()

;

exten=good_exten,1,Verbose(1,The PIN is available)

same=n,ODBCFinish(${ODBC_ID})

same=n,Verbose(1,Drop Caller into the bridge)

same=n,Set(CONFBRIDGE(user,template)=default_user)

same=n,ConfBridge(${CONF_ID},default_bridge,,sample_user_menu)

same=n,Hangup()

;

 

The log shows the 3 existing DB table rows are found but continues to cycle
indefinitely if the PIN is NOT found.

First few rows of the console log:

=

Connected to Asterisk 11.3.0 currently running on atpconf001 (pid = 1695)
atpconf001*CLI>

  == Using SIP RTP CoS mark 5

 

atpconf001*CLI> 

-- Executing [067740@default:1] Set("SIP/testbridge2-0021",
"GLOBAL(CONF_ID)=067740") in new stack

  == Setting global variable 'CONF_ID' to '067740'

-- Executing [067740@default:2] Goto("SIP/testbridge2-0021",
"rooms,067740,1") in new stack

 

atpconf001*CLI> 

-- Goto (rooms,067740,1)

-- Executing [067740@rooms:1] Set("SIP/testbridge2-0021",
"CONF_ID=067740") in new stack

-- Executing [067740@rooms:2] BackGround("SIP/testbridge2-0021",
"conf-getpin") in new stack

 

atpconf001*CLI> 

--  Playing 'conf-getpin.slin' (language 'en')

 

atpconf001*CLI> 

-- Executing [067740@rooms:3] WaitExten("SIP/testbridge2-0021", "5")
in new stack

 

atpconf001*CLI>

  == CDR updated on SIP/testbridge2-0021

-- Executing [444999@rooms:1] Goto("SIP/testbridge2-0021",
"getpin,444999,1") in new stack

-- Goto (getpin,444999,1)

-- Executing [444999@getpin:1] Set("SIP/testbridge2-0021",
"GLOBAL(CONF_PIN)=444999") in new stack

  == Setting global variable 'CONF_PIN' to '444999'

 

atpconf001*CLI> 

-- Executing [444999@getpin:2] Set("SIP/testbridge2-0021",
"ODBC_ID=32") in new stack

-- Executing [444999@getpin:3] NoOp("SIP/testbridge2-0021", "") in
new stack

-- Executing [444999@getpin:4] Set("SIP/testbridge2-0021",
"ROW_RESULT=112233") in new stack

 

atpconf001*CLI> 

-- Executing [444999@getpin:5] GotoIf("SIP/testbridge2-0021",
"0?cleanup,1") in new stack

-- Executing [444999@getpin:6] GotoIf("SIP/testbridge2-0021",
"0?good_exten,1") in new stack

-- Executing [444999@getpin:7] Goto("SIP/testbridge2-0021",
"loop_start") in new stack

-- Goto (getpin,444999,3)

-- Executing [444999@getpin:3] NoOp("SIP/testbridge2-0021", "") in
new stack

-- Executing [444999@getpin:4] Set("SIP/testbridge2-0021",
"ROW_RESULT=33") in new stack

-- Executing [444999@getpin:5] GotoIf("SIP/testbridge2-0021",
"0?cleanup,1") in new stack

-- Executing [444999@getpin:6] GotoIf("SIP/testbridge2-0021",
"0?good_exten,1") in new stack

-- Executing [444999@getpin:7] Goto("SIP/testbridge2-0021",
"loop_start") in new stack

-- Goto (getpin,444999,3)

-- Executing [444999@getpin:3] NoOp("SIP/testbridge2-0021", "") in
new stack

-- Executing

Re: [asterisk-users] ODBC dialplan looping problem

2013-04-18 Thread Doug Lytle
>> The problem is that if a user enters a PIN that is NOT in the table, 
>> asterisk goes crazy and continues to loop forever. 

Why don't you use read instead? This is what I have: 

exten => s,n,Answer(500) 
exten => s,n,Read(get-room-num,conf-getconfno) 

; * 
; Get conference room number, if number entered is 9 ** 
; jump to verify. ** 
; * 

exten => s,n,NoOP(${conf-getchannel}) 

Do some mysql magic here 

exten => s,n,GotoIf($["${conference.room}" != ""]?s-process,1:s-notexist,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] ODBC dialplan looping problem

2013-04-18 Thread Bharat Lalcheta
I think there is no problem with asterisk.

exten=_XX,n,GotoIf($["${ODBC_FETCH}" = "FAILURE"]?cleanup,1)

exten=_XX,n,GotoIf($["${ROW_RESULT}" = "${CONF_PIN}"]?good_exten,1)

It should be,

exten=_XX,n,GotoIf($["${ODBC_FETCH}" = "FAILURE"]?getpin,cleanup,1)
exten=_XX,n,GotoIf($["${ROW_RESULT}" =
"${CONF_PIN}"]?getpin,good_exten,1)

Hope it helps,

Regards,



Bharat Lalcheta
On Thu, Apr 18, 2013 at 4:45 PM, Pat Collins wrote:

> All,
>
> Thank you in advance for any help.
>
> I have a customer in need of a conferencing system.  A requirement is for
> users to each have their own PIN for the same bridge.
>
> So, I put the list of users, PINs bridges into a MYSQL DB and used an ODBC
> connector to parse the table.
>
> Asterisk is connected and reads the rows as expected.  The problem is that
> if a user enters a PIN that is NOT in the table, asterisk goes crazy and
> continues to loop forever.
>
> Please have a look and tell me where I went so wrong.
>
> Func_odbc.conf looks like this:
>
> [PIN]
>
> dsn=BRIDGE
>
> mode=multirow
>
> readsql=SELECT pin from users WHERE confid='${SQL_ESC(${CONF_ID})}'
>
> ** **
>
> extensions.conf section:
>
> [infromhost] ;Host dials  over SIP trunk exten=,1,Answer
>
> exten=,n,Background(conf-getconfno)
>
> exten=,n,WaitExten(10)
>
> exten=,n,Hangup
>
> exten=_XX,1,Set(GLOBAL(CONF_ID)=${EXTEN})
>
> exten=_XX,n,GoTo(rooms,${EXTEN},1)
>
> ;
>
> [rooms]
>
> exten=_XX,1,Set(CONF_ID=${EXTEN})
>
> exten=_XX,n,Background(conf-getpin)
>
> exten=_XX,n,WaitExten(5)
>
> exten=_XX,n,Hangup
>
> exten=_1X,1,Goto(getpin,${EXTEN},1)
>
> exten=_2X,1,Goto(getpin,${EXTEN},1)
>
> exten=_3X,1,Goto(getpin,${EXTEN},1)
>
> exten=_4X,1,Goto(getpin,${EXTEN},1)
>
> exten=_5X,1,Goto(getpin,${EXTEN},1)
>
> exten=_6X,1,Goto(getpin,${EXTEN},1)
>
> exten=_7X,1,Goto(getpin,${EXTEN},1)
>
> exten=_8X,1,Goto(getpin,${EXTEN},1)
>
> exten=_9X,1,Goto(getpin,${EXTEN},1)
>
> exten=i,1,Goto(getpin,${CONF_PIN},1)
>
> ;
>
> [getpin]
>
> exten=_XX,1,Set(GLOBAL(CONF_PIN)=${EXTEN})
>
> exten=_XX,n,Set(ODBC_ID=${ODBC_PIN(1)})
>
> exten=_XX,n(loop_start),NoOp()
>
> exten=_XX,n,Set(ROW_RESULT=${ODBC_FETCH(${ODBC_ID})})
>
> exten=_XX,n,GotoIf($["${ODBC_FETCH}" = "FAILURE"]?cleanup,1) 
>
> exten=_XX,n,GotoIf($["${ROW_RESULT}" = "${CONF_PIN}"]?good_exten,1)***
> *
>
> exten=_XX,n,Goto(loop_start)
>
> ;
>
> exten=cleanup,1,Verbose(1,Finish up)
>
> same=n,Verbose(1,PIN not found)
>
> same=n,ODBCFinish(${ODBC_ID})
>
> same=n,playback(conf-invalidpin)
>
> same=n,Goto(rooms,${CONF_ID}1)
>
> same=n,Hangup()
>
> ;
>
> exten=good_exten,1,Verbose(1,The PIN is available)
>
> same=n,ODBCFinish(${ODBC_ID})
>
> same=n,Verbose(1,Drop Caller into the bridge)
>
> same=n,Set(CONFBRIDGE(user,template)=default_user)
>
> same=n,ConfBridge(${CONF_ID},default_bridge,,sample_user_menu)
>
> same=n,Hangup()
>
> ;
>
> ** **
>
> The log shows the 3 existing DB table rows are found but continues to
> cycle indefinitely if the PIN is NOT found.
>
> First few rows of the console log:
>
> =*
> ***
>
> Connected to Asterisk 11.3.0 currently running on atpconf001 (pid = 1695)
> atpconf001*CLI>
>
>   == Using SIP RTP CoS mark 5
>
> ** **
>
> atpconf001*CLI> 
>
> -- Executing [067740@default:1] Set("SIP/testbridge2-0021",
> "GLOBAL(CONF_ID)=067740") in new stack
>
>   == Setting global variable 'CONF_ID' to '067740'
>
> -- Executing [067740@default:2] Goto("SIP/testbridge2-0021",
> "rooms,067740,1") in new stack
>
> ** **
>
> atpconf001*CLI> 
>
> -- Goto (rooms,067740,1)
>
> -- Executing [067740@rooms:1] Set("SIP/testbridge2-0021",
> "CONF_ID=067740") in new stack
>
> -- Executing [067740@rooms:2] BackGround("SIP/testbridge2-0021",
> "conf-getpin") in new stack
>
> ** **
>
> atpconf001*CLI> 
>
> --  Playing 'conf-getpin.slin' (language
> 'en')
>
> ** **
>
> atpconf001*CLI> 
>
> -- Executing [067740@rooms:3] WaitExten("SIP/testbridge2-0021",
> "5") in new stack
>
> ** **
>
> atpconf001*CLI>
>
>   == CDR updated on SIP/testbridge2-0021
>
> -- Executing [444999@rooms:1] Goto("SIP/testbridge2-0021",
> "getpin,444999,1") in new stack
>
> -- Goto (getpin,444999,1)
>
> -- Executing [444999@getpin:1] Set("SIP/testbridge2-0021",
> "GLOBAL(CONF_PIN)=444999") in new stack
>
>   == Setting global variable 'CONF_PIN' to '444999'
>
> ** **
>
> atpconf001*CLI> 
>
> -- Executing [444999@getpin:2] Set("SIP/testbridge2-0021",
> "ODBC_ID=32") in new stack
>
> -- Executing [444999@getpin:3

Re: [asterisk-users] ODBC dialplan looping problem

2013-04-18 Thread Pat Collins
Thank you Bharat.

Sadly, that made no difference.

 

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Bharat
Lalcheta
Sent: Thursday, April 18, 2013 7:33 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] ODBC dialplan looping problem

 

I think there is no problem with asterisk. 

exten=_XX,n,GotoIf($["${ODBC_FETCH}" = "FAILURE"]?cleanup,1) 

exten=_XX,n,GotoIf($["${ROW_RESULT}" = "${CONF_PIN}"]?good_exten,1)

It should be,

exten=_XX,n,GotoIf($["${ODBC_FETCH}" = "FAILURE"]?getpin,cleanup,1)
exten=_XX,n,GotoIf($["${ROW_RESULT}" =
"${CONF_PIN}"]?getpin,good_exten,1)

Hope it helps,

Regards,

 

Bharat Lalcheta

On Thu, Apr 18, 2013 at 4:45 PM, Pat Collins 
wrote:

All,

Thank you in advance for any help.

I have a customer in need of a conferencing system.  A requirement is for
users to each have their own PIN for the same bridge.

So, I put the list of users, PINs bridges into a MYSQL DB and used an ODBC
connector to parse the table.

Asterisk is connected and reads the rows as expected.  The problem is that
if a user enters a PIN that is NOT in the table, asterisk goes crazy and
continues to loop forever.

Please have a look and tell me where I went so wrong.

Func_odbc.conf looks like this:

[PIN]

dsn=BRIDGE

mode=multirow

readsql=SELECT pin from users WHERE confid='${SQL_ESC(${CONF_ID})}'

 

extensions.conf section:

[infromhost] ;Host dials  over SIP trunk exten=,1,Answer

exten=,n,Background(conf-getconfno)

exten=,n,WaitExten(10)

exten=,n,Hangup

exten=_XX,1,Set(GLOBAL(CONF_ID)=${EXTEN})

exten=_XX,n,GoTo(rooms,${EXTEN},1)

;

[rooms]

exten=_XX,1,Set(CONF_ID=${EXTEN})

exten=_XX,n,Background(conf-getpin)

exten=_XX,n,WaitExten(5)

exten=_XX,n,Hangup

exten=_1X,1,Goto(getpin,${EXTEN},1)

exten=_2X,1,Goto(getpin,${EXTEN},1)

exten=_3X,1,Goto(getpin,${EXTEN},1)

exten=_4X,1,Goto(getpin,${EXTEN},1)

exten=_5X,1,Goto(getpin,${EXTEN},1)

exten=_6X,1,Goto(getpin,${EXTEN},1)

exten=_7X,1,Goto(getpin,${EXTEN},1)

exten=_8X,1,Goto(getpin,${EXTEN},1)

exten=_9X,1,Goto(getpin,${EXTEN},1)

exten=i,1,Goto(getpin,${CONF_PIN},1)

;

[getpin]

exten=_XX,1,Set(GLOBAL(CONF_PIN)=${EXTEN})

exten=_XX,n,Set(ODBC_ID=${ODBC_PIN(1)})

exten=_XX,n(loop_start),NoOp()

exten=_XX,n,Set(ROW_RESULT=${ODBC_FETCH(${ODBC_ID})})

exten=_XX,n,GotoIf($["${ODBC_FETCH}" = "FAILURE"]?cleanup,1) 

exten=_XX,n,GotoIf($["${ROW_RESULT}" = "${CONF_PIN}"]?good_exten,1)

exten=_XX,n,Goto(loop_start)

;

exten=cleanup,1,Verbose(1,Finish up)

same=n,Verbose(1,PIN not found)

same=n,ODBCFinish(${ODBC_ID})

same=n,playback(conf-invalidpin)

same=n,Goto(rooms,${CONF_ID}1)

same=n,Hangup()

;

exten=good_exten,1,Verbose(1,The PIN is available)

same=n,ODBCFinish(${ODBC_ID})

same=n,Verbose(1,Drop Caller into the bridge)

same=n,Set(CONFBRIDGE(user,template)=default_user)

same=n,ConfBridge(${CONF_ID},default_bridge,,sample_user_menu)

same=n,Hangup()

;

 

The log shows the 3 existing DB table rows are found but continues to cycle
indefinitely if the PIN is NOT found.

First few rows of the console log:

=

Connected to Asterisk 11.3.0 currently running on atpconf001 (pid = 1695)
atpconf001*CLI>

  == Using SIP RTP CoS mark 5

 

atpconf001*CLI> 

-- Executing [067740@default:1] Set("SIP/testbridge2-0021",
"GLOBAL(CONF_ID)=067740") in new stack

  == Setting global variable 'CONF_ID' to '067740'

-- Executing [067740@default:2] Goto("SIP/testbridge2-0021",
"rooms,067740,1") in new stack

 

atpconf001*CLI> 

-- Goto (rooms,067740,1)

-- Executing [067740@rooms:1] Set("SIP/testbridge2-0021",
"CONF_ID=067740") in new stack

-- Executing [067740@rooms:2] BackGround("SIP/testbridge2-0021",
"conf-getpin") in new stack

 

atpconf001*CLI> 

--  Playing 'conf-getpin.slin' (language 'en')

 

atpconf001*CLI> 

-- Executing [067740@rooms:3] WaitExten("SIP/testbridge2-0021", "5")
in new stack

 

atpconf001*CLI>

  == CDR updated on SIP/testbridge2-0021

-- Executing [444999@rooms:1] Goto("SIP/testbridge2-0021",
"getpin,444999,1") in new stack

-- Goto (getpin,444999,1)

-- Executing [444999@getpin:1] Set("SIP/testbridge2-0021",
"GLOBAL(CONF_PIN)=444999") in new stack

  == Setting global variable 'CONF_PIN' to '444999'

 

atpconf001*CLI> 

-- Executing [444999@getpin:2] Set("SIP/testbridge2-0021",
"ODBC_ID=32") in new stack

-- Executing [444999@getpin:3] NoOp("SIP/testbridge2-0021", "") in
new stack

-- Executing [444999@getpin:4] Set("SIP/testbridge2-0021",
"ROW_RESULT=112233") in new stack

 

atpconf001*CLI> 

-- Executing [444999@getpin:5] GotoIf("SIP/testbridge2-0021",
"0?cleanup,1") in new stack

-- Executing [444999@getpin:6] GotoIf("SIP/testbr

Re: [asterisk-users] ODBC dialplan looping problem

2013-04-18 Thread Pat Collins
Thanks for the reply Doug!

How might I incorporate this into my dialplan?

Sorry, learning as I go

On a side note, any idea how to strip off the # at the end of a string?  
${EXTEN:0:6} doesn't do the trick.

Is this even possible?

Pat...

 

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Doug Lytle
Sent: Thursday, April 18, 2013 7:29 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] ODBC dialplan looping problem

 

>> The problem is that if a user enters a PIN that is NOT in the table, 
>> asterisk goes crazy and continues to loop forever.

 

Why don't you use read instead?  This is what I have:

 

exten => s,n,Answer(500)
exten => s,n,Read(get-room-num,conf-getconfno)

; *
; Get conference room number, if number entered is 9 **
; jump to verify.**
; *

exten => s,n,NoOP(${conf-getchannel})

 

Do some mysql magic here

 

exten => s,n,GotoIf($["${conference.room}" != ""]?s-process,1:s-notexist,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] ODBC dialplan looping problem

2013-04-18 Thread Bharat Lalcheta
Sorry for that.

I believe that, dialplan misbehave only when you didn't get the result
right?...then instead of below

exten=_XX,n,GotoIf($["${ODBC_FETCH}" = "FAILURE"]?cleanup,1)

try this...

exten=_XX,n,GotoIf($["${ODBC_FETCH_STATUS}" = "FAILURE"]?cleanup,1)

Hope it helps you out.

Regards,

Bharat Lalcheta


On Thu, Apr 18, 2013 at 5:36 PM, Pat Collins wrote:

> Thank you Bharat.
>
> Sadly, that made no difference.
>
> ** **
>
> *From:* asterisk-users-boun...@lists.digium.com [mailto:
> asterisk-users-boun...@lists.digium.com] *On Behalf Of *Bharat Lalcheta
> *Sent:* Thursday, April 18, 2013 7:33 AM
> *To:* Asterisk Users Mailing List - Non-Commercial Discussion
> *Subject:* Re: [asterisk-users] ODBC dialplan looping problem
>
> ** **
>
> I think there is no problem with asterisk. 
>
> exten=_XX,n,GotoIf($["${ODBC_FETCH}" = "FAILURE"]?cleanup,1) 
>
> exten=_XX,n,GotoIf($["${ROW_RESULT}" = "${CONF_PIN}"]?good_exten,1)***
> *
>
> It should be,
>
> exten=_XX,n,GotoIf($["${ODBC_FETCH}" = "FAILURE"]?getpin,cleanup,1)
> exten=_XX,n,GotoIf($["${ROW_RESULT}" =
> "${CONF_PIN}"]?getpin,good_exten,1)
>
> Hope it helps,
>
> Regards,
>
>  
>
> Bharat Lalcheta
>
> On Thu, Apr 18, 2013 at 4:45 PM, Pat Collins 
> wrote:
>
> All,
>
> Thank you in advance for any help.
>
> I have a customer in need of a conferencing system.  A requirement is for
> users to each have their own PIN for the same bridge.
>
> So, I put the list of users, PINs bridges into a MYSQL DB and used an ODBC
> connector to parse the table.
>
> Asterisk is connected and reads the rows as expected.  The problem is that
> if a user enters a PIN that is NOT in the table, asterisk goes crazy and
> continues to loop forever.
>
> Please have a look and tell me where I went so wrong.
>
> Func_odbc.conf looks like this:
>
> [PIN]
>
> dsn=BRIDGE
>
> mode=multirow
>
> readsql=SELECT pin from users WHERE confid='${SQL_ESC(${CONF_ID})}'
>
>  
>
> extensions.conf section:
>
> [infromhost] ;Host dials  over SIP trunk exten=,1,Answer
>
> exten=,n,Background(conf-getconfno)
>
> exten=,n,WaitExten(10)
>
> exten=,n,Hangup
>
> exten=_XX,1,Set(GLOBAL(CONF_ID)=${EXTEN})
>
> exten=_XX,n,GoTo(rooms,${EXTEN},1)
>
> ;
>
> [rooms]
>
> exten=_XX,1,Set(CONF_ID=${EXTEN})
>
> exten=_XX,n,Background(conf-getpin)
>
> exten=_XX,n,WaitExten(5)
>
> exten=_XX,n,Hangup
>
> exten=_1X,1,Goto(getpin,${EXTEN},1)
>
> exten=_2X,1,Goto(getpin,${EXTEN},1)
>
> exten=_3X,1,Goto(getpin,${EXTEN},1)
>
> exten=_4X,1,Goto(getpin,${EXTEN},1)
>
> exten=_5X,1,Goto(getpin,${EXTEN},1)
>
> exten=_6X,1,Goto(getpin,${EXTEN},1)
>
> exten=_7X,1,Goto(getpin,${EXTEN},1)
>
> exten=_8X,1,Goto(getpin,${EXTEN},1)
>
> exten=_9X,1,Goto(getpin,${EXTEN},1)
>
> exten=i,1,Goto(getpin,${CONF_PIN},1)
>
> ;
>
> [getpin]
>
> exten=_XX,1,Set(GLOBAL(CONF_PIN)=${EXTEN})
>
> exten=_XX,n,Set(ODBC_ID=${ODBC_PIN(1)})
>
> exten=_XX,n(loop_start),NoOp()
>
> exten=_XX,n,Set(ROW_RESULT=${ODBC_FETCH(${ODBC_ID})})
>
> exten=_XX,n,GotoIf($["${ODBC_FETCH}" = "FAILURE"]?cleanup,1) 
>
> exten=_XX,n,GotoIf($["${ROW_RESULT}" = "${CONF_PIN}"]?good_exten,1)***
> *
>
> exten=_XX,n,Goto(loop_start)
>
> ;
>
> exten=cleanup,1,Verbose(1,Finish up)
>
> same=n,Verbose(1,PIN not found)
>
> same=n,ODBCFinish(${ODBC_ID})
>
> same=n,playback(conf-invalidpin)
>
> same=n,Goto(rooms,${CONF_ID}1)
>
> same=n,Hangup()
>
> ;
>
> exten=good_exten,1,Verbose(1,The PIN is available)
>
> same=n,ODBCFinish(${ODBC_ID})
>
> same=n,Verbose(1,Drop Caller into the bridge)
>
> same=n,Set(CONFBRIDGE(user,template)=default_user)
>
> same=n,ConfBridge(${CONF_ID},default_bridge,,sample_user_menu)
>
> same=n,Hangup()
>
> ;
>
>  
>
> The log shows the 3 existing DB table rows are found but continues to
> cycle indefinitely if the PIN is NOT found.
>
> First few rows of the console log:
>
> =*
> ***
>
> Connected to Asterisk 11.3.0 currently running on atpconf001 (pid = 1695)
> atpconf001*CLI>
>
>   == Using SIP RTP CoS mark 5
>
>  
>
> atpconf001*CLI> 
>
> -- Executing [067740@default:1] Set("SIP/testbridge2-0021",
> "GLOBAL(CONF_ID)=067740") in new stack
>
>   == Setting global variable 'CONF_ID' to '067740'
>
> -- Executing [067740@default:2] Goto("SIP/testbridge2-0021",
> "rooms,067740,1") in new stack
>
>  
>
> atpconf001*CLI> 
>
> -- Goto (rooms,067740,1)
>
> -- Executing [067740@rooms:1] Set("SIP/testbridge2-0021",
> "CONF_ID=067740") in new stack
>
> -- Executing [067740@rooms:2] BackGround("SIP/testbridge2-00

Re: [asterisk-users] ODBC dialplan looping problem

2013-04-18 Thread jg

Hi Pat!

The book  "Asterisk: The Definitive Guide" contains an example 
implementation of exactly what you need (search for hotdesk). There used 
to be a free online access to the book (but the link seems to be dead now).


The basis difference is, that the authors used the "Read" command 
instead of "Background".


jg

--
_
-- 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] ODBC dialplan looping problem

2013-04-18 Thread Pat Collins
Perfect

THANK YOU!!

 

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Bharat
Lalcheta
Sent: Thursday, April 18, 2013 8:27 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] ODBC dialplan looping problem

 

Sorry for that.

 

I believe that, dialplan misbehave only when you didn't get the result
right?...then instead of below

 

exten=_XX,n,GotoIf($["${ODBC_FETCH}" = "FAILURE"]?cleanup,1) 

 

try this...

 

exten=_XX,n,GotoIf($["${ODBC_FETCH_STATUS}" = "FAILURE"]?cleanup,1) 

 

Hope it helps you out.

 

Regards,

 

Bharat Lalcheta

 

On Thu, Apr 18, 2013 at 5:36 PM, Pat Collins 
wrote:

Thank you Bharat.

Sadly, that made no difference.

 

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Bharat
Lalcheta
Sent: Thursday, April 18, 2013 7:33 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] ODBC dialplan looping problem

 

I think there is no problem with asterisk. 

exten=_XX,n,GotoIf($["${ODBC_FETCH}" = "FAILURE"]?cleanup,1) 

exten=_XX,n,GotoIf($["${ROW_RESULT}" = "${CONF_PIN}"]?good_exten,1)

It should be,

exten=_XX,n,GotoIf($["${ODBC_FETCH}" = "FAILURE"]?getpin,cleanup,1)
exten=_XX,n,GotoIf($["${ROW_RESULT}" =
"${CONF_PIN}"]?getpin,good_exten,1)

Hope it helps,

Regards,

 

Bharat Lalcheta

On Thu, Apr 18, 2013 at 4:45 PM, Pat Collins 
wrote:

All,

Thank you in advance for any help.

I have a customer in need of a conferencing system.  A requirement is for
users to each have their own PIN for the same bridge.

So, I put the list of users, PINs bridges into a MYSQL DB and used an ODBC
connector to parse the table.

Asterisk is connected and reads the rows as expected.  The problem is that
if a user enters a PIN that is NOT in the table, asterisk goes crazy and
continues to loop forever.

Please have a look and tell me where I went so wrong.

Func_odbc.conf looks like this:

[PIN]

dsn=BRIDGE

mode=multirow

readsql=SELECT pin from users WHERE confid='${SQL_ESC(${CONF_ID})}'

 

extensions.conf section:

[infromhost] ;Host dials  over SIP trunk exten=,1,Answer

exten=,n,Background(conf-getconfno)

exten=,n,WaitExten(10)

exten=,n,Hangup

exten=_XX,1,Set(GLOBAL(CONF_ID)=${EXTEN})

exten=_XX,n,GoTo(rooms,${EXTEN},1)

;

[rooms]

exten=_XX,1,Set(CONF_ID=${EXTEN})

exten=_XX,n,Background(conf-getpin)

exten=_XX,n,WaitExten(5)

exten=_XX,n,Hangup

exten=_1X,1,Goto(getpin,${EXTEN},1)

exten=_2X,1,Goto(getpin,${EXTEN},1)

exten=_3X,1,Goto(getpin,${EXTEN},1)

exten=_4X,1,Goto(getpin,${EXTEN},1)

exten=_5X,1,Goto(getpin,${EXTEN},1)

exten=_6X,1,Goto(getpin,${EXTEN},1)

exten=_7X,1,Goto(getpin,${EXTEN},1)

exten=_8X,1,Goto(getpin,${EXTEN},1)

exten=_9X,1,Goto(getpin,${EXTEN},1)

exten=i,1,Goto(getpin,${CONF_PIN},1)

;

[getpin]

exten=_XX,1,Set(GLOBAL(CONF_PIN)=${EXTEN})

exten=_XX,n,Set(ODBC_ID=${ODBC_PIN(1)})

exten=_XX,n(loop_start),NoOp()

exten=_XX,n,Set(ROW_RESULT=${ODBC_FETCH(${ODBC_ID})})

exten=_XX,n,GotoIf($["${ODBC_FETCH}" = "FAILURE"]?cleanup,1) 

exten=_XX,n,GotoIf($["${ROW_RESULT}" = "${CONF_PIN}"]?good_exten,1)

exten=_XX,n,Goto(loop_start)

;

exten=cleanup,1,Verbose(1,Finish up)

same=n,Verbose(1,PIN not found)

same=n,ODBCFinish(${ODBC_ID})

same=n,playback(conf-invalidpin)

same=n,Goto(rooms,${CONF_ID}1)

same=n,Hangup()

;

exten=good_exten,1,Verbose(1,The PIN is available)

same=n,ODBCFinish(${ODBC_ID})

same=n,Verbose(1,Drop Caller into the bridge)

same=n,Set(CONFBRIDGE(user,template)=default_user)

same=n,ConfBridge(${CONF_ID},default_bridge,,sample_user_menu)

same=n,Hangup()

;

 

The log shows the 3 existing DB table rows are found but continues to cycle
indefinitely if the PIN is NOT found.

First few rows of the console log:

=

Connected to Asterisk 11.3.0 currently running on atpconf001 (pid = 1695)
atpconf001*CLI>

  == Using SIP RTP CoS mark 5

 

atpconf001*CLI> 

-- Executing [067740@default:1] Set("SIP/testbridge2-0021",
"GLOBAL(CONF_ID)=067740") in new stack

  == Setting global variable 'CONF_ID' to '067740'

-- Executing [067740@default:2] Goto("SIP/testbridge2-0021",
"rooms,067740,1") in new stack

 

atpconf001*CLI> 

-- Goto (rooms,067740,1)

-- Executing [067740@rooms:1] Set("SIP/testbridge2-0021",
"CONF_ID=067740") in new stack

-- Executing [067740@rooms:2] BackGround("SIP/testbridge2-0021",
"conf-getpin") in new stack

 

atpconf001*CLI> 

--  Playing 'conf-getpin.slin' (language 'en')

 

atpconf001*CLI> 

-- Executing [067740@rooms:3] WaitExten("SIP/testbridge2-0021", "5")
in new stack

 

atpconf001*CLI>

  == CDR updated on SIP/testbridge2-0021

-- Executing [444999@rooms:1] Goto("SI

Re: [asterisk-users] ODBC dialplan looping problem

2013-04-18 Thread Dale Noll
A select that returns 0 rows does not always mean error.
If you make your SQL do a little more specific lookup, you can avoid the
loop entirely.

Instead of your:
readsql=SELECT pin from users WHERE confid='${SQL_ESC(${CONF_ID})}'

Something like:
readsql=select if(count(value)=0,0,1) from users where confid =
'${SQL_ESC(${ARG1})}' and pin = '${SQL_ESC(${ARG2})}'  ;

This will then take two arguments, the first is the conf id, the second is
the entered PIN.
It will return either 0 or 1.  1 if the pin and conf are a valid pair, 0 if
not.

Then in dialplan, simply check the return value.



While your approach to getting the pin does work, I personnally would use
READ() as others have suggested.
--
_
-- 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] ODBC dialplan looping problem

2013-04-18 Thread Matthew Jordan
On 04/18/2013 07:41 AM, jg wrote:
> Hi Pat!
> 
> The book  "Asterisk: The Definitive Guide" contains an example
> implementation of exactly what you need (search for hotdesk). There used
> to be a free online access to the book (but the link seems to be dead now).

http://asteriskdocs.org/

Works for me :-)


-- 
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org



--
_
-- 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] Dynamic realtime + queues

2013-04-18 Thread Tommy Cooper
Hi,
 
I am trying to store queues.conf to a MySQL database using dynamic realtime. I 
have a working ODBC connection and the queueing system already works but I want 
to store the queues.conf file to a database. I am following the guide from 
Asterisk the definitive guide, the ebook can be found at: 
http://ofps.oreilly.com/titles/9781449332426/asterisk-DB.html 
 
I have a database called asterisk which contains 2 main tables: Queues and 
queue_member_table, both tables have sample data.
 
mysql> select * from queue_member_table;
+--+++---+-++
| uniqueid | membername | queue_name | interface | penalty | paused |
+--+++---+-++
|    1 | SIP/1000   | support    | SIP/1000  |    NULL |       0 |
+--+++---+-++
 
 
SQL> select QueueID,name,strategy from Queues;
 
|QueueID|  name    strategy  
 1     support rrmemory 
   
 
There are more fields but these are the most important
 
I keep getting this error:
 
node1*CLI> queue show 
No queues.
[Apr 18 22:41:06] WARNING[18599]: res_odbc.c:645 ast_odbc_prepare_and_execute: 
SQL Execute returned an error -1: 42000: [MySQL][ODBC 5.1 
Driver][mysqld-5.1.67]You have an error in your SQL syntax; check the manual 
that corresponds to your MySQL server version for the right syntax to use near 
''\' ORDER BY name' at line 1 (202)
[Apr 18 22:41:06] WARNING[18599]: res_odbc.c:657 ast_odbc_prepare_and_execute: 
SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]...
[Apr 18 22:41:06] WARNING[18599]: res_odbc.c:761 ast_odbc_sanity_check: 
Connection is down attempting to reconnect...
[Apr 18 22:41:06] NOTICE[18599]: res_odbc.c:1527 odbc_obj_connect: Connecting 
asterisk
[Apr 18 22:41:06] NOTICE[18599]: res_odbc.c:1559 odbc_obj_connect: res_odbc: 
Connected to asterisk [asterisk-connector]
[Apr 18 22:41:06] WARNING[18599]: res_odbc.c:645 ast_odbc_prepare_and_execute: 
SQL Execute returned an error -1: 42000: [MySQL][ODBC 5.1 
Driver][mysqld-5.1.67]You have an error in your SQL syntax; check the manual 
that corresponds to your MySQL server version for the right syntax to use near 
''\' ORDER BY name' at line 1 (202)
[Apr 18 22:41:06] WARNING[18599]: res_odbc.c:657 ast_odbc_prepare_and_execute: 
SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]...
[Apr 18 22:41:06] WARNING[18599]: res_odbc.c:761 ast_odbc_sanity_check: 
Connection is down attempting to reconnect...
[Apr 18 22:41:06] NOTICE[18599]: res_odbc.c:1527 odbc_obj_connect: Connecting 
asterisk
[Apr 18 22:41:06] NOTICE[18599]: res_odbc.c:1559 odbc_obj_connect: res_odbc: 
Connected to asterisk [asterisk-connector]
 
 
 
extensions.conf:   
 
 
  
[general]
autofallthrough=yes
 
[default]
exten => 1000,1, Dial (SIP/1000)
exten => 1001,1, Dial (SIP/1001)
 
 
[Queues]
 
 
exten => 1000,1,Verbose(1,Call entering queue named ${support)
same => n,Set(QueueParameters=${GET_QUEUE_DETAILS(support)})
same => n,Queue(${QueueParameters})
 
[LocalSets]
 
include => Queues
 
[sip-phone]
;This is the context setup for outgoing calls
 
exten => _3.,1,Dial(SIP/myprovider/${EXTEN:1},60) ;working config
 
 
[from-myprovider]
;This is the context setup for incoming calls
 
exten => *mynumber*,1,Answer
exten => *mynumber*,2,Queue(support)
exten => *mynumber*,4,Hangup
 
queues.conf
 
[general]
autofill=yes    ; distribute all waiting callers to available members
shared_lastcall=yes ; respect the wrapup time for members logged into more
    ; than one queue
 
realtime_family = queue, Queues
 
 
Thank you and sorry for the long post--
_
-- 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] Dynamic realtime + queues

2013-04-18 Thread Tommy Cooper
Hi,
 
I am trying to store queues.conf to a MySQL database using dynamic realtime. I 
have a working ODBC connection and the queueing system already works but I want 
to store the queues.conf file to a database. I am following the guide from 
Asterisk the definitive guide, the ebook can be found at: 
http://ofps.oreilly.com/titles/9781449332426/asterisk-DB.html 
 
I have a database called asterisk which contains 2 main tables: Queues and 
queue_member_table, both tables have sample data.
 
mysql> select * from queue_member_table;
+--+++---+-++
| uniqueid | membername | queue_name | interface | penalty | paused |
+--+++---+-++
|    1 | SIP/1000   | support    | SIP/1000  |    NULL |       0 |
+--+++---+-++
 
 
SQL> select QueueID,name,strategy from Queues;
 
|QueueID|  name    strategy  
 1     support rrmemory 
   
 
There are more fields but these are the most important
 
I keep getting this error:
 
node1*CLI> queue show 
No queues.
[Apr 18 22:41:06] WARNING[18599]: res_odbc.c:645 ast_odbc_prepare_and_execute: 
SQL Execute returned an error -1: 42000: [MySQL][ODBC 5.1 
Driver][mysqld-5.1.67]You have an error in your SQL syntax; check the manual 
that corresponds to your MySQL server version for the right syntax to use near 
''\' ORDER BY name' at line 1 (202)
[Apr 18 22:41:06] WARNING[18599]: res_odbc.c:657 ast_odbc_prepare_and_execute: 
SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]...
[Apr 18 22:41:06] WARNING[18599]: res_odbc.c:761 ast_odbc_sanity_check: 
Connection is down attempting to reconnect...
[Apr 18 22:41:06] NOTICE[18599]: res_odbc.c:1527 odbc_obj_connect: Connecting 
asterisk
[Apr 18 22:41:06] NOTICE[18599]: res_odbc.c:1559 odbc_obj_connect: res_odbc: 
Connected to asterisk [asterisk-connector]
[Apr 18 22:41:06] WARNING[18599]: res_odbc.c:645 ast_odbc_prepare_and_execute: 
SQL Execute returned an error -1: 42000: [MySQL][ODBC 5.1 
Driver][mysqld-5.1.67]You have an error in your SQL syntax; check the manual 
that corresponds to your MySQL server version for the right syntax to use near 
''\' ORDER BY name' at line 1 (202)
[Apr 18 22:41:06] WARNING[18599]: res_odbc.c:657 ast_odbc_prepare_and_execute: 
SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]...
[Apr 18 22:41:06] WARNING[18599]: res_odbc.c:761 ast_odbc_sanity_check: 
Connection is down attempting to reconnect...
[Apr 18 22:41:06] NOTICE[18599]: res_odbc.c:1527 odbc_obj_connect: Connecting 
asterisk
[Apr 18 22:41:06] NOTICE[18599]: res_odbc.c:1559 odbc_obj_connect: res_odbc: 
Connected to asterisk [asterisk-connector]
 
 
 
extensions.conf:   
 
 
  
[general]
autofallthrough=yes
 
[default]
exten => 1000,1, Dial (SIP/1000)
exten => 1001,1, Dial (SIP/1001)
 
 
[Queues]
 
 
exten => 1000,1,Verbose(1,Call entering queue named ${support)
same => n,Set(QueueParameters=${GET_QUEUE_DETAILS(support)})
same => n,Queue(${QueueParameters})
 
[LocalSets]
 
include => Queues
 
[sip-phone]
;This is the context setup for outgoing calls
 
exten => _3.,1,Dial(SIP/myprovider/${EXTEN:1},60) ;working config
 
 
[from-myprovider]
;This is the context setup for incoming calls
 
exten => *mynumber*,1,Answer
exten => *mynumber*,2,Queue(support)
exten => *mynumber*,4,Hangup
 
queues.conf
 
[general]
autofill=yes    ; distribute all waiting callers to available members
shared_lastcall=yes ; respect the wrapup time for members logged into more
    ; than one queue
 
realtime_family = queue, Queues
 
 
Thank you and sorry for the long post--
_
-- 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] Dynamic realtime + queues

2013-04-18 Thread Leandro Dardini
You need a "name" column. This is my queue table:

CREATE TABLE IF NOT EXISTS `queue` (
  `name` varchar(128) NOT NULL,
  `musiconhold` varchar(128) DEFAULT NULL,
  `announce` varchar(128) DEFAULT NULL,
  `context` varchar(128) DEFAULT NULL,
  `timeout` int(11) DEFAULT NULL,
  `monitor_join` tinyint(1) DEFAULT NULL,
  `monitor_format` varchar(128) DEFAULT NULL,
  `queue_youarenext` varchar(128) DEFAULT NULL,
  `queue_thereare` varchar(128) DEFAULT NULL,
  `queue_callswaiting` varchar(128) DEFAULT NULL,
  `queue_holdtime` varchar(128) DEFAULT NULL,
  `queue_minutes` varchar(128) DEFAULT NULL,
  `queue_seconds` varchar(128) DEFAULT NULL,
  `queue_lessthan` varchar(128) DEFAULT NULL,
  `queue_thankyou` varchar(128) DEFAULT NULL,
  `queue_reporthold` varchar(128) DEFAULT NULL,
  `announce_frequency` int(11) DEFAULT NULL,
  `announce_round_seconds` int(11) DEFAULT NULL,
  `announce_holdtime` varchar(128) DEFAULT NULL,
  `retry` int(11) DEFAULT NULL,
  `wrapuptime` int(11) DEFAULT NULL,
  `maxlen` int(11) DEFAULT NULL,
  `servicelevel` int(11) DEFAULT NULL,
  `strategy` varchar(128) DEFAULT NULL,
  `joinempty` varchar(128) DEFAULT NULL,
  `leavewhenempty` varchar(128) DEFAULT NULL,
  `eventmemberstatus` tinyint(1) DEFAULT NULL,
  `eventwhencalled` tinyint(1) DEFAULT NULL,
  `reportholdtime` tinyint(1) DEFAULT NULL,
  `memberdelay` int(11) DEFAULT NULL,
  `weight` int(11) DEFAULT NULL,
  `timeoutrestart` tinyint(1) DEFAULT NULL,
  `periodic_announce` varchar(50) DEFAULT NULL,
  `periodic_announce_frequency` int(11) DEFAULT NULL,
  `ringinuse` tinyint(1) DEFAULT NULL,
  `setinterfacevar` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



2013/4/18 Tommy Cooper 

> Hi,**
>  
> I am trying to store queues.conf to a MySQL database using dynamic
> realtime. I have a working ODBC connection and the queueing system already
> works but I want to store the queues.conf file to a database. I am
> following the guide from Asterisk the definitive guide, the ebook can be
> found at: http://ofps.oreilly.com/titles/9781449332426/asterisk-DB.html **
> **
> ** **
> I have a database called asterisk which contains 2 main tables: Queues and 
> queue_member_table,
> both tables have sample data.
> ** **
> mysql> select * from queue_member_table;
> +--+++---+-++
> | uniqueid | membername | queue_name | interface | penalty | paused |
> +--+++---+-++
> |1 | SIP/1000   | support| SIP/1000  |NULL |   0 |
> 
> +--+++---+-++
> ** **
> ** **
> SQL> select QueueID,name,strategy from Queues;
> ** **
> |QueueID|  namestrategy  *
> ***
>  1 support rrmemory
> 
> ** **
> There are more fields but these are the most important
> ** **
> I keep getting this error:
> ** **
> node1*CLI> queue show 
> No queues.
> [Apr 18 22:41:06] WARNING[18599]: res_odbc.c:645
> ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 42000:
> [MySQL][ODBC 5.1 Driver][mysqld-5.1.67]You have an error in your SQL
> syntax; check the manual that corresponds to your MySQL server version for
> the right syntax to use near ''\' ORDER BY name' at line 1 (202)
> [Apr 18 22:41:06] WARNING[18599]: res_odbc.c:657
> ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to
> asterisk [asterisk-connector]...
> [Apr 18 22:41:06] WARNING[18599]: res_odbc.c:761 ast_odbc_sanity_check:
> Connection is down attempting to reconnect...
> [Apr 18 22:41:06] NOTICE[18599]: res_odbc.c:1527 odbc_obj_connect:
> Connecting asterisk
> [Apr 18 22:41:06] NOTICE[18599]: res_odbc.c:1559 odbc_obj_connect:
> res_odbc: Connected to asterisk [asterisk-connector]
> [Apr 18 22:41:06] WARNING[18599]: res_odbc.c:645
> ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 42000:
> [MySQL][ODBC 5.1 Driver][mysqld-5.1.67]You have an error in your SQL
> syntax; check the manual that corresponds to your MySQL server version for
> the right syntax to use near ''\' ORDER BY name' at line 1 (202)
> [Apr 18 22:41:06] WARNING[18599]: res_odbc.c:657
> ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to
> asterisk [asterisk-connector]...
> [Apr 18 22:41:06] WARNING[18599]: res_odbc.c:761 ast_odbc_sanity_check:
> Connection is down attempting to reconnect...
> [Apr 18 22:41:06] NOTICE[18599]: res_odbc.c:1527 odbc_obj_connect:
> Connecting asterisk
> [Apr 18 22:41:06] NOTICE[18599]: res_odbc.c:1559 odbc_obj_connect:
> res_odbc: Connected to asterisk [asterisk-connector]
>  
> ** **
> ** **
> extensions.conf:   
> ** **
> ** **
>   
> [general]
> autofallthrough=yes
> *

[asterisk-users] Dynamic realtime + queues

2013-04-18 Thread Tommy Cooper
Thank you for your response
 
I already have a name column but my primary key is 'QueueID' instead of name
 
+-+---+--+-+++
| Field   | Type  | Null | Key | Default    
| Extra  |
+-+---+--+-+++
| QueueID | mediumint(8) unsigned | NO   | PRI | NULL   
| auto_increment |
| name    | varchar(128)  | NO   | UNI | NULL   
|    |
| description | varchar(128)  | YES  | | NULL   
|    |
| maxlen  | tinyint(4)    | YES  | | NULL   
|    |
| reportholdtime  | varchar(3)    | YES  | | no 
|    |
| periodic_announce_frequency | varchar(4)    | YES  | | NULL   
|    |
| periodic_announce   | varchar(128)  | YES  | | NULL   
|    |
| strategy    | varchar(20)   | NO   | | rrmemory   
|    |
| joinempty   | varchar(35)   | YES  | | no 
|    |
| leavewhenempty  | varchar(35)   | YES  | | no 
|    |
| autopause   | varchar(3)    | YES  | | no 
|    |
| announce_round_seconds  | varchar(4)    | YES  | | NULL   
|    |
| retry   | varchar(4)    | YES  | | NULL   
|    |
| wrapuptime  | varchar(4)    | YES  | | NULL   
|    |
| announce_holdtime   | varchar(3)    | YES  | | no 
|    |
| announce_frequency  | varchar(4)    | YES  | | 0  
|    |
| timeout | varchar(4)    | YES  | | 60 
|    |
| context | varchar(128)  | NO   | | NULL   
|    |
| musicclass  | varchar(128)  | YES  | | default    
|    |
| autofill    | varchar(3)    | YES  | | yes    
|    |
| ringinuse   | varchar(45)   | YES  | | no 
|    |
| musiconhold | varchar(128)  | YES  | | yes    
|    |
| monitor_type    | varchar(128)  | YES  | | MixMonitor 
|    |
| monitor_format  | varchar(128)  | YES  | | wav    
|    |
| servicelevel    | varchar(4)    | YES  | | 60 
|    |
| queue_thankyou  | varchar(128)  | YES  | |    
|    |
| queue_youarenext    | varchar(128)  | YES  | |    
|    |
| queue_thereare  | varchar(128)  | YES  | |    
|    |
| queue_callswaiting  | varchar(128)  | YES  | |    
|    |
| queue_holdtime  | varchar(128)  | YES  | |    
|    |
| queue_minutes   | varchar(128)  | YES  | |    
|    |
| queue_seconds   | varchar(128)  | YES  | |    
|    |
| queue_lessthan  | varchar(128)  | YES  | |    
|    |
| queue_reporthold    | varchar(128)  | YES  | |    
|    |
| relative_periodic_announce  | varchar(4)    | YES  | | yes    
|    |
+-+---+--+-+++
35 rows in set (0.00 sec)


- Forwarded Message -
From: Leandro Dardini 
To: Tommy Cooper ; Asterisk Users Mailing List - 
Non-Commercial Discussion  
Sent: Thursday, April 18, 2013 11:04 PM
Subject: Re: [asterisk-users] Dynamic realtime + queues



You need a "name" column. This is my queue table: 

CREATE TABLE IF NOT EXISTS `queue` (
  `name` varchar(128) NOT NULL,
  `musiconhold` varchar(128) DEFAULT NULL,
  `announce` varchar(128) DEFAULT NULL,
  `context` varchar(128) DEFAULT NULL,
  `timeout` int(11) DEFAULT NULL,
  `monitor_join` tinyint(1) DEFAULT NULL,
  `monitor_format` varchar(128) DEFAULT NULL,
  `queue_youarenext` varchar(128) DEFAULT NULL,
  `queue_thereare` varchar(128) DEFAULT NULL,
  `queue_callswaiting` varchar(128) DEFAULT NULL,
  `queue_holdtime` varchar(128) DEFAULT NULL,
  `queue_minutes` varchar(128) DEFAULT NULL,
  `queue_seconds` varchar(128) DEFAULT NULL,
  `queue_lessthan` varchar(128) DEFAULT NULL,
  `queue_thankyou` varchar(128) DEFAULT NULL

Re: [asterisk-users] Dynamic realtime + queues

2013-04-18 Thread Leandro Dardini
Uhm ... I see the easy way will be to tcpdump the connection between the
asterisk and the mysql database server and to dump the exact SQL syntax
used. It will be something wrong...

Leandro

PS
tcpdump -i any -n -s 1500 -w /tmp/data.pcap port 3306




2013/4/18 Tommy Cooper 

> Thank you for your response
>
> I already have a name column but my primary key is 'QueueID' instead of
> name
>
>
> +-+---+--+-+++
> | Field   | Type  | Null | Key |
> Default| Extra  |
>
> +-+---+--+-+++
> | QueueID | mediumint(8) unsigned | NO   | PRI |
> NULL   | auto_increment |
> | name| varchar(128)  | NO   | UNI |
> NULL   ||
> | description | varchar(128)  | YES  | |
> NULL   ||
> | maxlen  | tinyint(4)| YES  | |
> NULL   ||
> | reportholdtime  | varchar(3)| YES  | |
> no ||
> | periodic_announce_frequency | varchar(4)| YES  | |
> NULL   ||
> | periodic_announce   | varchar(128)  | YES  | |
> NULL   ||
> | strategy| varchar(20)   | NO   | |
> rrmemory   ||
> | joinempty   | varchar(35)   | YES  | |
> no ||
> | leavewhenempty  | varchar(35)   | YES  | |
> no ||
> | autopause   | varchar(3)| YES  | |
> no ||
> | announce_round_seconds  | varchar(4)| YES  | |
> NULL   ||
> | retry   | varchar(4)| YES  | |
> NULL   ||
> | wrapuptime  | varchar(4)| YES  | |
> NULL   ||
> | announce_holdtime   | varchar(3)| YES  | |
> no ||
> | announce_frequency  | varchar(4)| YES  | |
> 0  ||
> | timeout | varchar(4)| YES  | |
> 60 ||
> | context | varchar(128)  | NO   | |
> NULL   ||
> | musicclass  | varchar(128)  | YES  | |
> default||
> | autofill| varchar(3)| YES  | |
> yes||
> | ringinuse   | varchar(45)   | YES  | |
> no ||
> | musiconhold | varchar(128)  | YES  | |
> yes||
> | monitor_type| varchar(128)  | YES  | |
> MixMonitor ||
> | monitor_format  | varchar(128)  | YES  | |
> wav||
> | servicelevel| varchar(4)| YES  | |
> 60 ||
> | queue_thankyou  | varchar(128)  | YES  |
> |||
> | queue_youarenext| varchar(128)  | YES  |
> |||
> | queue_thereare  | varchar(128)  | YES  |
> |||
> | queue_callswaiting  | varchar(128)  | YES  |
> |||
> | queue_holdtime  | varchar(128)  | YES  |
> |||
> | queue_minutes   | varchar(128)  | YES  |
> |||
> | queue_seconds   | varchar(128)  | YES  |
> |||
> | queue_lessthan  | varchar(128)  | YES  |
> |||
> | queue_reporthold| varchar(128)  | YES  |
> |||
> | relative_periodic_announce  | varchar(4)| YES  | |
> yes||
>
> +-+---+--+-+++
> 35 rows in set (0.00 sec)
>
>  - Forwarded Message -
> *From:* Leandro Dardini 
> *To:* Tommy Cooper ; Asterisk Users Mailing List -
> Non-Commercial Discussion 
> *Sent:* Thursday, April 18, 2013 11:04 PM
> *Subject:* Re: [asterisk-users] Dynamic realtime + queues
>
>  You need a "name" column. This is my queue table:
>
>  CREATE TABLE IF NOT EXISTS `queue` (
>   `name` varchar(128) NOT NULL,
>   `musiconhold` varchar(128) DEFAULT NULL,
>   `announce` varchar(128) DEFAULT NULL,
>   `context` varchar(128) DEFAULT NULL,
>   `timeout` int(11) DEFAULT NULL,
>   `monitor_join` tinyint(1) DEFAULT NULL,
>   `monito

Re: [asterisk-users] Dynamic realtime + queues

2013-04-18 Thread Tommy Cooper



Thanks again for replying, I got a wireshark capture with that command you 
provided. Please find attached the wireshark capture


- Forwarded Message -
From: Leandro Dardini 
To: Tommy Cooper ; Asterisk Users Mailing List - 
Non-Commercial Discussion  
Sent: Thursday, April 18, 2013 11:32 PM
Subject: Re: [asterisk-users] Dynamic realtime + queues



Uhm ... I see the easy way will be to tcpdump the connection between the 
asterisk and the mysql database server and to dump the exact SQL syntax used. 
It will be something wrong... 

Leandro

PS
tcpdump -i any -n -s 1500 -w /tmp/data.pcap port 3306





2013/4/18 Tommy Cooper 

Thank you for your response
> 
>I already have a name column but my primary key is 'QueueID' instead of name
> 
>+-+---+--+-+++
>| Field   | Type  | Null | Key | Default   
> | Extra  |
>+-+---+--+-+++
>| QueueID | mediumint(8) unsigned | NO   | PRI | NULL  
> | auto_increment |
>| name    | varchar(128)  | NO   | UNI | NULL  
> |    |
>| description | varchar(128)  | YES  | | NULL  
> |    |
>| maxlen  | tinyint(4)    | YES  | | NULL  
> |    |
>| reportholdtime  | varchar(3)    | YES  | | no
> |    |
>| periodic_announce_frequency | varchar(4)    | YES  | | NULL  
> |    |
>| periodic_announce   | varchar(128)  | YES  | | NULL  
> |    |
>| strategy    | varchar(20)   | NO   | | rrmemory  
> |    |
>| joinempty   | varchar(35)   | YES  | | no
> |    |
>| leavewhenempty  | varchar(35)   | YES  | | no
> |    |
>| autopause   | varchar(3)    | YES  | | no
> |    |
>| announce_round_seconds  | varchar(4)    | YES  | | NULL  
> |    |
>| retry   | varchar(4)    | YES  | | NULL  
> |    |
>| wrapuptime  | varchar(4)    | YES  | | NULL  
> |    |
>| announce_holdtime   | varchar(3)    | YES  | | no
> |    |
>| announce_frequency  | varchar(4)    | YES  | | 0 
> |    |
>| timeout | varchar(4)    | YES  | | 60
> |    |
>| context | varchar(128)  | NO   | | NULL  
> |    |
>| musicclass  | varchar(128)  | YES  | | default   
> |    |
>| autofill    | varchar(3)    | YES  | | yes   
> |    |
>| ringinuse   | varchar(45)   | YES  | | no
> |    |
>| musiconhold | varchar(128)  | YES  | | yes   
> |    |
>| monitor_type    | varchar(128)  | YES  | | 
>MixMonitor |    |
>| monitor_format  | varchar(128)  | YES  | | wav   
> |    |
>| servicelevel    | varchar(4)    | YES  | | 60
> |    |
>| queue_thankyou  | varchar(128)  | YES  | |   
> |    |
>| queue_youarenext    | varchar(128)  | YES  | |   
> |    |
>| queue_thereare  | varchar(128)  | YES  | |   
> |    |
>| queue_callswaiting  | varchar(128)  | YES  | |   
> |    |
>| queue_holdtime  | varchar(128)  | YES  | |   
> |    |
>| queue_minutes   | varchar(128)  | YES  | |   
> |    |
>| queue_seconds   | varchar(128)  | YES  | |   
> |    |
>| queue_lessthan  | varchar(128)  | YES  | |   
> |    |
>| queue_reporthold    | varchar(128)  | YES  | |   
> |    |
>| relative_periodic_announce  | varchar(4)    | YES  | | yes   
> |    |
>+-+---+--+-+++
>35 rows in set (0.00 sec)
>
>
>
> 

data.pcap
Description: Binary data
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webina

Re: [asterisk-users] Dynamic realtime + queues

2013-04-18 Thread Jose Flores Galicia
2013/4/18 Tommy Cooper :
>
>
> Thanks again for replying, I got a wireshark capture with that command you
> provided. Please find attached the wireshark capture
>
> - Forwarded Message -
> From: Leandro Dardini 
> To: Tommy Cooper ; Asterisk Users Mailing List -
> Non-Commercial Discussion 
> Sent: Thursday, April 18, 2013 11:32 PM
> Subject: Re: [asterisk-users] Dynamic realtime + queues
>
> Uhm ... I see the easy way will be to tcpdump the connection between the
> asterisk and the mysql database server and to dump the exact SQL syntax
> used. It will be something wrong...
>
> Leandro
>
> PS
> tcpdump -i any -n -s 1500 -w /tmp/data.pcap port 3306
>
>
>
>
> 2013/4/18 Tommy Cooper 
>
> Thank you for your response
>
> I already have a name column but my primary key is 'QueueID' instead of name
>
> +-+---+--+-+++
> | Field   | Type  | Null | Key | Default
> | Extra  |
> +-+---+--+-+++
> | QueueID | mediumint(8) unsigned | NO   | PRI | NULL
> | auto_increment |
> | name| varchar(128)  | NO   | UNI | NULL
> ||
> | description | varchar(128)  | YES  | | NULL
> ||
> | maxlen  | tinyint(4)| YES  | | NULL
> ||
> | reportholdtime  | varchar(3)| YES  | | no
> ||
> | periodic_announce_frequency | varchar(4)| YES  | | NULL
> ||
> | periodic_announce   | varchar(128)  | YES  | | NULL
> ||
> | strategy| varchar(20)   | NO   | |
> rrmemory   ||
> | joinempty   | varchar(35)   | YES  | | no
> ||
> | leavewhenempty  | varchar(35)   | YES  | | no
> ||
> | autopause   | varchar(3)| YES  | | no
> ||
> | announce_round_seconds  | varchar(4)| YES  | | NULL
> ||
> | retry   | varchar(4)| YES  | | NULL
> ||
> | wrapuptime  | varchar(4)| YES  | | NULL
> ||
> | announce_holdtime   | varchar(3)| YES  | | no
> ||
> | announce_frequency  | varchar(4)| YES  | | 0
> ||
> | timeout | varchar(4)| YES  | | 60
> ||
> | context | varchar(128)  | NO   | | NULL
> ||
> | musicclass  | varchar(128)  | YES  | | default
> ||
> | autofill| varchar(3)| YES  | | yes
> ||
> | ringinuse   | varchar(45)   | YES  | | no
> ||
> | musiconhold | varchar(128)  | YES  | | yes
> ||
> | monitor_type| varchar(128)  | YES  | |
> MixMonitor ||
> | monitor_format  | varchar(128)  | YES  | | wav
> ||
> | servicelevel| varchar(4)| YES  | | 60
> ||
> | queue_thankyou  | varchar(128)  | YES  | |
> ||
> | queue_youarenext| varchar(128)  | YES  | |
> ||
> | queue_thereare  | varchar(128)  | YES  | |
> ||
> | queue_callswaiting  | varchar(128)  | YES  | |
> ||
> | queue_holdtime  | varchar(128)  | YES  | |
> ||
> | queue_minutes   | varchar(128)  | YES  | |
> ||
> | queue_seconds   | varchar(128)  | YES  | |
> ||
> | queue_lessthan  | varchar(128)  | YES  | |
> ||
> | queue_reporthold| varchar(128)  | YES  | |
> ||
> | relative_periodic_announce  | varchar(4)| YES  | | yes
> ||
> +-+---+--+-+++
> 35 rows in set (0.00 sec)
>
>
>
>
> --
> _
> -- 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

T

[asterisk-users] Fw: Dynamic realtime + queues

2013-04-18 Thread Tommy Cooper
Thank you all for your help 
 
Mr. José Flores Galicia,

 
I already have the queue_member_table and it has 1 record in it. I m not sure 
what interface I have to enter in the interface field.
mysql> explain queue_member_table;
++--+--+-+-++
| Field  | Type | Null | Key | Default | Extra  |
++--+--+-+-++
| uniqueid   | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| membername | varchar(40)  | YES  | | NULL    |    |
| queue_name | varchar(128) | YES  | MUL | NULL    |    |
| interface  | varchar(128) | YES  | | NULL    |    |
| penalty    | int(11)  | YES  | | NULL    |    |
| paused | int(11)  | YES  | | NULL    |    |
++--+--+-+-++
6 rows in set (0.00 sec)
 

Lach,

"To me it looks like queue_name should be just name in your sql statement."

Are you refering to queue_name column in the queue_member_table?

- Forwarded Message -
From: Lachlan Dunlop 
To: Tommy Cooper ; Asterisk Users Mailing List - 
Non-Commercial Discussion  
Sent: Friday, April 19, 2013 12:02 AM
Subject: Re: [asterisk-users] Dynamic realtime + queues



Tommy,

To me it looks like queue_name should be just name in your sql statement.

Lach


This is what i m getting when i m in the asterisk console:

node1*CLI> queue show 
support has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s 
talktime), W:0, C:0, A:0, SL:0.0% within 60s
   No Members
   No Callers
[Apr 19 00:15:13] WARNING[57946]: res_odbc.c:645 ast_odbc_prepare_and_execute: 
SQL Execute returned an error -1: 42000: [MySQL][ODBC 5.1 
Driver][mysqld-5.1.67]You have an error in your SQL syntax; check the manual 
that corresponds to your MySQL server version for the right syntax to use near 
''\' ORDER BY name' at line 1 (202)
[Apr 19 00:15:13] WARNING[57946]: res_odbc.c:657 ast_odbc_prepare_and_execute: 
SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]...
[Apr 19 00:15:13] WARNING[57946]: res_odbc.c:761 ast_odbc_sanity_check: 
Connection is down attempting to reconnect...
[Apr 19 00:15:13] NOTICE[57946]: res_odbc.c:1527 odbc_obj_connect: Connecting 
asterisk
[Apr 19 00:15:13] NOTICE[57946]: res_odbc.c:1559 odbc_obj_connect: res_odbc: 
Connected to asterisk [asterisk-connector]
[Apr 19 00:15:13] WARNING[57946]: res_odbc.c:645 ast_odbc_prepare_and_execute: 
SQL Execute returned an error -1: 42000: [MySQL][ODBC 5.1 
Driver][mysqld-5.1.67]You have an error in your SQL syntax; check the manual 
that corresponds to your MySQL server version for the right syntax to use near 
''\' ORDER BY name' at line 1 (202)
[Apr 19 00:15:13] WARNING[57946]: res_odbc.c:657 ast_odbc_prepare_and_execute: 
SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]...
[Apr 19 00:15:13] WARNING[57946]: res_odbc.c:761 ast_odbc_sanity_check: 
Connection is down attempting to reconnect...
[Apr 19 00:15:13] NOTICE[57946]: res_odbc.c:1527 odbc_obj_connect: Connecting 
asterisk
[Apr 19 00:15:13] NOTICE[57946]: res_odbc.c:1559 odbc_obj_connect: res_odbc: 
Connected to asterisk [asterisk-connector]
[Apr 19 00:15:13] WARNING[57946]: res_odbc.c:645 ast_odbc_prepare_and_execute: 
SQL Execute returned an error -1: 42000: [MySQL][ODBC 5.1 
Driver][mysqld-5.1.67]You have an error in your SQL syntax; check the manual 
that corresponds to your MySQL server version for the right syntax to use near 
''\' AND queue_name = ? ORDER BY interface' at line 1 (226)
[Apr 19 00:15:13] WARNING[57946]: res_odbc.c:657 ast_odbc_prepare_and_execute: 
SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]...
[Apr 19 00:15:13] WARNING[57946]: res_odbc.c:761 ast_odbc_sanity_check: 
Connection is down attempting to reconnect...
[Apr 19 00:15:13] NOTICE[57946]: res_odbc.c:1527 odbc_obj_connect: Connecting 
asterisk
[Apr 19 00:15:13] NOTICE[57946]: res_odbc.c:1559 odbc_obj_connect: res_odbc: 
Connected to asterisk [asterisk-connector]
[Apr 19 00:15:13] WARNING[57946]: res_odbc.c:645 ast_odbc_prepare_and_execute: 
SQL Execute returned an error -1: 42000: [MySQL][ODBC 5.1 
Driver][mysqld-5.1.67]You have an error in your SQL syntax; check the manual 
that corresponds to your MySQL server version for the right syntax to use near 
''\' AND queue_name = ? ORDER BY interface' at line 1 (226)
[Apr 19 00:15:13] WARNING[57946]: res_odbc.c:657 ast_odbc_prepare_and_execute: 
SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]...
[Apr 19 00:15:13] WARNING[57946]: res_odbc.c:761 ast_odbc_sanity_check: 
Connection is down attempting to reconnect...
[Apr 19 00:15:13] NOTICE[57946]: res_odbc.c:1527 odbc_obj_connect: Connecting 
asterisk
[Apr 19 00:15:13] NOTICE[57946]: res_odbc.c:1559 odbc_obj_connect: res_odbc: 
Connected to aster