Sleep timers on Pjsua2.8 + swig + python

ME
Muhammad El-Sergani
Sat, Jun 15, 2019 8:13 AM

Hi all,

I'm writing an application where two apps will call each other, so no human
intervention is required.

I need to simulate a real life call-picking-up scenario. So instead of call
invite, trying, ringing, and then straight answer, I need to add timers, in
other words sleep a couple of seconds here and there.

So currently answering the call logic is placed in the onIncomingCall cb,
however, whenever I use python's time.sleep(x) method, the whole cb is
delayed.

If I add a sleep action between the sip180 and sip200 responses (bear in
mind I have code there to send sip100), the whole thing is delayed, and the
calling party keeps sending the re-invite messages.

Any thoughts would be greatly helpful.

Thanks
//M

Hi all, I'm writing an application where two apps will call each other, so no human intervention is required. I need to simulate a real life call-picking-up scenario. So instead of call invite, trying, ringing, and then straight answer, I need to add timers, in other words sleep a couple of seconds here and there. So currently answering the call logic is placed in the onIncomingCall cb, however, whenever I use python's time.sleep(x) method, the whole cb is delayed. If I add a sleep action between the sip180 and sip200 responses (bear in mind I have code there to send sip100), the whole thing is delayed, and the calling party keeps sending the re-invite messages. Any thoughts would be greatly helpful. Thanks //M
ME
Muhammad El-Sergani
Sun, Jun 16, 2019 6:17 PM

Any ideas?

Thanks
//M

On Sat, Jun 15, 2019, 12:13 PM Muhammad El-Sergani msergani@gmail.com
wrote:

Hi all,

I'm writing an application where two apps will call each other, so no
human intervention is required.

I need to simulate a real life call-picking-up scenario. So instead of
call invite, trying, ringing, and then straight answer, I need to add
timers, in other words sleep a couple of seconds here and there.

So currently answering the call logic is placed in the onIncomingCall cb,
however, whenever I use python's time.sleep(x) method, the whole cb is
delayed.

If I add a sleep action between the sip180 and sip200 responses (bear in
mind I have code there to send sip100), the whole thing is delayed, and the
calling party keeps sending the re-invite messages.

Any thoughts would be greatly helpful.

Thanks
//M

Any ideas? Thanks //M On Sat, Jun 15, 2019, 12:13 PM Muhammad El-Sergani <msergani@gmail.com> wrote: > Hi all, > > I'm writing an application where two apps will call each other, so no > human intervention is required. > > I need to simulate a real life call-picking-up scenario. So instead of > call invite, trying, ringing, and then straight answer, I need to add > timers, in other words sleep a couple of seconds here and there. > > So currently answering the call logic is placed in the onIncomingCall cb, > however, whenever I use python's time.sleep(x) method, the whole cb is > delayed. > > If I add a sleep action between the sip180 and sip200 responses (bear in > mind I have code there to send sip100), the whole thing is delayed, and the > calling party keeps sending the re-invite messages. > > Any thoughts would be greatly helpful. > > Thanks > //M >
BK
Büscsei Krisztián
Sun, Jun 16, 2019 9:36 PM

Hi Muhammad,

Would not be possibly to separate the 200 ok, from 180. So you send back
the 180 from the callback function. 200 will be sent back by a separate
function, in this case you have the full control to time it.

Krisz

Muhammad El-Sergani msergani@gmail.com ezt írta (időpont: 2019. jún. 16.,
V, 19:18):

Any ideas?

Thanks
//M

On Sat, Jun 15, 2019, 12:13 PM Muhammad El-Sergani msergani@gmail.com
wrote:

Hi all,

I'm writing an application where two apps will call each other, so no
human intervention is required.

I need to simulate a real life call-picking-up scenario. So instead of
call invite, trying, ringing, and then straight answer, I need to add
timers, in other words sleep a couple of seconds here and there.

So currently answering the call logic is placed in the onIncomingCall cb,
however, whenever I use python's time.sleep(x) method, the whole cb is
delayed.

If I add a sleep action between the sip180 and sip200 responses (bear in
mind I have code there to send sip100), the whole thing is delayed, and the
calling party keeps sending the re-invite messages.

Any thoughts would be greatly helpful.

Thanks
//M

Hi Muhammad, Would not be possibly to separate the 200 ok, from 180. So you send back the 180 from the callback function. 200 will be sent back by a separate function, in this case you have the full control to time it. Krisz Muhammad El-Sergani <msergani@gmail.com> ezt írta (időpont: 2019. jún. 16., V, 19:18): > Any ideas? > > Thanks > //M > > On Sat, Jun 15, 2019, 12:13 PM Muhammad El-Sergani <msergani@gmail.com> > wrote: > >> Hi all, >> >> I'm writing an application where two apps will call each other, so no >> human intervention is required. >> >> I need to simulate a real life call-picking-up scenario. So instead of >> call invite, trying, ringing, and then straight answer, I need to add >> timers, in other words sleep a couple of seconds here and there. >> >> So currently answering the call logic is placed in the onIncomingCall cb, >> however, whenever I use python's time.sleep(x) method, the whole cb is >> delayed. >> >> If I add a sleep action between the sip180 and sip200 responses (bear in >> mind I have code there to send sip100), the whole thing is delayed, and the >> calling party keeps sending the re-invite messages. >> >> Any thoughts would be greatly helpful. >> >> Thanks >> //M >> > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
ME
Muhammad El-Sergani
Mon, Jun 17, 2019 5:31 AM

Thanks krisz, I'll give it a shot sometime.

Thanks
//M

On Mon, Jun 17, 2019, 1:36 AM Büscsei Krisztián buscseik@gmail.com wrote:

Hi Muhammad,

Would not be possibly to separate the 200 ok, from 180. So you send back
the 180 from the callback function. 200 will be sent back by a separate
function, in this case you have the full control to time it.

Krisz

Muhammad El-Sergani msergani@gmail.com ezt írta (időpont: 2019. jún.
16., V, 19:18):

Any ideas?

Thanks
//M

On Sat, Jun 15, 2019, 12:13 PM Muhammad El-Sergani msergani@gmail.com
wrote:

Hi all,

I'm writing an application where two apps will call each other, so no
human intervention is required.

I need to simulate a real life call-picking-up scenario. So instead of
call invite, trying, ringing, and then straight answer, I need to add
timers, in other words sleep a couple of seconds here and there.

So currently answering the call logic is placed in the onIncomingCall
cb, however, whenever I use python's time.sleep(x) method, the whole cb is
delayed.

If I add a sleep action between the sip180 and sip200 responses (bear in
mind I have code there to send sip100), the whole thing is delayed, and the
calling party keeps sending the re-invite messages.

Any thoughts would be greatly helpful.

Thanks
//M

Thanks krisz, I'll give it a shot sometime. Thanks //M On Mon, Jun 17, 2019, 1:36 AM Büscsei Krisztián <buscseik@gmail.com> wrote: > Hi Muhammad, > > Would not be possibly to separate the 200 ok, from 180. So you send back > the 180 from the callback function. 200 will be sent back by a separate > function, in this case you have the full control to time it. > > Krisz > > Muhammad El-Sergani <msergani@gmail.com> ezt írta (időpont: 2019. jún. > 16., V, 19:18): > >> Any ideas? >> >> Thanks >> //M >> >> On Sat, Jun 15, 2019, 12:13 PM Muhammad El-Sergani <msergani@gmail.com> >> wrote: >> >>> Hi all, >>> >>> I'm writing an application where two apps will call each other, so no >>> human intervention is required. >>> >>> I need to simulate a real life call-picking-up scenario. So instead of >>> call invite, trying, ringing, and then straight answer, I need to add >>> timers, in other words sleep a couple of seconds here and there. >>> >>> So currently answering the call logic is placed in the onIncomingCall >>> cb, however, whenever I use python's time.sleep(x) method, the whole cb is >>> delayed. >>> >>> If I add a sleep action between the sip180 and sip200 responses (bear in >>> mind I have code there to send sip100), the whole thing is delayed, and the >>> calling party keeps sending the re-invite messages. >>> >>> Any thoughts would be greatly helpful. >>> >>> Thanks >>> //M >>> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip@lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >