Asterisk configuration

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:

extensions.conf:

[from-sendmycall]
exten => _X.,1,Ringing
exten => _X.,n,Answer
exten => _X.,n,Echo
exten => _X.,n,Wait(600)
exten => _X.,n,Hangup

sip.conf:

[sendmycall-us]
host=46.19.209.14
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-SendMyCall
insecure=very
nat=never
allow=all

[sendmycall-eu]
host=46.19.210.14
dtmfmode=rfc2833
dtmf=rfc2833
type=peer
context=from-SendMyCall
insecure=very
nat=never
allow=all

iax.conf:

[sendmycall-iax-us]
type=user
permit=46.19.209.42
context=from-sendmycall

[sendmycall-iax-eu]
type=user
permit=46.19.210.42
context=from-sendmycall

NOTE

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.