[asterisk-bugs] [JIRA] (ASTERISK-21130) sip_pvt.dsp incorrect manipulation related to inband dtmfmode and faxdetect in SIPDtmfMode() app. and enable_dsp_detect()
Roman S. (JIRA)
noreply at issues.asterisk.org
Mon Feb 18 06:42:58 CST 2013
[ https://issues.asterisk.org/jira/browse/ASTERISK-21130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roman S. updated ASTERISK-21130:
--------------------------------
Description:
1. If {{sip_pvt.dsp}} is already inited (e.g. with {{faxdetect=yes}}) then it can't be changed with {{SIPDtmfMode()}} app.
{noformat}
30013 static int sip_dtmfmode(struct ast_channel *chan, const char *data)
30055 if ((ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) ||
30056 (ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_AUTO)) {
30057 enable_dsp_detect(p);
4598 static void enable_dsp_detect(struct sip_pvt *p)
4602 if (p->dsp) {
4603 return;
{noformat}
Example:
{noformat}
sip.conf:
faxdetect = yes ; this enables dsp with DSP_FEATURE_FAX_DETECT flag
dtmfmode = rfc2833 ; no DSP_FEATURE_DIGIT_DETECT flag for dsp
extensions.conf:
...,SIPDtmfMode(inband)
{noformat}
{{SIPDtmfMode()}} doesn't set {{DSP_FEATURE_DIGIT_DETECT}} flag for dsp in {{enable_dsp_detect()}}.
2. If {{SIPDtmfMode()}} app. disables inband mode (e.g. switch to rfc2833) it also disables faxdetect (indeed any dsp feature).
{noformat}
30013 static int sip_dtmfmode(struct ast_channel *chan, const char *data)
30055 if ((ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) ||
30056 (ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_AUTO)) {
30057 enable_dsp_detect(p);
30058 } else {
30059 disable_dsp_detect(p);
30060 }
{noformat}
This check (line 30055) should also contain {{SIP_PAGE2_FAX_DETECT_CNG}} in condition and keep dsp also for faxdetect.
Example:
{noformat}
sip.conf:
faxdetect = yes ; this enables dsp with DSP_FEATURE_FAX_DETECT flag
dtmfmode = inband ; dsp with DSP_FEATURE_DIGIT_DETECT flag
extensions.conf:
...,SIPDtmfMode(rfc2833)
{noformat}
{{SIPDtmfMode()}} disables any dsp feature including faxdetect (which indeed should be kept).
Thanks
was:
1. If {{sip_pvt.dsp}} is already inited (e.g. with {{faxdetect=yes}}) then it can't be changed with SIPDtmfMode() app.
{{noformat}}
30013 static int sip_dtmfmode(struct ast_channel *chan, const char *data)
30055 if ((ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) ||
30056 (ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_AUTO)) {
30057 enable_dsp_detect(p);
4598 static void enable_dsp_detect(struct sip_pvt *p)
4602 if (p->dsp) {
4603 return;
{{noformat}}
Example:
{{noformat}}
sip.conf:
faxdetect = yes ; this enables dsp with DSP_FEATURE_FAX_DETECT flag
dtmfmode = rfc2833 ; no DSP_FEATURE_DIGIT_DETECT flag for dsp
extensions.conf:
...,SIPDtmfMode(inband)
{{noformat}}
SIPDtmfMode() doesn't set DSP_FEATURE_DIGIT_DETECT flag for dsp in {{enable_dsp_detect()}}.
2. If SIPDtmfMode() app. disables inband mode (e.g. switch to rfc2833) it also disables faxdetect (indeed any dsp features).
{{noformat}}
30013 static int sip_dtmfmode(struct ast_channel *chan, const char *data)
30055 if ((ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) ||
30056 (ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_AUTO)) {
30057 enable_dsp_detect(p);
30058 } else {
30059 disable_dsp_detect(p);
30060 }
This check (line 30055) should also contain {{SIP_PAGE2_FAX_DETECT_CNG}} in condition and keep dsp also for faxdetect.
Example:
{{noformat}}
sip.conf:
faxdetect = yes ; this enables dsp with DSP_FEATURE_FAX_DETECT flag
dtmfmode = inband ; dsp with DSP_FEATURE_DIGIT_DETECT flag
extensions.conf:
...,SIPDtmfMode(rfc2833)
{{noformat}}
SIPDtmfMode() disables any dsp features including faxdetect (which indeed should be kept).
Thanks
> sip_pvt.dsp incorrect manipulation related to inband dtmfmode and faxdetect in SIPDtmfMode() app. and enable_dsp_detect()
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: ASTERISK-21130
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-21130
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_sip/General
> Affects Versions: 1.8.20.0
> Reporter: Roman S.
> Severity: Minor
>
> 1. If {{sip_pvt.dsp}} is already inited (e.g. with {{faxdetect=yes}}) then it can't be changed with {{SIPDtmfMode()}} app.
> {noformat}
> 30013 static int sip_dtmfmode(struct ast_channel *chan, const char *data)
> 30055 if ((ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) ||
> 30056 (ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_AUTO)) {
> 30057 enable_dsp_detect(p);
> 4598 static void enable_dsp_detect(struct sip_pvt *p)
> 4602 if (p->dsp) {
> 4603 return;
> {noformat}
> Example:
> {noformat}
> sip.conf:
> faxdetect = yes ; this enables dsp with DSP_FEATURE_FAX_DETECT flag
> dtmfmode = rfc2833 ; no DSP_FEATURE_DIGIT_DETECT flag for dsp
> extensions.conf:
> ...,SIPDtmfMode(inband)
> {noformat}
> {{SIPDtmfMode()}} doesn't set {{DSP_FEATURE_DIGIT_DETECT}} flag for dsp in {{enable_dsp_detect()}}.
> 2. If {{SIPDtmfMode()}} app. disables inband mode (e.g. switch to rfc2833) it also disables faxdetect (indeed any dsp feature).
> {noformat}
> 30013 static int sip_dtmfmode(struct ast_channel *chan, const char *data)
> 30055 if ((ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) ||
> 30056 (ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_AUTO)) {
> 30057 enable_dsp_detect(p);
> 30058 } else {
> 30059 disable_dsp_detect(p);
> 30060 }
> {noformat}
> This check (line 30055) should also contain {{SIP_PAGE2_FAX_DETECT_CNG}} in condition and keep dsp also for faxdetect.
> Example:
> {noformat}
> sip.conf:
> faxdetect = yes ; this enables dsp with DSP_FEATURE_FAX_DETECT flag
> dtmfmode = inband ; dsp with DSP_FEATURE_DIGIT_DETECT flag
> extensions.conf:
> ...,SIPDtmfMode(rfc2833)
> {noformat}
> {{SIPDtmfMode()}} disables any dsp feature including faxdetect (which indeed should be kept).
> Thanks
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list