[pjsip] pjsua callbacks

Benny Prijono bennylp at pjsip.org
Tue Feb 12 06:14:53 EST 2008


On 2/11/08, Michael Broughton <Michael_Broughton at advanis.ca> wrote:
> Hello,
>
> Can anyone help me enumerate what locks are held (and the lock order)
> when each of the PJSUA callbacks is called? Is this documented anywhere?
>
> These ones:
>
> on_incoming_call
> on_call_state
> on_call_media_state
>
> seem to hold the PJSUA lock. I suspect they might also hold a dialog lock?
>

Yes they do. And it's mandatory that locks must be acquired in uniform
order, or otherwise we'll have deadlocks. I was pretty confident that
such an important issue must have been documented somewhere, but turns
out there's none of this. So for now, the only information about this
is here: http://trac.pjsip.org/repos/changeset/729. I'll work on a
wiki shortly.

> I don't think on_dtmf_digit holds any locks.
>

Currently no, since DTMF comes from media and not from dialog. But I
think this looks like a bug, so I think I'll add call lock here.


cheers,
 -benny

> Thanks,
>
> --
> Michael Broughton, Advanis
>
> Unintended Recipient & Unauthorized Use of E-Mail:
> This message and attachments may contain confidential or privileged
> information that is intended only for the named recipient of this
> e-mail. Any unauthorized use or distribution is not permitted. If you
> have received this e-mail in error, deleting the e-mail and notifying
> the sender would be appreciated. Thank you.
>
>
> _______________________________________________
> 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
>




More information about the pjsip mailing list