Notifiation of external Call Records missing

Hi,

I’ve set up a notification subscription for everything to do with calls (so call’s being made and call records). I receive every call object correctly but for the ‘Call Record’ notifications I only receive those for internal calls. So calls from device x to device y, I receive the call record for. For outgoing (from device x to external number y) or incoming (from external number y to device x) i’m not getting any call records.

The call I used to create the notification is:

    {
    "applicationId": "{{myGuid}}",
    "deviceId": "https://randomstring.ngrok.io/api/call",
    "transport": "webhook",
    "topic": "platform-api-media",
    "subjectFilter": "/calls"
}

Are you trying to monitor calls for on-premise endpoints?

Yes, that’s correct. Internal calls are coming through correctly but external calls aren’t.

The difference between internal and external seems strange but in general for on-premise endpoints then I think you would be better with a slightly different subscription.

Try using ‘^/2017-09-01/endpoints/[^/]+/calls/[^/]+$’ as the subject without a subjectFilter.

Is there a Call Record endpoint there? I don’t see any in the documentation. For clarification reason: we’re talking about the CDR records.

Ok, I misunderstood then… Sorry. I thought you were looking for events when the endpoints make/receive calls.

I checked what MOWA does.

    topic: 'platform-api-media',
    subjectFilter: '2017-09-01/calls/[^/]+/records'

I believe you will only get your own though - I don’t believe you can subscribe on everyones.

Hi Tim,

That’s indeed what’s going on, I can only receive call records for my own user. I also created a Client and tested with that but then no CDR records are received. So only call records for the current user are received and there is indeed no way to receive them all.

This might be a handy feature to add! Also at the moment there is no link between calls that are linked in the CDR records. For example when you receive a phone call and transfer that phone call to a 2nd party. There is no link between the 2 CDR records.

To confirm what Tim mentioned, you can setup a subscription like this:

    topic: 'platform-api-media',
    subjectFilter: '2017-09-01/calls/[^/]+/records'

However you can only receive CDR through the API for your own calls. For call control though, you can subscribe to events on specific on-premise PBX endpoints using the /endpoints path. Since you can use regular expressions for the subjectFilter, you can create a subscription to a range of endpoints you need to monitor, instead of having to set them up individually. This would be how you would monitor a range of virtual devices for ringing events, then perform the appropriate call control, assuming you’re building an app that handles dynamic routing or acts like an IVR.

We don’t recommend you monitor everything as that would generate a lot of traffic and might cause performance issues.