private function getUser($userId) { $this->client->send(OCISchemaUser::UserGetRequest17sp4($userId)); return $this->client->getResponse(); }
public function __construct($userId, $migrator) { if (is_object($migrator)) { $this->migrator = $migrator; } else { throw new LogicException("Migrator object invalid"); } $this->userId = $userId; $this->migrator = $migrator; $this->config = new stdClass(); $this->queryConfig(OCISchemaUser::UserGetRequest17sp4($this->userId)); $this->queryConfig(OCISchemaServiceCallForwardingAlways::UserCallForwardingAlwaysGetRequest($this->userId)); $this->queryConfig(OCISchemaServiceCallForwardingBusy::UserCallForwardingBusyGetRequest($this->userId)); $this->queryConfig(OCISchemaServiceCallForwardingNoAnswer::UserCallForwardingNoAnswerGetRequest13mp16($this->userId)); // $this->queryConfig(OCISchemaServiceCallForwardingNotReachable::UserCallForwardingNotReachableGetRequest($this->userId)); $this->queryConfig(OCISchemaUser::UserServiceGetAssignmentListRequest($this->userId)); $this->queryConfig(OCISchemaServiceVoiceMessaging::UserVoiceMessagingUserGetVoiceManagementRequest17($this->userId)); $this->queryConfig(OCISchemaServiceVoiceMessaging::UserVoiceMessagingUserGetAdvancedVoiceManagementRequest14sp3($this->userId)); $this->queryConfig(OCISchemaServiceCallingLineIDDeliveryBlocking::UserCallingLineIDDeliveryBlockingGetRequest($this->userId)); $this->queryConfig(OCISchemaServiceCallWaiting::UserCallWaitingGetRequest17sp4($this->userId)); //$this->queryConfig(OCISchemaServiceCallForwardingSelective::UserCallForwardingSelectiveGetRequest16($this->userId)); }
<?php require_once '../Broadworks_OCI-P/common.php'; Factory::getOCISchemaServiceProvider(); if (!isset($argv[1])) { die("Provide service provider id as second argument.\n"); } $mongo = new MongoClient('mongodb://pillock.net:27017'); $collection = $mongo->selectDB($argv[1])->selectCollection('UserGetListInServiceProviderRequest'); $client = CoreFactory::getOCIClient('http://bsews1.ipt.intechnology.co.uk/webservice/services/ProvisioningService'); $client->login('luke_script', 'waiodjjAWDOAWdlaiojhawiopjh4'); $client->send(OCISchemaUser::UserGetListInServiceProviderRequest($argv[1])); if ($client->getResponse()) { foreach ($client->getResponse()->userTable['row'] as $row) { $userId = $row['col'][0]; $client->send(OCISchemaUser::UserGetRequest17sp4($userId)); $data = $client->getResponse(); $data->userId = $userId; $collection->insert([bin2hex($userId) => $data]); } }