mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
add bind meta on A-D and refactor
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user