Skip to main content

Problem with custom tag

Posted by trinitel on Thu, 02/17/2011

I'm trying to use custom tag in dialout script. Tenant tag works fine but extension tag will not give me any value. "Database show" command shows that both tenant and extension tags are set correctly.

here is the example of using tenant tag:
exten => s,n(dial),Macro(tl-dialout-base,${ARG1},${ARG2},${DB(TL/TENANT/${tenant}/tag)},${ARG4},${ARG5})

and this is the extension tag:
exten => s,n(dial),Macro(tl-dialout-base,${ARG1},${ARG2},${DB(TL/${tenant}${TL_DASH}${MYEXTENSION}/tag)},${ARG4},${ARG5})

Is there something wrong with the syntax? Or anything else is wrong?

Please advise.

Peter
Trinitel Ltd
www.trinitel.co.uk


Submitted by trinitel on Sat, 02/19/2011 Permalink

Hi Erik,

you are correct (as always). MYEXTENSION is not set at that part of the dialout-1-trunk script.
I can see in verbose the MYEXTENSION is set later in dialout-base script using tl-set-myvariables.
What is the best way to have MYEXTENSION set already in dialout-1-trunk script?
Should I use tl-set-myvariables in dialout-1-trunk just before I call Macro(tl-dialout-base,${ARG1},${ARG2},${DB(TL/${tenant}${TL_DASH}${MYEXTENSION}/tag)},${ARG4},${ARG5})?
Do I need to remove tl-set-myvariables from dialout-base then?

Thanks

Peter

Peter
Trinitel Ltd
www.trinitel.co.uk