Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#1537 closed enhancement (fixed)

Via rewrite: putting the right IP address in Via sent-by for outgoing requests

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-2.0.1
Component: pjsip Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

Problem Description

Currently outgoing request has its Via sent-by filled in automatically with the address of the SIP transport being used to send the request. Since normally there is only one UDP transport instance that is shared by everything, this causes few problems:

  1. when STUN is used in PJSUA-LIB, it overwrites the address of the transport with the STUN resolved address, and everybody will have this public address in their Via sent-by, regardless of where they're sending the request to or whether they want STUN.
  2. Similar to above, if the host is multihomed, and different requests are sent to different interfaces, all these requests will use the same address in the Via sent-by, the one that is picked up by the transport when it is created, and causes requests to come to the UAS with Via containing address of the wrong interface.

Solution

This ticket adds allow_via_rewrite option in PJSUA-LIB account config to fix the Via sent-by to use the same interface address as the one in the REGISTER request, as long as the request uses the same transport instance as the previous REGISTER request. By default this option is enabled.

Change History (3)

comment:1 Changed 13 years ago by ming

  • Resolution set to fixed
  • Status changed from new to closed

In 4173:

Fixed #1537: Via rewrite: putting the right IP address in Via sent-by for outgoing requests

comment:2 Changed 13 years ago by ming

In 4181:

Re #1537: Fixed bug that does not update via_sent_by upon NAT address update.

comment:3 Changed 13 years ago by ming

In 4185:

Re #1537: Modify NAT detection to no longer update the transport address.

Note: See TracTickets for help on using tickets.