Idea

brandon-hein avatar image
brandon-hein suggested

IDEA: Add Location (city/state) to Parse Phone Number API && Presence `ActiveCalls`

I just wanted to put this idea out there to Ring Central. Pretty sure it's a quick win on your guys end.

I'm currently creating a custom WinForm desktop app leveraging Ring Central API's. One of the thing's I'm creating is an incoming call pop up alert. This is triggered by the PubNub presence notification. In the `ActiveCalls` array it gives me some details around the active call (includes telephony ids, phone number, names, date, etc.).... But what I see is it lacks in a location information.

My work around is to take that CallId and hit the CallLog endpoint to get the 'location' city/state info. To display on the endpoint. This gets pretty chatty when it comes to making a 'Heavy' API call to RC for every inbound call.

For this post... My idea is to add a 'location' property to the presence notification for an `activeCall` like so (see bolded):

{
    "uuid": "dkajkldfhjkahfafkdj",
    "event": "/restapi/v1.0/account/~/extension/~/presence?detailedTelephonyState=true&sipData=true",
    "timestamp": "2020-03-09T16:47:36.017Z",
    "subscriptionId": "d554ed80-7b2a-4f9a-ae10-4afeaa33fb63",
    "ownerId": "ownerId",
    "body": {
        "extensionId": 0,
        "telephonyStatus": "Ringing",
        "activeCalls": [{
            "id": "call-id",
            "direction": "Inbound",
            "fromName": "from so-and-so",
            "from": "+18888675309",
            "toName": "to so-and-so",
            "to": "+18888675309",            
            "location": "Beverly Hills, CA",
            "telephonyStatus": "Ringing",
            "sipData": {
                "toTag": "blahTag",
                "fromTag": "p-telephony-2",
                "remoteUri": "-",
                "localUri": "-"
            },
            "sessionId": "2938287438920",
            "startTime": "2020-03-09T16:47:35.891Z",
            "partyId": "p-telephony-2",
            "telephonySessionId": "s-telephony"
        }],
        "sequence": 131,
        "presenceStatus": "Available",
        "userStatus": "Available",
        "dndStatus": "TakeAllCalls",
        "meetingStatus": "Disconnected",
        "message": "I'm Ready!",
        "allowSeeMyPresence": true,
        "ringOnMonitoredCall": false,
        "pickUpCallsOnHold": true,
        "totalActiveCalls": 1
    }
}

Also by adding a location detail to your (currently in beta [as of 3/9/2020]) parse phone number endpoint. I'm thinking a response like this:

{
    "uri": "https://platform.ringcentral.com/restapi/v1.0/number-parser/parse?nationalAsPriority=false",
    "homeCountry": {
        "uri": "https://platform.ringcentral.com/restapi/v1.0/dictionary/country/1",
        "id": "1",
        "name": "United States",
        "isoCode": "US",
        "callingCode": "1"
    },
    "phoneNumbers": [{
        "originalString": "760561xxxx",
        "country": {
            "uri": "https://platform.ringcentral.com/restapi/v1.0/dictionary/country/1",
            "id": "1",
            "name": "United States",
            "isoCode": "US",
            "callingCode": "1"
        },
        "location": {
    
            "city": "Adelanto, Victorville Adelanto",
            "areaCode": "760",
            "npa": "760",
            "nxx": "561",
            "state": {
    
                "uri": "https://platform.ringcentral.com/restapi/v1.0/dictionary/state/16",
                "id": "16",
                "name": "CA"
            }
        },
        "areaCode": "760",
        "subscriberNumber": "561xxxx",
        "formattedNational": "(760) 561-xxxx",
        "formattedInternational": "+1 (760) 561xxxx",
        "dialable": "760561xxxx",
        "e164": "+1760561xxxx",
        "special": false,
        "normalized": "1760561xxxx",
        "tollFree": false
    }]
}


Adding location to the Parse Phone Number endpoint would allow developers that need to apply state/location business logic to their process.

presenceactive callsideaparse phone number
1 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

No Comments

·

Write a Comment

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.

Related Ideas