Re: Reinvite after delayed ack

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

 



Hi,

Thanks for the confirmation 

Regards,
Ajaresh Gudipati 

On Fri, 17 Jul 2020 at 7:46 PM, gabriel manea <gabriel.manea@xxxxxxxxx> wrote:
Hi,

Yes, it would be ok if this code is added in sip_inv.c (it's the solution I'm using now):

/*
 * Send a request or response message.
 */
PJ_DEF(pj_status_t) pjsip_inv_send_msg( pjsip_inv_session *inv,
                                        pjsip_tx_data *tdata)
{

...........
if (tdata->msg->line.req.method.id == PJSIP_ACK_METHOD)
        {
            pjsip_event ack_e;
            PJSIP_EVENT_INIT_TX_MSG(ack_e, tdata);
            /* Set state to CONFIRMED (if we're not in CONFIRMED yet).
             * But don't set it to CONFIRMED if we're already DISCONNECTED
             * (this may have been a late 200/OK response.
             */
            if (inv->state < PJSIP_INV_STATE_CONFIRMED) {
                inv_set_state(inv, PJSIP_INV_STATE_CONFIRMED, &ack_e);
            }
        }
.................

Regards,
Gabriel.

On 17.07.2020 17:00, Ajaresh Gudipati wrote:
Hi,

I tried to put that code inside pjsip_inv_send_msg() when method.id is ACK. So that no changes are required in api.

Is it okay to implement this way.?

Regards,
Ajaresh Gudipati.

On Fri, 17 Jul 2020 at 2:40 PM, gabriel manea <gabriel.manea@xxxxxxxxx> wrote:
Hi,

I only succeeded by modifying the pjsip source file sip_inv.c (remove static keyword from void inv_set_state() and declare void inv_set_state() in sip_inv.h header).
After that it is possible to manually change session state after sending ack:
{
pjsip_event e;
PJSIP_EVENT_INIT_TX_MSG(e, tdata);
inv_set_state(inv, PJSIP_INV_STATE_CONFIRMED, &e);
}

Regards,
Gabriel.

On 17.07.2020 07:12, Ajaresh Gudipati wrote:
Dear Team,

I am implementing b2bua server with pjsip version 2.9

I am trying the transfer feature in server. So I want to delay the ack message untill i get the offer.

I have implemented the on_send_ack method of inv_session to send ack message manually from application

But after sending the ack from the application, if i try reinvite on the session. It is giving error as the invite session state is still in CONNECTING state.

Please suggest how can I achieve this functionality 

Regards,
Ajaresh Gudipati.

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

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


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

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

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

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


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

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
_______________________________________________
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