[asterisk-users] MySQL Connect problem...
Geraint Lee
geraint at gmail.com
Wed Aug 18 15:59:21 CDT 2010
This is what I ended up doing, working fine now.
Cheers
On 18 August 2010 08:52, Nasir Iqbal <nasir at 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 <geraint at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100818/3c19d1e3/attachment.htm
More information about the asterisk-users
mailing list