Picture of Thomas 629
Registered 13 years 77 days
Thomas 629 Saturday, 30 January 2021, 12:40 PM
Object modification via SOAP is killing app-rights
Hi,

I'm trying to define app-right in a user object by SOAP.
But actually on my V13r1SR21 this is not possible.

While breaking down the problem it seems, that loading a user
object from the PBX and storing the same (unchanged) object back to
the PBX is killing all app rights for that object.

This is my simple code:

$user = $anlage_soapfd->ladeUserAlsXml('Thomas Neugebauer');
echo "Vorher:\n".$user->asXML()."\n\n";

$anlage_soapfd->speichereUser($user);

$user = $anlage_soapfd->ladeUserAlsXml('Thomas Neugebauer');
echo "Nachher:\n".$user->asXML()."\n\n";

The functions ladeUserAlsXML() and speichereUser() are simple wrapper
functions to the official SOAP API calls like <show><user cn='Thomas Neugebauer'></show> and <modify><user....>...</user></modify>

The results are:

Vorher:
<user cn="Thomas Neugebauer" guid="4ac631409ef55f0171000050563f00ca" e164="20" dn="Thomas Neugebauer" h323="Thomas Neugebauer" pwd="********" pwdx="41e8570bda7a1595fe39d10877756766879ea46a6bc6ea53" text="Thomas Neugebauer" apps-my="chat,calllist,dev%3ASwPh_Thomas%20Neugebauer_5ff5b7be,users-admin" loc="pbx_cloud_k100000_v13cubbi" node="pbx_cloud_k100000_v13cubbi" uclic="true" type="ep"><app name="profile"/><app name="softphone"/><app name="users"/><device hw="009033466A83" text="IP222 20" tls="true"/><device hw="sip_individual_2246"/><device hw="SwPh_Thomas Neugebauer_5ff5b7be" app="softphone" text="Softphone"/><grp name="AUTOPROV"/><grp name="gr_TAPI_"/></user>

Nachher:
<user cn="Thomas Neugebauer" guid="4ac631409ef55f0171000050563f00ca" e164="20" dn="Thomas Neugebauer" h323="Thomas Neugebauer" pwd="********" pwdx="41e8570bda7a1595fe39d10877756766879ea46a6bc6ea53" text="Thomas Neugebauer" apps-my="chat,calllist,dev%3ASwPh_Thomas%20Neugebauer_5ff5b7be,users-admin" loc="pbx_cloud_k100000_v13cubbi" node="pbx_cloud_k100000_v13cubbi" uclic="true" type="ep"><device hw="009033466A83" text="IP222 20" tls="true"/><device hw="sip_individual_2246"/><device hw="SwPh_Thomas Neugebauer_5ff5b7be" app="softphone" text="Softphone"/><grp name="AUTOPROV"/><grp name="gr_TAPI_"/></user>

As you can see, the <app name="profile"/><app name="softphone"/><app name="users"/> are missing after the Modify-Operation.

Is this a bug or am I doing anything wrong with my SOAP request?

Best regards
Thomas Neugebauer
Picture of Niko 1071
Registered 11 years 359 days
Niko 1071 Monday, 1 February 2021, 09:21 AM
Re: Object modification via SOAP is killing app-rights
Hi Thomas,

yes this is a bug. We have the same problem (workaround is to use the http get to set the App Lices again - dirty but it works),
We reportet it allready to innovaphone . i hoppe it's fixed in sr22 .. have to check


Best Regards
Niko
2013
Moderator Registered 16 years 15 days
Guntram Diehl (innovaphone) Monday, 1 February 2021, 09:32 AM
1 of 1 users consider this post helpful
Re: Object modification via SOAP is killing app-rights
This should work since build 132679
Picture of Thomas 629
Registered 13 years 77 days
Thomas 629 Monday, 1 February 2021, 10:57 AM
Re: Object modification via SOAP is killing app-rights
Hi Guntram,

we've tested again on SR22 - but the problem still exists.

Best regards
Thomas Neugebauer




Andreas Fink
Moderator Registered 13 years 52 days
Andreas Fink (innovaphone) Tuesday, 2 February 2021, 08:34 PM
Re: Object modification via SOAP is killing app-rights
Hello Thomas,

please use attribute apps in the tag user with comma separated list of the apps, that should be activated.

E.g.: <modify><user apps="profile,softphone,users" ... >

Best Regards
Andreas Fink
Picture of Thomas 629
Registered 13 years 77 days
Thomas 629 Wednesday, 3 February 2021, 11:35 AM
Re: Object modification via SOAP is killing app-rights
Hi Andreas,

thanks for your feedback. It looks a bit buggy and not idempotent,
sending a modify with
apps="softphone,users"
and getting back
<app name="softphone"/><app name="users"/>
whend reading the same object again.

But indeed - it works this way.

Is this really the intended use and behavior of the modify command
or is this expected to change in the future?

As we have to code some special handling for this behavior, it would be good to know, whether this is future proof.

Best regards
Thomas



Andreas Fink
Moderator Registered 13 years 52 days
Andreas Fink (innovaphone) Wednesday, 3 February 2021, 05:08 PM
Re: Object modification via SOAP is killing app-rights
Hi Thomas,

i have tested read/write/read sequence with the latest firmware (13r1 sr22) and it looks consistent now:


>>>:
<?xml version="1.0"?>
<show>
<user cn="user1" config="true"/>
</show>

<<<:
<?xml version="1.0"?>
<show time="8312">
<user cn="user1" guid="02b5bfeb761960016006009033403d06" e164="100" h323="user1" admin="full" loc="master" node="root" apps="apimonitor,chat">
<app name="apimonitor"/>
<app name="chat"/>
<device hw="user1"/>
</user>
</show>


>>>:
<?xml version="1.0"?>
<modify>
<user cn="user1" guid="02b5bfeb761960016006009033403d06" e164="100" h323="user1" admin="full" loc="master" node="root" apps="apimonitor,chat">
<app name="apimonitor"/>
<app name="chat"/>
<device hw="user1"/>
</user>
</modify>

<<<:
<?xml version="1.0"?>
<ok/>


>>>:
<?xml version="1.0"?>
<show>
<user cn="user1" config="true"/>
</show>

<<<:
<?xml version="1.0"?>
<show time="8312">
<user cn="user1" guid="02b5bfeb761960016006009033403d06" e164="100" h323="user1" admin="full" loc="master" node="root" apps="apimonitor,chat">
<app name="apimonitor"/>
<app name="chat"/>
<device hw="user1"/>
</user>
</show>


Another test case for adding an app to already existing:


>>>:
<?xml version="1.0"?>
<show>
<user cn="user1" config="true"/>
</show>

<<<:
<?xml version="1.0"?>
<show time="9082">
<user cn="user1" guid="02b5bfeb761960016006009033403d06" e164="100" h323="user1" admin="full" loc="master" node="root" apps="apimonitor,chat">
<app name="apimonitor"/>
<app name="chat"/>
<device hw="user1"/>
</user>
</show>


>>>:
<?xml version="1.0"?>
<modify>
<user cn="user1" guid="02b5bfeb761960016006009033403d06" e164="100" h323="user1" admin="full" loc="master" node="root" apps="apimonitor,chat,rcc">
<app name="apimonitor"/>
<app name="chat"/>
<device hw="user1"/>
</user>
</modify>

<<<:
<?xml version="1.0"?>
<ok/>


>>>:
<?xml version="1.0"?>
<show>
<user cn="user1" config="true"/>
</show>

<<<:
<?xml version="1.0"?>
<show time="9082">
<user cn="user1" guid="02b5bfeb761960016006009033403d06" e164="100" h323="user1" admin="full" loc="master" node="root" apps="apimonitor,chat,rcc">
<app name="apimonitor"/>
<app name="chat"/>
<app name="rcc"/>
<device hw="user1"/>
</user>
</show>




Best Regards
Andreas
Picture of Thomas 629
Registered 13 years 77 days
Thomas 629 Wednesday, 3 February 2021, 05:37 PM
Re: Object modification via SOAP is killing app-rights
Hi Andreas,

thanks for the explanation.

When using the following request, we can reproduce this.

<?xml version="1.0"?>
<show>
<user cn="user1" config="true"/>
</show>

The magic is in the config="true" in your code, which we did not use
in our read-request. The description of this option:

The attribute config="true" (available starting with version 9) is optional. If used only the pure config stored at a user is provided, without application of templates.

I'd not expected this option to lead to additional tags in the show-Results.

Best regards
Thomas






← You can define your color theme preference here