Call Forwarding to external phone numbers not working

Hi FreePBX users and admins,

I’m running FreePBX with Asterisk 13.19.1.
My VoIP phone is Grandstream GXP1630.

Having trouble with call forwarding to external numbers (e.g. cell phone numbers) not working.

Call forwarding to internal extension works.

Does a c.f to external numbers has to be enabled by a different way? (e.g. creating a virtual extension “mapping” to the external number and then the c.f. is being forwarded to the internal virtual extension?)

I had a look at the Asterisk CLI (asterisk -rvvvvvvvvvvvvv) and it states that the forwarded call to the external number is not possible due to no free lines - I do have 10 SIP channels and currently nobody is using the system, so it is not possible that all channels are busy.

Asterisk CLI:

– Executing [[email protected]:1] NoOp(“Local/[email protected];2”, “TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 21 - failing through to other trunks”) in new stack
– Executing [[email protected]:2] ExecIf(“Local/[email protected];2”, “0?Set(CALLERID(number)=)”) in new stack
– Executing [[email protected]:8] Macro(“Local/[email protected];2”, “outisbusy,”) in new stack
– Executing [[email protected]:1] Progress(“Local/[email protected];2”, “”) in new stack
– Executing [[email protected]:2] GotoIf(“Local/[email protected];2”, “0?emergency,1”) in new stack
– Executing [[email protected]:3] GotoIf(“Local/[email protected];2”, “0?intracompany,1”) in new stack
– Executing [[email protected]:4] Playback(“Local/[email protected];2”, “all-circuits-busy-now&please-try-call-later, noanswer”) in new stack
– <Local/[email protected];2> Playing ‘all-circuits-busy-now.alaw’ (language ‘en’)
– Local/[email protected];1 is making progress passing it to Local/[email protected];2
– Executing [[email protected]:6] GotoIf(“Local/[email protected];2”, “1?start”) in new stack

P.S.: Dialing the external number directly from the VoIP phone does work without issues.

Thanks for your replies and advice!


That’s a valid phone number?

Hi dghundt,

I don’t know. At least it is not mine.

This trouble is usually caused by sending a caller ID that your trunking provider will not accept. By default, FreePBX attempts to display the number of the original caller on the forwarded-to mobile.

Some trunking providers won’t allow you to send a number that is not yours. In that situation, you can either use a different provider for forwarded calls, or set the outbound caller ID to your main company number (or some other number that they will accept). If you are using the Follow Me function for forwarding, set the Change External CID Configuration and Fixed CID Value as required.

Some trunking providers are fussy about the SIP headers. For example, you may need to send a fixed value in the From user field and put the desired caller ID in P-Asserted-Identity. See their documentation and set up the trunk accordingly.

Finally, caller ID coming into your system may be in a different format than what is required going out. Decide which format you want (displayed on phones, in contact and speed dial lists, etc.) and adjust the incoming and/or outgoing format accordingly.

At the Asterisk CLI, use
pjsip set logger on
(if a pjsip trunk) or
sip set debug on
(for chan_sip trunk)
then make a failing call to see what is being sent to the provider and what error they are returning. Compare that to what happens when you dial the mobile directly.

If you still have trouble, post a (suitably redacted) log with the SIP trace included.

1 Like

Hi Stewart1,

thank you very much for the detailed info.

Initially as a workaround I configured now the FOLLOW ME option and I think this is even better than the classical call forwarding.

It works very good.

Thank you again!


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.