[asterisk-users] UPDATE !! Spontaneous reboots on asterisk 1.6.2.11

Alec Davis sivad.a at paradise.net.nz
Wed Sep 15 17:06:56 CDT 2010


Just a quick note: may not be related, but may help.

See https://issues.asterisk.org/view.php?id=14757#107179

We have been using mysql queries within macros for a few years.
But initially there was a problem, mysql connections were not clearing, if a
caller hungup while an mysql connection was open.

In mysql.conf:
[general]
autoclear=yes

Alec Davis


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of jon pounder
Sent: Thursday, 16 September 2010 4:49 a.m.
To: asterisk-users at lists.digium.com
Subject: Re: [asterisk-users] UPDATE !! Spontaneous reboots on asterisk
1.6.2.11

On 09/15/2010 12:42 PM, Leif Madsen wrote:
> On 10-09-15 05:25 AM, Jonas Kellens wrote:
>    
>> I think I've found it :
>>
>> Asterisk always reboots on this part :
>>
>> [Sep 15 11:16:32] -- Goto (azura,pbx,1) [Sep 15 11:16:32] -- 
>> Executing [pbx at azura:1] NoOp("SIP/INTERTELin-00000000", "3252480333 = 
>> pbx formule") in new stack [Sep 15 11:16:32] -- Executing 
>> [pbx at azura:2] Set("SIP/INTERTELin-00000000", 
>> "CDR(accountcode)=AZURAin") in new stack [Sep 15 11:16:32] -- 
>> Executing [pbx at azura:3] Set("SIP/INTERTELin-00000000", 
>> "BRON="473555006"<473555006>") in new stack [Sep 15 11:16:32] -- 
>> Executing [pbx at azura:4] Goto("SIP/INTERTELin-00000000", "vakantie") 
>> in new stack [Sep 15 11:16:32] -- Goto (azura,pbx,5) [Sep 15 
>> 11:16:32] -- Executing [pbx at azura:5] Macro("SIP/INTERTELin-00000000", 
>> "vakantie,58") in new stack [Sep 15 11:16:32] -- Executing 
>> [s at macro-vakantie:1] MYSQL("SIP/INTERTELin-00000000", "Connect connid 
>> localhost username passwd AsteriskHosted") in new stack [Sep 15 
>> 11:16:32] -- Executing [s at macro-vakantie:2] 
>> MYSQL("SIP/INTERTELin-00000000", "Query resultid 1 SELECT ast1 , ast2 
>> , na , naID FROM vakantiedata where ID=58") in new stack vps2301*CLI> 
>> Disconnected from Asterisk server [Sep 15 11:16:32] Executing last 
>> minute cleanups
>>
>>
>> Dialplan :
>>
>> [macro-vakantie]
>> exten =>  s,1,MYSQL(Connect connid localhost username passwd 
>> AsteriskHosted) exten =>  s,n,MYSQL(Query resultid ${connid} SELECT 
>> ast1 , ast2 , na , naID FROM vakantiedata where ID=${ARG1}) exten =>  
>> s,n,MYSQL(Fetch fetchid ${resultid} AST1 AST2 NA naID ) exten =>  
>> s,n,NoOp(vakantie-ast1 = ${AST1} vakantie-ast2 = ${AST2} na = ${NA} 
>> naID = ${naID}) exten =>  s,n,MYSQL(Clear ${resultid}) exten =>  
>> s,n,MYSQL(Disconnect ${connid})
>>
>> exten =>  s,n,NoOp(fetchid = ${fetchid}) exten =>  
>> s,n,GoToIf($["${fetchid}"=="0"]?exit)
>>
>> exten =>  s,n,NoOp()
>> exten =>  s,n,GoToIfTime(${AST1}?opvakantie)
>> exten =>  s,n,GoToIfTime(${AST2}?opvakantie)
>>
>> exten =>  s,n(exit),NoOp()
>> exten =>  s,n,Set(vakantieresult=continue) exten =>  s,n,MacroExit
>>
>> exten =>  s,n(opvakantie),NoOp(op vakantie !) exten =>  
>> s,n,GoToIf($["${NA}"="hangup"]?hangup:route)
>>
>>
>> Do you guys see why Asterisk has problems with this part of the dialplan
?!
>>      
> I've seen problems with MYSQL() application crashing on customers boxes
before.
> It is not that well supported, and would greatly recommend you move to 
> func_odbc usage for dialplan<->database integration.
>
> Not only will it simplify your dialplan, but likely will resolve your 
> crashing issues as well. I've done this for at least 3 customers who 
> were using MYSQL() and all crashing issues stopped and their dialplans 
> ended up becoming significantly more readable.
>    

This will also fix any real or perceived mysql takeover issues since odbc
can be attached to any backend without changing the code.
> Leif.
>
>    


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




More information about the asterisk-users mailing list