當前位置: 首頁>>代碼示例>>Python>>正文


Python UA.compact_sip方法代碼示例

本文整理匯總了Python中sippy.UA.UA.compact_sip方法的典型用法代碼示例。如果您正苦於以下問題:Python UA.compact_sip方法的具體用法?Python UA.compact_sip怎麽用?Python UA.compact_sip使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在sippy.UA.UA的用法示例。


在下文中一共展示了UA.compact_sip方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from sippy.UA import UA [as 別名]
# 或者: from sippy.UA.UA import compact_sip [as 別名]
    def __init__(self, global_config, body, done_cb, portrange):
        uaO = UA(global_config, event_cb = self.recvEvent, nh_address = ('127.0.0.1', 5060), \
          conn_cbs = (self.connected,), disc_cbs = (self.disconnected,), fail_cbs = (self.disconnected,), \
          dead_cbs = (self.alldone,))
        uaO.godead_timeout = 10
        uaO.compact_sip = self.compact_sip

        event = CCEventTry((SipCallId(), SipCiscoGUID(), self.cli, self.cld, body, \
          None, 'Alice Smith'))
        uaO.recvEvent(event)
        self.done_cb = done_cb
        self.portrange = portrange
開發者ID:hongbinz,項目名稱:voiptests,代碼行數:14,代碼來源:a_test1.py

示例2: answer

# 需要導入模塊: from sippy.UA import UA [as 別名]
# 或者: from sippy.UA.UA import compact_sip [as 別名]
 def answer(self, global_config, body, req, sip_t):
     in_body = req.getBody()
     in_body.parse()
     if not checkhostport(in_body, self.portrange, self.atype):
         self.nerrs += 1
         raise ValueError('Bob(%s): hostport validation has failed' % str(self.__class__))
     # New dialog
     uaA = UA(global_config, self.recvEvent, disc_cbs = (self.disconnected,), \
       fail_cbs = (self.disconnected,), dead_cbs = (self.alldone,))
     uaA.godead_timeout = 10
     uaA.compact_sip = self.compact_sip
     Timeout(self.ring, self.ring_ival, 1, uaA)
     self.body = body
     return uaA.recvRequest(req, sip_t)
開發者ID:hongbinz,項目名稱:voiptests,代碼行數:16,代碼來源:b_test1.py

示例3: __init__

# 需要導入模塊: from sippy.UA import UA [as 別名]
# 或者: from sippy.UA.UA import compact_sip [as 別名]
 def __init__(self, global_config, body, done_cb, portrange, atype = 'IP4', \
   cli = None):
     self.atype = atype
     if cli != None:
         self.cli = cli
     if atype == 'IP4':
         nh_address = self.nh_address4
     else:
         nh_address = self.nh_address6
     uaO = UA(global_config, event_cb = self.recvEvent, nh_address = nh_address, \
       conn_cbs = (self.connected,), disc_cbs = (self.disconnected,), fail_cbs = (self.disconnected,), \
       dead_cbs = (self.alldone,))
     uaO.godead_timeout = 10
     uaO.compact_sip = self.compact_sip
     event = CCEventTry((SipCallId(), SipCiscoGUID(), self.cli, self.cld, body, \
       None, 'Alice Smith'))
     self.done_cb = done_cb
     self.portrange = portrange
     self.run(uaO, event)
開發者ID:jevonearth,項目名稱:voiptests,代碼行數:21,代碼來源:a_test1.py


注:本文中的sippy.UA.UA.compact_sip方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。