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

Connect call SVAML

Kcarpenter12
Occasional Contributor
When a call comes into my webhook, I want to transfer it to a cellphone number. Am I looking for the connectPstn action? I’m not sure which action is best to transfer to another number or multiple numbers. If it matters, I’m using Python.
3 ACCEPTED SOLUTIONS

Accepted Solutions

Alex_Sberna
Employee
Employee

Hi, and thanks for your question!
The connectPstn action will transfer your call to another number. 
When you say you might transfer multiple numbers, can you clarify what you mean? Unless a call is part of a conference, it is only a connection between two numbers at any given time.

Thanks,

Alex Sberna, Documentation Engineer

View solution in original post

Catalin_Vasile
Employee
Employee

Hello Kcarpenter12,

 

I will assume you've at least followed the getting started guide found here

And further assume that it works fine! You are right, instead of using the action hangup as per the example above, you would have to replace the action and use connectPstn instead, as simple as the structure below.

 

{
"action": {
  "name": "connectPstn",
  "number": "+31634443333", // number you want to connect the call with. International format
  "cli": "+31631112222" // number you want to display e.g. Sinch-rented free test number. International format
  }
}

 

Catalin Vasile, Product Manager

View solution in original post

connectPstn is for connecting calls 1-to-1. For ringing multiple cellphones, you could try a different solution such as making use of connectConf instead.

 

1. When ICE webhook occurs, add the caller to a conference

 

{
  "action": {
    "name": "connectConf",
    "conferenceId": "27386721-d40d-4b52-8196-0f2dc2c6d4bb",
    "moh": "ring",
    "conferenceType": "twopartwait"
  }
}

 

 

2. Iterate over all numbers that you want to ring and do a custom callout for each number using inline SVAML

3. On the first ACE webhook from step 2, respond using connectConf SVAML again and connect the first phone that answered to the same conference where the caller is currently waiting, hangup all the other calls

 

{
  "action": {
    "name": "connectConf",
    "conferenceId": "27386721-d40d-4b52-8196-0f2dc2c6d4bb",
    "conferenceType": "twopartbridge"
  }
}

 

 

Catalin Vasile, Product Manager

View solution in original post

4 REPLIES 4

Alex_Sberna
Employee
Employee

Hi, and thanks for your question!
The connectPstn action will transfer your call to another number. 
When you say you might transfer multiple numbers, can you clarify what you mean? Unless a call is part of a conference, it is only a connection between two numbers at any given time.

Thanks,

Alex Sberna, Documentation Engineer

Catalin_Vasile
Employee
Employee

Hello Kcarpenter12,

 

I will assume you've at least followed the getting started guide found here

And further assume that it works fine! You are right, instead of using the action hangup as per the example above, you would have to replace the action and use connectPstn instead, as simple as the structure below.

 

{
"action": {
  "name": "connectPstn",
  "number": "+31634443333", // number you want to connect the call with. International format
  "cli": "+31631112222" // number you want to display e.g. Sinch-rented free test number. International format
  }
}

 

Catalin Vasile, Product Manager

Kcarpenter12
Occasional Contributor
Thanks for the speedy reply! When someone calls my sinch virtual number, I want my cellphone to ring…. But I also might want to ring multiple cellphones.

connectPstn is for connecting calls 1-to-1. For ringing multiple cellphones, you could try a different solution such as making use of connectConf instead.

 

1. When ICE webhook occurs, add the caller to a conference

 

{
  "action": {
    "name": "connectConf",
    "conferenceId": "27386721-d40d-4b52-8196-0f2dc2c6d4bb",
    "moh": "ring",
    "conferenceType": "twopartwait"
  }
}

 

 

2. Iterate over all numbers that you want to ring and do a custom callout for each number using inline SVAML

3. On the first ACE webhook from step 2, respond using connectConf SVAML again and connect the first phone that answered to the same conference where the caller is currently waiting, hangup all the other calls

 

{
  "action": {
    "name": "connectConf",
    "conferenceId": "27386721-d40d-4b52-8196-0f2dc2c6d4bb",
    "conferenceType": "twopartbridge"
  }
}

 

 

Catalin Vasile, Product Manager