Skip to content

[BUG]: Interop issue with Twilio for outbound calls (ACK not received from the SIP endpoint) #300

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

Open
psanders opened this issue Jan 30, 2025 · 2 comments
Assignees
Labels

Comments

@psanders
Copy link
Member

psanders commented Jan 30, 2025

What happened?

We are encountering errors when sending calls to Twilio, where the ACK in response to the 200 OK is not received from the SIP endpoint. Twilio either has not received these messages or has deemed them invalid.

Steps to reproduce

  1. Create a SIP domain and an agent.
  2. Create a trunk with outbound settings using Twilio.
  3. Assign one of your Twilio numbers to the trunk you created.
  4. Call a number on the PSTN and observe the signaling.

You will notice that the call hangs after 30 seconds.

Expected behavior

It should work...

Additional context

This only happens for outbound calls.

We should look at testing the same flow with other providers.

I will continue updating this as it is considered a critical signaling issue.

@psanders psanders added the bug label Jan 30, 2025
@psanders psanders self-assigned this Jan 30, 2025
@psanders
Copy link
Member Author

Quick update: I tried downgrading JAIN SIP in case it was a regression and ended up with the same issue.

@psanders
Copy link
Member Author

psanders commented Feb 1, 2025

After analyzing the signaling, I found several contributing factors adding to this issue.

  1. The CSeq was getting wrongly increased
  2. The VIA header calculation was wrong (and had to create a new alteration)
  3. We were overwriting the contact header, which breaks the SIP protocol

I will continue investigating the issue and testing until I verify that these changes won't break something else.

Also, I noticed that I cannot hang up from the callee side for outbound (to the PSTN) calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant