# How can I get the SMS Notification profile IP address from script?

**URL:** <https://forum.inductiveautomation.com/t/how-can-i-get-the-sms-notification-profile-ip-address-from-script/28726>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [October 2, 2019, 6:42am UTC](https://forum.inductiveautomation.com/t/how-can-i-get-the-sms-notification-profile-ip-address-from-script/28726 "2019-10-02T06:42:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joel.golinucci](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/joel.golinucci/32/9927_2.png) [@joel.golinucci](https://forum.inductiveautomation.com/u/joel.golinucci)\
**Post date:** [October 2, 2019, 6:42am UTC](https://forum.inductiveautomation.com/t/how-can-i-get-the-sms-notification-profile-ip-address-from-script/28726/1 "2019-10-02T06:42:38Z")

</div>

I have two SMS Notification profiles, and I want to use one as master and the second one as backup.

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

I was planning on creating a script in my notification pipeline that will ping the Notif\_SMS\_1 IP address and use it if the ping is sucessfull, otherwise use the Notif\_SMS\_2.

How can I get from a scripting function the IP address of the SMS notification profile defined in the gateway ?

> **The ping function**
>
> ```auto
> def ping(ip, timeout = 200):
> import os
> return os.system("ping -n 1 -w " + str(timeout) + " " + ip) == 0
> 
> ```
