User-agent Access From Pjsip

Home » Asterisk Users » User-agent Access From Pjsip
Asterisk Users 1 Comment

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.

Thanks Bryant

One thought on - User-agent Access From Pjsip

  • 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