Fix SIP INFO DTMF handling for non-numeric codes
authorMatthew Jordan <mjordan@digium.com>
Thu, 9 Feb 2012 16:37:01 +0000 (16:37 +0000)
committerMatthew Jordan <mjordan@digium.com>
Thu, 9 Feb 2012 16:37:01 +0000 (16:37 +0000)
commitba08e9f4d681fa30caba6addaff51cbb3b59fc84
treeb15a5d7848e2e11d84e32b2bc6af79f63472b34f
parent16fbc7e9028a3cbc3e2756178920a175637e589d
Fix SIP INFO DTMF handling for non-numeric codes

In ASTERISK-18924, SIP INFO DTMF handlingw as changed to account for both
lowercase alphatbetic DTMF events, as well as uppercase alphabetic DTMF
events.  When this occurred, the comparison of the character buffer containing
the event code was changed such that the buffer was first compared again '0'
and '9' to determine if it was numeric.  Unfortunately, since the first
character in the buffer will typically be '1' in the case of non-numeric
event codes (10-16), this caused those codes to be converted to a DTMF event
of '1'.  This patch fixes that, and cleans up handling of both
application/dtmf-relay and application/dtmf content types.

Review: https://reviewboard.asterisk.org/r/1722/

(closes issue ASTERISK-19290)
Reported by: Ira Emus
Tested by: mjordan
........

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

Merged revisions 354543 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c