*** id: 510fce50-36ba-4684-a891-b17922a7e61c title: connectPhone slug: /node/reference/voice/call/connect-phone description: connectPhone method for the Call class. max-toc-depth: 3 ---------------- [call-10]: /docs/server-sdk/v3/node/reference/voice/call [call-19]: /docs/server-sdk/v3/node/reference/voice/call [callstate-6]: /docs/server-sdk/v3/node/reference/voice/call-state [voice-call-3]: /docs/server-sdk/v3/node/reference/voice/call/disconnected [voiceplaylist-4]: /docs/server-sdk/v3/node/reference/voice/playlist ### connectPhone * **connectPhone**(`params`): `Promise` - See [Call][call-19] for more details. Attempt to connect an existing call to a new outbound phone call. The two devices will hear each other. You can wait until the new peer is disconnected by calling [disconnected][voice-call-3]. #### Parameters | Name | Type | Description | | :-------------------------- | :--------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `params` | `Object` | - | | `params.callStateEvents` | `string[]` | An optional array of event names to be notified about. Allowed values are `created`, `ringing`, `answered`, and `ended`. Default is `ended`. | | `params.callStateUrl` | `string` | Optional webhook URL to which SignalWire will send call status change notifications. See the payload specifications under [`CallState`][callstate-6]. | | `params.from` | `string` | The party the call is coming from. Must be a SignalWire number or SIP endpoint that you own. | | `params.maxPricePerMinute?` | `number` | The maximum price in USD acceptable for the call to be created. If the rate for the call is greater than this value, the call will not be created. If not set, all calls will be created. Price can have a maximum of four decimal places, i.e. 0.0075. | | `params.ringback?` | [`VoicePlaylist`][voiceplaylist-4] | Ringback audio to play to call leg. You can play audio, TTS, silence or ringtone. | | `params.timeout?` | `number` | The time, in seconds, the call will ring before it is considered unanswered. | | `params.to` | `string` | The party you are attempting to call. | #### Returns `Promise` - See [Call][call-19] for more details. A promise that resolves to a [`Call`][call-10] object that you can use to control the new peer. The promise resolves only after the new peer picks up the call. #### Example ```js const peer = await call.connectPhone({ from: "+xxxxxx", to: "+yyyyyy", timeout: 30, }); await call.playTTS({ text: "You are peer 1" }); await peer.playTTS({ text: "You are peer 2" }); await call.disconnected(); await call.playTTS({ text: "The peer disconnected" }); ```