# Airlink RV50 and Ignition - Error on Phonenumber

**URL:** <https://forum.inductiveautomation.com/t/airlink-rv50-and-ignition-error-on-phonenumber/20740>\
**Category:** Ignition\
**Created:** [November 10, 2018, 3:20pm UTC](https://forum.inductiveautomation.com/t/airlink-rv50-and-ignition-error-on-phonenumber/20740 "2018-11-10T15:20:05Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![lasse](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lasse/32/11108_2.png) [@lasse](https://forum.inductiveautomation.com/u/lasse)\
**Post date:** [November 10, 2018, 3:20pm UTC](https://forum.inductiveautomation.com/t/airlink-rv50-and-ignition-error-on-phonenumber/20740/1 "2018-11-10T15:20:05Z")

</div>

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:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/f39949bff8c0f0611d9d502fe804fb5be8687df8.png)

Pictures from Ignition Log:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/40000d1b367761f5f36d14b7bfc48552f81bd102.png)

How can this be corrected?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 12, 2018, 3:12pm UTC](https://forum.inductiveautomation.com/t/airlink-rv50-and-ignition-error-on-phonenumber/20740/2 "2018-11-12T15:12:55Z")

</div>

> [@lasse](#):
>
> `com.google.i18n.phonenumbers.NumberParseException: Missing or invalid default region.`

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](https://www.twilio.com/docs/glossary/what-e164), 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.

---

<div class="post-metadata">

**Author:** ![lasse](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lasse/32/11108_2.png) [@lasse](https://forum.inductiveautomation.com/u/lasse)\
**Post date:** [November 12, 2018, 3:35pm UTC](https://forum.inductiveautomation.com/t/airlink-rv50-and-ignition-error-on-phonenumber/20740/3 "2018-11-12T15:35:30Z")

</div>

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.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/97c6ee31767adf6f5643138e33664335f2b34e9d.png)

---

<div class="post-metadata">

**Author:** ![lasse](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lasse/32/11108_2.png) [@lasse](https://forum.inductiveautomation.com/u/lasse)\
**Post date:** [November 12, 2018, 3:39pm UTC](https://forum.inductiveautomation.com/t/airlink-rv50-and-ignition-error-on-phonenumber/20740/4 "2018-11-12T15:39:42Z")

</div>

This is with +47 and 8digit phone number.

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

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/ee5bfc4f5de6ecbed14f7e3743557789c0142032.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 12, 2018, 3:54pm UTC](https://forum.inductiveautomation.com/t/airlink-rv50-and-ignition-error-on-phonenumber/20740/5 "2018-11-12T15:54:27Z")

</div>

> [@lasse](#):
>
> 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?  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/fa98a88ff9c70c622f79583387c37f1aae709899.png)  
I'm not an expert on the Airlink, unfortunately. You may also want to get in contact with Support about this.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 12, 2018, 4:41pm UTC](https://forum.inductiveautomation.com/t/airlink-rv50-and-ignition-error-on-phonenumber/20740/6 "2018-11-12T16:41:12Z")

</div>

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.

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

```

---

<div class="post-metadata">

**Author:** ![lasse](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lasse/32/11108_2.png) [@lasse](https://forum.inductiveautomation.com/u/lasse)\
**Post date:** [November 12, 2018, 4:46pm UTC](https://forum.inductiveautomation.com/t/airlink-rv50-and-ignition-error-on-phonenumber/20740/7 "2018-11-12T16:46:31Z")

</div>

Something like this?

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/3aaa38acb6e7b045e56b96cbc2fca6a1713f9bb1.png)

---

<div class="post-metadata">

**Author:** ![lasse](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lasse/32/11108_2.png) [@lasse](https://forum.inductiveautomation.com/u/lasse)\
**Post date:** [November 12, 2018, 4:50pm UTC](https://forum.inductiveautomation.com/t/airlink-rv50-and-ignition-error-on-phonenumber/20740/8 "2018-11-12T16:50:46Z")

</div>

> [@paul-griffith](#):
>
> from java.util import Locale  
> system.util.getLogger("Locale Debug").infof("Current system locale: %s", Locale.getDefault().getCountry())

Got this when I scripted a button:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/7addb656304a31afbd757ab9b12325268c9e72fe.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 12, 2018, 5:24pm UTC](https://forum.inductiveautomation.com/t/airlink-rv50-and-ignition-error-on-phonenumber/20740/9 "2018-11-12T17:24:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lasse](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lasse/32/11108_2.png) [@lasse](https://forum.inductiveautomation.com/u/lasse)\
**Post date:** [November 12, 2018, 10:53pm UTC](https://forum.inductiveautomation.com/t/airlink-rv50-and-ignition-error-on-phonenumber/20740/10 "2018-11-12T22:53:58Z")

</div>

> [@paul-griffith](#):
>
> from java.util import Locale  
> system.util.getLogger("Locale Debug").infof("Current system locale: %s", Locale.getDefault().getCountry())

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.

---

<div class="post-metadata">

**Author:** ![lasse](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lasse/32/11108_2.png) [@lasse](https://forum.inductiveautomation.com/u/lasse)\
**Post date:** [November 15, 2018, 11:30am UTC](https://forum.inductiveautomation.com/t/airlink-rv50-and-ignition-error-on-phonenumber/20740/11 "2018-11-15T11:30:46Z")

</div>

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?

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/7b4ffcb8cb17808ccc97f8627752abf40e0d5620.png)

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [November 15, 2018, 1:05pm UTC](https://forum.inductiveautomation.com/t/airlink-rv50-and-ignition-error-on-phonenumber/20740/12 "2018-11-15T13:05:11Z")

</div>

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

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/aef5069b5f57a245c70614c0afcb3f4b01ec1c04.PNG)

Look at the Logs on gateway Status page…

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/5377e893929e7f46387c755aef9fbcaecdbdb208.PNG)

---

<div class="post-metadata">

**Author:** ![lasse](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lasse/32/11108_2.png) [@lasse](https://forum.inductiveautomation.com/u/lasse)\
**Post date:** [November 15, 2018, 1:19pm UTC](https://forum.inductiveautomation.com/t/airlink-rv50-and-ignition-error-on-phonenumber/20740/13 "2018-11-15T13:19:58Z")

</div>

Thanks alot!

This is what im getting now:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/d/da67cfabcc889f5dddcd2483bac5a765166a7c72.png)

---

<div class="post-metadata">

**Author:** ![lasse](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lasse/32/11108_2.png) [@lasse](https://forum.inductiveautomation.com/u/lasse)\
**Post date:** [November 15, 2018, 1:47pm UTC](https://forum.inductiveautomation.com/t/airlink-rv50-and-ignition-error-on-phonenumber/20740/14 "2018-11-15T13:47:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 15, 2018, 3:01pm UTC](https://forum.inductiveautomation.com/t/airlink-rv50-and-ignition-error-on-phonenumber/20740/15 "2018-11-15T15:01:34Z")

</div>

> [@lasse](#):
>
> SMS acknowledging is working as it should.

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.
