GraphQL: how to list SIP secrets

Hi,
I’m discovering FreePBX 15’s GraphQL feature.
{
allExtensions {
extension {
extension
id
user {
name
password
sipname
extension
}
}
}
}

With the above request, I’ve got the bellow answer.
{
“data”: {
“allExtensions”: {
“extension”: [
{
“extension”: “4444”,
“id”: “ZXh0ZW5zaW9uOjQ0NDQ=”,
“user”: {
“name”: “John Doe”,
“password”: “”,
“sipname”: “”,
“extension”: “4444”
}
}
]
}
}
}

How can I get all extensions with their SIP password ?
Best regards

  1. Sorry for my above message identation (I forgot to use appropriate edition options). I’m reallu sorry for that.

  2. Having an equivalent request that would REST instead of GraphQL is an acceptable work around for me.
    All I currently need is way to list all SIP accounts with secret and display names.

Working on the same platform (FreePBX 15, Asterisk 16.4.1) , I added a chansip extension.
Looking at SIP traffic, I observed Asterisk required PJSIP or chansip extension to use configured SIP secret.

I exported extension data with Bulk Handler tools.
For both, a “secret” field was and “password” wset !

It seem

For both, a “secret” field was and “password” was unset !
I confused both in my previous query but my first question remains:

how can I get this secret field withe either REST or GraphQL API ?

The elements bellow worked (after 40 or more different attempts) ! I hope this will help others (and save them 39 attempts) !

{
allExtensions {
extension {
device {
tech {
__typename
… on pjsip {
secret
}
}
}
extension
}
}
}

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.