<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Helvetica, Arial, sans-serif">Hello<br>
<br>
<br>
i have the following field (text string) in a MySQL database :
"${KNUMMER} ${phone_number_to} ${phone_number_from} ${CHANNEL:4}"<br>
<br>
I read this string form the database and want to have the dialplan
variables to be replaced with the correct content.<br>
<br>
How can I do this ?<br>
<br>
<br>
Currently this is not working. The variable </font><font
face="Helvetica, Arial, sans-serif"><font face="Helvetica, Arial,
sans-serif">${PARAMS}</font> contains the exact string of the
database field :<br>
<br>
my dialplan :<br>
<br>
exten => s,n,MYSQL(Connect connid localhost dbuser dbpass
MyTable)<br>
exten => s,n,MYSQL(Query resultid ${connid} SELECT script_url,
script_params FROM my_tbl WHERE ID="${myID}")<br>
exten => s,n,MYSQL(Fetch fetchid ${resultid} scriptURL PARAMS)<br>
exten => s,n,NoOp(scriptURL = ${scriptURL} PARAMS = ${PARAMS})<br>
<br>
becomes :<br>
<br>
-- Executing [s@sub-details:4] MYSQL("SIP/SipT01-00000012",
"Connect connid localhost </font><font face="Helvetica, Arial,
sans-serif"><font face="Helvetica, Arial, sans-serif">dbuser
dbpass MyTable</font>") in new stack<br>
-- Executing [s@sub-details:5] MYSQL("SIP/SipT01-00000012", "Query
resultid 1 SELECTÂ script_url, script_params FROM my_tbl WHERE
ID="2"") in new stack<br>
-- Executing [s@sub-details:6] MYSQL("SIP/SipT01-00000012", "Fetch
fetchid 2 scriptURL PARAMS") in new stack<br>
-- Executing [s@sub-details:7] NoOp("SIP/SipT01-00000012",
"scriptURL = call_end.php PARAMS = ${KNUMMER} ${phone_number_to}
${phone_number_from} ${CHANNEL:4}") in new stack<br>
<br>
<br>
If the variable ${PARAMS} contains other variables " </font><font
face="Helvetica, Arial, sans-serif"><font face="Helvetica, Arial,
sans-serif">${KNUMMER} ${phone_number_to} ${phone_number_from}
${CHANNEL:4} "</font>, how can I use the values of these
variables in my dialplan ??<br>
<br>
<br>
I want to use "</font><font face="Helvetica, Arial, sans-serif"><font
face="Helvetica, Arial, sans-serif"> ${KNUMMER}
${phone_number_to} ${phone_number_from} ${CHANNEL:4} </font>"
as input to my script inside my dialplan :<br>
<br>
-- Executing [h@pbx-routing:43] System("SIP/SipT01-00000012",
"/usr/bin/php /var/lib/asterisk/agi-bin/call_end.php ${KNUMMER}
${phone_number_to} ${phone_number_from} ${CHANNEL:4}") in new
stack<br>
<br>
But in stead of having ${KNUMMER} I want to have "112233", and in
stead of having </font><font face="Helvetica, Arial, sans-serif">${phone_number_to}
I want to have "31023456789" and so on...<br>
<br>
<br>
Is this possible ??<br>
<br>
<br>
Kind regards,<br>
<br>
Jonas.<br>
<br>
</font>
</body>
</html>