]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix codec mismatch
authorIgor Goncharovskiy <igor.goncharovsky@gmail.com>
Mon, 10 Dec 2012 06:41:47 +0000 (06:41 +0000)
committerIgor Goncharovskiy <igor.goncharovsky@gmail.com>
Mon, 10 Dec 2012 06:41:47 +0000 (06:41 +0000)
Fix code to send in both rx and tx open stream messages correct codecs. Found that on phase 0/1 phones wrong codecs cause to no audio in some situations.

(issue ASTERISK-20183)
........

Merged revisions 377591 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@377592 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_unistim.c

index 177eba5558a2db21de7cf18cfa0c27e2020ec9a0..d506eed0a40a46fd1e03c5042c70e04a8a311afd 100644 (file)
@@ -2183,9 +2183,9 @@ static void start_rtp(struct unistim_subchannel *sub)
                        buffsend[16] = (htons(sin.sin_port) & 0x00ff);
                        buffsend[20] = (us.sin_port & 0xff00) >> 8;
                        buffsend[19] = (us.sin_port & 0x00ff);
-                       buffsend[11] = codec;
                }
-               buffsend[12] = codec;
+               buffsend[11] = codec; /* rx */
+               buffsend[12] = codec; /* tx */
                send_client(SIZE_HEADER + sizeof(packet_send_open_audio_stream_tx), buffsend,
                                   sub->parent->parent->session);
 
@@ -2213,9 +2213,9 @@ static void start_rtp(struct unistim_subchannel *sub)
                        buffsend[16] = (htons(sin.sin_port) & 0x00ff);
                        buffsend[20] = (us.sin_port & 0xff00) >> 8;
                        buffsend[19] = (us.sin_port & 0x00ff);
-                       buffsend[12] = codec;
                }
-               buffsend[11] = codec;
+               buffsend[11] = codec; /* rx */
+               buffsend[12] = codec; /* tx */
                send_client(SIZE_HEADER + sizeof(packet_send_open_audio_stream_rx), buffsend,
                                   sub->parent->parent->session);
        } else {