Hi,
I’m seeing a strange behaviour with pjsip (v 2.5.4)
My application does the following:
Each time the app receives a call, it creates a custom AudioMedia class
which creates a bidirectional media port.
And calls:
myMedia->startTransmit(sink)
sink->startTransmit(myMedia)
On the put_frame(), the app records the audio.
On the get_frame(), the app sends some audio frames.
It works very well.
But when I try with 2 simultaneous calls, all seems to work fine except
that the 2nd caller ear the 1st one speaking (but only in this way. the 1st
one isn’t earring the 2nd one).
In fact, if the app answers to callers A, B and C (in this order), then B
and C are earring A, and C is earring B and C. (ie. each callers are
earring previous callers)
Also, what is said by the caller A doesn’t appear in the audio recording on
the call B. Which is fine.
From the logs, all seems fine:
port 1 (my_port #1) <—> port 2 (caller A)
port 3 (my_port #2) <—> port 4 (caller B)
But it looks like port 2 (Caller A) is also transmitting to port 4 (Caller
B).
Any ideas or explanations about what can cause this ?
Many thanks in advance,
Simon.
OK, I made a mistake when describing this issue.
Caller B is earring caller A and caller C is earring caller B (but not A).
Don't know if it will help someone to understand this.
Any help will be very appreciated.
Sorry to insist, but I'm really don't see what I'm doing wrong.
I have 4 conference ports attached to the bridge:
#1 (bidirectionnel AudioMedia instance A)
#2 (Call 0)
#3 (bidirectionnel AudioMedia instance B)
#4 (Call 1)
#0 is for the null audio device as I called pjsua_set_null_snd_dev()
ports #1 and #2 are connected together
ports #3 and #3 are connected together
I've checked that each ports have only 1 listener and 1 transmitter.
But caller 1 (port #4) is earring caller 0 (port #2) even if there is no
connection established between port #4 and port #2.
AFAIK logs seems OK:
Call 0:
18:37:50.927 pjsua_call.c .....Call 0: received updated media offer
18:37:50.927 pjsua_media.c ......Call 0: re-initializing media..
18:37:50.927 pjsua_media.c .......Media index 0 selected for audio call 0
18:37:50.927 pjsua_media.c ......Call 0: updating media..
18:37:50.927 pjsua_media.c ........Media stream call00:0 is destroyed
18:37:50.927 pjsua_aud.c .......Audio channel update..
18:37:50.927 strm0x10480c42 ........VAD temporarily disabled
18:37:50.927 strm0x10480c42 ........Encoder stream started
18:37:50.927 strm0x10480c42 ........Decoder stream started
18:37:50.927 pjsua_media.c .......Audio updated, stream #0: GSM (sendrecv)
18:37:50.928 pjsua_aud.c ......Conf disconnect: 2 -x- 1
18:37:50.928 pjsua_aud.c ......Conf disconnect: 1 -x- 2
18:37:50.928 pjsua_aud.c ......Conf connect: 1 --> 2
18:37:50.928 conference.c .......Port 1 (memspeech-0) transmitting to
port 2 (sip:nicolas@10.2.240.109)
18:37:50.928 pjsua_aud.c ......Conf connect: 2 --> 1
18:37:50.928 conference.c .......Port 2 (sip:nicolas@10.2.240.109)
transmitting to port 1 (memspeech-0)
18:37:50.930 pjsua_core.c ........TX 830 bytes Response msg
200/INVITE/cseq=104 (tdta0x104809a00) to UDP 10.2.240.109:5060:
SIP/2.0 200 OK
Call 1:
18:37:59.613 pjsua_call.c .....Call 1: received updated media offer
18:37:59.613 pjsua_media.c ......Call 1: re-initializing media..
18:37:59.613 pjsua_media.c .......Media index 0 selected for audio call 1
18:37:59.614 pjsua_media.c ......Call 1: updating media..
18:37:59.614 pjsua_media.c .......Call 1: stream #0 (audio) unchanged.
18:37:59.614 pjsua_media.c .......Audio updated, stream #0: PCMU
(sendrecv)
18:37:59.614 pjsua_aud.c ......Conf disconnect: 4 -x- 3
18:37:59.614 conference.c .......Port 4 (sip:christophe@10.2.240.109)
stop transmitting to port 3 (memspeech-1)
18:37:59.614 pjsua_aud.c ......Conf disconnect: 3 -x- 4
18:37:59.614 conference.c .......Port 3 (memspeech-1) stop transmitting
to port 4 (sip:christophe@10.2.240.109)
18:37:59.614 pjsua_aud.c ......Conf connect: 3 --> 4
18:37:59.614 conference.c .......Port 3 (memspeech-1) transmitting to
port 4 (sip:christophe@10.2.240.109)
18:37:59.614 pjsua_aud.c ......Conf connect: 4 --> 3
18:37:59.614 conference.c .......Port 4 (sip:christophe@10.2.240.109)
transmitting to port 3 (memspeech-1)
18:37:59.614 pjsua_core.c ........TX 827 bytes Response msg
200/INVITE/cseq=104 (tdta0x10483de00) to UDP 10.2.240.109:5060:
SIP/2.0 200 OK
Any help will be very much appreciated.
Simon.
2016-03-18 17:56 GMT+01:00 Simon Aurilac simon.aurilac@gmail.com:
OK, I made a mistake when describing this issue.
Caller B is earring caller A and caller C is earring caller B (but not A).
Don't know if it will help someone to understand this.
Any help will be very appreciated.
Hi Simon,
I doubt it's a problem in the bridge, more likely it's an issue with the
AudioMedia object. Try bypassing the sample processing in the AudioMedia
object and see if the leak stops. I can imagine various ways the audio
can leak through the AudioMedia object, if for example, the two
instances are using the same buffer.
Regards,
Bill
On 3/23/2016 1:49 PM, Simon Aurilac wrote:
Sorry to insist, but I'm really don't see what I'm doing wrong.
I have 4 conference ports attached to the bridge:
#1 (bidirectionnel AudioMedia instance A)
#2 (Call 0)
#3 (bidirectionnel AudioMedia instance B)
#4 (Call 1)
#0 is for the null audio device as I called pjsua_set_null_snd_dev()
ports #1 and #2 are connected together
ports #3 and #3 are connected together
I've checked that each ports have only 1 listener and 1 transmitter.
But caller 1 (port #4) is earring caller 0 (port #2) even if there is
no connection established between port #4 and port #2.
AFAIK logs seems OK:
Call 0:
18:37:50.927 pjsua_call.c .....Call 0: received updated media offer
18:37:50.927 pjsua_media.c ......Call 0: re-initializing media..
18:37:50.927 pjsua_media.c .......Media index 0 selected for audio
call 0
18:37:50.927 pjsua_media.c ......Call 0: updating media..
18:37:50.927 pjsua_media.c ........Media stream call00:0 is destroyed
18:37:50.927 pjsua_aud.c .......Audio channel update..
18:37:50.927 strm0x10480c42 ........VAD temporarily disabled
18:37:50.927 strm0x10480c42 ........Encoder stream started
18:37:50.927 strm0x10480c42 ........Decoder stream started
18:37:50.927 pjsua_media.c .......Audio updated, stream #0: GSM
(sendrecv)
18:37:50.928 pjsua_aud.c ......Conf disconnect: 2 -x- 1
18:37:50.928 pjsua_aud.c ......Conf disconnect: 1 -x- 2
18:37:50.928 pjsua_aud.c ......Conf connect: 1 --> 2
18:37:50.928 conference.c .......Port 1 (memspeech-0) transmitting
to port 2 (sip:nicolas@10.2.240.109 mailto:sip%3Anicolas@10.2.240.109)
18:37:50.928 pjsua_aud.c ......Conf connect: 2 --> 1
18:37:50.928 conference.c .......Port 2 (sip:nicolas@10.2.240.109
mailto:sip%3Anicolas@10.2.240.109) transmitting to port 1 (memspeech-0)
18:37:50.930 pjsua_core.c ........TX 830 bytes Response msg
200/INVITE/cseq=104 (tdta0x104809a00) to UDP 10.2.240.109:5060
http://10.2.240.109:5060:
SIP/2.0 200 OK
Call 1:
18:37:59.613 pjsua_call.c .....Call 1: received updated media offer
18:37:59.613 pjsua_media.c ......Call 1: re-initializing media..
18:37:59.613 pjsua_media.c .......Media index 0 selected for audio
call 1
18:37:59.614 pjsua_media.c ......Call 1: updating media..
18:37:59.614 pjsua_media.c .......Call 1: stream #0 (audio) unchanged.
18:37:59.614 pjsua_media.c .......Audio updated, stream #0: PCMU
(sendrecv)
18:37:59.614 pjsua_aud.c ......Conf disconnect: 4 -x- 3
18:37:59.614 conference.c .......Port 4
(sip:christophe@10.2.240.109 mailto:sip%3Achristophe@10.2.240.109)
stop transmitting to port 3 (memspeech-1)
18:37:59.614 pjsua_aud.c ......Conf disconnect: 3 -x- 4
18:37:59.614 conference.c .......Port 3 (memspeech-1) stop
transmitting to port 4 (sip:christophe@10.2.240.109
mailto:sip%3Achristophe@10.2.240.109)
18:37:59.614 pjsua_aud.c ......Conf connect: 3 --> 4
18:37:59.614 conference.c .......Port 3 (memspeech-1) transmitting
to port 4 (sip:christophe@10.2.240.109
mailto:sip%3Achristophe@10.2.240.109)
18:37:59.614 pjsua_aud.c ......Conf connect: 4 --> 3
18:37:59.614 conference.c .......Port 4
(sip:christophe@10.2.240.109 mailto:sip%3Achristophe@10.2.240.109)
transmitting to port 3 (memspeech-1)
18:37:59.614 pjsua_core.c ........TX 827 bytes Response msg
200/INVITE/cseq=104 (tdta0x10483de00) to UDP 10.2.240.109:5060
http://10.2.240.109:5060:
SIP/2.0 200 OK
Any help will be very much appreciated.
Simon.
2016-03-18 17:56 GMT+01:00 Simon Aurilac <simon.aurilac@gmail.com
mailto:simon.aurilac@gmail.com>:
OK, I made a mistake when describing this issue.
Caller B is earring caller A and caller C is earring caller B
(but not A).
Don't know if it will help someone to understand this.
Any help will be very appreciated.
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, thanks for the answer. I finally find the problem.
on the AudioMedia get_frame() method, I was setting the frame type to
PJMEDIA_FRAME_TYPE_AUDIO even if there was no available frame.
Setting the frame type to PJMEDIA_FRAME_TYPE_NONE when no frame are
available fix my issue.
2016-03-23 19:26 GMT+01:00 Bill Gardner billg@wavearts.com:
Hi Simon,
I doubt it's a problem in the bridge, more likely it's an issue with the
AudioMedia object. Try bypassing the sample processing in the AudioMedia
object and see if the leak stops. I can imagine various ways the audio can
leak through the AudioMedia object, if for example, the two instances are
using the same buffer.
Regards,
Bill
On 3/23/2016 1:49 PM, Simon Aurilac wrote:
Sorry to insist, but I'm really don't see what I'm doing wrong.
I have 4 conference ports attached to the bridge:
#1 (bidirectionnel AudioMedia instance A)
#2 (Call 0)
#3 (bidirectionnel AudioMedia instance B)
#4 (Call 1)
#0 is for the null audio device as I called pjsua_set_null_snd_dev()
ports #1 and #2 are connected together
ports #3 and #3 are connected together
I've checked that each ports have only 1 listener and 1 transmitter.
But caller 1 (port #4) is earring caller 0 (port #2) even if there is no
connection established between port #4 and port #2.
AFAIK logs seems OK:
Call 0:
18:37:50.927 pjsua_call.c .....Call 0: received updated media offer
18:37:50.927 pjsua_media.c ......Call 0: re-initializing media..
18:37:50.927 pjsua_media.c .......Media index 0 selected for audio call 0
18:37:50.927 pjsua_media.c ......Call 0: updating media..
18:37:50.927 pjsua_media.c ........Media stream call00:0 is destroyed
18:37:50.927 pjsua_aud.c .......Audio channel update..
18:37:50.927 strm0x10480c42 ........VAD temporarily disabled
18:37:50.927 strm0x10480c42 ........Encoder stream started
18:37:50.927 strm0x10480c42 ........Decoder stream started
18:37:50.927 pjsua_media.c .......Audio updated, stream #0: GSM
(sendrecv)
18:37:50.928 pjsua_aud.c ......Conf disconnect: 2 -x- 1
18:37:50.928 pjsua_aud.c ......Conf disconnect: 1 -x- 2
18:37:50.928 pjsua_aud.c ......Conf connect: 1 --> 2
18:37:50.928 conference.c .......Port 1 (memspeech-0) transmitting to
port 2 (sip:nicolas@10.2.240.109)
18:37:50.928 pjsua_aud.c ......Conf connect: 2 --> 1
18:37:50.928 conference.c .......Port 2 ( sip%3Anicolas@10.2.240.109
sip:nicolas@10.2.240.109) transmitting to port 1 (memspeech-0)
18:37:50.930 pjsua_core.c ........TX 830 bytes Response msg
200/INVITE/cseq=104 (tdta0x104809a00) to UDP 10.2.240.109:5060:
SIP/2.0 200 OK
Call 1:
18:37:59.613 pjsua_call.c .....Call 1: received updated media offer
18:37:59.613 pjsua_media.c ......Call 1: re-initializing media..
18:37:59.613 pjsua_media.c .......Media index 0 selected for audio call 1
18:37:59.614 pjsua_media.c ......Call 1: updating media..
18:37:59.614 pjsua_media.c .......Call 1: stream #0 (audio) unchanged.
18:37:59.614 pjsua_media.c .......Audio updated, stream #0: PCMU
(sendrecv)
18:37:59.614 pjsua_aud.c ......Conf disconnect: 4 -x- 3
18:37:59.614 conference.c .......Port 4 (
sip%3Achristophe@10.2.240.109sip:christophe@10.2.240.109) stop
transmitting to port 3 (memspeech-1)
18:37:59.614 pjsua_aud.c ......Conf disconnect: 3 -x- 4
18:37:59.614 conference.c .......Port 3 (memspeech-1) stop transmitting
to port 4 (sip:christophe@10.2.240.109)
18:37:59.614 pjsua_aud.c ......Conf connect: 3 --> 4
18:37:59.614 conference.c .......Port 3 (memspeech-1) transmitting to
port 4 (sip:christophe@10.2.240.109)
18:37:59.614 pjsua_aud.c ......Conf connect: 4 --> 3
18:37:59.614 conference.c .......Port 4 (
sip%3Achristophe@10.2.240.109sip:christophe@10.2.240.109) transmitting
to port 3 (memspeech-1)
18:37:59.614 pjsua_core.c ........TX 827 bytes Response msg
200/INVITE/cseq=104 (tdta0x10483de00) to UDP 10.2.240.109:5060:
SIP/2.0 200 OK
Any help will be very much appreciated.
Simon.
2016-03-18 17:56 GMT+01:00 Simon Aurilac simon.aurilac@gmail.com:
OK, I made a mistake when describing this issue.
Caller B is earring caller A and caller C is earring caller B (but not
A).
Don't know if it will help someone to understand this.
Any help will be very appreciated.
Visit our blog: http://blog.pjsip.org
pjsip mailing listpjsip@lists.pjsip.orghttp://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