예제 #1
0
 def end(self, timeout=None):
     with self._lock:
         if self._last_request is None:
             return
         notification_center = NotificationCenter()
         notification_center.post_notification('SIPPublicationWillEnd', sender=self)
         try:
             self._make_and_send_request(None, RouteHeader.new(self._last_request.route_header), timeout, False)
         except SIPCoreError, e:
             notification_center.post_notification('SIPPublicationDidNotEnd', sender=self, data=NotificationData(code=0, reason=e.args[0]))
 def end(self, timeout=None):
     with self._lock:
         if self._last_request is None:
             raise PublicationError("Nothing is currently published")
         self._make_and_send_request(
             None, RouteHeader.new(self._last_request.route_header),
             timeout, False)
         NotificationCenter().post_notification(
             "SIPPublicationWillEnd",
             sender=self,
             data=TimestampedNotificationData())
예제 #3
0
 def end(self, timeout=None):
     with self._lock:
         if self._last_request is None:
             return
         notification_center = NotificationCenter()
         notification_center.post_notification('SIPPublicationWillEnd',
                                               sender=self)
         try:
             self._make_and_send_request(
                 None, RouteHeader.new(self._last_request.route_header),
                 timeout, False)
         except SIPCoreError as e:
             notification_center.post_notification(
                 'SIPPublicationDidNotEnd',
                 sender=self,
                 data=NotificationData(code=0, reason=e.args[0]))
 def end(self, timeout=None):
     with self._lock:
         if self._last_request is None:
             return
         NotificationCenter().post_notification(
             "SIPRegistrationWillEnd",
             sender=self,
             data=TimestampedNotificationData())
         try:
             self._make_and_send_request(
                 ContactHeader.new(self._last_request.contact_header),
                 RouteHeader.new(self._last_request.route_header), timeout,
                 False)
         except SIPCoreError, e:
             NotificationCenter().post_notification(
                 "SIPRegistrationDidNotEnd",
                 sender=self,
                 data=TimestampedNotificationData(code=0, reason=e.args[0]))
예제 #5
0
 def end(self, timeout=None):
     with self._lock:
         if self._last_request is None:
             return
         NotificationCenter().post_notification("SIPRegistrationWillEnd", sender=self, data=TimestampedNotificationData())
         try:
             self._make_and_send_request(ContactHeader.new(self._last_request.contact_header), RouteHeader.new(self._last_request.route_header), timeout, False)
         except SIPCoreError, e:
             NotificationCenter().post_notification("SIPRegistrationDidNotEnd", sender=self, data=TimestampedNotificationData(code=0, reason=e.args[0]))
예제 #6
0
 def end(self, timeout=None):
     with self._lock:
         if self._last_request is None:
             raise PublicationError("Nothing is currently published")
         self._make_and_send_request(None, RouteHeader.new(self._last_request.route_header), timeout, False)
         NotificationCenter().post_notification("SIPPublicationWillEnd", sender=self, data=TimestampedNotificationData())