MP02 Automatic Dialing (Custom Dial Plan)

40 views
Skip to first unread message

Brandon M.

unread,
Apr 12, 2016, 1:22:18 PM4/12/16
to Village Telco Development Community
Hello,

I have an MP02 and we're building out a small mesh network for a project. Our project uses menus for callers to learn what they can do from the telephone so I would like to configure the MP02 to automatically dial an extension (like #100) upon the user picking up the phone. 

Is this possible?

If so, how would I go about executing it?

I have been looking at the mentions online of custom dial plans but haven't seen an example like this (yet). I would need the modification to be persistent with reboots since the units are battery powered.

Thank you in advance for any help and really like this hardware :-)

Brandon M.
Central Services 

T Gillett

unread,
Apr 12, 2016, 6:28:33 PM4/12/16
to village-telco-dev
Hi Brandon

Could you clarify what you are trying to achieve please?

It sounds like you want to configure the MP02 so that when a user picks up the phone, it will always automatically dial a preset number.

Is that correct?

If so, then I can understand that this might be used for some special application (eg for an emergency phone) but it would not seem to be useful for more general use.

Perhaps I have misunderstood your requirement.

The MP02 uses Asterisk which is very flexible. It has been set up with a dial plan to support a range of typical uses, but this can be extended/changed for a special use if required. The dial plan is contained in /etc/asterisk/extensions.conf and associated include files.

Regards
Terry



--
You received this message because you are subscribed to the Google Groups "Village Telco Development Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to village-telco-...@googlegroups.com.
To post to this group, send email to village-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/village-telco-dev/da5ff49e-b72b-48f7-99cb-9fe7abd2acd9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brandon M.

unread,
Apr 14, 2016, 3:13:43 AM4/14/16
to Village Telco Development Community
Hi Terry,

Thank you for the reply!

We use the MP02 in installations where the users are presented with a menu (versus a dial tone) so they can better understand their options. 

I am sure it is possible however I am used to doing custom dial plans on lesser ATA's and am not sure where to make my modifications so that things won't get immediately overwritten on next bootup. 

Thank you in advance for the help :-)


Brandon M.
Central Services 

T Gillett

unread,
Apr 15, 2016, 6:59:37 PM4/15/16
to village-telco-dev
Hi Brandon

Apologies, but I still don't quite understand what you need to achieve.

Is the required process as follows:
- a user picks up the phone, 
- the MP automatically dials a pre-determined number to an IVR system which presents an audio menu,
- the user selects from the menu by pressing the appropriate key(s) on the phone,
- the IVR system responds to the dialled digit(s) in the appropriate manner.


Or is it that you want the audio menu presented from the IVR within the MP, and the user then dials the required number?

Or something else entirely.

Perhaps it would help to explain more fully the context of the application so we can better understand.

Regards
Terry

Brandon M.

unread,
Apr 16, 2016, 1:19:16 AM4/16/16
to Village Telco Development Community
Hi Terry,

Thanks again for the reply and sorry for the confusion. 

You're itemized list for the required process is accurate. We want the MP02 to dial into a PBX extension as soon as the user picks up the phone. 

On our linksys type devices we have the dial plan of

( P2 <:100> | xxx )

This tells the ATA to dial extension 100 after a 2 second pause (this pause is to allow the user, if they're a technician or know the extension, to quickly dial it before getting tossed to the IVR (which is at ext 100). What I am confused about is how to execute something similar on the MP02.

Thank you!

-Brandon M.
Central Services

T Gillett

unread,
Apr 16, 2016, 7:41:59 AM4/16/16
to village-telco-dev
Hi Brandon

OK I get it now.

From a quick search I turned up this page that talks about doing something similar and indicates that it is quite possible:

   http://pbxinaflash.com/community/threads/off-hook-auto-dial.8203/

The Asterisk dial plan is essentially contained in the file  /etc/asterisk/extensions.conf, augmented by some include files.
In the MP02 this file is static, but some of the include files are generated dynamically by the firmware to reflect changes in the MP02 configuration and networking (since it uses IP based numbering for on-mesh calls)

If you look through the extensions.conf file on the MP02-FXS (copy attached) you will see what has been done for the call handling on the MP.

For your purposes, you should be able to customise the extensions.conf file either directly or by setting up an include file containing your additional configuration. This will allow you to preserve all the current dial plan rules if you wish so that it will respond to dialled digits in the two second pause period.

Unfortunately I am not familiar enough with Asterisk to be able to give you the dial plan syntax you need, but hopefully someone who is more knowledgeable will chime in and offer some help.

Also there are some good on-line resources for Asterisk, including these below which will no doubt help you to develop your custom dial plan.
If you develop new files and want to install them on multiple MP02s, you can use the "Load Config /Patch" facility to upload a patch.

When (not if) you are successful in this endeavour, please post back a description of what you did for the edification of the rest of us.

Regards
Terry

extensions.conf

Brandon M.

unread,
May 10, 2016, 1:34:08 AM5/10/16
to Village Telco Development Community
Hi Terry,

So we made some progress on this and found a solution. Two files to modify...

1st:Gain SSH access to the device by setting a password in the SECN configuration webpage. Login with root as username and whatever password you chose.

Modify /etc/config/dragino2-si3217x using vi

Change
option immediate 'no'
 
to

option immediate 'yes'

Save and quit.

Modify /etc/asterisk/extensions.conf using vi

Add, under [outgoing-analog]:

exten => s,1,Answer()

exten => s,2,WaitExten(1)

exten => s,3,Dial(SIP/xxx@sipaccount,60,r)

exten => s,n,Hangup()

Where xxx is the extension you want to dial on your SIP account (in our case we're connected to an external asterisk server via SIP). The 2nd line with WaitExten(1) is not necessary but we added this so the phone had a short delay before dialing.

Thanks again for the help! 

-Brandon M.
Central Services

Wayne Abroue

unread,
May 10, 2016, 2:31:41 AM5/10/16
to village-telco-dev
Great work,, Yes asterisk has mostly simple solutions, it's finding them which can sometimes be a pain. Setting up a full Vtelco system server, with prepaid,DID's etc,,gave me a new appreciation for Asterisk. I would recommend this to anyone who is interested in expanding their knowledge.

W

--
You received this message because you are subscribed to the Google Groups "Village Telco Development Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to village-telco-...@googlegroups.com.
To post to this group, send email to village-...@googlegroups.com.

T Gillett

unread,
May 10, 2016, 6:57:39 AM5/10/16
to village-telco-dev
Hi Brandon

Thanks very much for the feedback, I am sure it will be useful to others.

I will put a page on the VT Wiki with the details.

Regards
Terry

--
You received this message because you are subscribed to the Google Groups "Village Telco Development Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to village-telco-...@googlegroups.com.
To post to this group, send email to village-...@googlegroups.com.

T Gillett

unread,
May 11, 2016, 12:29:47 AM5/11/16
to village-telco-dev
Reply all
Reply to author
Forward
0 new messages