fix overlooked dtmf changed
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6992 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
0624a541d8
commit
079975d3c3
|
@ -55,7 +55,7 @@ struct soundtouch_helper {
|
|||
int literal;
|
||||
};
|
||||
|
||||
static switch_status_t on_dtmf(switch_core_session_t *session, const char *dtmf)
|
||||
static switch_status_t on_dtmf(switch_core_session_t *session, const switch_dtmf_t *dtmf)
|
||||
{
|
||||
|
||||
switch_media_bug_t *bug;
|
||||
|
@ -65,20 +65,13 @@ static switch_status_t on_dtmf(switch_core_session_t *session, const char *dtmf)
|
|||
struct soundtouch_helper *sth = (struct soundtouch_helper *) switch_core_media_bug_get_user_data(bug);
|
||||
|
||||
if (sth) {
|
||||
const char *p;
|
||||
|
||||
if (sth->literal) {
|
||||
sth->literal = 0;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
for (p = dtmf; p && *p; p++) {
|
||||
if (sth->literal) {
|
||||
sth->literal = 0;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
switch(*p) {
|
||||
switch(dtmf->digit) {
|
||||
case '*':
|
||||
sth->literal++;
|
||||
break;
|
||||
|
@ -146,7 +139,7 @@ static switch_status_t on_dtmf(switch_core_session_t *session, const char *dtmf)
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue