Video Call In Background

VR
Vedvyas Rauniyar
Wed, Jul 12, 2017 10:45 AM

Hello ,

I am working on PJSIP. Audio and video call is working fine in foreground
but the issue is, When the app is in background, I am able to make call in
background but no video is displaying. Any help would be highly appreciated.

When I make a call and pick the call from background, I am getting the
errors -

15:48:19.250    pjsua_vid.c  ......Creating video window: type=stream,
cap_id=-1, rend_id=0

15:48:19.250    vid_port.c  .......Opening device OpenGL renderer
[OpenGL] for render: format=I420, size=656x656 @22:1 fps

15:48:19.251 ios_opengl_dev  .......Failed to initialize iOS OpenGL
because we are in background

15:48:19.251    vid_port.c  .......Closing OpenGL renderer..

15:48:19.319    pjsua_vid.c  .......Window 0: destroying..

15:48:19.319  pjsua_media.c  ....pjsua_vid_channel_update() failed for
call_id 0 media 1: video subsystem not initialized (PJMEDIA_EVID_INIT)

15:48:19.319  pjsua_media.c  ....Error updating media call00:1: video
subsystem not initialized (PJMEDIA_EVID_INIT)

15:48:19.319    pjsua_app.c  ...Call 0 media 0 [type=audio], status is
Active

15:48:19.319    pjsua_aud.c  ...Conf connect: 3 --> 0

15:48:19.319    pjsua_app.c  ....Turning sound device ON

15:48:19.319  conference.c  ....Port 3 (sip:linchpin@192.168.1.7
sip%3Alinchpin@192.168.1.7) transmitting to port 0 (Master/sound)

15:48:19.319    pjsua_aud.c  ...Conf connect: 0 --> 3

15:48:19.319  conference.c  ....Port 0 (Master/sound) transmitting to
port 3 (sip:linchpin@192.168.1.7 sip%3Alinchpin@192.168.1.7)

15:48:19.319    pjsua_app.c  ...Call 0 media 1 [type=video], status is
Error

15:48:19.319    pjsua_app.c  ...Just rejected incoming video offer on call
0, use "vid call enable 1" or "vid call add" to enable video!

15:48:19.319  pjsua_core.c  ....TX 1321 bytes Response msg
200/INVITE/cseq=20 (tdta0x10494b000) to UDP 91.121.209.194:5060
http://91.121.209.194:5060:

Code Snippet is -

#define KEEP_ALIVE_INTERVAL 600

  • (void)keepAlive {

    static pj_thread_desc a_thread_desc;

    static pj_thread_t *a_thread;

    int i;

    if (!pj_thread_is_registered()) {

      pj_thread_register("ipjsua", a_thread_desc, &a_thread);
    

    }

    /* Since iOS requires that the minimum keep alive interval is 600s,

    • application needs to make sure that the account's registration

    • timeout is long enough.

    */

    for (i = 0; i < (int)pjsua_acc_get_count(); ++i) {

      if (pjsua_acc_is_valid(i)) {
    
          pjsua_acc_set_registration(i, PJ_TRUE);
    
      }
    

    }

}

Hello , I am working on PJSIP. Audio and video call is working fine in foreground but the issue is, When the app is in background, I am able to make call in background but no video is displaying. Any help would be highly appreciated. When I make a call and pick the call from background, I am getting the errors - *15:48:19.250 pjsua_vid.c ......Creating video window: type=stream, cap_id=-1, rend_id=0* *15:48:19.250 vid_port.c .......Opening device OpenGL renderer [OpenGL] for render: format=I420, size=656x656 @22:1 fps* *15:48:19.251 ios_opengl_dev .......Failed to initialize iOS OpenGL because we are in background* *15:48:19.251 vid_port.c .......Closing OpenGL renderer..* *15:48:19.319 pjsua_vid.c .......Window 0: destroying..* *15:48:19.319 pjsua_media.c ....pjsua_vid_channel_update() failed for call_id 0 media 1: video subsystem not initialized (PJMEDIA_EVID_INIT)* *15:48:19.319 pjsua_media.c ....Error updating media call00:1: video subsystem not initialized (PJMEDIA_EVID_INIT)* *15:48:19.319 pjsua_app.c ...Call 0 media 0 [type=audio], status is Active* *15:48:19.319 pjsua_aud.c ...Conf connect: 3 --> 0* *15:48:19.319 pjsua_app.c ....Turning sound device ON* *15:48:19.319 conference.c ....Port 3 (sip:linchpin@192.168.1.7 <sip%3Alinchpin@192.168.1.7>) transmitting to port 0 (Master/sound)* *15:48:19.319 pjsua_aud.c ...Conf connect: 0 --> 3* *15:48:19.319 conference.c ....Port 0 (Master/sound) transmitting to port 3 (sip:linchpin@192.168.1.7 <sip%3Alinchpin@192.168.1.7>)* *15:48:19.319 pjsua_app.c ...Call 0 media 1 [type=video], status is Error* *15:48:19.319 pjsua_app.c ...Just rejected incoming video offer on call 0, use "vid call enable 1" or "vid call add" to enable video!* *15:48:19.319 pjsua_core.c ....TX 1321 bytes Response msg 200/INVITE/cseq=20 (tdta0x10494b000) to UDP 91.121.209.194:5060 <http://91.121.209.194:5060>:* Code Snippet is - #define KEEP_ALIVE_INTERVAL 600 - (void)keepAlive { static pj_thread_desc a_thread_desc; static pj_thread_t *a_thread; int i; if (!pj_thread_is_registered()) { pj_thread_register("ipjsua", a_thread_desc, &a_thread); } /* Since iOS requires that the minimum keep alive interval is 600s, * application needs to make sure that the account's registration * timeout is long enough. */ for (i = 0; i < (int)pjsua_acc_get_count(); ++i) { if (pjsua_acc_is_valid(i)) { pjsua_acc_set_registration(i, PJ_TRUE); } } }
VR
Vedvyas Rauniyar
Mon, Jul 17, 2017 4:13 AM

Hi Team,

This is gentle reminder.

On Wednesday, July 12, 2017, Vedvyas Rauniyar vedvyas.rauniyar@vvdntech.in
wrote:

Hello ,

I am working on PJSIP. Audio and video call is working fine in foreground
but the issue is, When the app is in background, I am able to make call in
background but no video is displaying. Any help would be highly appreciated.

When I make a call and pick the call from background, I am getting the
errors -

15:48:19.250    pjsua_vid.c  ......Creating video window: type=stream,
cap_id=-1, rend_id=0

15:48:19.250    vid_port.c  .......Opening device OpenGL renderer
[OpenGL] for render: format=I420, size=656x656 @22:1 fps

15:48:19.251 ios_opengl_dev  .......Failed to initialize iOS OpenGL
because we are in background

15:48:19.251    vid_port.c  .......Closing OpenGL renderer..

15:48:19.319    pjsua_vid.c  .......Window 0: destroying..

15:48:19.319  pjsua_media.c  ....pjsua_vid_channel_update() failed for
call_id 0 media 1: video subsystem not initialized (PJMEDIA_EVID_INIT)

15:48:19.319  pjsua_media.c  ....Error updating media call00:1: video
subsystem not initialized (PJMEDIA_EVID_INIT)

15:48:19.319    pjsua_app.c  ...Call 0 media 0 [type=audio], status is
Active

15:48:19.319    pjsua_aud.c  ...Conf connect: 3 --> 0

15:48:19.319    pjsua_app.c  ....Turning sound device ON

15:48:19.319  conference.c  ....Port 3 (sip:linchpin@192.168.1.7
javascript:_e(%7B%7D,'cvml','sip:linchpin@192.168.1.7');) transmitting to
port 0 (Master/sound)

15:48:19.319    pjsua_aud.c  ...Conf connect: 0 --> 3

15:48:19.319  conference.c  ....Port 0 (Master/sound) transmitting to
port 3 (sip:linchpin@192.168.1.7
javascript:_e(%7B%7D,'cvml','sip:linchpin@192.168.1.7');)

15:48:19.319    pjsua_app.c  ...Call 0 media 1 [type=video], status is
Error

15:48:19.319    pjsua_app.c  ...Just rejected incoming video offer on
call 0, use "vid call enable 1" or "vid call add" to enable video!

15:48:19.319  pjsua_core.c  ....TX 1321 bytes Response msg
200/INVITE/cseq=20 (tdta0x10494b000) to UDP 91.121.209.194:5060
http://91.121.209.194:5060:

Code Snippet is -

#define KEEP_ALIVE_INTERVAL 600

  • (void)keepAlive {

    static pj_thread_desc a_thread_desc;

    static pj_thread_t *a_thread;

    int i;

    if (!pj_thread_is_registered()) {

      pj_thread_register("ipjsua", a_thread_desc, &a_thread);
    

    }

    /* Since iOS requires that the minimum keep alive interval is 600s,

    • application needs to make sure that the account's registration

    • timeout is long enough.

    */

    for (i = 0; i < (int)pjsua_acc_get_count(); ++i) {

      if (pjsua_acc_is_valid(i)) {
    
          pjsua_acc_set_registration(i, PJ_TRUE);
    
      }
    

    }

}

Hi Team, This is gentle reminder. On Wednesday, July 12, 2017, Vedvyas Rauniyar <vedvyas.rauniyar@vvdntech.in> wrote: > Hello , > > I am working on PJSIP. Audio and video call is working fine in foreground > but the issue is, When the app is in background, I am able to make call in > background but no video is displaying. Any help would be highly appreciated. > > When I make a call and pick the call from background, I am getting the > errors - > > *15:48:19.250 pjsua_vid.c ......Creating video window: type=stream, > cap_id=-1, rend_id=0* > > *15:48:19.250 vid_port.c .......Opening device OpenGL renderer > [OpenGL] for render: format=I420, size=656x656 @22:1 fps* > > *15:48:19.251 ios_opengl_dev .......Failed to initialize iOS OpenGL > because we are in background* > > *15:48:19.251 vid_port.c .......Closing OpenGL renderer..* > > *15:48:19.319 pjsua_vid.c .......Window 0: destroying..* > > *15:48:19.319 pjsua_media.c ....pjsua_vid_channel_update() failed for > call_id 0 media 1: video subsystem not initialized (PJMEDIA_EVID_INIT)* > > *15:48:19.319 pjsua_media.c ....Error updating media call00:1: video > subsystem not initialized (PJMEDIA_EVID_INIT)* > > *15:48:19.319 pjsua_app.c ...Call 0 media 0 [type=audio], status is > Active* > > *15:48:19.319 pjsua_aud.c ...Conf connect: 3 --> 0* > > *15:48:19.319 pjsua_app.c ....Turning sound device ON* > > *15:48:19.319 conference.c ....Port 3 (sip:linchpin@192.168.1.7 > <javascript:_e(%7B%7D,'cvml','sip:linchpin@192.168.1.7');>) transmitting to > port 0 (Master/sound)* > > *15:48:19.319 pjsua_aud.c ...Conf connect: 0 --> 3* > > *15:48:19.319 conference.c ....Port 0 (Master/sound) transmitting to > port 3 (sip:linchpin@192.168.1.7 > <javascript:_e(%7B%7D,'cvml','sip:linchpin@192.168.1.7');>)* > > *15:48:19.319 pjsua_app.c ...Call 0 media 1 [type=video], status is > Error* > > *15:48:19.319 pjsua_app.c ...Just rejected incoming video offer on > call 0, use "vid call enable 1" or "vid call add" to enable video!* > > *15:48:19.319 pjsua_core.c ....TX 1321 bytes Response msg > 200/INVITE/cseq=20 (tdta0x10494b000) to UDP 91.121.209.194:5060 > <http://91.121.209.194:5060>:* > > Code Snippet is - > > #define KEEP_ALIVE_INTERVAL 600 > > > > - (void)keepAlive { > > > > static pj_thread_desc a_thread_desc; > > static pj_thread_t *a_thread; > > int i; > > > > if (!pj_thread_is_registered()) { > > pj_thread_register("ipjsua", a_thread_desc, &a_thread); > > } > > > > /* Since iOS requires that the minimum keep alive interval is 600s, > > * application needs to make sure that the account's registration > > * timeout is long enough. > > */ > > for (i = 0; i < (int)pjsua_acc_get_count(); ++i) { > > if (pjsua_acc_is_valid(i)) { > > pjsua_acc_set_registration(i, PJ_TRUE); > > } > > } > > } >
OB
Oren Barash
Mon, Jul 17, 2017 6:27 AM

Hi,

Currently I am using PJSIP only in android, but from my knowledge on iOS you can’t do any UI operation from the background, so this is why OpenGL is failing.

I assume that you can answer/initiate the call, but you will be able to connect to the camera only when the app will go back to foreground.

When you wrote “no video is displaying” in which side ?

  1. Let’s say that Bob calls Alice, and Alice's app is in the background, which one will not see anything ?
  2. Let’s say that Bob calls Alice, and Bob's app is in the background Alice in foreground, when Bob returns to the app do you see video?

Oren.
Elbit Systems

On 17 Jul 2017, at 7:13, Vedvyas Rauniyar vedvyas.rauniyar@vvdntech.in wrote:

Hi Team,

This is gentle reminder.

On Wednesday, July 12, 2017, Vedvyas Rauniyar <vedvyas.rauniyar@vvdntech.in mailto:vedvyas.rauniyar@vvdntech.in> wrote:
Hello ,

I am working on PJSIP. Audio and video call is working fine in foreground but the issue is, When the app is in background, I am able to make call in background but no video is displaying. Any help would be highly appreciated.

When I make a call and pick the call from background, I am getting the errors -

15:48:19.250    pjsua_vid.c  ......Creating video window: type=stream, cap_id=-1, rend_id=0

15:48:19.250    vid_port.c  .......Opening device OpenGL renderer [OpenGL] for render: format=I420, size=656x656 @22:1 fps

15:48:19.251 ios_opengl_dev  .......Failed to initialize iOS OpenGL because we are in background

15:48:19.251    vid_port.c  .......Closing OpenGL renderer..

15:48:19.319    pjsua_vid.c  .......Window 0: destroying..

15:48:19.319  pjsua_media.c  ....pjsua_vid_channel_update() failed for call_id 0 media 1: video subsystem not initialized (PJMEDIA_EVID_INIT)

15:48:19.319  pjsua_media.c  ....Error updating media call00:1: video subsystem not initialized (PJMEDIA_EVID_INIT)

15:48:19.319    pjsua_app.c  ...Call 0 media 0 [type=audio], status is Active

15:48:19.319    pjsua_aud.c  ...Conf connect: 3 --> 0

15:48:19.319    pjsua_app.c  ....Turning sound device ON

15:48:19.319  conference.c  ....Port 3 (sip:linchpin@192.168.1.7 javascript:_e(%7B%7D,'cvml','sip:linchpin@192.168.1.7');) transmitting to port 0 (Master/sound)

15:48:19.319    pjsua_aud.c  ...Conf connect: 0 --> 3

15:48:19.319  conference.c  ....Port 0 (Master/sound) transmitting to port 3 (sip:linchpin@192.168.1.7 javascript:_e(%7B%7D,'cvml','sip:linchpin@192.168.1.7');)

15:48:19.319    pjsua_app.c  ...Call 0 media 1 [type=video], status is Error

15:48:19.319    pjsua_app.c  ...Just rejected incoming video offer on call 0, use "vid call enable 1" or "vid call add" to enable video!

15:48:19.319  pjsua_core.c  ....TX 1321 bytes Response msg 200/INVITE/cseq=20 (tdta0x10494b000) to UDP 91.121.209.194:5060 http://91.121.209.194:5060/:

Code Snippet is -

#define KEEP_ALIVE_INTERVAL 600

  • (void)keepAlive {

    static pj_thread_desc a_thread_desc;

    static pj_thread_t *a_thread;

    int i;

    if (!pj_thread_is_registered()) {

      pj_thread_register("ipjsua", a_thread_desc, &a_thread);
    

    }

    /* Since iOS requires that the minimum keep alive interval is 600s,

    • application needs to make sure that the account's registration

    • timeout is long enough.

    */

    for (i = 0; i < (int)pjsua_acc_get_count(); ++i) {

      if (pjsua_acc_is_valid(i)) {
    
          pjsua_acc_set_registration(i, PJ_TRUE);
    
      }
    

    }

}


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hi, Currently I am using PJSIP only in android, but from my knowledge on iOS you can’t do any UI operation from the background, so this is why OpenGL is failing. I assume that you can answer/initiate the call, but you will be able to connect to the camera only when the app will go back to foreground. When you wrote “no video is displaying” in which side ? 1) Let’s say that Bob calls Alice, and Alice's app is in the background, which one will not see anything ? 2) Let’s say that Bob calls Alice, and Bob's app is in the background Alice in foreground, when Bob returns to the app do you see video? Oren. Elbit Systems > On 17 Jul 2017, at 7:13, Vedvyas Rauniyar <vedvyas.rauniyar@vvdntech.in> wrote: > > Hi Team, > > This is gentle reminder. > > On Wednesday, July 12, 2017, Vedvyas Rauniyar <vedvyas.rauniyar@vvdntech.in <mailto:vedvyas.rauniyar@vvdntech.in>> wrote: > Hello , > > I am working on PJSIP. Audio and video call is working fine in foreground but the issue is, When the app is in background, I am able to make call in background but no video is displaying. Any help would be highly appreciated. > > When I make a call and pick the call from background, I am getting the errors - > > 15:48:19.250 pjsua_vid.c ......Creating video window: type=stream, cap_id=-1, rend_id=0 > > 15:48:19.250 vid_port.c .......Opening device OpenGL renderer [OpenGL] for render: format=I420, size=656x656 @22:1 fps > > 15:48:19.251 ios_opengl_dev .......Failed to initialize iOS OpenGL because we are in background > > 15:48:19.251 vid_port.c .......Closing OpenGL renderer.. > > 15:48:19.319 pjsua_vid.c .......Window 0: destroying.. > > 15:48:19.319 pjsua_media.c ....pjsua_vid_channel_update() failed for call_id 0 media 1: video subsystem not initialized (PJMEDIA_EVID_INIT) > > 15:48:19.319 pjsua_media.c ....Error updating media call00:1: video subsystem not initialized (PJMEDIA_EVID_INIT) > > 15:48:19.319 pjsua_app.c ...Call 0 media 0 [type=audio], status is Active > > 15:48:19.319 pjsua_aud.c ...Conf connect: 3 --> 0 > > 15:48:19.319 pjsua_app.c ....Turning sound device ON > > 15:48:19.319 conference.c ....Port 3 (sip:linchpin@192.168.1.7 <javascript:_e(%7B%7D,'cvml','sip:linchpin@192.168.1.7');>) transmitting to port 0 (Master/sound) > > 15:48:19.319 pjsua_aud.c ...Conf connect: 0 --> 3 > > 15:48:19.319 conference.c ....Port 0 (Master/sound) transmitting to port 3 (sip:linchpin@192.168.1.7 <javascript:_e(%7B%7D,'cvml','sip:linchpin@192.168.1.7');>) > > 15:48:19.319 pjsua_app.c ...Call 0 media 1 [type=video], status is Error > > 15:48:19.319 pjsua_app.c ...Just rejected incoming video offer on call 0, use "vid call enable 1" or "vid call add" to enable video! > > 15:48:19.319 pjsua_core.c ....TX 1321 bytes Response msg 200/INVITE/cseq=20 (tdta0x10494b000) to UDP 91.121.209.194:5060 <http://91.121.209.194:5060/>: > > > Code Snippet is - > > #define KEEP_ALIVE_INTERVAL 600 > > > - (void)keepAlive { > > > static pj_thread_desc a_thread_desc; > > static pj_thread_t *a_thread; > > int i; > > > if (!pj_thread_is_registered()) { > > pj_thread_register("ipjsua", a_thread_desc, &a_thread); > > } > > > /* Since iOS requires that the minimum keep alive interval is 600s, > > * application needs to make sure that the account's registration > > * timeout is long enough. > > */ > > for (i = 0; i < (int)pjsua_acc_get_count(); ++i) { > > if (pjsua_acc_is_valid(i)) { > > pjsua_acc_set_registration(i, PJ_TRUE); > > } > > } > > } > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
VR
Vedvyas Rauniyar
Mon, Jul 17, 2017 7:01 AM

Hi Oren,

I made a call from linphone mac application to iPhone device in foreground
and video was showing at both end (Linphone and iPhone) but when I made the
same call from linphone mac application to iPhone in background, I picked
up the call and app was moved from background to foreground. Audio was
working fine on both end but no video is displayed either iPhone side or
Linphone mac app side.

I am getting the below error -

*15:48:19.250    pjsua_vid.c  ......Creating video window: type=stream,

cap_id=-1, rend_id=0*

15:48:19.250    vid_port.c  .......Opening device OpenGL renderer
[OpenGL] for render: format=I420, size=656x656 @22:1 fps

15:48:19.251 ios_opengl_dev  .......Failed to initialize iOS OpenGL
because we are in background

15:48:19.251    vid_port.c  .......Closing OpenGL renderer..

15:48:19.319    pjsua_vid.c  .......Window 0: destroying..

15:48:19.319  pjsua_media.c  ....pjsua_vid_channel_update() failed for
call_id 0 media 1: video subsystem not initialized (PJMEDIA_EVID_INIT)

15:48:19.319  pjsua_media.c  ....Error updating media call00:1: video
subsystem not initialized (PJMEDIA_EVID_INIT)

15:48:19.319    pjsua_app.c  ...Call 0 media 0 [type=audio], status is
Active

15:48:19.319    pjsua_aud.c  ...Conf connect: 3 --> 0

15:48:19.319    pjsua_app.c  ....Turning sound device ON

15:48:19.319  conference.c  ....Port 3 (sip:linchpin@192.168.1.7
https://www.spinics.net/lists/pjsip/_javascript_:_e(%7B%7D,'cvml','sip:linchpin@192.168.1.7');)
transmitting to port 0 (Master/sound)

15:48:19.319    pjsua_aud.c  ...Conf connect: 0 --> 3

15:48:19.319  conference.c  ....Port 0 (Master/sound) transmitting to
port 3 (sip:linchpin@192.168.1.7
https://www.spinics.net/lists/pjsip/_javascript_:_e(%7B%7D,'cvml','sip:linchpin@192.168.1.7');)

15:48:19.319    pjsua_app.c  ...Call 0 media 1 [type=video], status is
Error

15:48:19.319    pjsua_app.c  ...Just rejected incoming video offer on
call 0, use "vid call enable 1" or "vid call add" to enable video!

15:48:19.319  pjsua_core.c  ....TX 1321 bytes Response msg
200/INVITE/cseq=20 (tdta0x10494b000) to UDP 91.121.209.194:5060
http://91.121.209.194:5060/:

On Wed, Jul 12, 2017 at 4:15 PM, Vedvyas Rauniyar <
vedvyas.rauniyar@vvdntech.in> wrote:

Hello ,

I am working on PJSIP. Audio and video call is working fine in foreground
but the issue is, When the app is in background, I am able to make call in
background but no video is displaying. Any help would be highly appreciated.

When I make a call and pick the call from background, I am getting the
errors -

15:48:19.250    pjsua_vid.c  ......Creating video window: type=stream,
cap_id=-1, rend_id=0

15:48:19.250    vid_port.c  .......Opening device OpenGL renderer
[OpenGL] for render: format=I420, size=656x656 @22:1 fps

15:48:19.251 ios_opengl_dev  .......Failed to initialize iOS OpenGL
because we are in background

15:48:19.251    vid_port.c  .......Closing OpenGL renderer..

15:48:19.319    pjsua_vid.c  .......Window 0: destroying..

15:48:19.319  pjsua_media.c  ....pjsua_vid_channel_update() failed for
call_id 0 media 1: video subsystem not initialized (PJMEDIA_EVID_INIT)

15:48:19.319  pjsua_media.c  ....Error updating media call00:1: video
subsystem not initialized (PJMEDIA_EVID_INIT)

15:48:19.319    pjsua_app.c  ...Call 0 media 0 [type=audio], status is
Active

15:48:19.319    pjsua_aud.c  ...Conf connect: 3 --> 0

15:48:19.319    pjsua_app.c  ....Turning sound device ON

15:48:19.319  conference.c  ....Port 3 (sip:linchpin@192.168.1.7
sip%3Alinchpin@192.168.1.7) transmitting to port 0 (Master/sound)

15:48:19.319    pjsua_aud.c  ...Conf connect: 0 --> 3

15:48:19.319  conference.c  ....Port 0 (Master/sound) transmitting to
port 3 (sip:linchpin@192.168.1.7 sip%3Alinchpin@192.168.1.7)

15:48:19.319    pjsua_app.c  ...Call 0 media 1 [type=video], status is
Error

15:48:19.319    pjsua_app.c  ...Just rejected incoming video offer on
call 0, use "vid call enable 1" or "vid call add" to enable video!

15:48:19.319  pjsua_core.c  ....TX 1321 bytes Response msg
200/INVITE/cseq=20 (tdta0x10494b000) to UDP 91.121.209.194:5060
http://91.121.209.194:5060:

Code Snippet is -

#define KEEP_ALIVE_INTERVAL 600

  • (void)keepAlive {

    static pj_thread_desc a_thread_desc;

    static pj_thread_t *a_thread;

    int i;

    if (!pj_thread_is_registered()) {

      pj_thread_register("ipjsua", a_thread_desc, &a_thread);
    

    }

    /* Since iOS requires that the minimum keep alive interval is 600s,

    • application needs to make sure that the account's registration

    • timeout is long enough.

    */

    for (i = 0; i < (int)pjsua_acc_get_count(); ++i) {

      if (pjsua_acc_is_valid(i)) {
    
          pjsua_acc_set_registration(i, PJ_TRUE);
    
      }
    

    }

}

Hi Oren, I made a call from linphone mac application to iPhone device in foreground and video was showing at both end (Linphone and iPhone) but when I made the same call from linphone mac application to iPhone in background, I picked up the call and app was moved from background to foreground. Audio was working fine on both end but no video is displayed either iPhone side or Linphone mac app side. I am getting the below error - *15:48:19.250 pjsua_vid.c ......Creating video window: type=stream, > cap_id=-1, rend_id=0* > > *15:48:19.250 vid_port.c .......Opening device OpenGL renderer > [OpenGL] for render: format=I420, size=656x656 @22:1 fps* > > *15:48:19.251 ios_opengl_dev .......Failed to initialize iOS OpenGL > because we are in background* > > *15:48:19.251 vid_port.c .......Closing OpenGL renderer..* > > *15:48:19.319 pjsua_vid.c .......Window 0: destroying..* > > *15:48:19.319 pjsua_media.c ....pjsua_vid_channel_update() failed for > call_id 0 media 1: video subsystem not initialized (PJMEDIA_EVID_INIT)* > > *15:48:19.319 pjsua_media.c ....Error updating media call00:1: video > subsystem not initialized (PJMEDIA_EVID_INIT)* > > *15:48:19.319 pjsua_app.c ...Call 0 media 0 [type=audio], status is > Active* > > *15:48:19.319 pjsua_aud.c ...Conf connect: 3 --> 0* > > *15:48:19.319 pjsua_app.c ....Turning sound device ON* > > *15:48:19.319 conference.c ....Port 3 (sip:linchpin@192.168.1.7 > <https://www.spinics.net/lists/pjsip/_javascript_:_e(%7B%7D,'cvml','sip:linchpin@192.168.1.7');>) > transmitting to port 0 (Master/sound)* > > *15:48:19.319 pjsua_aud.c ...Conf connect: 0 --> 3* > > *15:48:19.319 conference.c ....Port 0 (Master/sound) transmitting to > port 3 (sip:linchpin@192.168.1.7 > <https://www.spinics.net/lists/pjsip/_javascript_:_e(%7B%7D,'cvml','sip:linchpin@192.168.1.7');>)* > > *15:48:19.319 pjsua_app.c ...Call 0 media 1 [type=video], status is > Error* > > *15:48:19.319 pjsua_app.c ...Just rejected incoming video offer on > call 0, use "vid call enable 1" or "vid call add" to enable video!* > > *15:48:19.319 pjsua_core.c ....TX 1321 bytes Response msg > 200/INVITE/cseq=20 (tdta0x10494b000) to UDP 91.121.209.194:5060 > <http://91.121.209.194:5060/>:* > On Wed, Jul 12, 2017 at 4:15 PM, Vedvyas Rauniyar < vedvyas.rauniyar@vvdntech.in> wrote: > Hello , > > I am working on PJSIP. Audio and video call is working fine in foreground > but the issue is, When the app is in background, I am able to make call in > background but no video is displaying. Any help would be highly appreciated. > > When I make a call and pick the call from background, I am getting the > errors - > > *15:48:19.250 pjsua_vid.c ......Creating video window: type=stream, > cap_id=-1, rend_id=0* > > *15:48:19.250 vid_port.c .......Opening device OpenGL renderer > [OpenGL] for render: format=I420, size=656x656 @22:1 fps* > > *15:48:19.251 ios_opengl_dev .......Failed to initialize iOS OpenGL > because we are in background* > > *15:48:19.251 vid_port.c .......Closing OpenGL renderer..* > > *15:48:19.319 pjsua_vid.c .......Window 0: destroying..* > > *15:48:19.319 pjsua_media.c ....pjsua_vid_channel_update() failed for > call_id 0 media 1: video subsystem not initialized (PJMEDIA_EVID_INIT)* > > *15:48:19.319 pjsua_media.c ....Error updating media call00:1: video > subsystem not initialized (PJMEDIA_EVID_INIT)* > > *15:48:19.319 pjsua_app.c ...Call 0 media 0 [type=audio], status is > Active* > > *15:48:19.319 pjsua_aud.c ...Conf connect: 3 --> 0* > > *15:48:19.319 pjsua_app.c ....Turning sound device ON* > > *15:48:19.319 conference.c ....Port 3 (sip:linchpin@192.168.1.7 > <sip%3Alinchpin@192.168.1.7>) transmitting to port 0 (Master/sound)* > > *15:48:19.319 pjsua_aud.c ...Conf connect: 0 --> 3* > > *15:48:19.319 conference.c ....Port 0 (Master/sound) transmitting to > port 3 (sip:linchpin@192.168.1.7 <sip%3Alinchpin@192.168.1.7>)* > > *15:48:19.319 pjsua_app.c ...Call 0 media 1 [type=video], status is > Error* > > *15:48:19.319 pjsua_app.c ...Just rejected incoming video offer on > call 0, use "vid call enable 1" or "vid call add" to enable video!* > > *15:48:19.319 pjsua_core.c ....TX 1321 bytes Response msg > 200/INVITE/cseq=20 (tdta0x10494b000) to UDP 91.121.209.194:5060 > <http://91.121.209.194:5060>:* > > Code Snippet is - > > #define KEEP_ALIVE_INTERVAL 600 > > > > - (void)keepAlive { > > > > static pj_thread_desc a_thread_desc; > > static pj_thread_t *a_thread; > > int i; > > > > if (!pj_thread_is_registered()) { > > pj_thread_register("ipjsua", a_thread_desc, &a_thread); > > } > > > > /* Since iOS requires that the minimum keep alive interval is 600s, > > * application needs to make sure that the account's registration > > * timeout is long enough. > > */ > > for (i = 0; i < (int)pjsua_acc_get_count(); ++i) { > > if (pjsua_acc_is_valid(i)) { > > pjsua_acc_set_registration(i, PJ_TRUE); > > } > > } > > } >
OB
Oren Barash
Mon, Jul 17, 2017 11:25 AM

Oh,

I believe you need to add a small delay before connected the video window

On 17 Jul 2017, at 10:01, Vedvyas Rauniyar vedvyas.rauniyar@vvdntech.in wrote:

Hi Oren,

I made a call from linphone mac application to iPhone device in foreground and video was showing at both end (Linphone and iPhone) but when I made the same call from linphone mac application to iPhone in background, I picked up the call and app was moved from background to foreground. Audio was working fine on both end but no video is displayed either iPhone side or Linphone mac app side.

I am getting the below error -

15:48:19.250    pjsua_vid.c  ......Creating video window: type=stream, cap_id=-1, rend_id=0

15:48:19.250    vid_port.c  .......Opening device OpenGL renderer [OpenGL] for render: format=I420, size=656x656 @22:1 fps

15:48:19.251 ios_opengl_dev  .......Failed to initialize iOS OpenGL because we are in background

15:48:19.251    vid_port.c  .......Closing OpenGL renderer..

15:48:19.319    pjsua_vid.c  .......Window 0: destroying..

15:48:19.319  pjsua_media.c  ....pjsua_vid_channel_update() failed for call_id 0 media 1: video subsystem not initialized (PJMEDIA_EVID_INIT)

15:48:19.319  pjsua_media.c  ....Error updating media call00:1: video subsystem not initialized (PJMEDIA_EVID_INIT)

15:48:19.319    pjsua_app.c  ...Call 0 media 0 [type=audio], status is Active

15:48:19.319    pjsua_aud.c  ...Conf connect: 3 --> 0

15:48:19.319    pjsua_app.c  ....Turning sound device ON

15:48:19.319  conference.c  ....Port 3 (sip:linchpin@192.168.1.7 https://www.spinics.net/lists/pjsip/_javascript_:_e(%7B%7D,'cvml','sip:linchpin@192.168.1.7');) transmitting to port 0 (Master/sound)

15:48:19.319    pjsua_aud.c  ...Conf connect: 0 --> 3

15:48:19.319  conference.c  ....Port 0 (Master/sound) transmitting to port 3 (sip:linchpin@192.168.1.7 https://www.spinics.net/lists/pjsip/_javascript_:_e(%7B%7D,'cvml','sip:linchpin@192.168.1.7');)

15:48:19.319    pjsua_app.c  ...Call 0 media 1 [type=video], status is Error

15:48:19.319    pjsua_app.c  ...Just rejected incoming video offer on call 0, use "vid call enable 1" or "vid call add" to enable video!

15:48:19.319  pjsua_core.c  ....TX 1321 bytes Response msg 200/INVITE/cseq=20 (tdta0x10494b000) to UDP 91.121.209.194:5060 http://91.121.209.194:5060/:

On Wed, Jul 12, 2017 at 4:15 PM, Vedvyas Rauniyar <vedvyas.rauniyar@vvdntech.in mailto:vedvyas.rauniyar@vvdntech.in> wrote:
Hello ,

I am working on PJSIP. Audio and video call is working fine in foreground but the issue is, When the app is in background, I am able to make call in background but no video is displaying. Any help would be highly appreciated.

When I make a call and pick the call from background, I am getting the errors -

15:48:19.250    pjsua_vid.c  ......Creating video window: type=stream, cap_id=-1, rend_id=0

15:48:19.250    vid_port.c  .......Opening device OpenGL renderer [OpenGL] for render: format=I420, size=656x656 @22:1 fps

15:48:19.251 ios_opengl_dev  .......Failed to initialize iOS OpenGL because we are in background

15:48:19.251    vid_port.c  .......Closing OpenGL renderer..

15:48:19.319    pjsua_vid.c  .......Window 0: destroying..

15:48:19.319  pjsua_media.c  ....pjsua_vid_channel_update() failed for call_id 0 media 1: video subsystem not initialized (PJMEDIA_EVID_INIT)

15:48:19.319  pjsua_media.c  ....Error updating media call00:1: video subsystem not initialized (PJMEDIA_EVID_INIT)

15:48:19.319    pjsua_app.c  ...Call 0 media 0 [type=audio], status is Active

15:48:19.319    pjsua_aud.c  ...Conf connect: 3 --> 0

15:48:19.319    pjsua_app.c  ....Turning sound device ON

15:48:19.319  conference.c  ....Port 3 (sip:linchpin@192.168.1.7 mailto:sip%3Alinchpin@192.168.1.7) transmitting to port 0 (Master/sound)

15:48:19.319    pjsua_aud.c  ...Conf connect: 0 --> 3

15:48:19.319  conference.c  ....Port 0 (Master/sound) transmitting to port 3 (sip:linchpin@192.168.1.7 mailto:sip%3Alinchpin@192.168.1.7)

15:48:19.319    pjsua_app.c  ...Call 0 media 1 [type=video], status is Error

15:48:19.319    pjsua_app.c  ...Just rejected incoming video offer on call 0, use "vid call enable 1" or "vid call add" to enable video!

15:48:19.319  pjsua_core.c  ....TX 1321 bytes Response msg 200/INVITE/cseq=20 (tdta0x10494b000) to UDP 91.121.209.194:5060 http://91.121.209.194:5060/:

Code Snippet is -

#define KEEP_ALIVE_INTERVAL 600

  • (void)keepAlive {

    static pj_thread_desc a_thread_desc;

    static pj_thread_t *a_thread;

    int i;

    if (!pj_thread_is_registered()) {

      pj_thread_register("ipjsua", a_thread_desc, &a_thread);
    

    }

    /* Since iOS requires that the minimum keep alive interval is 600s,

    • application needs to make sure that the account's registration

    • timeout is long enough.

    */

    for (i = 0; i < (int)pjsua_acc_get_count(); ++i) {

      if (pjsua_acc_is_valid(i)) {
    
          pjsua_acc_set_registration(i, PJ_TRUE);
    
      }
    

    }

}


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Oh, I believe you need to add a small delay before connected the video window > On 17 Jul 2017, at 10:01, Vedvyas Rauniyar <vedvyas.rauniyar@vvdntech.in> wrote: > > Hi Oren, > > I made a call from linphone mac application to iPhone device in foreground and video was showing at both end (Linphone and iPhone) but when I made the same call from linphone mac application to iPhone in background, I picked up the call and app was moved from background to foreground. Audio was working fine on both end but no video is displayed either iPhone side or Linphone mac app side. > > I am getting the below error - > >> 15:48:19.250 pjsua_vid.c ......Creating video window: type=stream, cap_id=-1, rend_id=0 >> >> 15:48:19.250 vid_port.c .......Opening device OpenGL renderer [OpenGL] for render: format=I420, size=656x656 @22:1 fps >> >> 15:48:19.251 ios_opengl_dev .......Failed to initialize iOS OpenGL because we are in background >> >> 15:48:19.251 vid_port.c .......Closing OpenGL renderer.. >> >> 15:48:19.319 pjsua_vid.c .......Window 0: destroying.. >> >> 15:48:19.319 pjsua_media.c ....pjsua_vid_channel_update() failed for call_id 0 media 1: video subsystem not initialized (PJMEDIA_EVID_INIT) >> >> 15:48:19.319 pjsua_media.c ....Error updating media call00:1: video subsystem not initialized (PJMEDIA_EVID_INIT) >> >> 15:48:19.319 pjsua_app.c ...Call 0 media 0 [type=audio], status is Active >> >> 15:48:19.319 pjsua_aud.c ...Conf connect: 3 --> 0 >> >> 15:48:19.319 pjsua_app.c ....Turning sound device ON >> >> 15:48:19.319 conference.c ....Port 3 (sip:linchpin@192.168.1.7 <https://www.spinics.net/lists/pjsip/_javascript_:_e(%7B%7D,'cvml','sip:linchpin@192.168.1.7');>) transmitting to port 0 (Master/sound) >> >> 15:48:19.319 pjsua_aud.c ...Conf connect: 0 --> 3 >> >> 15:48:19.319 conference.c ....Port 0 (Master/sound) transmitting to port 3 (sip:linchpin@192.168.1.7 <https://www.spinics.net/lists/pjsip/_javascript_:_e(%7B%7D,'cvml','sip:linchpin@192.168.1.7');>) >> >> 15:48:19.319 pjsua_app.c ...Call 0 media 1 [type=video], status is Error >> >> 15:48:19.319 pjsua_app.c ...Just rejected incoming video offer on call 0, use "vid call enable 1" or "vid call add" to enable video! >> >> 15:48:19.319 pjsua_core.c ....TX 1321 bytes Response msg 200/INVITE/cseq=20 (tdta0x10494b000) to UDP 91.121.209.194:5060 <http://91.121.209.194:5060/>: >> > > > On Wed, Jul 12, 2017 at 4:15 PM, Vedvyas Rauniyar <vedvyas.rauniyar@vvdntech.in <mailto:vedvyas.rauniyar@vvdntech.in>> wrote: > Hello , > > I am working on PJSIP. Audio and video call is working fine in foreground but the issue is, When the app is in background, I am able to make call in background but no video is displaying. Any help would be highly appreciated. > > When I make a call and pick the call from background, I am getting the errors - > > 15:48:19.250 pjsua_vid.c ......Creating video window: type=stream, cap_id=-1, rend_id=0 > > 15:48:19.250 vid_port.c .......Opening device OpenGL renderer [OpenGL] for render: format=I420, size=656x656 @22:1 fps > > 15:48:19.251 ios_opengl_dev .......Failed to initialize iOS OpenGL because we are in background > > 15:48:19.251 vid_port.c .......Closing OpenGL renderer.. > > 15:48:19.319 pjsua_vid.c .......Window 0: destroying.. > > 15:48:19.319 pjsua_media.c ....pjsua_vid_channel_update() failed for call_id 0 media 1: video subsystem not initialized (PJMEDIA_EVID_INIT) > > 15:48:19.319 pjsua_media.c ....Error updating media call00:1: video subsystem not initialized (PJMEDIA_EVID_INIT) > > 15:48:19.319 pjsua_app.c ...Call 0 media 0 [type=audio], status is Active > > 15:48:19.319 pjsua_aud.c ...Conf connect: 3 --> 0 > > 15:48:19.319 pjsua_app.c ....Turning sound device ON > > 15:48:19.319 conference.c ....Port 3 (sip:linchpin@192.168.1.7 <mailto:sip%3Alinchpin@192.168.1.7>) transmitting to port 0 (Master/sound) > > 15:48:19.319 pjsua_aud.c ...Conf connect: 0 --> 3 > > 15:48:19.319 conference.c ....Port 0 (Master/sound) transmitting to port 3 (sip:linchpin@192.168.1.7 <mailto:sip%3Alinchpin@192.168.1.7>) > > 15:48:19.319 pjsua_app.c ...Call 0 media 1 [type=video], status is Error > > 15:48:19.319 pjsua_app.c ...Just rejected incoming video offer on call 0, use "vid call enable 1" or "vid call add" to enable video! > > 15:48:19.319 pjsua_core.c ....TX 1321 bytes Response msg 200/INVITE/cseq=20 (tdta0x10494b000) to UDP 91.121.209.194:5060 <http://91.121.209.194:5060/>: > > > Code Snippet is - > > #define KEEP_ALIVE_INTERVAL 600 > > > - (void)keepAlive { > > > static pj_thread_desc a_thread_desc; > > static pj_thread_t *a_thread; > > int i; > > > if (!pj_thread_is_registered()) { > > pj_thread_register("ipjsua", a_thread_desc, &a_thread); > > } > > > /* Since iOS requires that the minimum keep alive interval is 600s, > > * application needs to make sure that the account's registration > > * timeout is long enough. > > */ > > for (i = 0; i < (int)pjsua_acc_get_count(); ++i) { > > if (pjsua_acc_is_valid(i)) { > > pjsua_acc_set_registration(i, PJ_TRUE); > > } > > } > > } > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org