News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
RingOut creating Outbound and Inbound calls
Tags: ringout
Jul 12, 2017 at 3:01pm   •   7 replies  •  0 likes
rhaylander-almeida

I'm using the RingOut API to initiate calls for my customers and I'm monitoring the events. When I initiate a call to a number A, 2 calls are being created and I'm receiving events of both of them.


I'm sending the following body:

{
  
    from: {phoneNumber: "NUMBER_A"},
    to: {phoneNumber: "NUMBER_B"},
    playPrompt: true
}

Then I start receiving the following events:

[{          telephonyStatus: 'Ringing',         from: 'NUMBER_A',         id: '',         to: 'NUMBER_B',         sessionId: '35393577028',         direction: 'Outbound'   }]

The one above is ok, but then I receive these:

 [{         telephonyStatus: 'Ringing',         from: 'NUMBER_B',         id: 'b536df52145149d6af765f47a2ec6ed9',         to: 'NUMBER_A',         sessionId: '35393581028',         direction: 'Inbound'  },{         telephonyStatus: 'CallConnected',         from: 'NUMBER_A',         id: 'c4e45991e1d84caa9dccd6e9b76d1e10',         to: 'NUMBER_B',         sessionId: '35393577028',         direction: 'Outbound'  }]

See the call log below:

I'd like to know if I'm doing something wrong or if I could relate both events because I don't believe it's reliable to correlate the "from" and "to" properties from the events, or even if I could change the way I'm doing the RingOut and make it stop creating two calls, when it was suppose to just create an Outbound call. Any guidance here will be really appreciated!


Let me know if you need further information.

7 Answers
answered on Oct 26, 2018 at 3:08am  
@Tyler Long Did you find any perfect solution for above problem other than mentioned workaround. Still we are getting two call log records.

 0
on Oct 26, 2018 at 3:53am   •  1 likes
Actually the workaround I mentioned is deprecated, you should not use it anymore!

It is a known bug of our side and we need to fix it.

I will push the engineering team.
on Mar 23, 2022 at 2:31pm   •  0 likes

Hi is there a fix for this problem?

on Mar 24, 2022 at 8:16am   •  0 likes

Can you create a new question and post your finding. You can add the link to this old thread as a reference.

Thanks

answered on Jul 19, 2017 at 7:05pm  
I did lots of investigation. And our internal development team also faces this issue and there is no perfect solution yet.

There is a solution which works most of the time (maybe 99%):
Outbound fromNumber = inbound toNumber 
&& 
Math.abs(outbound sessionId inbound sessionId) is one of 1000, 2000, 3000, 4000.

Then you can assert that they are actually two legs of the same call instead of two separate calls.

 0
answered on Jul 19, 2017 at 4:31pm  
@AK But what if another incoming call comes at the same time when the number A is talking to number B . We may miss that particular call log from our side if we refer only direction as Outbound.

 0
answered on Jul 14, 2017 at 10:54am  
There would be two call logs or rather two records within the active calls object of the API response when you receive a Presence notification as below:

{
  "uuid": "3219598113702261466-7473112250947924986",
  "timestamp": "2017-07-14T17:29:10.968Z",
  "subscriptionId": "103a9249-a0d9-420c-a545-fecc97ff6782",
  "body": {
    "extensionId": 734191020,
    "telephonyStatus": "Ringing",
    "activeCalls": [
      {
        "id": "9834152a1f624655b8e9065d3accb384",
        "direction": "Inbound",
        "fromName": "xxxx xxxx     ",
        "from": "RingCentral Number (ext number)",
        "toName": "Anil Digital Line Only",
        "to": "Customer Number",
        "telephonyStatus": "Ringing",
        "startTime": "2017-07-14T17:28:59.314Z"
      },
      {
        "id": "a3945590afb8496c8d0a5553842a042a",
        "direction": "Outbound",
        "fromName": "Anil Digital Line Only",
        "from": "RingCentral Number",
        "toName": "Customer Name",
        "to": "Customer Number",
        "telephonyStatus": "CallConnected",
        "sessionId": "158674552020",
        "startTime": "2017-07-14T17:28:59.220Z"
      }
    ],
    "sequence": 555006,
    "presenceStatus": "Available",
    "userStatus": "Available",
    "dndStatus": "TakeAllCalls",
    "allowSeeMyPresence": true,
    "ringOnMonitoredCall": false,
    "pickUpCallsOnHold": false
  }
}
As you are initiating a Ringout between one of the numbers on your account and an external number / Internal number you would see the active calls for the two legs. 

If you would like to just refer to a single call log record then you could refer to the records with the direction: "Outbound"

As the sessionID remains the same for this leg ( direction: " Outbound / Inbound " ) across all the three events:

1.) Ringing
2.) Call Connected
3.) No Call 




 1
answered on Jul 14, 2017 at 9:32am  
Hi Tyler, have you had the chance to take a look at the reference I've sent?
It's really important for us to receive an answer from you guys before we take the next step, otherwise we could just waste time going into the wrong direction.

 0
answered on Jul 12, 2017 at 8:45pm  
The issue I'm experiencing is the same as this guy did: https://devcommunity.ringcentral.com/ringcentraldev/topics/ringout-quirks

After the last response, I'm not sure if I understood what was the solution or what the guy had to do.

Let me know if really there isn't anything else to do.

 0
answered on Jul 12, 2017 at 8:20pm  
I confirm that RingOut does generate two call log records. Let me know if you have any questions.

 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us