SDP negotiator stays in WAIT_NEGO after receiving a 200/OK with SDP to a UPDATE with no SDP

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

 



I am using pjsip 2.1.0.

With RFC 4028, pjsip sends UPDATE periodically when it is a refresher.
These UPDATE are sent with an empty body (no SDP). My switch responds
200/OK with a SDP. Pjsip considers this answer as an offer and the
negotiator goes to state WAIT_NEGO. But the negotiation is never done
and when an UPDATE is received with a SDP, pjsip refuses to consider it
("Invalid SDP offer/answer state for UPDATE" is displayed) and in the
same way, refuses to send an UPDATE with a SDP.

 

The workaround I found is, in sip_inv.c, to replace (line 1801)

 

        if (inv->neg == NULL) {

            status=pjmedia_sdp_neg_create_w_remote_offer(inv->pool,
NULL,

                                                         sdp_info->sdp,

                                                         &inv->neg);

        } else {

            status=pjmedia_sdp_neg_set_remote_offer(inv->pool_prov,
inv->neg,

                                                    sdp_info->sdp);

        }

 

With

 

        if (inv->neg == NULL) {

            status=pjmedia_sdp_neg_create_w_remote_offer(inv->pool,
NULL,

                                                         sdp_info->sdp,

                                                         &inv->neg);

        } else if (tsx->role == PJSIP_ROLE_UAC &&

            rdata->msg_info.msg->line.status.code/100 == 2) {

                PJ_LOG(1,(inv->obj_name, "RLE=UAC status=200 Forget"));

                return PJ_SUCCESS;

        } else {

            status=pjmedia_sdp_neg_set_remote_offer(inv->pool_prov,
inv->neg,

                                                    sdp_info->sdp);

        }

 

The idea is to forget the SDP if it comes in a 200/OK and is considered
as an offer. But I am not sure there is no side effect.

Thanks

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20140130/7aacc3b3/attachment-0001.html>


[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