[asterisk-dev] pjsip seems to send ACK responses to the wrong destination

Karsten Wemheuer kwem at mail.de
Mon Mar 21 08:03:08 CDT 2022


Hi Joshua,

Am Montag, dem 21.03.2022 um 07:34 -0300 schrieb Joshua C. Colp:
> On Mon, Mar 21, 2022 at 7:18 AM Karsten Wemheuer <kwem at mail.de>
> wrote:
> > Hi *,
> > 
> > i am trying to analyze a problem with pjsip. 
> > 
> > Scenario: Phones are registered to opensips. From there the calls
> > go to
> > asterisk and then on via the trunk. This works fine. 
> > 
> > In the opposite direction there is sometimes a problem:
> > A call comes in over the trunk, asterisk sends the INVITE to
> > opensips.
> > From there the INVITE goes to the phone. After the call is answered
> > (200 OK from phone via proxy), asterisk sends the ACK not via the
> > proxy
> > but directly to the phone. Looking at the debug log it looks like
> > the
> > destination address of the ACK is obtained from the Contact or RTP
> > data
> > and not from the Via header.
> > 
> > I would like to check the source code to see if I am doing
> > something
> > wrong or if there is a bug. Where do I enter to investigate the
> > construction of the ACK packet?
> 
> I would not suggest looking at the source code for this. You would
> still have to understand SIP itself to know what is going on, so the
> RFC is really the best place.
> 
> For your specific issue - unless the proxy is doing record routing,
> then the behavior is correct. The Contact header would be used for
> sending the ACK. RTP is never used for SIP signaling destination.
> 

Thanks a lot!
The hint with record routing was very helpful. I have it working now. I
just was confused by the debug log which lead me in the wrong
direction.

Have a nice day. Best regards

Karsten




More information about the asterisk-dev mailing list