cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to deal with Incoming PSTN call

Dylan
Contributor

Hi,

 

From PSTN call To Sinch virtual number, How should it be handled on the server side and what SVAML should be returned?

 

The expectation is that this call will be pushed to my device, which has the iOS SDK integrated.

 

This is a person-to-person call, not a conference call.

19 REPLIES 19

Roland_Ian
Employee
Employee

 

1. Yes the same conference id. Keep in mind the regional scope of conferences if your callout and sdk client are based in different regions. 

 

Calling API

https://developers.sinch.com/docs/voice/api-reference/#api-quick-reference

https://developers.sinch.com/docs/in-app-calling/overview/#sinch-in-app-global--regional-hostnamesen...

 

2. Custom headers in call out are not compatible with headers to in-app clients.  

 

3. Which error does it return?

 

 

Roland-Ian Clothier, Developer Support Engineer

Roland_Ian
Employee
Employee

1. Yes you should. Please keep in mind the regional scope of Conferences when connecting your clients.

 

Conference calls / scope

https://developers.sinch.com/docs/voice/api-reference/#conference-calls

 

Calling API

https://developers.sinch.com/docs/in-app-calling/overview/#sinch-in-app-global--regional-hostnamesen...

 

In-app clients

https://developers.sinch.com/docs/in-app-calling/overview/#sinch-in-app-global--regional-hostnamesen...

 

2. custom field is not supported currently in conferenceCallout to destination type: username

 

3. Which error is it? Can you give me an example

 

Roland-Ian Clothier, Developer Support Engineer

Hi,

I have now created a new problem and need your help.

 

I returned SVAML on the server side specifying the conference

{"instructions":[{"name":"answer"}],"action":{"name":"connectConf","conferenceId":"2000000033938953"}}

and also called callout to set up the conference.

 

curl -i -X GET \
-u xx:xx \
'https://calling.api.sinch.com/calling/v1/conferences/id/2000000033938953'

 

Return  

{"participants":[{"cli":"+12483158xxx","id":"e5fbc98b-4d1b-4e31-a527-4d13ed7d6636","duration":8,"muted":false,"onhold":false}]}

 

But when I go to get the conference information, I get only one member, and it looks like it's just the receiver's side that's joined the conference, and the dialing side isn't connected to the conference. So the manifestation is that the call doesn't have sound. I would like to ask how the dialing party is accessing the conference and how can I get both parties into the conference to talk normally.

Am I missing any processes? Let me know if you need any examples.

 

Regards.

Roland_Ian
Employee
Employee

Hi

I have looked and each conference leg is started in two different regions. This is due to GeoIP lookup between the IP you use to start the callout and the IP of the in-app Voice SDK client being considered as different regsions.

As outlined here: https://developers.sinch.com/docs/voice/api-reference/#conference-calls

Important!

Conference rooms have regional scope. If you want to connect multiple participants from different regions (Continents) on the same conference, you must “force” all members to be on the same region.

This can be done by selecting the same Sinch Voice API regional endpoints for Callout requests and/or the Sinch In-App regional endpoint/hostname to be used on your Mobile or Web Apps.

 

You can work around this, please try the following:

Can you change your in-app client URL to:  https://ocra-apse1.api.sinch.com

And the callout use: https://calling-apse1.api.sinch.com/calling/v1

 

Roland-Ian Clothier, Developer Support Engineer

Hi Roland_Ian,

 

This doesn't seem to be working. I have changed the callout url as you said 

and the client url as wellhttps://ocra-apse1.api.sinch.com, and I still get the same results as before.

 

"callid":"50e30922-dfa5-4e53-9be2-b94c6903de14"

The SVAML returned by the server is 

{"instructions":[{"name":"answer"}],"action":{"name":"connectConf","conferenceId":"2000000033938953"}}

 

By looking up the attendee is still a member. Please help find the information about this call to see if something is set up incorrectly, looking forward to your input.

 

 

Roland_Ian
Employee
Employee

Hi, I want to examine your conferences across regions I need to isolate your conference name, can you use another one than 2000000033938953 for a single test?

Thanks

Roland-Ian Clothier, Developer Support Engineer

Roland_Ian
Employee
Employee

Hi

After checking the logs.

I have looked at the logs and the URL in the ICE for the conferenceCallout portion of the call

 https://calling-use1.api.sinch.com/calling/v1/calls the region contained in  calling-<region> should also be used in the in-app client.  

So https://ocra-use1.api.sinch.com should be used here.

It is the incoming PSTN leg that defines which reason to use. 

This is due to the regional scope of conferences and the originating PSTN leg creates the conference so it will be anchored there.

Roland-Ian Clothier, Developer Support Engineer

HI Roland_Ian,

 

 

But the PSTN is an external caller, in that the client has specified the address at the time of registration and he doesn't know what region the caller belongs to. Does it have to be consistent on the client side to work, and can you use a global address?

 

 

Roland_Ian
Employee
Employee

Hi Dylan,

Yes this is a limitation of conferencing being regional.

You will have to have your Sinch Client started in the region the PSTN origination leg is in for it connect to the conference in that region.

There could be creative ways around such as sending an out of band push that could then start the client before doing the conference callout,  however it would be outside of the scope of the Voice SDK.

Roland-Ian Clothier, Developer Support Engineer

Hi Roland_Ian,

Thank you.

I have no problem with this part. Now I have initiated a recording question, but no one has answered it. Please take a look at the reason.

Start recording failed - Sinch Community - 13823

 

As an added note, I would like to start recording anytime during a call instead of specifying recording when dialing. Now going to turn on recording during a call doesn't work, so please help me see what's going on.

 

Regards.