Ejemplo n.º 1
0
 def user_sca_endpoint_add(self, user_id, access_device, line_port,
                           is_active=True, allow_origination=True,
                           allow_termination=True):
     log.info("Add SCA. User: %s, Access Device: %s, Line Port: %s"
                 % (user_id, access_device, line_port))
     return self._send(
             self._oci_xml('UserSharedCallAppearance'
                           'AddEndpointRequest14sp2',
                           {'userId': user_id},
                           {'accessDeviceEndpoint': None},
                           {'accessDevice': None,
                            'parent': 'accessDeviceEndpoint'},
                           {'deviceLevel': 'Group',
                            'parent': 'accessDeviceEndpoint/'
                                      'accessDevice'},
                           {'deviceName': access_device,
                            'parent': 'accessDeviceEndpoint/'
                                      'accessDevice'},
                           {'linePort': line_port,
                            'parent': 'accessDeviceEndpoint'},
                           {'isActive': value_to_str(is_active)},
                           {'allowOrigination': value_to_str(
                                   allow_origination)},
                           {'allowTermination': value_to_str(
                                   allow_termination)}))
Ejemplo n.º 2
0
 def user_sca_modify(self, user_id, allow_call_retrieve=True,
                     alert_all_for_click_to_dial_calls=False):
     return self._send(
             self._oci_xml('UserSharedCallAppearanceModifyRequest',
                           {'userId': user_id},
                           {'alertAllAppearancesForClickToDialCalls':
                            value_to_str(
                                    alert_all_for_click_to_dial_calls)},
                           {'allowSCACallRetrieve':
                            value_to_str(allow_call_retrieve)}))
Ejemplo n.º 3
0
 def user_set_voice_management(self, user_id, is_active, **kwargs):
     return self._send(
         self._oci_xml('UserVoiceMessagingUserModifyVoiceManagementRequest',
                       {'userId': user_id},
                       {'isActive': value_to_str(is_active)},
                       {'alwaysRedirectToVoiceMail': value_to_str(
                           kwargs.get('alwaysRedirectToVoiceMail',
                                      'false'))},
                       {'busyRedirectToVoiceMail': value_to_str(
                           kwargs.get('busyRedirectToVoiceMail', 'true'))},
                       {'noAnswerRedirectToVoiceMail': value_to_str(
                           kwargs.get('noAnswerRedirectToVoiceMail',
                                      'true'))}
                       )
     )
Ejemplo n.º 4
0
 def group_device_add_custom_tag(self, device_name, tag, value, **kwargs):
     device = {'deviceName': device_name}
     tag = {'tagName': tag}
     value = {'tagValue': value_to_str(value)}
     return self._group_requests(
             'GroupAccessDeviceCustomTagAddRequest', device, tag, value,
             **kwargs)
Ejemplo n.º 5
0
    def group_device_modify_config_file(
            self, device_name, config_mode="Default", file_content='',
            file_format="config.xml", extended_capture=False, **kwargs):
        args = [{'deviceName': device_name},
                {'fileFormat': file_format},
                {'fileSource': config_mode}]  # 'Default'|'Manual'|'Custom'
        if file_content:
            args += [{'uploadFile': None},
                     {'fileContent': file_content,
                      'parent': 'uploadFile'}]  # xs:base64Binary
        args += [{'extendedCaptureEnabled': value_to_str(extended_capture)}]

        return self._group_requests(
            'GroupAccessDeviceFileModifyRequest14sp8', *args,
            **kwargs)
Ejemplo n.º 6
0
 def user_set_integrated_imp(self, user_id, is_active):
     return self._send(
         self._oci_xml('UserIntegratedIMPModifyRequest',
                       {'userId': user_id},
                       {'isActive': value_to_str(is_active)}))