I introduce two things. One thing that has nothing to do with patterns but makes using patterns in the scenario I give very practical. It is the Extension variable.
Syntax of extension variable: ${EXTEN}
As you write the script you can use the ${EXTEN} variable in the function side, and at run time (when in call), it will be replaced by the number that is dialed. Again, whatever number is dialed, it becomes the Extension variable.
So now essentially all your lines for you extension configuration are going to pretty much look the same, except for the number dialed. So how can this be compressed (for lack of a better word). Through a pattern. Instead of defining each and every phone number that can be possibly dialed, define a pattern that can represent hundreds, thousands, or millions of extensions/phone numbers. You can see why this is necessary to implement in the real world.
See http://www.the-asterisk-book.com/ for a good guide on how to write patterns.
I learned so much from your tutorial. You are very good at explaining concepts in a simple easy to understand manner. Thank you and keep the videos coming.
dingoleh 4 weeks ago in playlist Asterisk tutorials
Hi Manni I learned a bit using your videos can you please do a video for adding VOIP in them and if one extension for example 1000 wants to call an outside number or call my mobile. Thanks
Maxt0r001 6 months ago
Kuddos for you manni, very nice and clean. keep up that good work!
brucelampson 7 months ago in playlist Asterisk tutorials