Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support X-CID for feature server to detect sip callid #147

Merged
merged 3 commits into from
Oct 15, 2024
Merged

Conversation

xquanluu
Copy link
Contributor

lib/call-session.js Outdated Show resolved Hide resolved
// to allow calling/status hooks contains sbc_callid.
responseHeaders: (uacRes, headers) => {
if (this.req.locals.cdr) {
headers['X-CID'] = this.req.locals.cdr.sip_callid;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if this is set

              if (this.req.locals.account?.disable_cdrs) {
                this.logger.debug('cdrs disabled for this account');

Then won't this.req.locals.cdr not exist, and your code above throw an exception and crash the process?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I was overthinking, the uacRes object will have call-id for the sbc oubound invite.

@davehorton davehorton merged commit 821275c into main Oct 15, 2024
2 checks passed
@davehorton davehorton deleted the feat/call_id branch October 15, 2024 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants