stream port destroyed before callback function was called

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

 



On 2/16/08, Truong Thanh Quang <quangtt at softend.vn> wrote:
>  In fact, the stream was destroyed by PJSUA.

Ah yes, of course, what was I thinking!


>  Following lines is call stack when I set break point in
> on_call_media_state() function:
>

The callstack looks okay so far.


>  Step into inv_negotiate_sdp():
>  static pj_status_t inv_negotiate_sdp( pjsip_inv_session *inv )
>  {
>      pj_status_t status;
>
>      PJ_ASSERT_RETURN(pjmedia_sdp_neg_get_state(inv->neg)
> ==
>               PJMEDIA_SDP_NEG_STATE_WAIT_NEGO,
>               PJMEDIA_SDPNEG_EINSTATE);
>
>      status = pjmedia_sdp_neg_negotiate(inv->pool,
> inv->neg, 0);
>
>      PJ_LOG(5,(inv->obj_name, "SDP negotiation done, status=%d", status));
>
>      if (mod_inv.cb.on_media_update && inv->notify)
>      (*mod_inv.cb.on_media_update)(inv, status);
>
>      return status;
>  }
>
>  The stream was destroyed by pjmedia_sdp_neg_negotiate() before callback
> function was called.

Ah I see. So the stream gets destroyed by PJSUA-LIB before application
has a chance to remove it from its media flow, is that right?

>  About solution, I think it is difficult.
>  1) Create another callback function in PJSUA (called
> pjsua_call_on_media_updating or something) to notify app about media is
> about to re-create new one

Yeah we could do that, by installing a callback in
stop_media_session() function in pjsua_media.c before media session is
destroyed. I'm still not sure about adding the callback in the API,
since anyway doing high volume call with PJSUA-LIB is not supported.
The best way is to redesign everything to handle more calls, but this
will take some time of course.

cheers,
 -benny

>  2) Handle call by app (the best way as Q&A suggests)
>


cheers,
 -benny


>  Thanks for your support!
>  -quang
>
>
>
>
>
>  Help me how to handle this case?
>  Thanks,
>  -quang
>
>
>
>  _______________________________________________
> 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
>
>
>
>
>
> _______________________________________________
> 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