onvif icon indicating copy to clipboard operation
onvif copied to clipboard

Event subscription fails due to malformed camera response

Open brendann993 opened this issue 2 years ago • 4 comments

Not sure anyone else had this issue but sharing just in case. I have a camera that shows events in ODM but no events are ever captured by this library. While troubleshooting I identified that the camera is responding to the pullpoint subscription with <wsa5:To SOAP-ENV:mustUnderstand="true">http:///onvif/events_service?session=392</wsa5:To> The host is missing from the address and so when the library is attempting to connect to pull events its unable to connect. I tried using preserveAddress which allows the library to connect to the right endpoint e.g http://ipaddress/onvif/events_service?session=392 but the library then also sends the full url back to the camera in the payload and the camera rejects saying not subscription.

As a temporary work around I add the host bask into the urlAddress after the payload has been generated.

brendann993 avatar Apr 29 '22 10:04 brendann993

I wrote all the recent changes for the event handling and use it on another project so am interested in fixing this.

Out of interest, what is the make/model of camera you use.

I can work in your fix of populating the camera hostname/post with the hostname we first connected to, so a bit like what preserveAddress does for general ONVIF commands

But interested to know what camera this is.

Thanks Roger

RogerHardiman avatar Apr 29 '22 12:04 RogerHardiman

Its a rebranded raysharp camera. Commonly sold in Australia rebranded as Swann and Concord. Very little details available but model is RS-CM-228A (concords model number is (CNC5IBP-A)

brendann993 avatar Apr 29 '22 12:04 brendann993

Hi Thanks for the info. In the UK there is lots of Swann CCTV kit. I've never tried any. Most of the projects I use the ONVIF library for have Axis, Bosch, Sony, Hik or Hanwha cameras.

RogerHardiman avatar Apr 29 '22 15:04 RogerHardiman

It seems that we should have module with some dirty hacks supporting all cams with strange response :smile: But this work will take more than one day

agsh avatar Apr 30 '22 05:04 agsh