*** id: 37096ff3-14e8-4baa-bbe3-7d41dfaaa53f title: Relay.Calling slug: /php/reference/calling max-toc-depth: 3 ---------------- [link]: #dial [relay-calling-call]: /docs/server-sdk/v2/php/reference/calling/call [relay-calling-dialresult]: /docs/server-sdk/v2/php/reference/calling/results/dial This represents the API interface for the Calling Relay Service. This object is used to make requests related to managing end to end calls. ## Methods ### dial Make an outbound Call and waits until it has been answered or hung up. **Parameters** | Parameter | Type | Required | Description | | --------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------- | | `$params` | `array` | **required** | Array with the following properties: | | `type` | `string` | **required** | The type of call. Only `phone` is currently supported. | | `from` | `string` | **required** | The party the call is coming from.
*Must be a SignalWire number or SIP endpoint that you own.* | | `to` | `string` | **required** | The party you are attempting to call. | | `timeout` | `number` | *optional* | The time, in seconds, the call will ring before going to voicemail. | **Returns** `React\Promise\Promise` - Promise object that will be fulfilled with a [`Relay.Calling.DialResult`][relay-calling-dialresult] object. **Examples** Make an outbound Call and grab the call object if it was answered. ```php 'phone', 'from' => '+1XXXXXXXXXX', 'to' => '+1YYYYYYYYYY' ]; $client->calling->dial($params)->done(function($dialResult) { if ($dialResult->isSuccessful()) { // Your active $call.. $call = $dialResult->getCall(); } }); ``` ### newCall Create a new `Call` object. The call has not started yet allowing you to attach event listeners on it. **Parameters** See [`Relay.Calling.Dial`][link] for the parameter list. **Returns** `Call` - A new [`Relay.Calling.Call`][relay-calling-call] object. **Examples** Create a new Call object. ```php 'phone', 'from' => '+1XXXXXXXXXX', 'to' => '+1YYYYYYYYYY' ]; $call = $client->calling->newCall($params); // Use the $call object... ```