Re-Invite with no SDP cause 488 error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Just want to report this issue that I have stumbled on. I have done a quick fix that seems to work for me but it would be great if you could solve this in the next release.

I have compiled the source available in https://www.pjsip.org/release/2.8/pjproject-2.8.tar.bz2 and was using the client towards an account in our IMS network. I'm using PJSUA2 and Python bindings but I believe this is unrelated to this issue.
The SW is great and everything is working fine except for a call case between the PJSIP UA client and a mobile user (VoLTE) where the mobile user adds a new call using the mobile 3PTY call function. This action results in a re-INVITE without SDP from the network (network want to move media to a media port with the mixed voice, not sure why network does not send Invite with SDP... however no SDP should be allowed). The PJSIP user agent replies with 488 error code and the call is then terminated by the network. The call never reaches any call back in the PJSUA2 python environment.

Here are the logs from my PJSUA2 client:
20:25:47.125      dlg0x55853f079a88  .Received Request msg INVITE/cseq=24202 (rdata0x55853f07cc68)
20:25:47.125      tsx0x55853f08da18  ...Transaction created for Request msg INVITE/cseq=24202 (rdata0x55853f07cc68)
20:25:47.125      tsx0x55853f08da18  ..Incoming Request msg INVITE/cseq=24202 (rdata0x55853f07cc68) in state Null
20:25:47.125      tsx0x55853f08da18  ...State changed from Null to Trying, event=RX_MSG
20:25:47.125      dlg0x55853f079a88  ....Transaction tsx0x55853f08da18 state changed to Trying
20:25:47.125               endpoint  .....Response msg 488/INVITE/cseq=24202 (tdta0x55853f0b3fd8) created
20:25:47.125      dlg0x55853f079a88  ......Sending Response msg 488/INVITE/cseq=24202 (tdta0x55853f0b3fd8)

I looked a bit into the code and I think identified the issue in row 4893 and 4894 in the file pjproject/pjsip/src/pjsip-ua/sip_inv.c
.....
	    /* Process SDP in incoming message. */
	    status = inv_check_sdp_in_incoming_msg(inv, tsx, rdata);

            if (status == PJ_SUCCESS && mod_inv.cb.on_rx_reinvite &&
                inv->notify)
{
......

Seems like the message is treated as a an incoming reinvite with SDP and the msg is entering the if block. I added the following code to add check if msg body was not empty to disable incoming SDP related logic for messages without SDP body.
....
NEW>            pjsip_msg *my_msg;
NEW>            my_msg = rdata->msg_info.msg;

            if (status == PJ_SUCCESS && mod_inv.cb.on_rx_reinvite &&
UPDATE>                inv->notify  && my_msg->body != NULL)
......

With the new code this call case works fine. I have not done any extensive testing and it might be something more that is required in order to make it work properly.

Mats Bergman

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux