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

Joshua C. Colp jcolp at sangoma.com
Mon Mar 21 05:34:40 CDT 2022


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.

-- 
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20220321/0fd5c217/attachment.html>


More information about the asterisk-dev mailing list