bilal ghayyad
2009-Jul-01 17:25 UTC
[asterisk-users] Testing the manager.conf: sending and receiving commands
Hi All; How can I test manager.conf? Can I telnet to the asterisk machine at the port 5038 and send and receive commands to test if the manager is working fine? How? Regards Bilal
Gordon Henderson
2009-Jul-01 18:33 UTC
[asterisk-users] Testing the manager.conf: sending and receiving commands
On Wed, 1 Jul 2009, bilal ghayyad wrote:> Hi All; > > How can I test manager.conf? > > Can I telnet to the asterisk machine at the port 5038 and send and > receive commands to test if the manager is working fine? How?Yes! RTFM would be a fine place to start - or at least the wiki: http://www.voip-info.org/wiki/view/Asterisk+manager+API I suggest preparing a file in one window with commands in it, then copy & paste these into the telnet window while you're experimenting. Gordon
Jared Smith
2009-Jul-01 19:46 UTC
[asterisk-users] Testing the manager.conf: sending and receiving commands
On Wed, 2009-07-01 at 10:25 -0700, bilal ghayyad wrote:> Can I telnet to the asterisk machine at the port 5038 and send and receive commands to test if the manager is working fine?Absolutely!> How?1) Make sure manager is enabled in manager.conf (enabled=yes in [general] section) 2) Create a manager user, and give that user permissions (see the sample section in manager.conf named [mark]) 3) Type "manager reload" from the Asterisk CLI 4) Telnet to port 5038, as shown below: [jsmith at mybox ~]$ telnet localhost 5038 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Asterisk Call Manager/1.1 Action: Login Username: jsmith Secret: doughnuts Events: on ActionID: 12345 Response: Success ActionID: 12345 Message: Authentication accepted Action: ExtensionState Exten: 555 Context: lab ActionID: 987654321 Response: Success ActionID: 987654321 Message: Extension Status Exten: 555 Context: lab Hint: SIP/linksys Status: 0 -- Jared Smith Training Manager Digium, Inc.