Incoming ICE from PSTN (telephone leg)
The first ICE arrives at your backend when you call your number assigned to your application
{
"event": "ice",
"callid": "8d668511-9497-4c23-a7b7-xxxxxxxxxxx",
"callResourceUrl": "https://calling-euc1.api.sinch.com/calling/v1/calls/id/8d668511-9497-4c23-a7b7-xxxxxxxxxxx",
"timestamp": "2023-05-17T10:52:57Z",
"version": 1,
"userRate": {
"currencyId": "USD",
"amount": 0
},
"cli": "46xxxxxxxxxx",
"to": {
"type": "did",
"endpoint": "+46xxxxxxxxx"
},
"domain": "pstn",
"applicationKey": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx",
"originationType": "PSTN",
"rdnis": "+46xxxxxxxxx"
}
SVAML Response for PSTN domain ICE from your callback application
Here is an added say instruction before the connectConf so you know when you are connected to a conference and when one participant only is in the conference music will play.
Notice the conferenceId is called InAppToPSTN (you can call your conference anything you want)
This must match on the InApp (MXP) leg when doing the connectConf SVAML response
{
"instructions": [
{
┊ "name": "say",
┊ "text": "Conference test",
┊ "locale": "en-GB"
}
],
"action": {
"name": "ConnectConf",
"conferenceId": "InAppToPSTN",
"suppressCallbacks": false,
"moh": "ringing"
}
}
ICE from incoming SDK InApp (MXP) leg.
Note here the to is type conference and endpoint is InAppToPSTN (the conferenceId). Even though you have requested a conference connect you must re-confirm that in the SVAML response with connectConf (again, because you are using a callback server)
{
"event": "ice",
"callid": "4f1632b4-c582-4cfe-84b1-xxxxxxxxxxxx",
"callResourceUrl": "https://calling-euc1.api.sinch.com/calling/v1/calls/id/4f1632b4-c582-4cfe-84b1-xxxxxxxxxxxx",
"timestamp": "2023-05-17T10:53:07Z",
"version": 1,
"user": "InApp-caller",
"userRate": {
"currencyId": "USD",
"amount": 0
},
"to": {
"type": "conference",
"endpoint": "InAppToPSTN"
},
"domain": "mxp",
"applicationKey": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx",
"originationType": "MXP",
"rdnis": "",
"callHeaders": [
{
┊ "key": "info",
┊ "value": "MXP and PSTN Conf test, InAppToPSTN Conference name"
}
]
}
SVAML Response for MXP domain ICE from your callback application
Here you will respond with the same conferenceId as before (InAppToPSTN). There will be the same welcome message, but because their are two particpants in the conference InAppToPSTN the music will stop playing and the conference can connect.
{
"instructions": [
{
┊ "name": "say",
┊ "text": "Conference test",
┊ "locale": "en-GB"
}
],
"action": {
"name": "ConnectConf",
"conferenceId": "InAppToPSTN",
"suppressCallbacks": false,
"moh": "ringing"
}
}
That will be enough to get both parties in the conference.
... View more