Closed zebox closed 7 months ago
Simple example based on event example:
Please note that the example you refer to is for ONVIF Basic Notification Interface (WS-BaseNotification) for which the ONVIF protocol does not specify an Unsubscribe
method, although it is specified in the web services spec.
The ONVIF Unsubscribe
method applies to PullPointSubscriptions.
PullPointSubscriptions
also required SubscriptionReference->Address
for Unsubscribe
.
I have three different ONVIF cameras and they support Basic Subscription (web services spec) and Unsubscribe
method as shown in the my example.
I found errors in other parts of code and this PR doesn't metter now. I will create issue for errors
Unsubscribe
method use endpoint from response ofSubscribe
method in theSubscriptionReference->Address
field (not root onvif endpoint). E.g. subscription endpoint:http://{onvif_ip_address}/onvif/Events/SubManager_20231117T152334Z_2
.Correct endpoint for
Unsubscribe
can be pass with request arg atAny
field ofevent.Unsubscribe
and override endpoint when method calls.Simple example based on event example: