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.

1 ACCEPTED SOLUTION

Accepted Solutions

Roland_Ian
Employee
Employee

Hi,

You cannot call directly from PSTN to an In-app you will have to  use a conference.

Pre-requisite

  • Start an in-app SDK client (user123)

 

Incoming PSTN call to a Sinch Virtual number

  • PSTN originating call to Sinch Virtual Number -> (ICE) -> (your Backend) -> (SVAML ConnectConf) (e.g.myconfid123) 

         PSTN leg is now in conference myconfid123

 

Conference callout using calling API In parallel (or after you get the ICE above. )

  • conferenceCallout using destination -> endpoint -> username (user123)

       In-app leg is now in conference myconfid123

 

Poll the conference for participants

(If you want to see which parties are still in Conference)

Hangup the call on the incoming DICE (from in-app let)

Hope this helps. 

 

Roland-Ian Clothier, Developer Support Engineer

View solution in original post

19 REPLIES 19

Roland_Ian
Employee
Employee

Hi,

You cannot call directly from PSTN to an In-app you will have to  use a conference.

Pre-requisite

  • Start an in-app SDK client (user123)

 

Incoming PSTN call to a Sinch Virtual number

  • PSTN originating call to Sinch Virtual Number -> (ICE) -> (your Backend) -> (SVAML ConnectConf) (e.g.myconfid123) 

         PSTN leg is now in conference myconfid123

 

Conference callout using calling API In parallel (or after you get the ICE above. )

  • conferenceCallout using destination -> endpoint -> username (user123)

       In-app leg is now in conference myconfid123

 

Poll the conference for participants

(If you want to see which parties are still in Conference)

Hangup the call on the incoming DICE (from in-app let)

Hope this helps. 

 

Roland-Ian Clothier, Developer Support Engineer

Dylan
Contributor

Is a conferences necessary?

So what does connectMxp do and how is it used?

I'm talking between two people. conference doesn't fit my scenario. What I expect is that after dialing a Sinch number, Sinch can push a call to the device. How can this be achieved?

Roland_Ian
Employee
Employee

Sorry, we do not support direct PSTN origination call to in-app Voice SDK client. You have to use a conference to anchor the media portion of the call for the in-app leg.

A word about push:

  • This would be either FCM or APN depending if the handset is Android or Apple.  The push would be sent to the device for: 
    • media connection to the conference after the conference callout
    • media connection to the in-app peer (or proxy to peer) depending on the external network restrictions. After another in-app Voice SDK client has placed a call to another in-app Voice SDK client

Direct calling support

You can however achieve the other way round in-app -> PSTN 

Roland-Ian Clothier, Developer Support Engineer

Thanks, I may not have phrased it clearly.

 

My usage scenario is to use a non-Sinch number (could be a real number or another virtual number) to call a number purchased on a sinch. The number is already pointing to an applicantion, and then the APN key is configured, and the iOS SDK is already integrated on the phone, what should I do to get the call pushed to the device?

 

What kind of SVAML should be returned by the server, please give me an example.

 

The conference doesn't look like it's quite what I'm looking for.

 

Regards,

Dylan.

Roland_Ian
Employee
Employee

Hi Dylan

 

As I stated we do not support incoming PSTN (real or virtual number) to a purchased Sinch Virtual number that then pushes to an iOS SDK (In-app Voice SDK client).

You have to use a conference to connect both legs here.

 

As you will see from the call scenarios listed in our documentation, phone to app is not listed.

For the SVAML connectMXP, this only works for application-to-application calls (in-app only) no phone to application.

https://developers.sinch.com/docs/voice/api-reference/svaml/actions/#connectmxp

 

Hope this helps clarify a little.

Roland-Ian Clothier, Developer Support Engineer

Roland-Ian

Thank you,

 

So about the app-to-app call and whether or not the push can be accomplished.

I now want to do only app to app calls and incoming calls can be pushed to the device, how should this be implemented in my backend.

 

Regards.

Roland_Ian
Employee
Employee

App to App push for iOS is documented here: 

https://developers.sinch.com/docs/in-app-calling/ios/push-notifications-callkit/

 

You will need to provide us with your APNS Authentication Signing Key

https://developers.sinch.com/docs/in-app-calling/ios/push-notifications-callkit/#configuring-an-apns...

We will then send the push to Apple and they will in turn send it to the handset.

 

If you use Android we will require your FCM sender id and Registration token

https://developers.sinch.com/docs/in-app-calling/android/push-notifications/

https://developers.sinch.com/docs/in-app-calling/android/push-notifications/#fcm-step-4-acquire-fcm-...

 

 

Roland-Ian Clothier, Developer Support Engineer

Hi Roland-Ian,

 

Thank you.

I still have a few questions about this conference that I hope you can help answer.

 

1.Should the conference id set in connectConf SVAML and the conference id set via callout be set to the same, or should they be set differently?

 

2.I set the value of custom in the callout, but I don't receive it in the APN push, how can I set it to take effect?

 

3.I'm trying to get the information about the meeting, but it returns me an error,

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

I'm getting it when the meeting is being set up, I don't know why it's okay to return an error.

 

Regards.