yaai
yaai copied to clipboard
Special Characters in Extension cause JS Parse problems (How to support extensions that aren't purely numeric)
Problem occurs when phone extension takes the form of 123-ABC. To resolve, enclose AST_UserExtension in quotes in AsteriskJS.php.
AST_UserExtention = "' . $userExt . '";
Still looking for other issues, which may pop up, but this was an obvious one.
Never seen an extension that wasn't purely numerical. I suspect there will be other issues for sure as most of the regex's look for \d to extract extension.
How does one call an extension like that?
~blake
On Sep 11, 2012, at 2:30 PM, Joshua [email protected] wrote:
Problem occurs when phone extension takes the form of 123-ABC. To resolve, enclose AST_UserExtension in quotes in AsteriskJS.php.
echo ' AST_UserExtention = "' . $userExt . '";';
Still looking for other issues, which may pop up, but this was an obvious one.
— Reply to this email directly or view it on GitHub.
I modified the regexes to work with the non-purely numeric extensions and it actually seems to work OK. Still testing some of the flows, but thus far it does seem to be functioning as expected.
Extensions with the format COMPANY-XXX or XXX-DEPT are pretty common for people that run multi-tenant or segregated institutions. In the dialplan, you'd simply strip off the COMPANY- or -DEPT and produce the calls. It's transparent to the end user, save the fact that they'd provision their phones with the whole peer name as COMPANY-XXX.
Also, having a SIP username which is different from the dialplan extension is a quite common best practice for securing VoIP PBXs. SIP usernames, under default circumstances, could be brute forced giving an attacker information regarding which SIP usernames are available to attack. Alphanumerical username requieres considerably more time to brute force.
@laureano,@rx4change
That is good to know. I was not aware of that. I really appreciate you taking the time to chime in on this and other threads!
Can you guys send me an email to Blake.robertson at gmail so I can add you to a users list I'm compiling.
~blake
On Sep 12, 2012, at 3:04 PM, Tomás Laureano Peralta [email protected] wrote:
Also, having an SIP username which is different from the dialplan extension is a quite common best practice for securing VoIP PBXs. SIP usernames, under default circumstances, could be brute forced giving an attacker information regarding which SIP usernames are available to attack. Alphanumerical username requieres considerably more time to brute force.
— Reply to this email directly or view it on GitHub.
How's the testing of alphanumeric SIP id's going? It'd really appreciate it if you could add some notes to the user page about how to modify the regex's to support them. Anyone can edit the page.
@rx4change @Laureano I've updated the admin config to support better help descriptions.
What is the conclusion of supporting alphanumeric sip extensions. Can you post the various regex's you used? Were there any other changes needed?