voiceip / tinyphone

Minimalist Windows / OSx / Linux SIP Softphone with API Control
GNU General Public License v3.0
117 stars 36 forks source link

Add outgoing or incoming call prop #28

Closed Rysakov1986 closed 3 years ago

Rysakov1986 commented 3 years ago

Please, add a prop about the initiator of the call or a prop outgoing or incoming call

outgoing calls:

{
    "calls": [
        {
            "account": "11001@185.x.x.x",
            "callerId": "11002",
            "displayName": "",
            "duration": 5,
            "hold": "NOT_IN_HOLD",
            "id": 0,
            "party": "sip:11002@185.x.x.x",
            "sid": "426a029a22b54787ad772ab357ec3f10",
            "state": "CONFIRMED"
        }
    ],
    "count": 1,
    "message": "Current Calls"
}

incoming calls:

{
    "calls": [
        {
            "account": "11001@185.x.x.x",
            "callerId": "11002",
            "displayName": "",
            "duration": 3,
            "hold": "NOT_IN_HOLD",
            "id": 3,
            "party": "sip:11002@185.x.x.x",
            "sid": "812ca396b36947e5bbefe6cfcd7be2c9",
            "state": "CONFIRMED"
        }
    ],
    "count": 1,
    "message": "Current Calls"
}
kingster commented 3 years ago

Added attribute direction

{
    "calls": [
        {
            "account": "1234@domain.com",
            "callerId": "0987654321",
            "direction": "INCOMING",
            "displayName": "sip:0987654321@x.x.x.x",
            "duration": 2,
            "hold": "NOT_IN_HOLD",
            "id": 1,
            "party": "<sip:0987654321@x.x.x.x>",
            "sid": "asbcz54x3hwpw6v5vhqbwq1x5w5xp6hzwz36@y.y.y.y",
            "state": "EARLY"
        }
    ],
    "count": 1,
    "message": "Current Calls"
}