live attendant feature issue

25 views
Skip to first unread message

Marco Colaneri

unread,
Nov 8, 2021, 10:40:16 AM11/8/21
to sipxcom-dev
Hi,

I found out an issue (bug) in the live attendant code.

In the file sipxecs/sipXivr/src/org/sipfoundry/attendant/LiveAttendantManagement.java,
the StringUtils.stripStart function is used to strip the feature prefix.

if (dialedNumber.startsWith(m_enablePrefix)) {
            dialedNumber = StringUtils.stripStart(dialedNumber, m_enablePrefix);
            enable = true;
        } else if (dialedNumber.startsWith(m_disablePrefix)) {
            dialedNumber = StringUtils.stripStart(dialedNumber, m_disablePrefix);
            enable = false;
        }

This function leads to wrong output when the prefix includes the first number of the Auto Attendant extension.
Consider the following example:
code prefix: *67
Auto Attendant extension: 6711
PIN 123

the "dialedNumber" is "*676711123" before applying stripStart function whose output is "11123" instead of the expected "6711123"...

I think that the stripStart function is not a good choice to strip the prefix, you could simply use the StingUtils substring function instead to fix the issue.

Can anyone fix it in the next releases? I'm not a developer and i don't know developer tools so I ask your help to fix it.

Thank you.

Marco.

Reply all
Reply to author
Forward
0 new messages