cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

This community is for technical, feature, configuration and deployment questions.
For production deployment issues, please contact the TAC! We will not comment or assist with your TAC case in these forums.
Please see How to Ask the Community for Help for other best practices.

526
Views
5
Helpful
2
Replies
DavidAceti
Beginner

ISE 3.1 remove country code for SMS provider

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 

1 ACCEPTED SOLUTION

Accepted Solutions
thomas
Cisco Employee

The ISE SMS Gateway configuration has an option to configure the mobile number sent to the provider:

Screen Shot 2022-05-30 at 8.28.52 AM.png

 

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;
}

View solution in original post

2 REPLIES 2
thomas
Cisco Employee

The ISE SMS Gateway configuration has an option to configure the mobile number sent to the provider:

Screen Shot 2022-05-30 at 8.28.52 AM.png

 

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;
}

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;

}

 

Create
Recognize Your Peers
Content for Community-Ad

ISE Webinars


Miss a previous ISE webinar?
Never miss one again!

CiscoISE on YouTube