voglander

Independent device recheck

The built-in single-process SIP fixture uses separate endpoints, but both endpoints share the JAIN-SIP stack and the Sip-Proxy dialog registry. Run a separate JVM for the device to distinguish shared-stack behavior from the platform’s wire behavior. This recheck used the same Voglander build and Sip-Proxy 1.8.7 in both JVMs, not a third-party device or hardware certification.

Isolated setup

Start two instances with separate disposable SQLite and Redis instances. Both instances use prod,repo,inte and the same SIP domain. In this run the platform had HTTP 28181, SIP 15060, server enabled and lab/client disabled; the device had HTTP 28182, SIP client 15071, lab/client enabled and server disabled. Bind all listeners to loopback. Give the device a distinct GB28181 ID and register to the platform explicitly via the device’s POST /api/v1/lab/client/register with serverIp, serverPort, serverId, and transport: "UDP". Push a one-channel catalog from the device. Use different media ports from any other rehearsal stack. For ZLM relay mode an isolated test hook must deliver stream registration to both JVMs, because the device waits for its own hook event before starting RTP. Do not enable the simulator, test subscription tick, or hook fan-out in production.

  1. In the platform, enable MOBILE_POSITION with PUT /api/v1/device/subscription/toggle. For a bounded recheck only, configure gateway.gb28181.subscription.default-expires=60 and gateway.gb28181.subscription.refresh-interval-ms=1000.
  2. Compare the initial Call-ID and 200 with the next incoming device SUBSCRIBE and advancing CSeq. Disable the same subscription. Check both sides: distinguish gateway dispatch from successful lease application. A true platform dispatch return is not a substitute for the device applying refresh/unsubscribe.
  3. Start a live stream on the fixture channel and check the INVITE 200 and ACK. Stop on the platform. Compare the platform’s BYE, the device’s incoming BYE and the platform’s 200 for the original dialog. If media fails to establish, the timeout rollback also exercises the SIP BYE path; label the two cases separately.

Observed results

Check Independent device result
Location subscription establishment Passed: device recorded the initial request, then the platform received SIP 200 with its Call-ID.
Location subscription renewal and cancellation (unmodified SDK fixture baseline) Wire dispatch passed: the platform sent same-dialog SUBSCRIBE and the separate device received it at increasing CSeq. Application did not pass: Sip-Proxy’s device request processor dropped bodyless in-dialog SUBSCRIBE; the simulated lease remained at its original sequence and expiry. The platform’s accepted dispatch should not be interpreted as a device-side confirmation.
INVITE, ACK and rollback BYE Passed on wire: device received ACK and BYE for the established INVITE Call-ID; platform received BYE 200. This run used the timeout rollback, because the relay hook reached only the platform and not the device.
Ordinary stop after successful RTP setup Passed: with the isolated hook delivered to both JVMs, device RTP publish succeeded and live start returned ready. Platform stop made the reference count zero; scheduled cleanup sent BYE on the original dialog, the device stopped its fixture stream, and the platform received BYE 200.

The second run’s relative order was INVITE/confirmed ACK, RTP ready about 0.7 seconds later, stop about 5 seconds after ACK, then same-dialog BYE/200 about 44 seconds after stop on the scheduled cleanup tick. Stop is a reference release, not an immediate SIP teardown while another viewer may still reuse the stream.

Lab fixture follow-up

The optional Lab-only processor leaves initial subscriptions with Sip-Proxy. For a bodyless request it requires the package and original sequence observed on the initial SIP request, the matching validated device callback, the configured Lab recipient and peer, and an established server dialog with matching Call-ID and tags. Requests outside those bounds are not handled by the Lab processor. A retransmission of an already applied request does not rerun the lease action.

For MOBILE_POSITION, the independent rerun received successive SIP 200s for same-Call-ID refreshes. The device’s sequence advanced to 6, then to 7 with Expires:0 on unsubscribe, stopped position pushing, and returned another 200 observed by the sending platform. This validates the Lab device fixture under two JVMs, not the stock same-process SDK dialog registry or third-party hardware behavior.

A second independent run checked all three subscription types. Each produced one initial 200, four same-dialog renewal 200s, and one same-dialog Expires:0

  1. Device state ended at Expires:0 for Catalog, Alarm and MobilePosition. The confirmations were correlated by exact Call-ID on both JVMs.
Package Renewal CSeq range Cancellation CSeq Matched 200s
Catalog 10917–10920 10921 6
Alarm 16090–16093 16094 6
MobilePosition 4815–4818 4819 6

Channel presets and device guard

Build the runnable backend jar, then set VOG_TEST_JAR to its absolute path and run deploy/single-site/tests/run-preset-guard-independent.sh. The script uses two independent loopback JVMs, temporary databases and Redis instances, and a registered Lab device. For the command checks no video stream is required. The Java regressions were 55 passing tests (53 simulator/SIP/controller regressions and 2 permission cases).

Platform entry Verified result in the separate device process
POST /api/v1/ptz/preset (SET) Stored preset 7 on the requested catalog channel
POST /api/v1/ptz/preset (GOTO) Selected preset 7 on that channel
POST /api/v1/ptz/preset (DEL) Removed preset 7 and cleared the active preset
POST /api/v1/device-cmd/guard (armed) Applied SetGuard
POST /api/v1/device-cmd/guard (disarmed) Applied ResetGuard

For every row the platform trace showed a SIP MESSAGE and the platform wire log contained the corresponding Call-ID in a 200 OK. The device-side assertions checked increasing state sequence and the applied state, not just HTTP success. An anonymous request, an unknown catalog channel, an invalid action, and an invalid preset number were rejected. The role tests require Device:Cmd:Ptz or Device:Cmd:Alarm respectively. The preset’s SIP destination is the registered parent device; the XML DeviceID is the validated catalog channel. This is simulated state acceptance through production REST routes, not proof of physical PTZ motion, a hardware alarm, or a new console control.