[Asterisk-code-review] chan pjsip: fix switching sending codec when asymmetric rtp ... (asterisk[13])
Alexei Gradinari
asteriskteam at digium.com
Wed Nov 16 09:08:10 CST 2016
Alexei Gradinari has posted comments on this change. ( https://gerrit.asterisk.org/4453 )
Change subject: chan_pjsip: fix switching sending codec when asymmetric_rtp_codec=no
......................................................................
Patch Set 2:
(1 comment)
> (1 comment)
>
> I'm curious why this worked for others. Was it the reinvite from
> the other side that actually forced it?
I can't imagine it worked for others.
I did a simple test.
The call from Grandstream BT100 (not support asymmetric codecs) as endpoint 'test' to Cisco SPA508G (support asymmetric codecs) as endpoint 'test2'.
The SPA508G was configured with the ulaw codec, while BT100 with g729|ulaw codecs.
Both endpoints configured with asymmetric_rtp_codec=no.
With your patch there is one way audio on BT100.
With 'debug 1' I found the next log on every RTP packets from BT100.
======================
Oooh, got a frame with format of g729 on channel 'PJSIP/test-00000002' when we're sending 'ulaw', switching to match
channel.c: Channel PJSIP/test-00000002 setting write format path: ulaw -> ulaw
bridge.c: Bridge technology softmix does not have any capabilities we want.
bridge_native_rtp.c: Bridge '4dfb15ff-8e0a-46cd-82a2-d902c0725b0e' can not use native RTP bridge as channel 'PJSIP/test2-00000003'
bridge.c: Bridge technology native_rtp is not compatible with properties of existing bridge.
bridge.c: Bridge technology holding_bridge does not have any capabilities we want.
bridge.c: Chose bridge technology simple_bridge
bridge.c: Bridge 4dfb15ff-8e0a-46cd-82a2-d902c0725b0e is already using the new technology.
======================
There is't one way audio on the call from SPA508G to BT100.
With my patch
1st 'Oooh' on '183 Session Progress'
======================
chan_pjsip.c: Oooh, got a frame with format of g729 on channel 'PJSIP/user40-00000000' when we're sending 'ulaw', switching to match
channel.c: Channel PJSIP/user40-00000000 setting write format path: ulaw -> g729
channel.c: Channel PJSIP/user40-00000000 setting read format path: g729 -> g729
channel.c: Channel PJSIP/test540-00000001 changing write format from ulaw to g729, native formats (ulaw)
channel.c: Channel PJSIP/test540-00000001 setting write format path: g729 -> ulaw
======================
and 2nd 'Oooh' on answer '200 OK'
======================
chan_pjsip.c: Oooh, got a frame with format of g729 on channel 'PJSIP/test-00000000' when we're sending 'ulaw', switching to match
channel.c: Channel PJSIP/test-00000000 setting write format path: ulaw -> g729
channel.c: Channel PJSIP/test-00000000 setting read format path: g729 -> g729
bridge.c: Bridge technology softmix does not have any capabilities we want.
bridge_native_rtp.c: Bridge '3002da5d-ee05-4af6-a9cd-e0f3524eb854' can not use native RTP bridge as channel 'PJSIP/test2-00000001'
bridge.c: Bridge technology native_rtp is not compatible with properties of existing bridge.
bridge.c: Bridge technology holding_bridge does not have any capabilities we want.
channel.c: Channel PJSIP/test2-00000001 changing write format from ulaw to g729, native formats (ulaw)
bridge.c: Chose bridge technology simple_bridge
bridge.c: Bridge 3002da5d-ee05-4af6-a9cd-e0f3524eb854 is already using the new technology.
channel.c: Channel PJSIP/test2-00000001 setting write format path: g729 -> ulaw
======================
https://gerrit.asterisk.org/#/c/4453/2/channels/chan_pjsip.c
File channels/chan_pjsip.c:
Line 741: ast_channel_lock(ast);
> The channel is already locked.
> The channel is already locked.
OK.
I've added note about it.
--
To view, visit https://gerrit.asterisk.org/4453
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I5b7d098f8b254ce8f45546e6c36e5d324737f71d
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list