Setting variables

Is it possible to set a variable based off of user entry (the user dials the number) then have it set the variable. This is basically what I want to be done:

exten => 123,1,Answer
exten => 123,2,Playback(xxx)
exten => 123,3,Set(${NumbersEnteredByUser})

It seems like a relatively easy thing to do, but I can’t seem to find any info about it. Let me know if I was unclear in any way. Any help would be greatly appreciated. Thanks in advance for your help.


What you can do is actually act as if the user had enter a phone number. For example, you can do something like:

exten => s,1,Background(mysound)
;now, the callee enters a phone number with, say, 8 digits

exten => _XXXXXXXX,1,Set(NumbersEnteredByUser=${EXTEN})
;here you register the number entered by the user (which is actually the extension itself)

Hope that I have helped you…

Thanks for the reply! Great idea- I’m going to try and.



The simplest and I assume the reason this is in * is for just this function

This will read out the soundfile and expect a digits and assign them to the variable. and steps on