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]

 



Hi Poquillon,

Just fixed this in https://trac.pjsip.org/repos/ticket/1747. Note that
the proposed fix seems to cause problem in the case of sending INVITE
without SDP (so remote offer will be in 200/INVITE and local answer
will be in ACK).

Thanks for such detail report.

BR,
nanang


On Thu, Jan 30, 2014 at 11:21 PM, Poquillon Bernard
<bpoquillon at prosodie.com> wrote:
> 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
>
>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> 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