Closed xciser77 closed 5 years ago
Hi this works for me on V3 hope it helps
use CWM\BroadWorksConnector\Ocip\Models\UserModifyRequest17sp4; use CWM\BroadWorksConnector\Ocip\Models\AccessDevice; use CWM\BroadWorksConnector\Ocip\Models\AccessDeviceLevel; use CWM\BroadWorksConnector\Ocip\Models\AccessDeviceMultipleContactEndpointModify;
$request = (new UserModifyRequest17sp4()) ->setUserId($userId) ->setEndpoint( (new UserModifyRequest17sp4Endpoint()) ->setAccessDeviceEndpoint( (new AccessDeviceMultipleContactEndpointModify()) ->setLinePort($lineport) ->setAccessDevice( (new AccessDevice()) ->setDeviceLevel(AccessDeviceLevel::GROUP()) ->setDeviceName($devicename) ) ) );
added the AccessDeviceLevel::GROUP() instead op 'Group' and that works. But now I have the following fault. I am trying to add a user without a device because its a flex user 👍 $add_user_request = (new UserAddRequest21()) ->setServiceProviderId($loginData->getServiceProviderId()) ->setGroupId($loginData->getGroupId()) ->setUserId('user'.($extension+(-1+$x)).'@'.$groupdomains->getGroupDefaultDomain()) ->setFirstName('User') ->setLastName(($extension+(-1+$x))) ->setCallingLineIdLastName('User') ->setCallingLineIdFirstName(($extension+(-1+$x))) ->setExtension(($extension+(-1+$x))) ->setPassword('password');
But now I get error: Choice not made between accessDeviceEndpoint, trunkAddressing The endpoint is added later on in the script with a UserFlexibleSeatingGuestModifyRequest(), so why is it trowing this error ?
It appears this is an issue with the validator. I'm looking into it.
The Choice issue should now be fixed in 3.0.3
I was using version 2.3.3 and upgrade to 3.x, but now I get an 500 internal server error in my project when I create a new AccessDevice. I downgraded back to 2.3.3 an its working again. The fails comes from the code below, nothing special.
$new_accessdevice = (new AccessDevice()) ->setDeviceLevel('Group') ->setDeviceName($toestelId);