PJSUA: on_pager_status2() never called when sending MESSAGE inside call

AW
Andreas Wehrmann
Wed, Dec 11, 2019 3:29 PM

Hello people,

I found that when you send a SIP MESSAGE inside a call by using
pjsua_call_send_im()
the pager status callback on_pager_status2() is never called.

I then played around a little and found that on_pager_status() (the
first variant) does work.
After doing some digging, I looks like you forgot to check for the
second variant in pjsua_call.c.

Best Regards,
Andreas Wehrmann

Hello people, I found that when you send a SIP MESSAGE inside a call by using pjsua_call_send_im() the pager status callback on_pager_status2() is never called. I then played around a little and found that on_pager_status() (the first variant) does work. After doing some digging, I looks like you forgot to check for the second variant in pjsua_call.c. Best Regards, Andreas Wehrmann
AW
Andreas Wehrmann
Thu, Dec 12, 2019 10:14 AM

On 11.12.19 16:29, Andreas Wehrmann wrote:

Hello people,

I found that when you send a SIP MESSAGE inside a call by using
pjsua_call_send_im()
the pager status callback on_pager_status2() is never called.

I then played around a little and found that on_pager_status() (the
first variant) does work.
After doing some digging, I looks like you forgot to check for the
second variant in pjsua_call.c.

Best Regards,
Andreas Wehrmann

Hello again,

attached to this message you'll find a patch that seems to fix the
problem I described in my previous mail.
Also while I was testing this I noticed that the on_pager_status()
callback would always be called twice when a MESSAGE is sent inside a call
(one for event TSX_STATE and one afterwards for event TIMER).

The patch should fix both problems:

  • on_pager_status2() will now be called when set and an IM is sent
    inside a call
  • on_pager_status() and on_pager_status2() will only be called once for
    a message after sending an IM inside a call

Best Regards,
Andreas Wehrmann

On 11.12.19 16:29, Andreas Wehrmann wrote: > Hello people, > > I found that when you send a SIP MESSAGE inside a call by using > pjsua_call_send_im() > the pager status callback on_pager_status2() is never called. > > I then played around a little and found that on_pager_status() (the > first variant) does work. > After doing some digging, I looks like you forgot to check for the > second variant in pjsua_call.c. > > Best Regards, > Andreas Wehrmann Hello again, attached to this message you'll find a patch that seems to fix the problem I described in my previous mail. Also while I was testing this I noticed that the on_pager_status() callback would always be called twice when a MESSAGE is sent inside a call (one for event TSX_STATE and one afterwards for event TIMER). The patch should fix both problems: - on_pager_status2() will now be called when set and an IM is sent inside a call - on_pager_status() and on_pager_status2() will only be called once for a message after sending an IM inside a call Best Regards, Andreas Wehrmann