How to handle caller get BYE when on early dialog

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

 



Dear benny,
        I know callee's UA MUST not send a BYE on early dialog. But pls
consider below msg flow:

1,  callee get INVITE from caller, and respond 200 OK first time(this packet
was lost);

2,  callee use pjsip_inv_end_session() to disconnect the call. BYE will go
to caller because callee is in PJSIP_INV_STATE_CONNECTING state.

3,  then caller get BYE on early dialog.

      There are no logic to handel this at function inv_on_state_early().
      I tried to use inv_respond_incoming_bye() to create a respond for BYE.
But callee still create ACK request for retransmission 200 OK after dialog
in disconnected state. And the pool used by ACK tdata still there after long
time.
      And I also found there was transacton/tata pool leak when dumping
pj_caching_pool, but related dialog not there. Is there anyway to release
these unused pools on the fly?

+    } else if (inv->role == PJSIP_ROLE_UAC &&
+           tsx->role == PJSIP_ROLE_UAS &&
+           tsx->method.id == PJSIP_BYE_METHOD &&
+           tsx->state < PJSIP_TSX_STATE_COMPLETED &&
+           e->body.tsx_state.type == PJSIP_EVENT_RX_MSG )
+    {
+       /*
+        * Handle incoming BYE request.
+        */
+
+       inv_respond_incoming_bye(inv, tsx, e->body.tsx_state.src.rdata, e);
+
     }

regards,
Gang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090330/f9a7456b/attachment.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