[asterisk-users] More SQL Querys in dialplan
Ulrich Meckel
meckel at netzing.de
Tue Jul 5 05:00:59 CDT 2011
Everything was fine but i have a hangup in an other shorter route where
the extenension was 1234, but i forgot the '4' so everytime it goes to
the defined hangup in the other route.....
Thx for your quick answer and sorry for my mistake
On 05.07.2011 11:34, Thorsten Göllner wrote:
> Executing the query in MySQL-CLI is fine?
>
> Am 05.07.2011 11:25, schrieb Ulrich Meckel:
>> Hi List
>>
>> I tried to use SQL Query in my diaplan. If i only use one or two
>> there is no Problem but if i try to start the third one after the
>> other it hangup after the 2nd clear
>>
>> exten => _123.,1,MYSQL(Connect connid host user pw db_name)
>>
>> exten => _123.,n,MYSQL(Query resultid ${connid} SELECT value1 FROM
>> table1 WHERE sp=${var})
>> exten => _123.,n,MYSQL(Fetch fetchid ${resultid} var1)
>> exten => _123.,n,MYSQL(Clear ${resultid})
>>
>> exten => _123.,n,MYSQL(Query resultid ${connid} SELECT value2 FROM
>> table2 WHERE sp='name')
>> exten => _123.,n,MYSQL(Fetch fetchid ${resultid} var2)
>> exten => _123.,n,NoOp(var2 = ${var2})
>> exten => _123.,n,MYSQL(Clear ${resultid})
>>
>> exten => _123.,n,MYSQL(Query resultid ${connid} SELECT value3 FROM
>> table2 WHERE sp='loc')
>> exten => _123.,n,MYSQL(Fetch fetchid ${resultid} var3)
>> exten => _123.,n,NoOp(var3 = ${var3})
>> exten => _123.,n,MYSQL(Clear ${resultid}
>>
>> exten => _123.,n,MYSQL(Disconnect ${connid})
>>
>> CLI :
>> -- Executing [03514138123 at btsctrl:6] MYSQL("lcr/5", "Fetch fetchid
>> 2 var2") in new stack
>> -- Executing [03514138123 at btsctrl:7] NoOp("lcr/5", "var2= 49") in
>> new stack
>> -- Executing [03514138123 at btsctrl:8] MYSQL("lcr/5", "Clear 2") in
>> new stack
>> -- Executing [03514138123 at btsctrl:9] Hangup("lcr/5", "") in new stack
>
>
> --
> _____________________________________________________________________
> -- 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
--
_______________________________________________________________________
Ulrich Meckel
Entwicklung Mail: Meckel at netzing.de
NETZING Solutions AG Tel.: 0351/41381 - 0
Fröbelstr. 57, 01159 Dresden Fax: 0351/41381 - 12
_______________________________________________________________________
Impressum:
NETZING Solutions AG - Fröbelstraße 57 - 01159 Dresden
Sitz der Gesellschaft Amtsgericht Dresden HRB 18926
Vorstand Dieter Schneider - Aufsichtsratsvorsitzender Volker Kanitz
USt.Id DE211326547 Mail: netzing.ag at netzing.de
More information about the asterisk-users
mailing list