Multiple simultaneous calls

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

 



Hi guys,

I'm trying to use pjsip to test some rtp/audio issues. What I want to do is
make multiple outgoing calls and record the incoming audio. Preferably to
one file per call, but if all calls share one file that's OK.

I'm using the python module for this and are having problems with the
recordings. If I start several calls, it seems only the last one is
recorded.

I'm struggling to understand how the bridge work. For each call I get a
slot, and for each recording I get a slot, and then I connect the two. Isn't
this the right idea?

I would be eternally grateful for a push in the right direction.

Here's my code, simplified:

dst = "some_number"
for i in range(nr_of_calls):
  recorder.append(lib.create_recorder('file' + str(i) + '.wav'))
  calls.append(acc.make_call(dst, call_cb))

In the on_media_state in the callback:
global lib, recorder
if self.call.info().media_state == pj.MediaState.ACTIVE:
  call_slot = self.call.info().conf_slot
  rec_slot = lib.recorder_get_slot(recorder)
  lib.conf_connect(call_slot, rec_slot)

Best Regards,
Magnus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20091215/b5a0d208/attachment.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