Gridphone

From GridPlay

Info

GridPhone is a grid wide phone system that lets you make and receive calls from any GridPhone device

How To Use

  • Payphone is easy, just rez it and forget it
  • Office phone comes with a web config, rez it, click it and select WebConfig in the menu
  • Cellphone is the same as office but you wear it (add) to your HUD.

Webconfig is easy to follow, once setup you just click it to make a call or answer a call.

API

RESTful

GET https://api.gridplay.net/phone/{search}
{search} can be phone number, name or sim

{
  "numbers": [
    {
      "name": "PAYPHONE",
      "number": 1134198748,
      "sim": "Cavanaugh"
    },
    {
      "name": "Test Phone",
      "number": 9055604019,
      "sim": "Cavanaugh"
    }
  ]
}

POST https://api.gridplay.net/phone/{uri}
{uri} can be the following. call|endcall|answer|sendmsg. call to call a number, endcall to end a call, answer to answer a incoming call, sendmsg to send a message of a already in progress call. A JSON error will be returned if theres a error, else nothing is returned.

{
    "error": "The error message"
}

Required JSON fields are...

{
    "number": "Number to call",
    "incoming_number": "Your number",
    "incoming_name": "Your name to display for the receiver",
    "msg": "The message, only required if in a call"
}

LSL

To send a command in LSL is easy but does require the script be in the same prim as the phone script

list json = ["msg", "hello world", "status", "sendmsg|call|endcall|answer|menu", "num", "9055551234"];
llMessageLinked(LINK_SET, 98, llList2Json(JSON_OBJECT, json), toucher);

Receiving commands is easy as well using JSON

link_message(integer sn, integer num, string str, key id) {
    if (num == 99) {
        string status = llJsonGetValue(json,["status"]);
        if (status == "incoming") {
            string num = llJsonGetValue(json,["num"]);
        }
        if (status == "endcall") {
            // do your magic here
        }
        if (status == "msg") {
            string msg = llJsonGetValue(json,["msg"]);
        }
        if (status == "answer") {
            string msg = llJsonGetValue(json,["msg"]);
        }
        if (status == "setup") {
            // do your magic here
        }
    }
}

All messages uses JSON for data since its a cool language to use for passing data from device to device

VIDEOS

UPDATES

1.0.1 - June 28 2022

  • Fixed a issue with saving database ID to a prim
  • Fixed a incoming call where the number should of been the name of the number calling

1.0.0 - June 27 2022

  • Inital Release
  • Payphone got a setting derped