0

I am trying to get user information from a given extension using the Asterisk API commands. something like:

 getUserInfo('4000');

response could be:

 name: Bob Smith
email: bob@smith.com
...
...
etc....

I have tried the action: ExtensionState but that doesn't do it for me. It only returns:

 Response: Success
 ActionID: 1
 Message: Extension Status
 Exten: idonno
 Context: default
 Hint:
 Status: -1 
bart2puck
  • 2,432
  • 3
  • 27
  • 53
  • You need to add more info to this question if you don't want it closed... Why did ExtensionState not work? What response did you get? – Mathew May 29 '14 at 16:13

1 Answers1

0

Asterisk does not contain the concept of a "user". It defers the idea of a user to higher level systems, such as FreePBX. Generally, Asterisk only has the concept of devices and presence state which can be aggregated together into an extension state.

User names, locations, e-mail addresses and the like are the domain of systems that build on top of Asterisk.

Note: I'm ignoring users.conf, which isn't something we tend to recommend. It doesn't really provide the concept of a user either - it merely provides a way to define information for multiple channel drivers/modules in a single location, while sacrificing a lot of power/flexibility.

Matt Jordan
  • 2,899
  • 1
  • 27
  • 29