Tengo un problema tratando de realizar un query a mysql desde mi dialplan, el output que me da esta algo raro, alguien ve algun error?
exten => _X.,1,MYSQL(Connect connid localhost root passw0rd asterisk)
exten => _X.,n,MYSQL(Query resultid ${connid} SELECT\ type,\ dst\ from\ did\ where\ status='1'\ and\ did='${EXTEN}')
exten => _X.,n,MYSQL(Fetch fetchid ${resultid} type dst)
exten => _X.,n,noop(${type})
exten => _X.,n,noop(${dst})
exten => _X.,n,noop(${resultid})
Resultado:
-- Executing MYSQL("SIP/200-4edb", "Connect connid localhost root passw0rd asterisk") in new stack
-- Executing MYSQL("SIP/200-4edb", "Query resultid 81 SELECT type|dst from did where status=1 and did=541981") in new stack
-- Executing MYSQL("SIP/200-4edb", "Fetch fetchid 82 type dst") in new stack
-- Executing NoOp("SIP/200-4edb", "200") in new stack
-- Executing NoOp("SIP/200-4edb", "") in new stack
-- Executing NoOp("SIP/200-4edb", "82") in new stack
Cuando en este caso debe regresar en ${type} = 'E' y ${dst} = '200'
Los parametros que mando a mysql() son los que segun yo estan definidos en voip-info.
exten => _X.,1,MYSQL(Connect connid localhost root passw0rd asterisk)
exten => _X.,n,MYSQL(Query resultid ${connid} SELECT\ type,\ dst\ from\ did\ where\ status='1'\ and\ did='${EXTEN}')
exten => _X.,n,MYSQL(Fetch fetchid ${resultid} type dst)
exten => _X.,n,noop(${type})
exten => _X.,n,noop(${dst})
exten => _X.,n,noop(${resultid})
Resultado:
-- Executing MYSQL("SIP/200-4edb", "Connect connid localhost root passw0rd asterisk") in new stack
-- Executing MYSQL("SIP/200-4edb", "Query resultid 81 SELECT type|dst from did where status=1 and did=541981") in new stack
-- Executing MYSQL("SIP/200-4edb", "Fetch fetchid 82 type dst") in new stack
-- Executing NoOp("SIP/200-4edb", "200") in new stack
-- Executing NoOp("SIP/200-4edb", "") in new stack
-- Executing NoOp("SIP/200-4edb", "82") in new stack
Cuando en este caso debe regresar en ${type} = 'E' y ${dst} = '200'
Los parametros que mando a mysql() son los que segun yo estan definidos en voip-info.
Comentario