Check state of call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



python code:

    """ State of call

    def incoming(self):
        return not self.hasMedia() and \
            (self.state == PJ.PJSIP_INV_STATE_INCOMING \
                or self.state == PJ.PJSIP_INV_STATE_EARLY) \
            and (self.role == PJ.PJSIP_ROLE_UAS \
                or self.role == PJ.PJSIP_UAS_ROLE)
    # incoming

    def calling(self):
        return (self.state == PJ.PJSIP_INV_STATE_CALLING \
                or self.state == PJ.PJSIP_INV_STATE_EARLY) \
            and (self.role == PJ.PJSIP_ROLE_UAC \
                or self.role == PJ.PJSIP_UAC_ROLE)
    # calling

    def talking(self):
        return self.state == PJ.PJSIP_INV_STATE_CONFIRMED \
           and self.hasMedia()

This is correct?

Visit our blog:

pjsip mailing list

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux