PJSIP ReInvite

Home » Asterisk Users » PJSIP ReInvite
Asterisk Users 7 Comments

Hi All,

We are using asterisk 16.5 and having an issue with the first re-invite after the call has been established. We can see the call gets up and you see in the logs the bridge type has changed and after that a re-invite is triggered.

Is there any possibility to deactivate this kind of reInvite? We have some race conditions while have multiple asterisk in the call flow and the different asterisk systems are sending this reInvites out parallel. While an invite is pending on a system it is not accepting another incoming reInvite from peer.

With chan_SIP canreinvite=no solved the issue. But it seems there is nothing similar in PJSIP.

any help would be much appreciated!

7 thoughts on - PJSIP ReInvite

  • Le 15/08/2019 à 13:22, Jöran Vinzens a écrit :

    As far as I know directmedia is the replacement of canreinvite

    […]


    Daniel

  • Hi,

    we tried “direct_media=no”. this is documented to suppress reInvites but it has no effect.
    “directmedia” is not known by the config parser and it gives error while reading.

    direct_media=no is not the same behavior as canreinvite=no, at least as far I can see it.

    BR
    Jöran

  • The “direct_media” option controls just that, direct media. A reinvite can occur for other reasons (such as attempting to renegotiate streams to be of better quality or to update connected line information). Have you determined which case is occurring?


    Joshua C. Colp Digium – A Sangoma Company | Senior Software Developer
    445 Jan Davis Drive NW – Huntsville, AL 35806 – US
    Check us out at: http://www.digium.com & http://www.asterisk.org

  • Hi all,

    So the scenario is:

    A -> Asterisk -> B

    after B send back 200 OK Asterisk is answering the call to A. Directly after the Answer Asterisk generates a ReInvite to A and the only difference between the 200 OK sdp and the reInvite sdp are the offered codecs which are forwarded from B to A. Here i do not understand why this could not be done in the 200OK to A?

    As far as i understood you Josh, there is no way to prohibit this kind of reInvite? It is not about route Optimization just for some more options for the A Party.

    BR
    Jöran

  • Noone has written the functionality to do this. The information isn’t exchanged back at such a point or used to construct the answer to A.

    There’s no ability currently to disable this.


    Joshua C. Colp Digium – A Sangoma Company | Senior Software Developer
    445 Jan Davis Drive NW – Huntsville, AL 35806 – US
    Check us out at: http://www.digium.com & http://www.asterisk.org

  • HI All,

    thanks for your help. We will make our setup work correctly with reInvites.

    BR
    Jöran