I'm pretty new to Asterisk, and am using AsteriskNOW on CentOS.
I currently can't figure out if it is even possible to dynamically create extensions. Is there dialplan code that I can write to accomplish this, or should I use an AGI?
I'm pretty new to Asterisk, and am using AsteriskNOW on CentOS.
I currently can't figure out if it is even possible to dynamically create extensions. Is there dialplan code that I can write to accomplish this, or should I use an AGI?
Use _.
to match any extension in your dialplan (or, if your dynamic extensions will follow a pattern, use that), and use the value of ${EXTEN}
to dynamically deal with the call. A simple example:
exten => _.,1,Answer()
same => n,SayDigits(${EXTEN})
same => n,Hangup()
Whether or not you use AGI is simply a function of how you want to handle the call—you'll still need to pass control to the AGI in your dialplan, and for that you'll need to match the call as above.