i have created AddUser and EditUser scripts in perl for adding/modify/view/delete sip/voicemail entry in config files.
Requirements:
- Asterisk::config CPAN module
Features and working
- add/edit sip entry
- add/edit voicemail entry if required
- add/remove hint in extensions.conf if required.
- when ask for codecs provide a list of codecs with separated by a space
- default values in AddUser script are appended to input message in braces.
Setup
- create an empty file “/etc/asterisk/sip_custom.conf” and include the newly created file reference in “/etc/asterisk/sip.conf” at the end of file, like this.
- in sip.conf
- include “sip_custom.conf”
- run cpan and install Asterisk::config library.
# cpan
cpan> install Asterisk::config
cpan> install Asterisk::config
# chmod a+rx AddUser
# chmod a+rx EditUser
# chmod a+rx EditUser
That’s it, now run AddUser to AddUser script to create users.
Enjoy!