Applications currently have no way to observe a mid-call hold/un-hold.
The feature-server handles the in-dialog re-INVITE internally (re-modifies
the endpoint, returns 200) but never notifies the app, so a transcription
or agent-assist app can't pause/resume when a caller is held or retrieved.
This detects the hold state transition on a re-INVITE and delivers it over
the existing sipRequestWithinDialogHook channel as a verb:hook, plus emits
a local 'hold'/'unhold' event so in-process tasks (e.g. transcribe) can react.
- call-session.js: ordinary calls — reuse isOnhold() (a=sendonly/a=inactive).
- siprec-call-session.js: SIPREC overrides _onReinvite, so a separate handler
is required. SIPREC recording streams are sendonly by nature, so a stream
flipping to a=inactive is treated as the hold signal; the full multipart
body (SDP + rs-metadata) is always forwarded. Fires on transition only;
other re-INVITEs are delivered as event:"reinvite".
Delivery uses requestor.request('verb:hook', ...) — the same channel
_handleRefer uses — rather than a task-bound performHook, so events are not
dropped if the current task has ended. Enable per call with:
{"verb":"config","sipRequestWithinDialogHook":"/hold-events"}
Confirmed live against Cisco CUBE (Cisco-SIPGateway/IOS-17.12.7b) over SIPREC:
both recording streams flip sendonly<->inactive on hold/resume, each
transition emitted correctly.
The whole feature is opt-in behind the JAMBONES_HOLD_UNHOLD_EVENTS env var;
when it is unset, _notifyHoldState / _notifySipRecReinvite are no-ops (neither
the local event nor the hook fires).
Reinstates the feature previously reverted in #1563. The revert was due to the
unit test failing in the full suite: lib/config.js captures the env var once at
load time, and earlier suite files require config/session modules (flag unset)
before this test could set it, so the enabled-path assertions saw a disabled
feature. The test now force-reloads config + the session modules with the flag
set (and restores the module cache afterward), so it is robust to suite load order.
Applications currently have no way to observe a mid-call hold/un-hold.
The feature-server handles the in-dialog re-INVITE internally (re-modifies
the endpoint, returns 200) but never notifies the app, so a transcription
or agent-assist app can't pause/resume when a caller is held or retrieved.
This detects the hold state transition on a re-INVITE and delivers it over
the existing sipRequestWithinDialogHook channel as a verb:hook, plus emits
a local 'hold'/'unhold' event so in-process tasks (e.g. transcribe) can react.
- call-session.js: ordinary calls — reuse isOnhold() (a=sendonly/a=inactive).
- siprec-call-session.js: SIPREC overrides _onReinvite, so a separate handler
is required. SIPREC recording streams are sendonly by nature, so a stream
flipping to a=inactive is treated as the hold signal; the full multipart
body (SDP + rs-metadata) is always forwarded. Fires on transition only;
other re-INVITEs are delivered as event:"reinvite".
Delivery uses requestor.request('verb:hook', ...) — the same channel
_handleRefer uses — rather than a task-bound performHook, so events are not
dropped if the current task has ended. Enable per call with:
{"verb":"config","sipRequestWithinDialogHook":"/hold-events"}
Confirmed live against Cisco CUBE (Cisco-SIPGateway/IOS-17.12.7b) over SIPREC:
both recording streams flip sendonly<->inactive on hold/resume, each
transition emitted correctly.
The whole feature is opt-in behind the JAMBONES_HOLD_UNHOLD_EVENTS env var;
when it is unset, _notifyHoldState / _notifySipRecReinvite are no-ops (neither
the local event nor the hook fires).
* Revert "Update dial.js (#1243)"
This reverts commit 259dedcded.
* add to .gitignore
* when we receive a REFER on the parent leg, after adulting the child the dial task in the parent session should end
* fix release freeswitch media properly
* if a leg is opus, modify b leg offer opus first
* if a leg is opus, modify b leg offer opus first
* wip
* wip
* fix review comments
* fix review comments
* fix review comments
* ws-requestor unit test
* ws-requestor unit test
* ws-requestor unit test
* handle special case of reconnecting during the initial session:new - ack transaction
* fix: add more wsrequestor unit test
* fix: add more wsrequestor unit test
---------
Co-authored-by: Quan HL <quanluuhoang8@gmail.com>
Co-authored-by: Dave Horton <daveh@beachdognet.com>
* first draft
* first draft
* listen should connect to port 3000 on webhook scaffold
* revamp webhook scaffold for listen ws support
* fix: finished listen test
* fix: add playbeep test listen
* fix: add playbeep test listen
* fixed: listen on 10% loss
* feat: add test case for listen pause resume and complete the call
Co-authored-by: Quan HL <quanluuhoang8@gmail.com>
Co-authored-by: Dave Horton <daveh@beachdognet.com>
* initial changes to gather to support nuance stt
* updateSpeechCredentialLastUsed could be called without a speech_credential_sid if credentials are passed in the flow
* fix bugname
* typo
* added handlers for nuance
* logging
* major refactor of parsing transcriptions
* initial support for nuance in transcribe verb
* updates from testing
* cleanup some tests
* update action
* typo
* gather: start nuance timers after say/play completes
* update drachtio-fsrmf
* refactor some code
* typo
* log nuance error detail
* timeout handling
* typo
* handle nuance 413 response when recognition times out
* typo in specs.json
* add support for nuance resources
* fixes and tests for transcribe
* remove logging from test
* initial support for kryptonEndpoint
* try getting access token even when using krypton
* typo in kryptonEndpoint property
* add support for Nuance tts
* parse nuance voice and model for tts
* use nuance credentials from db
* update to db-helpers@0.7.0 with caching option
* add support for azure audio logging in gather/transcribe
* sync package-lock.json
* feat: update time-series 0.11.12
* feat: support play verb url in plain text or array
* fix: review comment
Co-authored-by: Dave Horton <daveh@beachdognet.com>