[Asterisk-Users] Asterisk Gotoif / last called
Philipp von Klitzing
klitzing at pool.informatik.rwth-aachen.de
Sat Jan 3 05:27:15 MST 2004
Hi
> Ive been trying to get this to work for ages now, basicaly im trying
> to do if ${woteva} = "" (nothing), or its none existenant then do
> label 1, else label 2. for my last called function, so it will play a
> different message if theres no last call in the system or it was
> anonymous. ive tried
There is a way to test for an empty string:
GotoIf($[${CALLERIDNUM} = ]?3:2)
> exten => 1000,1,GotoIf($[${last-call${CALLERIDNUM}} = ""]?4:5)
> and heaps of other combinations, most times it ses syntax error when
> im in asterisk verbose
My guess is that this won't work. Instead look into DBput and DBget and
do something like
DBput(last-call/${CALLERIDNUM}=value)
The advantage of this is, by the way, that the last caller data will also
be available after a restart of Asterisk.
> Also say in my example above, its true so it goes to 4, does that mean
> it goes to extension 4.. or rule 4 in that dialplan ?
You'll jump to priority 4, not extension 4.
> oh while im asking.. is there a way to make global changes to a
> context
Look at Macros.
Cheers, Philipp
More information about the asterisk-users
mailing list