I asked this question before. I figured I’d ask again and pose it a different way.
Is there a way to set a variable in a context, when that context is entered? Asterisk only allows you to set variables with VAR=VAL in the global context.
MuppetMaster suggested I use the s extension, like this:
[user_context]
exten => s,1,SetVar(…)
I don’t think that will work because the s extension only gets called when there are NO OTHER valid extensions. This will not be the case. There will be valid matching extensions in this user context. We want to be able to set the caller id variables for each user, when they dial an outside number.
What a dumb name… 'start extension. I don’t see the connection between the name ‘start’ and something that gets executed when no valid extensions exist. Huh???
what other extensions are you going to have in a context then ? i have lots of extensions in my dialplan that only contain ‘s’ and they work OK. and all do things with variables.
when you compiled did you do a make samples ? or do you have another system you can install A@H on to give yourself a headstart ?
Asterisk at home? Not using it. Don’t follow what your talking about.
The context could have lots of extensions. I don’t know what/how many yet. All I can tell you is that example doesn’t work because ‘s’ isn’t a wild card, and it only used when no other valid extensions exist. That’s what the docs say.
i give up. you’re right, the Asterisk docs make it impossible to get even the most basic system to work. if i were you i would give up, get a refund and spend a heap more budget on a traditional PBX.
A@H takes a few minutes to install on a spare “test” machine, and gives you the chance to look at a whole heap of functionality. even if you’re not going to use it, the conf files it generates will help you get started, as would the samples if you generated those at build time.
it seems to me like you really want someone to come install this for you.
oh, and that call-blocking functionality you were going around in circles to do, wrote that in < 60 mins, including extra pages in AMP !