On Wed, Oct 18, 2017 at 11:00 AM, Bryant Zimmerman <brya...@zktech.com> wrote:
>
> I am trying to get the user-agent from extensions registered via pjsip.
> With sip we could do a sip show peer peername and it would list the 
> user-agent string.
> In a pjsip deployment it looks like this info is likely in the contact. I 
> know we can access it from the dialplan, but this is only works when a call 
> occurs. How can we get the user-agent for extensions from the console. We 
> need this for firmware version checking of extensions as many providers 
> include that in the user-agent.  Any ideas as the pjsip show contact 
> contactname does not return any real helpful info to the command line.
>
> Please advise if you are able.
>

For a long time, the project has discouraged (although not necessarily
prevented) using/abusing the CLI for interactions with external
systems. The CLI is intended for human interaction, not intersystem
interaction. Doesn't mean you can't build a system that interacts with
Asterisk through the CLI - just means you probably shouldn't.

If you need the UserAgent string for your registered endpoints, you
can get that off of the Contact. You can get the Contact via AMI by
listening for events and by querying for the status of the contacts
[1].

[1] 
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+ManagerAction_PJSIPShowRegistrationInboundContactStatuses

-- 
Matthew Jordan
Digium, Inc. | CTO
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to