From 663544ed57520278e41f2c5ae5c3c8eae4a35abc Mon Sep 17 00:00:00 2001 From: manny-r31 Date: Tue, 25 Nov 2025 12:02:14 -0500 Subject: [PATCH 1/5] Created SWML guide for Call forwarding --- .../how-to-forward-calls/index.mdx | 47 +++++++++++++++++-- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx b/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx index 116e550af..00281b7fc 100644 --- a/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx +++ b/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx @@ -8,19 +8,56 @@ description: Use cXML to forward calls # Forwarding Calls -In [Making and Receiving Phone Calls](../making-and-receiving-phone-calls/index.mdx) we learned how to use XML -bins to define what should happen when a call is received by one of your +In [Making and Receiving Phone Calls](../making-and-receiving-phone-calls/index.mdx) we learned how to use SWML and cXML +to define what should happen when a call is received by one of your SignalWire numbers. In that case, we just played some audio. In this article, instead, we will use the same technique to forward the call to a different number. -## cXML for Call Forwarding +## SWML for call forwarding + +We are going to define the forwarding instructions in a SWML script hosted on +SignalWire. To create a new SWML script, navigate to the "Resources" section from your sidebar. There, create +a new script, and select the "SWML" option. + +### Creating your call forwarding script + +We will start by creating a new SWML script, and pasting the following in it: + +```yaml andJson +version: 1.0.0 +sections: + main: + - connect: + from: "%{call.from}" + to: "+15551234567" +``` + +You should replace `+15551234567` with a real phone number, for example your personal one. + +We used the [`connect`](/swml/methods/connect) method to call the number you +would like the call to be forwarded to. Notice how we used its `from` parameter to ensure that the +number of the original caller (stored in the `call.from` variable) is maintained as caller ID for the forwarded call. + +### Assigning the script to a SignalWire phone number + +The final step is to configure one of your SignalWire phone numbers to answer calls using the SWML script we just created. You can do that from the **Phone Numbers** section: + +![Assign Resource](@image/dashboard/phone-numbers/assign-resource-voice.png) + +After clicking on the **Phone Numbers** section, click on the phone number that you'd like to assign,then click **edit settings**. +From there, click **Assign Resource** and assign the newly created SWML script. +Now any calls that go to that number will get forwarded with the caller ID being the original number that called in. + +## cXML for call forwarding We are going to define the forwarding instructions in an cXML bin hosted on SignalWire. To create a new cXML bin, navigate to the "Resources" section from your sidebar. There, create a new script, and select the "cXML" option. +### Creating your call forwarding script + Create a new cXML bin, and paste the following XML in it: ```xml @@ -44,7 +81,7 @@ import NewLegacy from '/docs/main/_common/dashboard/_ui-accordion.mdx' If you're still on **Legacy UI**, refer to [Making and Receiving Phone Calls](../making-and-receiving-phone-calls/index.mdx) for detailed instructions. -## Assigning the Bin to a SignalWire Phone Number +### Assigning the Bin to a SignalWire Phone Number The final step is to configure one of your SignalWire phone numbers to answer calls using the XML bin we just created. You can do that from the "Phone Numbers" section: @@ -58,6 +95,6 @@ You are now ready to test call forwarding. If you are forwarding calls to a personal number, you may wonder how to differentiate incoming calls as either personal or ones forwarded from your SignalWire number. Please see our guide on [Call Whisper](/compatibility-api/guides/voice/general/setting-up-call-whispering-in-cxml) for a handy solution. -XML bins offer a quick and easy way to get started with common use cases. If you are an advanced developer, or you need more +SWML scripts and cXML bins offer a quick and easy way to get started with common use cases. If you are an advanced developer, or you need more flexibility and real-time control on your calls, you may be interested in our guide about how to [make and receive calls in Node.js](/sdks/realtime-sdk/guides/voice/first-steps-with-voice). From 1a7f2609a2f77a4b61de78be27afa63bf0de903d Mon Sep 17 00:00:00 2001 From: manny-r31 Date: Tue, 25 Nov 2025 15:22:39 -0500 Subject: [PATCH 2/5] Created SWML guide for Call forwarding --- .../how-to-forward-calls/index.mdx | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx b/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx index 00281b7fc..9db3072f1 100644 --- a/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx +++ b/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx @@ -17,13 +17,13 @@ number. ## SWML for call forwarding -We are going to define the forwarding instructions in a SWML script hosted on -SignalWire. To create a new SWML script, navigate to the "Resources" section from your sidebar. There, create -a new script, and select the "SWML" option. +We are going to define the forwarding instructions in a SWML script hosted on SignalWire. +To create a new SWML script, navigate to the **Resources** section from your sidebar. +There, create a new script, and select the **SWML Script** option. ### Creating your call forwarding script -We will start by creating a new SWML script, and pasting the following in it: +Once you are in the menu for creating a SWML script, copy and paste the following script: ```yaml andJson version: 1.0.0 @@ -34,21 +34,23 @@ sections: to: "+15551234567" ``` +This script will handle the call by making an outbound dial, setting the `from` address to be the address which created the initial call, +and then forwarding that call to the number specified in the `to` field. You should replace `+15551234567` with a real phone number, for example your personal one. -We used the [`connect`](/swml/methods/connect) method to call the number you -would like the call to be forwarded to. Notice how we used its `from` parameter to ensure that the -number of the original caller (stored in the `call.from` variable) is maintained as caller ID for the forwarded call. +We used the [`connect`](/swml/methods/connect) method to call the number you would like the call to be forwarded to. +Notice how we used its `from` parameter to ensure that the number of the original caller (stored in the `call.from` variable) is maintained as caller ID for the forwarded call. ### Assigning the script to a SignalWire phone number -The final step is to configure one of your SignalWire phone numbers to answer calls using the SWML script we just created. You can do that from the **Phone Numbers** section: +The final step is to configure one of your SignalWire phone numbers to answer calls using the SWML script we just created. +You can do that from the **Phone Numbers** section: ![Assign Resource](@image/dashboard/phone-numbers/assign-resource-voice.png) -After clicking on the **Phone Numbers** section, click on the phone number that you'd like to assign,then click **edit settings**. +After clicking on the **Phone Numbers** section, click on the phone number that you'd like to assign, then click **edit settings**. From there, click **Assign Resource** and assign the newly created SWML script. -Now any calls that go to that number will get forwarded with the caller ID being the original number that called in. +Now any calls that are routed to that number will be forwarded, with the caller ID being the original number that called in. ## cXML for call forwarding From f45c48a0cc2994c867c6491a97d61606341b7b97 Mon Sep 17 00:00:00 2001 From: manny-r31 Date: Mon, 1 Dec 2025 09:15:57 -0500 Subject: [PATCH 3/5] Minor adjustments --- .../voice/getting-started/how-to-forward-calls/index.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx b/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx index 9db3072f1..01bed28ad 100644 --- a/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx +++ b/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx @@ -36,7 +36,9 @@ sections: This script will handle the call by making an outbound dial, setting the `from` address to be the address which created the initial call, and then forwarding that call to the number specified in the `to` field. -You should replace `+15551234567` with a real phone number, for example your personal one. + +:::tip You should replace `+15551234567` with a real phone number, for example your personal one. +::: We used the [`connect`](/swml/methods/connect) method to call the number you would like the call to be forwarded to. Notice how we used its `from` parameter to ensure that the number of the original caller (stored in the `call.from` variable) is maintained as caller ID for the forwarded call. @@ -97,6 +99,6 @@ You are now ready to test call forwarding. If you are forwarding calls to a personal number, you may wonder how to differentiate incoming calls as either personal or ones forwarded from your SignalWire number. Please see our guide on [Call Whisper](/compatibility-api/guides/voice/general/setting-up-call-whispering-in-cxml) for a handy solution. -SWML scripts and cXML bins offer a quick and easy way to get started with common use cases. If you are an advanced developer, or you need more +SWML and cXML Scripts offer a quick and easy way to get started with common use cases. If you are an advanced developer, or you need more flexibility and real-time control on your calls, you may be interested in our guide about how to [make and receive calls in Node.js](/sdks/realtime-sdk/guides/voice/first-steps-with-voice). From 1821b65c251a363f2865d106eeedec9de465284d Mon Sep 17 00:00:00 2001 From: manny-r31 Date: Mon, 1 Dec 2025 09:43:46 -0500 Subject: [PATCH 4/5] Minor adjustments --- .../how-to-forward-calls/index.mdx | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx b/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx index 01bed28ad..534e6fb89 100644 --- a/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx +++ b/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx @@ -8,7 +8,7 @@ description: Use cXML to forward calls # Forwarding Calls -In [Making and Receiving Phone Calls](../making-and-receiving-phone-calls/index.mdx) we learned how to use SWML and cXML +In [Making and Receiving Phone Calls](/voice/getting-started/making-and-receiving-phone-calls) we learned how to use SWML and cXML to define what should happen when a call is received by one of your SignalWire numbers. In that case, we just played some audio. In this article, instead, we will use the same technique to forward the call to a different @@ -17,13 +17,13 @@ number. ## SWML for call forwarding -We are going to define the forwarding instructions in a SWML script hosted on SignalWire. -To create a new SWML script, navigate to the **Resources** section from your sidebar. -There, create a new script, and select the **SWML Script** option. +We are going to define the forwarding instructions in a SWML Script hosted on SignalWire. +To create a new SWML Script, navigate to the **Resources** section from your sidebar. +There, create a new Script, and select the **SWML Script** option. -### Creating your call forwarding script +### Creating your call forwarding Script -Once you are in the menu for creating a SWML script, copy and paste the following script: +Once you are in the menu for creating a SWML Script, copy and paste the following Script: ```yaml andJson version: 1.0.0 @@ -34,35 +34,36 @@ sections: to: "+15551234567" ``` -This script will handle the call by making an outbound dial, setting the `from` address to be the address which created the initial call, +This Script will handle the call by making an outbound dial, setting the `from` address to be the address which created the initial call, and then forwarding that call to the number specified in the `to` field. -:::tip You should replace `+15551234567` with a real phone number, for example your personal one. +:::info +You should replace `+15551234567` with a real phone number, for example your personal one. ::: We used the [`connect`](/swml/methods/connect) method to call the number you would like the call to be forwarded to. Notice how we used its `from` parameter to ensure that the number of the original caller (stored in the `call.from` variable) is maintained as caller ID for the forwarded call. -### Assigning the script to a SignalWire phone number +### Assigning the Script to a SignalWire phone number -The final step is to configure one of your SignalWire phone numbers to answer calls using the SWML script we just created. +The final step is to configure one of your SignalWire phone numbers to answer calls using the SWML Script we just created. You can do that from the **Phone Numbers** section: ![Assign Resource](@image/dashboard/phone-numbers/assign-resource-voice.png) After clicking on the **Phone Numbers** section, click on the phone number that you'd like to assign, then click **edit settings**. -From there, click **Assign Resource** and assign the newly created SWML script. +From there, click **Assign Resource** and assign the newly created SWML Script. Now any calls that are routed to that number will be forwarded, with the caller ID being the original number that called in. ## cXML for call forwarding -We are going to define the forwarding instructions in an cXML bin hosted on -SignalWire. To create a new cXML bin, navigate to the "Resources" section from your sidebar. There, create -a new script, and select the "cXML" option. +We are going to define the forwarding instructions in an cXML Script hosted on +SignalWire. To create a new cXML Script, navigate to the "Resources" section from your sidebar. There, create +a new Script, and select the "cXML" option. -### Creating your call forwarding script +### Creating your call forwarding Script -Create a new cXML bin, and paste the following XML in it: +Create a new cXML Script, and paste the following XML in it: ```xml @@ -71,9 +72,10 @@ Create a new cXML bin, and paste the following XML in it: ``` +:::info You should replace `123-456-7891` with a real phone number, for example your personal one. - +::: We used the [``](/compatibility-api/cxml/voice/dial) verb to call the number you would like the call to be forwarded to. Notice how we used its `callerId` attribute to ensure that the number of the original caller (stored in the `From` variable) is maintained as caller id for the forwarded call. You can read more about the @@ -85,9 +87,9 @@ import NewLegacy from '/docs/main/_common/dashboard/_ui-accordion.mdx' If you're still on **Legacy UI**, refer to [Making and Receiving Phone Calls](../making-and-receiving-phone-calls/index.mdx) for detailed instructions. -### Assigning the Bin to a SignalWire Phone Number +### Assigning the Script to a SignalWire Phone Number -The final step is to configure one of your SignalWire phone numbers to answer calls using the XML bin we just created. You can do that from the "Phone Numbers" section: +The final step is to configure one of your SignalWire phone numbers to answer calls using the XML Script we just created. You can do that from the "Phone Numbers" section: ![Assign Resource](@image/dashboard/phone-numbers/assign-resource-voice.png) From 33951c9f33f4354da664a80cf61cd963be0128a7 Mon Sep 17 00:00:00 2001 From: manny-r31 Date: Mon, 1 Dec 2025 09:49:42 -0500 Subject: [PATCH 5/5] Various grammatical changes --- .../how-to-forward-calls/index.mdx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx b/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx index 534e6fb89..b4af29915 100644 --- a/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx +++ b/website/docs/main/home/calling/voice/getting-started/how-to-forward-calls/index.mdx @@ -37,14 +37,14 @@ sections: This Script will handle the call by making an outbound dial, setting the `from` address to be the address which created the initial call, and then forwarding that call to the number specified in the `to` field. -:::info -You should replace `+15551234567` with a real phone number, for example your personal one. +:::info +You should replace `+15551234567` with a real phone number, for example your personal one. ::: We used the [`connect`](/swml/methods/connect) method to call the number you would like the call to be forwarded to. Notice how we used its `from` parameter to ensure that the number of the original caller (stored in the `call.from` variable) is maintained as caller ID for the forwarded call. -### Assigning the Script to a SignalWire phone number +### Assigning the Script to a SignalWire Phone Number The final step is to configure one of your SignalWire phone numbers to answer calls using the SWML Script we just created. You can do that from the **Phone Numbers** section: @@ -57,9 +57,9 @@ Now any calls that are routed to that number will be forwarded, with the caller ## cXML for call forwarding -We are going to define the forwarding instructions in an cXML Script hosted on -SignalWire. To create a new cXML Script, navigate to the "Resources" section from your sidebar. There, create -a new Script, and select the "cXML" option. +We are going to define the forwarding instructions in a cXML Script hosted on SignalWire. +To create a new cXML Script, navigate to the **Resources** section from your sidebar. +There, create a new Script, and select the **cXML Script** option. ### Creating your call forwarding Script @@ -72,28 +72,28 @@ Create a new cXML Script, and paste the following XML in it: ``` -:::info -You should replace `123-456-7891` with a real phone number, for example your -personal one. +:::info +You should replace `123-456-7891` with a real phone number, for example your personal one. ::: + We used the [``](/compatibility-api/cxml/voice/dial) verb to call the number you would like the call to be forwarded to. Notice how we used its `callerId` attribute to ensure that the -number of the original caller (stored in the `From` variable) is maintained as caller id for the forwarded call. You can read more about the +number of the original caller (stored in the `From` variable) is maintained as caller ID for the forwarded call. You can read more about the templating system and how it works in our [dedicated guide](/compatibility-api/guides/general/utilizing-mustache-templates). import NewLegacy from '/docs/main/_common/dashboard/_ui-accordion.mdx' -If you're still on **Legacy UI**, refer to [Making and Receiving Phone Calls](../making-and-receiving-phone-calls/index.mdx) for detailed instructions. +If you're still on **Legacy UI**, refer to [Making and Receiving Phone Calls](/voice/getting-started/making-and-receiving-phone-calls) for detailed instructions. ### Assigning the Script to a SignalWire Phone Number -The final step is to configure one of your SignalWire phone numbers to answer calls using the XML Script we just created. You can do that from the "Phone Numbers" section: +The final step is to configure one of your SignalWire phone numbers to answer calls using the cXML Script we just created. You can do that from the **Phone Numbers** section: ![Assign Resource](@image/dashboard/phone-numbers/assign-resource-voice.png) -Refer to [Making and Receiving Phone Calls](../making-and-receiving-phone-calls/index.mdx#receiving-incoming-calls) for more information about this step. +Refer to [Making and Receiving Phone Calls](/voice/getting-started/making-and-receiving-phone-calls#receiving-incoming-calls) for more information about this step. ## Conclusion