The following guide will explain how to set new virtual (DID) number on Asterisk. In the following explanation, we will use DID number 17186765566 for example, this DID number will be forwarded to the internal SIP extension 100.
Your Asterisk configuration files should look as follows:
If asterisk will not be able to find extension within given context you will get an unhelpful No such context/extension IAX2 debug error. Thus, it’s better to use catch-all extension pattern _X. during debugging
You can find detailed explanation of asterisk IAX authentication here.