[asterisk-users] More SQL Querys in dialplan

Ulrich Meckel meckel at netzing.de
Tue Jul 5 04:25:11 CDT 2011


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


Thank you in advance for your help

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