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

Rusty Newton (JIRA) noreply at issues.asterisk.org
Fri Mar 17 11:27:12 CDT 2017


     [ https://issues.asterisk.org/jira/browse/ASTERISK-26874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rusty Newton updated ASTERISK-26874:
------------------------------------

    Assignee: LTCtech  (was: Unassigned)
      Status: Waiting for Feedback  (was: Triage)

Hmm, I'm a little confused about your debug/trace.

Can you follow the instructions here: https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

To gather an Asterisk log with warning,error,notice,verbose,debug channels, with verbose and debug both turned up to 5. Make sure the "sip set debug on" output is captured simultaneously in the same log so we can see the timing of the SIP messages related to log messages.



> chan_sip: 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_sip/CodecHandling
>    Affects Versions: 13.14.0
>            Reporter: LTCtech
>            Assignee: LTCtech
>            Severity: Minor
>         Attachments: console-output.txt, sip-trace-em.txt, sip-trace-no-em.txt
>
>
> 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