Picture of pietro
Registered 2 years 75 days
pietro Thursday, 25 January 2024, 12:56 PM
Agenda SDK Dialog
com.innovaphone.events

Hi, Is it possible to send an alarm to my device using API events? I tried to simulate the event by following this example but it didn't work. How can i use it?

Example:

{ mt: "AddEvent", type: "error", severity: 1, code: "0x0011005b", date: "1580559884", host: "IP0011-00-00-00", serial: "009033000000", source: "IP", text: "No route to destination", xsl: "fault_network.xsl", details: "<route src-addr=\"10.0.0.1\" src-port=\"24\" dst-addr=\"10.0.0.3\" dst-port=\"80\" prot=\"TCP\" cause=\"Destination interface down\"/>" }

thanks
Andreas Fink
Moderator Registered 13 years 43 days
Andreas Fink (innovaphone) Thursday, 1 February 2024, 03:28 PM
Re: Agenda SDK Dialog
Hello Pietro,

could you explain more detailed, how exactly do you send this JSON?

This is a client API https://sdk.innovaphone.com/14r1/doc/reference.htm#APIs , so I assume, if you send this JSON to the Events App Service, it will not work.


Best Regards
Andreas Fink
Picture of pietro
Registered 2 years 75 days
pietro Friday, 2 February 2024, 08:05 PM
Re: Agenda SDK Dialog
Hi Andreas,

thanks for answering me but i still dont understand how it works

In my system , i need to send an alarm to identify the device , i have the hardware ID of all devices connected on the PBX .

Is it possible to send this alarm or some sound to identify the device?

i have no idea what API i must choose to make this
Andreas Fink
Moderator Registered 13 years 43 days
Andreas Fink (innovaphone) Friday, 2 February 2024, 08:11 PM
Re: Agenda SDK Dialog
Hello Pietro,

> In my system , i need to send an alarm to identify the device , i have the hardware ID of all devices connected on the PBX .

Could you explain this more detailed?

What do you mean by "identify"?

Best Regards
Andreas Fink
Picture of pietro
Registered 2 years 75 days
pietro Friday, 2 February 2024, 08:29 PM
Re: Agenda SDK Dialog
Hi Andreas ,

> What do you mean by "identify"?

We're creating a Colwork system so there are many devices putted on differentes tables in a room and i want to set this device to someone by using ReplicateNext on PbxTableUsers but i can't identify which device is. And because of this someone can take an random device but not that one that he/she wanted, do you understand? is kinda hard to explain.

What i want to do is a button that people can click and send an Alarm to identify the device that they want to take. i dont know if my idea is possible to do by using an API ,

Can you help me?

BR,
Pietro


Andreas Fink
Moderator Registered 13 years 43 days
Andreas Fink (innovaphone) Friday, 2 February 2024, 09:15 PM
Re: Agenda SDK Dialog
> set this device to someone

Do you mean an IP-Phone must be assigned to a PBX User (e.g. by adding the MAC to HW-ID field)?
Picture of pietro
Registered 2 years 75 days
pietro Monday, 5 February 2024, 09:00 PM
Re: Agenda SDK Dialog

Yes,
and from that , i want to make/send an alarm to the device , or some sound .
I was reading SDK documentation and i found this :

Example: { mt: "AddAlarm", type: "alarm", severity: 1, active: true, code: "0x00010002", date: "1580559884", host: "IP0011-42-04-a7", serial: "009033000000", source: "RELAY/RECH", text: "Registration down", xsl: "fault_relay.xsl", details: "<relay prot=\"SH323\"/>" }

Could this JSON help me to solve what i need?

Andreas Fink
Moderator Registered 13 years 43 days
Andreas Fink (innovaphone) Friday, 23 February 2024, 02:30 PM
Re: Agenda SDK Dialog
I'm sorry for the long delay.

The Alarm API is not designed for this purposes (it is used for the management alarms and events).

You could trigger a ringtone on the IP-Phone via web UI if you navigate to the Phone/Ring-Tones web UI page (https://wiki.innovaphone.com/index.php?title=Reference9:Phone/Ring-Tones).

You could start and stop playing a ringtone by sending a HTTP request to the specific phone.

Other possibility is to send a normal call to some specific device.

Best Regards
Andreas Fink
Picture of pietro
Registered 2 years 75 days
pietro Monday, 26 February 2024, 03:50 PM
Re: Agenda SDK Dialog
Hi Andreas,

> You could start and stop playing a ringtone by sending a HTTP request to the specific phone.

Can you give me an example of this? how can i send this HTTP request? usually i use Postman to do this.

> Other possibility is to send a normal call to some specific device.

About to send this normal call , i was wondering if is possible to send a normal call to a device without user , by using the HardwareID?

BR,
Pietro Fiori
Andreas Fink
Moderator Registered 13 years 43 days
Andreas Fink (innovaphone) Tuesday, 27 February 2024, 10:33 AM
Re: Agenda SDK Dialog
Hello Pietro,

> Can you give me an example of this? how can i send this HTTP
> request? usually i use Postman to do this.

First you need to find out which URL to use. If you navigate to the Web UI page with ring tones, you will be able to capture the URL by using the developer console of your browser.

After you got the URL, you can try to make an HTTP Request using curl or postman. To be able to make a HTTP request from JavaScript App Service you have to use the HttpClient Library for innovaphone JavaScript Runtime (SDK -> Reference -> JavaScript library for App Services).

> About to send this normal call , i was wondering if is
> possible to send a normal call to a device without user ,
> by using the HardwareID?

If you have unassigned IP-phones, it is a good practice to register them to some dummy user, that has no rights, but emergency calls. By using the RCC API you can select such user and hardware id of the phone to be able to start a call from this phone to some Waiting Queue in hands-free mode. So the user will be able to hear the music playing from some specific phone.

Other possibility is to register the unassigned phones to own users (e.g. Unassigned_0090331a2b3c), to be able to call the particular phone. But this has a disadvantage, that a Port License ist required for each phone. In case where you have enough licenses, this would be a good solution for you.

Best Regards
Andreas Fink
Picture of pietro
Registered 2 years 75 days
pietro Tuesday, 27 February 2024, 01:28 PM
Re: Agenda SDK Dialog
Hi andreas,

I found out the URL by using the developer console > network.

There is a param after the hardware ID that i dont understand
/0090334c62ca/0ed6a957-bd38-43f9-b40f-5048b973892c/

I wonder that this param is generate
dynamically :

0ed6a957-bd38-43f9-b40f-5048b973892c

Can you explain how i can get this param?

Andreas Fink
Moderator Registered 13 years 43 days
Andreas Fink (innovaphone) Tuesday, 27 February 2024, 01:51 PM
Re: Agenda SDK Dialog
Hello Pietro,

this is a passthrough ID of Devices App that links to the particular device.

If you check the URL carefully, you are accessing the IP address of the Devices App Service, not of the phone. the Devices App Service authenticates and forwards the request to the IP address of the phone.

See the Devices API for more info on obtaining the URL:
https://sdk.innovaphone.com/14r1/web1/com.innovaphone.devices/com.innovaphone.devices.htm

Best Regards
Andreas Fink

P.S.: I still think it is easier to implement a call via RCC.
Picture of pietro
Registered 2 years 75 days
pietro Friday, 2 February 2024, 08:34 PM in response to Andreas Fink (innovaphone)
Re: Agenda SDK Dialog
What do you mean by "identify"?

We're creating a Colwork system so there are many devices putted on differentes tables in a room and i want to set this device to someone by using ReplicateNext on PbxTableUsers but i can't identify which device is. And because of this someone can take an random device but not that one that he/she wanted, do you understand? is kinda hard to explain.

What i want to do is a button that people can click and send an Alarm to identify the device that they want to take. i dont know if my idea is possible to do by using an API ,

Can you help me?

BR,
Pietro
← You can define your color theme preference here