Summary:ASTERISK-09638: Set() works different in realtime
Reporter:Denes Dolhay (denke)Labels:
Date Opened:2007-06-10 13:26:25Date Closed:2011-06-07 14:03:20
Versions:Frequency of
Description:If I use the Set() application in realtime, then it works elsewhise.
In the normal mode: Set(abc='def') then the value of ${abc} is def .
In realtime mode:   Set(abc='def') then the value of ${abc} is 'def' .

In the normal mode: Set(ghi='') then the value of ${ghi} is a nullstring .
In realtime mode:   Set(ghi='') then the value of ${ghi} is '' . (hhitch is not a nullstring, but two apostrophes.)

This cause a lot of trouble when working with strings.
Comments:By: Tilghman Lesher (tilghman) 2007-06-10 20:33:21

Actually, it's not working any differently, the difference is just that the quotes are eliminated during the dialplan load into memory.  If you type 'dialplan show', you'll see the Set app without quotes.  If the Realtime app is returning quotes that are in the database, then you're right, the quotes will be part of the variable value.

By: Denes Dolhay (denke) 2007-06-11 03:20:02

I see. Then I think quotes should be eliminated after querying the appdata from the realtime database, just to make them work the same way...
But tell me if im wrong...

By: Tilghman Lesher (tilghman) 2007-06-11 08:11:35

No, you should be eliminating the quotes when you load the lines into the database.  That corresponds to the same time as the load of the file into memory.

By: Denes Dolhay (denke) 2007-06-11 10:35:03

I see. Then please consider this issue colsed.
I will write my script to eliminate theese quotes in the future

Thank you!