Asterisk Tweaks on MP2
1. Automatically dialling an extension when the phone is picked up
Contributed by Brandon M.
We want the MP02 to dial into a PBX extension as soon as the user picks up the phone.
Firmware is SECN 3 MP02-FXS
The required process is 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.
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).
A. Modify /etc/config/dragino2-si3217x
option immediate 'no'
option immediate 'yes'
Save and quit.
B. Modify /etc/asterisk/extensions.conf
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 strictly necessary but we added this so the phone had a short delay before dialing to allow manual dialling if required.