Airlink RV50 and Ignition - Error on Phonenumber

Hi,
I recently installed an Airlink RV50 and got it setup to send and recieve sms.

The connection is working. I get the module to send sms, the problem comes when I send sms back to the gateway.
The gateway cant recognize the phone number for some reason, I have tried all country codes for my country that I can imagine exists.

Example (Norway):

  1. 96914xxx
  2. 004796914xxx
  3. +4796914xxx
  4. 4796914xxx

In Airlink RV50 the phone number only shows as: 4796914xxx

They all work with sending out, but when I send an acknowledge back, Ignition cant recognize the phone number for some reason.

Below is the error log from ignition:
com.google.i18n.phonenumbers.NumberParseException: Missing or invalid default region.

at com.google.i18n.phonenumbers.PhoneNumberUtil.parseHelper(PhoneNumberUtil.java:2743)

at com.google.i18n.phonenumbers.PhoneNumberUtil.parse(PhoneNumberUtil.java:2638)

at com.google.i18n.phonenumbers.PhoneNumberUtil.parse(PhoneNumberUtil.java:2628)

at com.inductiveautomation.ignition.alarming.notification.sms.profile.SmsAckManager.asE164(SmsAckManager.java:230)

at com.inductiveautomation.ignition.alarming.notification.sms.profile.SmsAckManager.access$400(SmsAckManager.java:30)

at com.inductiveautomation.ignition.alarming.notification.sms.profile.SmsAckManager$1.apply(SmsAckManager.java:165)

at com.inductiveautomation.ignition.alarming.notification.sms.profile.SmsAckManager$1.apply(SmsAckManager.java:160)

at com.google.common.collect.Iterators.indexOf(Iterators.java:778)

at com.google.common.collect.Iterators.any(Iterators.java:684)

at com.google.common.collect.Iterables.any(Iterables.java:623)

at com.google.common.collect.Collections2$FilteredCollection.isEmpty(Collections2.java:186)

at com.inductiveautomation.ignition.alarming.notification.sms.profile.SmsAckManager.incomingNumberBelongsToUser(SmsAckManager.java:173)

at com.inductiveautomation.ignition.alarming.notification.sms.profile.SmsAckManager.acknowledgeAlarm(SmsAckManager.java:122)

at com.inductiveautomation.ignition.alarming.notification.sms.profile.SmsAckManager.smsReceived(SmsAckManager.java:95)

at com.inductiveautomation.ignition.alarming.notification.sms.profile.SmsNotificationProfile$SmsCallback.smsReceived(SmsNotificationProfile.java:406)

at com.inductiveautomation.ignition.alarming.notification.sms.airlink.AirlinkUdpConnection$InboundPacketReceiver.handleReceived(AirlinkUdpConnection.java:172)

at com.inductiveautomation.ignition.alarming.notification.sms.airlink.AirlinkUdpConnection$InboundPacketReceiver.run(AirlinkUdpConnection.java:157)

at java.lang.Thread.run(Thread.java:748)

Pictures from Airlink RV50:

Pictures from Ignition Log:

How can this be corrected?

This is the problem - the phone number library we’re using isn’t able to parse your number. The phone number should be in E164 format, so +4796914xxx should be correct, but it’s possible it’s getting manipulated before it comes back into Ignition. Try setting the alarm.Notification.Sms.SmsNotificationProfile logger to TRACE - on an incoming SMS, you should get a full printout of the incoming SMS which includes the phone number. If that phone number is in E164 format, then also check how the SMS number is defined inside Ignition, in the user’s contact settings - that also needs to be a valid E164 number.

I have now set it to trace, still same error. Maybe this pic can explain more? This is with only “47” before the 8digit phone number.

This is with +47 and 8digit phone number.

I see that the incoming is still only “47”.

My best guess is that’s the problem. Try changing the settings on the Airlink to see if you can get it to send through including the +; possibly by some combination of these two settings?

I’m not an expert on the Airlink, unfortunately. You may also want to get in contact with Support about this.

On talking with another dev, it looks like this may be a bug in the SMS module. Can you try running this code somewhere in the gateway scope (tag event script, etc?). The failure case might be that your Gateway’s locale is different from the incoming SMS’ country code.

from java.util import Locale
system.util.getLogger("Locale Debug").infof("Current system locale: %s", Locale.getDefault().getCountry())

Something like this?

Got this when I scripted a button:

Yes, but it needs to run on the gateway itself - the script console/buttons/windows/etc are all running on the local machine as a signed in user. You can add it to a tag as a tag event script, or put it in a shared script and runScript in an expression tag to run the script.

Hmm, Can you give me a quickguide to how?

I tried adding in the gateway script, binding it to a tag change, according to the tag event script video. But I can’'t find any results.

I get this from running locale in the linux box.

I still cant get information from the tag-event script, as its prob some error on the code im running.

Is this information for an yhelp troubleshooting the sms problem?

Create Timer script in Gateway event scripts and put @PGriffith code in it. Save the project.

Look at the Logs on gateway Status page…

Thanks alot!

This is what im getting now:

Ok, got my system engineer to set the Locale to Norwegian.

Somehow the system locale script is reporting back “US”, but the system is now working.

SMS acknowledging is working as it should.

1 Like

That’s great news. Based on that earlier discussion with another developer, I opened an internal ticket to fix this for anyone else in the future, but at least your setup is working for now.

1 Like