[PATCH] Use selection behavior of 'Multiple Codec' as used in PJSIP prior 1.6

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

 



Hello all,

A little addition to my story below:

The 'old' behavior has been made switchable by means of a compiler
directive, and is by default _not_ enabled.
In your config_site.h you can fallback to old behavior by adding:
#define  PJSUA_IGNORE_OTHER_THAN_FIRST_CODEC_IN_SDP_ANSWER  1

With regards,

Eize Slange


On Tue, Sep 13, 2011 at 4:46 PM, Eize Slange <eize.slange at gmail.com> wrote:

> Hello all,
>
> Prior PJSIP version 1.6 when a SDP-answer was received with multiple
> (audio) codecs, just the first codec was selected. The other was just
> ignored. From on PJSIP 1.6 this behavior has been changed such a way that
> PJSIP now starts reINVITE.
> In our situation this resulted sometimes in undesirable behavior, so we
> decided to revert back to old behavior.
>
> I think this patch (or part of it) has already been mentioned once, but it
> is offered again here.
> We've introduced "PJSUA_IGNORE_OTHER_THAN_FIRST_CODEC_IN_SDP_ANSWER"-flag
> for this.
> Credits to Arie Velthoen for his initial patch.
>
> It is likely this patch will never make it to the main-branch (or else in
> bit modified form), but we wanted to share it anyway.
> Please find the patch below (based upon stable 1.10):
>
> With regards,
>
> Eize Slange
>
>
> Index: pjsip/src/pjsua-lib/pjsua_call.c
> ===================================================================
> --- pjsip/src/pjsua-lib/pjsua_call.c    (revision 3748)
> +++ pjsip/src/pjsua-lib/pjsua_call.c    (working copy)
> @@ -3269,7 +3269,17 @@
>          call->lock_codec.retry_cnt = 0;
>      return PJ_SUCCESS;
>      }
> +#if PJSUA_IGNORE_OTHER_THAN_FIRST_CODEC_IN_SDP_ANSWER
> +    else
> +    {
> +    /* Ignore other codecs, use the first codec. */
> +        PJ_LOG(3, (THIS_FILE, "Got answer with multiple codecs, use the
> first one."));
>
> +        call->lock_codec.retry_cnt = 0;
> +
> +    return PJ_SUCCESS;
> +    }
> +#else
>      /* Remote keeps answering with multiple codecs, let's just give up
>       * locking codec to avoid infinite retry loop.
>       */
> @@ -3291,6 +3301,7 @@
>                     &call->lock_codec.reinv_timer, &delay);
>
>      return PJ_SUCCESS;
> +#endif
>  }
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20110914/7fb5c407/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