Skip to content

NethVoice Proxy: in-dialog requests to a provider fail with 481 after a re-INVITE #8276

Open

Description

@edospadoni

Component and version

NethVoice Proxy 1.7.4 (Kamailio configuration, route[DLGURI])

Steps to reproduce

  1. Use a SIP provider whose proxy record-routes and answers from a port other than the one in the Contact of its UAS.
  2. Place a call through that trunk and answer it.
  3. Put the call on hold and resume it, so Asterisk sends a re-INVITE.
  4. Hang up from either side.

Expected behavior

The ACK of the re-INVITE, any following re-INVITE and the BYE are accepted by the provider, and the call ends normally.

Actual behavior

The provider answers 481 Call/Transaction Does Not Exist to the ACK, to the following re-INVITE and to the BYE. The call is lost on the provider side.

The 2xx of the re-INVITE has no Record-Route, so is_first_hop() is true and, since its source port differs from the Via, set_contact_alias() adds ;alias= to the Contact. topos stores that Contact as the remote target. On the next in-dialog request loose_route() has already set the next hop from the provider Record-Route, so route[DLGURI] skips handle_ruri_alias() and the request leaves the proxy with ;alias= in the Request-URI. A provider that checks the remote target refuses it.

Suggested fix

In route[DLGURI], when the destination is already set and the Request-URI carries alias, call handle_ruri_alias() to remove it and restore the next hop chosen by the route set.

Pull request: nethesis/ns8-nethvoice-proxy#230

Activity

  1. added
    nethvoiceBug or features releted to the NethVoice project
    on Oct 26, 2026
  2. added theissue type on Oct 26, 2026
  3. added this to the NethVoice 1.8 milestone on Oct 26, 2026
  4. self-assigned this
    on Oct 26, 2026
  5. moved this from Todo to In Progress in NethVoiceon Oct 26, 2026
  6. added
    testingPackages are available from testing repositories
    on Oct 26, 2026
  7. edospadoni commented on Oct 26, 2026

    @edospadoni
    MemberAuthor

    QA test cases

    Testing image: ghcr.io/nethesis/nethvoice-proxy:pr-230.209-1.a7229b3 (nethesis/ns8-nethvoice-proxy#230)

    api-cli run update-module --data '{"module_url":"ghcr.io/nethesis/nethvoice-proxy:pr-230.209-1.a7229b3","instances":["nethvoice-proxy1"],"force":true}'
    

    Replace nethvoice-proxy1 with your instance name.

    • Re-INVITE toward a record-routing provider: use a provider whose proxy record-routes and answers from a port other than the one in the Contact of its UAS. Place a call through the trunk and answer it. Put it on hold and resume it twice, then hang up from NethVoice. No 481 must appear, the ACKs and the re-INVITEs must be accepted, and the BYE must get 200 OK.
    • Hangup from the provider side: repeat the test and hang up from the external party. The BYE must get 200 OK and the call must end on both sides.
    • Trunk on port 5060: repeat the hold/resume test with a provider on the standard port 5060.
    • Phones behind NAT: make an internal call to an extension behind NAT and hang up from both sides. The call must set up and end as before.
    • Phones over TCP/TLS: register a phone over TLS, make a call with hold/resume and hang up. The call must behave as before.
    • Regressions: registrations and the qualify of trunks and phones must keep working.

    The first two cases and the internal NAT call were tested in a lab by the PR author. The port 5060 trunk and the TCP/TLS phones were not tested.

  8. moved this from In Progress to Testing in NethVoiceon Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

nethvoiceBug or features releted to the NethVoice projecttestingPackages are available from testing repositories

Type

Projects

  • Status
    Testing

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions