[asterisk-dev] How to debug reinvites not getting forwarded to other call leg (pjsip)

Joshua C. Colp jcolp at sangoma.com
Wed Jan 12 08:33:46 CST 2022


On Wed, Jan 12, 2022 at 10:17 AM Floimair Florian <f.floimair at commend.com>
wrote:

> Hi everybody!
>
>
>
> I am currently facing an issue with SIP reINVITEs (with changed media
> direction) being acknowledged by Asterisk but not forwarded to the second
> call leg.
>
> My setup is as follows:
>
>
>
> Device A -> Kamailio -> Asterisk (18.9.0 chan_pjsip) -> Kamailio -> Device
> B
>
>
>
> Device A sends a reinvite through Kamailio (Proxy & Registrar) to
> Asterisk, which answers with 200 OK.
>
> Asterisk is configured with mohpassthrough option so any change in SDP
> media direction should be forwarded from A to B or vice versa.
>
> This works in almost all cases but I do have an edge case where a linphone
> client sends the reinvite and Asterisk more or less
>
> silently discards it. I tried ramping up debug level verbosity (to 5) but
> was unable to spot anything in regards to reinvites or any other
> error/mismatch as to why it is not forwarded.
>
>
>
> So my question is: What can I do to analyze this better, maybe even add
> debug messages myself to the source code, but I have no clue
>
> where the appropriate location for this would be (maybe even in libpjsip?
>  I’m using bundled version).
>
>
>
> Thanks for your help in advance.
>

You'll need to be specific. Is this strictly for an audio stream for music
on hold? If so, it doesn't strictly get forwarded. It would be handled as
part of the normal music on hold handling[1][2] so debug would need to go
there initially, and disabling passthrough and ensuring MOH actually occurs
locally would narrow it down. If it doesn't do MOH even with it disabled
then it's probably SDP level and you'd need to compare the new SDP to the
previous, specifically the version and make sure it was incremented
properly.

[1]
https://github.com/asterisk/asterisk/blob/master/res/res_pjsip_sdp_rtp.c#L2186
[2]
https://github.com/asterisk/asterisk/blob/master/channels/chan_pjsip.c#L1754

-- 
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/20220112/b200d36e/attachment.html>


More information about the asterisk-dev mailing list