add bind meta on A-D and refactor

This commit is contained in:
Anthony Minessale
2011-01-05 17:53:27 -06:00
parent 96ac90adce
commit 27869d7a26
11 changed files with 70 additions and 17 deletions
+26
View File
@@ -184,6 +184,32 @@ static inline switch_bool_t switch_is_digit_string(const char *s)
return SWITCH_TRUE;
}
static inline char switch_itodtmf(char i)
{
char r = i;
if (i > 9 && i < 14) {
r = i + 55;
}
return r;
}
static inline int switch_dtmftoi(char *s)
{
int r;
switch_assert(s);
if (!(r = atoi(s))) {
int l = tolower(*s);
if (l > 96 && l < 101) {
r = l - 87;
}
}
return r;
}
static inline uint32_t switch_known_bitrate(switch_payload_t payload)
{