[asterisk-bugs] [Asterisk 0013243]: [patch] Set(SIP_CODEC=xxxx) only applies to first inbound leg of call

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Apr 6 11:15:32 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13243 
====================================================================== 
Reported By:                samdell3
Assigned To:                file
====================================================================== 
Project:                    Asterisk
Issue ID:                   13243
Category:                   Channels/chan_sip/CodecHandling
Reproducibility:            always
Severity:                   tweak
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           Older 1.4 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2008-08-05 18:32 CDT
Last Modified:              2009-04-06 11:15 CDT
====================================================================== 
Summary:                    [patch] Set(SIP_CODEC=xxxx) only applies to first
inbound leg of call
Description: 
We have had a long standing requirement to be able to force the use of g711
codec based on dialled number, eg known modem destinations etc.
We still need to use g729 by default for voice calls.

The obvious choice is to Set(SIP_CODEC=alaw) prior to Dial()

However, SIP_CODEC only ever forced the inbound (first) leg of the call to
use alaw. If the outbound leg codec priority was 1st G729 2nd alaw, then
g729 was always used.

Attached is a very simple patch against 1.4.14 that solves our problem. It
works for both reinvited and non reinvited media.
Due to the patch only being 2 lines of additional code, it would be easy
to apply to later versions of Asterisk

It's now running in a production environment, but I would really like some
feedback from other users.

 
====================================================================== 

---------------------------------------------------------------------- 
 (0102787) svnbot (reporter) - 2009-04-06 11:15
 http://bugs.digium.com/view.php?id=13243#c102787 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 186624

U   trunk/CHANGES
U   trunk/channels/chan_sip.c
U   trunk/doc/tex/channelvariables.tex

------------------------------------------------------------------------
r186624 | file | 2009-04-06 11:15:31 -0500 (Mon, 06 Apr 2009) | 13 lines

Add support for changing the outbound codec on a SIP call using
a dialplan variable.

This adds a dialplan variable (SIP_CODEC_OUTBOUND) which controls
the codec offered for an outgoing SIP call. This is much like the
SIP_CODEC dialplan variable and has the same restrictions. The codec
set must be one that is configured for the call.

(closes issue http://bugs.digium.com/view.php?id=13243)
Reported by: samdell3
Patches:
      13243.diff uploaded by file (license 11)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=186624 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-04-06 11:15 svnbot         Checkin                                      
2009-04-06 11:15 svnbot         Note Added: 0102787                          
======================================================================




More information about the asterisk-bugs mailing list