Материал из for iRidium developers
Перейти к: навигация, поиск
Эта страница является переводом страницы CloudPush. Перевод выполнен на 97%.

Other languages:
English • ‎русский

Sending Push Notifications via iRidium cloud

It is a manual on how to set up sending of Push notifications to control panels via the account on the iRidium mobile web site.

What It Is for

It is necessary when working with SIP. When i3 pro is closed on the control panel and intercom tries to call to it, it is required to send a Push notification to the control panel to activate the i3 pro application.

There are 2 way to implement such function: 1. To connect to the iRidium server project and make intercom call to the server. When receiving the call, the server will send a Push notification to the control panel. 2.To send Push notifications via iRidium cloud. This manual describes this way.

How It Works

1. When calling from intercom, the intercom sends a request to sending a Push notification to iRidium cloud
2. After getting the request the cloud gives a command to send notifications to the indicated group of notifications in the indicated automation object
3. The cloud will send notifications to all panels which are connected to the indicated group of notifications
4. After seeing the notification on the control panel, the user will start the application and see the incoming call

Sending Notifications via the Cloud

1. Open the automation object for which it is required to set up cloud notifications in the account and create a group of notifications.


2. Go to the settings of the group of notifications and click on "create key" for the required group


3. Copy the key. It will be used when setting up SIP intercom


4. Set up SIP intercom. The main thing is to create the event which will send a request about sending a Push notification in the cloud.
The request looks as follows:

GET http://push.iridiummobile.net/?key=INPUTHEREYOUKEY&title=You%20have%20not%20recived%20call&sound_type=1

key - the key copied from the account
title - the notification text

Setting up of SIP Intercom

Setting up Notifications for Asteriks

1. Create a name
2. Specify the context name 'ContextName.PNG'


3. Create a file on the server Asterisk ntf.sh chmod +x


4. Make changes in the context


Script text

#! /bin/bash
curl -X GET \
        'http://push.iridiummobile.net/?key=INPUTHEREYOUKEY&title=You%20have%20not%20recived%20call&sound_type=1' \ //Write the key copied from the account in the  Key parameter
        -H 'Cache-Control: no-cache' \

Context text

;Doing push
exten => 5009,1,System(/etc/asterisk/ntf.sh "${name} (number ${CALLERID(num)})" ${EXTEN})
;Init incriment
exten => 5009,n,Set(i=0)
;Start call cycle and incriment i
exten => 5009,n(redail),Set(i=$[${i} + 1])
exten => 5009,n,Dial(PJSIP/5009,,m)
;Getting abonent status
exten => 5009,n,ChanIsAvail(PJSIP/5009,,as)
;Wait 5 sec
exten => 5009,n,Wait(5)
;If count of trying more then 5 go out from cycle
exten => 5009,n,GotoIF($["${i}" = "5"]?skip)
;If abonent is offline go to cycle start
exten => 5009,n,GotoIF($["${AVAILSTATUS}" = "5"]?redail)
;Event of cycle out
exten => 5009,n(skip),Wait(1)

Setting up Notifications for 3CX

1. Create 3cx Voice Call App
2. Add HTTP Request in it


3. Create and set up the call queue


4. Add your voice application


Setting up Notifications for Mobotix

1. Go to the Mobotix web interface
2. Go to the Admin menu section


3. Then open the Outgoing calls settings menu in the Audio and VOIP Telephony section


4. Set up phone numbers and SIP addresses 5. Set up value 10 in Dial Attempts


5. Go to Setup menu-> Action group overview 6. Create Action, where we set up "If the intercom call button is pushed, then:"
Action 1 - start calling to the control panel
Action 2 - select the value SimpleNotify


7. Go to the IP Notify window in the same section


8. Open Simple Nofity and set up the parameters:
Destination Address = push.iridiummobile.net:80
Data Protocol = HTTP/1.0 Request in the next field input the request text described above



At that, the setting up of Mobotix is finished.