05-23-2022 07:07 AM
Hi all,
I´m integrating the SMS in a guest portal in ISE 3.1 and my SMS provider doesn´t admit country code in the value sent by ISE.
In my case the variable sent by ISE is $mobilenumber$ and the value is +34 XXXXXXXXX but my provider only accept XXXXXXXXX.
My first option was to talk with provider without lucky so now I´m trying to modify this variable on-the-fly ,
if anyone has another idea or how to modify this variable, I would appreciate.
Thanks
David
Solved! Go to Solution.
05-30-2022 11:07 AM
The ISE SMS Gateway configuration has an option to configure the mobile number sent to the provider:
You will want to customize that JavaScript function to remove the "+34" from the mobile number sent to your SMS provider. You may try something like this:
function mobileNumber (mobileNumber) {
number = mobileNumber.trim();
if (number.startsWith("+34")) {
// remove +34 and remove all non-digit characters
number = number.substr(3, number.length).replace(/\D/g, '');
}
return number;
}
05-30-2022 11:07 AM
The ISE SMS Gateway configuration has an option to configure the mobile number sent to the provider:
You will want to customize that JavaScript function to remove the "+34" from the mobile number sent to your SMS provider. You may try something like this:
function mobileNumber (mobileNumber) {
number = mobileNumber.trim();
if (number.startsWith("+34")) {
// remove +34 and remove all non-digit characters
number = number.substr(3, number.length).replace(/\D/g, '');
}
return number;
}
05-30-2022 12:40 PM
Thanks Thomas,
that was I´m looking for.
I just shortened the javascript function to avoid complain of ISE, and that how I set it:
function mobileNumber(mobileNumber) {
mobile=mobileNumber.substring(3);
return mobile;
}
07-21-2023 10:32 AM
This seems to be a known issue and the work around mentioned above did not work in 3.1.0.518-Patch5. However, It is fixed in 3.1.0.518-Patch7.
https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwe70975
Symptom:
once we tried to configure
function mobileNumber(mobileNumber) {
return mobileNumber.replace("+1","");
}
to remove +1 we see into pcap that +1 it is still sendin it even if the javascript is executed
Conditions: in ISE 3.1 patch 5 Workaround: no available Further Problem Description: this seems to be a regression of defect CSCvz66577
https://www.cisco.com/c/en/us/td/docs/security/ise/3-1/release_notes/b_ise_31_RN.html
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide