A big bug in pjsip

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

 



Hi Hlzhangxt,

I doubt the problem/bug was in pjsua side.
Looking at your previous mail:
----
A is pjusa,  B is another sip phone.
A is talking with B,  B press hold key, then A start to listen to hold
music.
After a while, B press unhold key, music stop.
...
----
It seems the B was not actually doing 'hold', since it was still sending the
hold music to pjsua,
it just didn't play the packets received from pjsua, and sent to pjsua the
hold music streaming instead of microphone data.
When unhold button was pressed, the B did something 'buggy' so pjsua did not
receive any packets from B.

You said reinvite solved the problem, I guess this works since reinvite
might reinitialized stream engine in B side,
so it could correctly sent the packets again to pjsua as if new call
condition.

Could you tell us what is B? or just send along the complete SIP trace for
the whole call session
(invite, hold, unhold, hangup) so everybody can analyze further.

Cheers,
nanang


On 05/04/2008, hlzhangxt <hlzhangxt at 163.com> wrote:
>
>
>
>  The big bug is:
>
>    When pjsip usa works with asterisk, After it's put on hold, listening
to
> on hold music, or transfered , listening to hold music, It's very possible
> to be deaf. Only after you send reinvite, rebuild the media channel, then
> resume.
>
>    So this is a big bug, I hope somebody can solve it.
>
>    I solve it by changing sound_prot.c, after a little time(1 second), the
> media port can not get any sound fram, I make it send reinvite. Look the
> codes below:
>    in function play_cb
>
>  return PJ_SUCCESS;
> no_frame:
>    if (pjsua_call_get_count() > 0)
>    {
>
>     if (pjsua_call_has_media(0)){
>          ++snd_port->no_frame_count;
>          if (snd_port->no_frame_count >
> snd_port->ec_suspend_limit/AEC_SUSPEND_LIMIT*1.1)
>    {
>            pjsua_call_reinvite(0, PJ_TRUE, NULL);
>      snd_port->no_frame_count = 0;
>    }
>     }
>    }
>
>
>     if (snd_port->ec_state && !snd_port->ec_suspended) {
>  ++snd_port->ec_suspend_count;
>  if (snd_port->ec_suspend_count > snd_port->ec_suspend_limit) {
>      snd_port->ec_suspended = PJ_TRUE;
>      PJ_LOG(4,(THIS_FILE, "EC suspended because of inactivity"));
>  }
>  if (snd_port->ec_state) {
>      /* To maintain correct delay in EC */
>      pjmedia_echo_playback(snd_port->ec_state,
> (pj_int16_t*)output);
>  }
>     }
>
>
> The Blue part is the change. I and a new variable no_frame_count in
> sn_port,It caculate how many frames not received. If more than 1.1 seconds
> frames lost, I send reinvite.
>
>
>   I know this is not the final solution, But it works.
>
>  I hope somebody can solve it in a final righ way.
>
>
>   Regards
>
>
> ________________________________
>  ? ? ? ? ? ? --- ? ? ? ? ? ? ?166 ? ? ? ? ? ? ?
> _______________________________________________
>  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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080405/2fe0faab/attachment-0001.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