本文整理汇总了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
示例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)
示例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)