Configuring Asterisk for MicroSIP Device-to-Device Calling with Proper Call Routing

I need some help from you regarding the Asterisk server. I have created Asterisk extensions following the same steps as in this video, but I am using MicroSIP. When I make a call, it rings on the same device, whereas in this video, he is making calls from his Android phone to MicroSIP . Can anyone help me with this?
I have two peers one is 7001 and second is 7002
I want to connect 7001 to one device and 7002 to another device. When I connect 7001 to 7002, a call should go to the device to which it is connected. How can this be done?

Please show your configuration and the logging of a call that is not working.

The video shows that an sip client is installed on the android phone, no difference compared to the MicroSIP you have installed.

Another remark, the video uses Asterisk 16, which is EOL since 2023-10-09…

my sip.conf file



my extensions.conf file

exten => 7001,1,Answer()
exten => 7001,2,Dial(SIP/7001,60)
exten => 7001,3,Playback(vm-nobodyavail)
exten => 7001,4,VoiceMail(7001@main)
exten => 7001,5,Hangup()

exten => 7002,1,Answer()
exten => 7002,2,Dial(SIP/7002,60)
exten => 7002,3,Playback(vm-nobodyavail)
exten => 7002,4,VoiceMail(7001@main)
exten => 7002,5,Hangup()

exten => 8001,1,VoicemailMain(7001@main)
exten => 8001,2,Hangup()

exten => 8002,1,VoicemailMain(7002@main)
exten => 8002,2,Hangup()

my voicemail.conf file
7001 => 7001

7002 => 7002

zaryab-Latitude-E5470*CLI> core show version
Asterisk 18.10.0~dfsg+~cs6.10.40431411-2 built by nobody @ on a unknown running Linux on 2022-02-12 18:24:51 UTC

I would first change your localnet setting in the sip.conf to : localnet =

And what does the asterisk log show when you make a call?

Are the sip clients registered?

Remember, the more information you provide the better we can help you.

The other advise is, change to pjsip.

Why would you spend time learning the chan_sip, while this is not supported anymore in the latest Asterisk versions and is being phased out…

Call being rejected because extensions not found in context

Can you please provide a video along with documentation related to it, so I can learn more easily?

ehh no…

I would suggest you look on for videos related to Asterisk if you want to learn using videos.

My advise however is to take a look at this :,%204th%20Edition.pdf

As you are using chan_sip, take into account that this book version is a bit older, but it will teach you how Asterisk works, when you understand the basics, it is much easier for you to change from chan_sip to pjsip.

And no there are not shortcuts in learning how to work with Asterisk.

Thank you very much for guiding and helping me.

The article linked starts by saying you are not allowed to update a file, but that file is a file that you must update if you are configuring Asterisk from scratch. It also refers to a file that is not installed in a normal install.

These restrictions and extra files are normally associated with FreePBX, which is not supported on this forum.

Could you please provide a more detailed explanation?

Detailed explanation of what? Did you start with the book?

We all had to first start reading, trying, then ask questions.

And to ask you have to provide information. What is not working, what does the log file say…

No, I’m not asking you. Actually, I’m asking about the answer that David551 has given.

Your extensions are in different contexts (Do really need to separate those 2 extensions?). You haven’t defined “external” context.
To call someone in another context you need smth like this:




Or to include one context in another (typically where trusted and untrusted callers can call the same number, in the same form, in which case you can include the untrusted user context in the trusted one.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.