Exemplo n.º 1
0
    def __init__(self, behavior='email', busy_to_voicemail=True, cc_email=None, did=None, email=None, mwi=None,
                 no_answer_to_voicemail=True, rings=3, straight_to_voicemail=False, send_cc=False, sip_user_id=None,
                 type='broadsoft', transfer_on_zero=False, transfer_number=None, sip_password=None, surgemail_domain=None,
                 **kwargs):
        self.behavior = behavior                            # "email" or "store" (on server)
        self.busy_to_voicemail = busy_to_voicemail
        self.cc_email = cc_email
        self.did = did
        self.email = email
        self.mwi = mwi
        self.no_answer_to_voicemail = no_answer_to_voicemail
        self.rings = rings
        self.send_cc = send_cc
        self.sip_password = sip_password
        self.sip_user_id = sip_user_id
        self.straight_to_voicemail = straight_to_voicemail
        self.surgemail_domain=surgemail_domain
        self.transfer_on_zero = transfer_on_zero
        self.transfer_number = transfer_number
        self.type = type                                    # broadsoft or unity

        BroadsoftObject.__init__(self, **kwargs)

        if self.surgemail_domain is None:
            self.surgemail_domain = self.broadsoftinstance.surgemail_domain
Exemplo n.º 2
0
    def __init__(self, default_device_count=36, did=None, extension=None, last_name=None, first_name=None,
                 sip_user_id=None, kname=None, email=None, services=None, service_pack=None,
                 sip_password=None, voicemail='broadsoft', voicemail_mwi=None, **kwargs):
        self.default_device_count = default_device_count
        self.did = did
        self.email = email
        self.first_name = first_name
        self.kname = kname
        self.last_name = last_name
        self.service_pack = self.default_service_pack
        if service_pack:
            self.service_pack = service_pack
        self.services = self.load_default_services()
        if services:
            if type(services) == str:
                services = [services]
            self.services = services
        self.voicemail = voicemail

        # these are optional; will be derived by broadsoft.RequestObjects as needed
        self.extension = extension
        self.sip_user_id = sip_user_id

        # fully optional
        self.devices = []  # Devices associated with this Account (should be broadsoft.Device objects)
        self.sip_password = sip_password
        self.voicemail_mwi = voicemail_mwi

        self.old_did = self.did
        BroadsoftObject.__init__(self, **kwargs)