INNER CODE UNIT · Python

CallHandling

arnonym/ha-plugins · ha-sip/src/call.py:33

class CallHandling(Enum):
    LISTEN = 'LISTEN'
    ACCEPT = 'ACCEPT'
    REJECT = 'REJECT'

    @staticmethod
    def get_or_else(name: Optional[str], default: CallHandling) -> CallHandling:
        try:
            return CallHandling[(name or '').upper()]
        except (KeyError, AttributeError):
            return default


class Call(pj.Call):
    def __init__(
        self,
        end_point: pj.Endpoint,
        sip_account: account.Account,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…