[asterisk-bugs] [JIRA] (ASTERISK-26874) SIP_CODEC Without Early Media Causes Odd Transcoding

LTCtech (JIRA) noreply at issues.asterisk.org
Tue Mar 14 18:57:10 CDT 2017


LTCtech created ASTERISK-26874:
----------------------------------

             Summary: SIP_CODEC Without Early Media Causes Odd Transcoding
                 Key: ASTERISK-26874
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26874
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Channels/chan_bridge, Channels/chan_sip/CodecHandling
    Affects Versions: 13.14.0
            Reporter: LTCtech
            Severity: Minor


Our office phones are configured to prefer G722 for intercom. Our ITSP completes calls using G711u. Without forcing a codec it will transcode from G722 to G711u when placing an outbound call, this is expected behavior.

To avoid transcoding we have added the following dialplan to the oubound context:
{noformat}
exten => s,n,Set(SIP_CODEC_INBOUND=ulaw)
exten => s,n,Set(SIP_CODEC_OUTBOUND=ulaw)
...
exten => s,n,Dial(...)
{noformat}
This works for most outbound calls. Resulting in the following output for "core show channel" on both legs:
{noformat}
NativeFormats: (ulaw)
WriteFormat: ulaw
ReadFormat: ulaw
WriteTranscode: No
ReadTranscode: No
{noformat}
On some outbound calls, specifically an auto answering join.me conference line (860) 970-0010 we get this output on both legs:
{noformat}
NativeFormats: (ulaw)
WriteFormat: slin16
ReadFormat: slin16
WriteTranscode: Yes (slin at 16000)->(slin at 8000)->(ulaw at 8000)
ReadTranscode: Yes (ulaw at 8000)->(slin at 8000)->(slin at 16000)
{noformat}
It's almost as if the bridge itself remained in slin16 mode, while both endpoints switched to G711u.

The call that doesn't transcode the ITSP indicated "183 Session Progress" and early media in SDP. While the call that does transcode the ITSP only indicated "200 OK" and the actual media for the call in SDP.

I was able to work around this issue by forcing early media to occur locally instead of on the remote side:
{noformat}
exten => s,n,Set(SIP_CODEC_INBOUND=ulaw)
exten => s,n,Set(SIP_CODEC_OUTBOUND=ulaw)
exten => s,n,Progress() ;force early media
...
exten => s,n,Dial(...)
{noformat}
This fixed the issue. Another quirk to note is that Progress() has to be put after the SIP_CODEC statements, putting them before the statements did not help. The media has to change after the statements.

Is this a bug or an inherent limitation?



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list