Forwarding FROM external not working anymore

Hi guys,

I currently have some problems with a forwarding which is set up on the phone (Yealink).
It has always worked fine, but since a few days not anymore.

I have the problem on different systems.

If a call comes from extarnal, it is not forwarded to an external number (cell phone).
If a call comes from internal, the redirection to an external number (cell phone) works as before without any problem.

Can anyone help me here please?

Friendly greetings

Here are some log data, which contain the number to which the call should be forwarded (pjsip set logger on):

VERBOSE[2608] res_pjsip_logger.c: <--- Received SIP response (512 bytes) from UDP:192.168.200.73:5060 --->	
SIP/2.0 302 Moved Temporarily	
Via: SIP/2.0/UDP 192.168.200.70:5060;rport=5060;branch=z9hG4bKPj15f864c8-27c8-4a66-af57-853ecc0381aa	
From: "+49176XXXXXXX3" <sip:[email protected]>;tag=d6518640-d0a4-431c-90c5-a8831e6209f3	
To: <sip:[email protected]>;tag=1024385768	
Call-ID: 812b38b2-e75c-44b0-a492-03d92ca7e9e7	
CSeq: 32760 INVITE	
Contact: <sip:[email protected]_doman.tld:5060>	
User-Agent: Yealink SIP-T54W 96.85.0.5	
Diversion: <sip:[email protected]>;reason=unconditional	
Content-Length: 0


VERBOSE[32507][C-0000049d] app_dial.c: PJSIP/36-00000ee8 connected line has changed. Saving it until answer for PJSIP/Telekom_Magenda_230-00000ee3
VERBOSE[32507][C-0000049d] app_dial.c: PJSIP/38-00000ee6 connected line has changed. Saving it until answer for PJSIP/Telekom_Magenda_230-00000ee3
VERBOSE[32507][C-0000049d] app_dial.c: Now forwarding PJSIP/Telekom_Magenda_230-00000ee3 to 'Local/0017XXXXXXX2@from-internal' (thanks to PJSIP/38-00000ee7)
VERBOSE[32507][C-0000049d] app_dial.c: Not accepting call completion offers from call-forward recipient Local/0017XXXXXXX2@from-internal-00000324;1




VERBOSE[32528][C-0000049d] pbx.c: Executing [0017XXXXXXX2@from-internal:1] Macro("Local/0017XXXXXXX2@from-internal-00000324;2", "user-callerid,LIMIT") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:1] Set("Local/0017XXXXXXX2@from-internal-00000324;2", "TOUCH_MONITOR=1598443038.5435") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:2] Set("Local/0017XXXXXXX2@from-internal-00000324;2", "AMPUSER=+49176XXXXXXX3") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:3] Set("Local/0017XXXXXXX2@from-internal-00000324;2", "HOTDESCKCHAN=0017XXXXXXX2@from-internal-00000324;2") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:4] Set("Local/0017XXXXXXX2@from-internal-00000324;2", "HOTDESKEXTEN=0017XXXXXXX2@from") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:5] Set("Local/0017XXXXXXX2@from-internal-00000324;2", "HOTDESKCALL=0") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:6] ExecIf("Local/0017XXXXXXX2@from-internal-00000324;2", "0?Set(HOTDESKCALL=1)") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:7] ExecIf("Local/0017XXXXXXX2@from-internal-00000324;2", "0?Set(CALLERID(name)=)") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:8] GotoIf("Local/0017XXXXXXX2@from-internal-00000324;2", "0?report") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:9] ExecIf("Local/0017XXXXXXX2@from-internal-00000324;2", "1?Set(REALCALLERIDNUM=+49176XXXXXXX3)") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:10] Set("Local/0017XXXXXXX2@from-internal-00000324;2", "AMPUSER=") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:11] GotoIf("Local/0017XXXXXXX2@from-internal-00000324;2", "0?limit") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:12] Set("Local/0017XXXXXXX2@from-internal-00000324;2", "AMPUSERCIDNAME=") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:13] ExecIf("Local/0017XXXXXXX2@from-internal-00000324;2", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:14] GotoIf("Local/0017XXXXXXX2@from-internal-00000324;2", "1?report") in new stack
VERBOSE[32528][C-0000049d] pbx_builtins.c: Goto (macro-user-callerid,s,23)
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:23] NoOp("Local/0017XXXXXXX2@from-internal-00000324;2", "Macro Depth is 1") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:24] GotoIf("Local/0017XXXXXXX2@from-internal-00000324;2", "1?report2:macroerror") in new stack
VERBOSE[32528][C-0000049d] pbx_builtins.c: Goto (macro-user-callerid,s,25)
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:25] GotoIf("Local/0017XXXXXXX2@from-internal-00000324;2", "1?continue") in new stack
VERBOSE[32528][C-0000049d] pbx_builtins.c: Goto (macro-user-callerid,s,44)
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:44] Set("Local/0017XXXXXXX2@from-internal-00000324;2", "CALLERID(number)=+49176XXXXXXX3") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:45] Set("Local/0017XXXXXXX2@from-internal-00000324;2", "CALLERID(name)=+49176XXXXXXX3") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:46] GotoIf("Local/0017XXXXXXX2@from-internal-00000324;2", "0?cnum") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:47] Set("Local/0017XXXXXXX2@from-internal-00000324;2", "CDR(cnam)=+49176XXXXXXX3") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:48] Set("Local/0017XXXXXXX2@from-internal-00000324;2", "CDR(cnum)=+49176XXXXXXX3") in new stack
VERBOSE[32530][C-0000049d] pbx.c: Executing [9038@zulu-desktop-phone:1] Set("Local/9038@zulu-desktop-phone-00000323;2", "_ZULU_ID=d2c38XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1cefd") in new stack
VERBOSE[32530][C-0000049d] pbx.c: Executing [9038@zulu-desktop-phone:2] Set("Local/9038@zulu-desktop-phone-00000323;2", "HASH(_SIPHEADERS,X-Zulu-Id)=d2c38XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1cefd") in new stack
VERBOSE[32530][C-0000049d] pbx.c: Executing [9038@zulu-desktop-phone:3] Stasis("Local/9038@zulu-desktop-phone-00000323;2", "zulu-desktop-call-processing,300,90,") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [s@macro-user-callerid:49] Set("Local/0017XXXXXXX2@from-internal-00000324;2", "CHANNEL(language)=de_DE") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [0017XXXXXXX2@from-internal:2] Set("Local/0017XXXXXXX2@from-internal-00000324;2", "ROUTEUSER=36") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [0017XXXXXXX2@from-internal:3] Set("Local/0017XXXXXXX2@from-internal-00000324;2", "ROUTEUSER=230") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [0017XXXXXXX2@from-internal:4] GotoIf("Local/0017XXXXXXX2@from-internal-00000324;2", "1?notblind") in new stack
VERBOSE[32528][C-0000049d] pbx_builtins.c: Goto (from-internal,0017XXXXXXX2,7)
VERBOSE[32528][C-0000049d] pbx.c: Executing [0017XXXXXXX2@from-internal:7] GotoIf("Local/0017XXXXXXX2@from-internal-00000324;2", "0?,0017XXXXXXX2,2:outbound-allroutes,0017XXXXXXX2,2") in new stack
VERBOSE[32528][C-0000049d] pbx_builtins.c: Goto (outbound-allroutes,0017XXXXXXX2,2)
VERBOSE[32528][C-0000049d] pbx.c: Auto fallthrough, channel 'Local/0017XXXXXXX2@from-internal-00000324;2' status is 'UNKNOWN'



VERBOSE[32507][C-0000049d] pbx.c: Executing [s@macro-hangupcall:4] NoOp("PJSIP/Telekom_Magenda_230-00000ee3", "Local/0017XXXXXXX2@from-internal-00000324;1 montior file= ") in new stack

Further testing:

It’s no problem with IPS.
I tested the same provider data and settings from a system where forwarding works with no problems.

It’s no problem with the phone hardware.
Same device model and firmware and settings on a system where forwarding works.

Freepbx(modules) + asterisk version are on the same level on the system where forwarding works as on the not working systems.

I don’t get it…

And more testing:

Follow me working nether on this way.

If I put (only) a extarnal number on the follow me list it only works for calls from internal.
On calls from external I get a busy tone.

So no workaround with the follow me function :frowning:

Same with the Forwarding option on the user control panel within the forwarding menu of my user.
Redirection from internal works; from external not.

And btw:
a redirection TO an internal number works FROM external AND internal with no problems

On a forwarded or follow-me call from external, the system normally passes the caller ID of the original caller. This caller ID is presented to the Outbound Route logic, in lieu of the extension number.

I am guessing that you have some form of restricted route such that the caller ID beginning with + did not match. Are you using the Class of Service or Extension Routes module? Or, do your Outbound Routes Dial Patterns have entries in the CallerID field?

If you still have trouble, paste the complete log for a failing call at pastebin.freepbx.org and post the link here.

1 Like

Are you from Germany? It seems to me that the forwarding tries to dial a number starting with two zeros…which cannot work in Germany…but I’m no pro…

1 Like

I assume that the system is using the ‘old school’ scheme of requiring a 0 before external numbers. IMO this is not a good idea, but I was just trying to answer the OP’s question.

1 Like

if @JustAnotherUser configured the forwarding in the endpoint HW…maybe this is the problem.

I usually create a custom extension with local/yourMobileNumber@outbound-allroutes in the dial field of the advanced settings. I add this custom extension to the ring group. So every call to this ring group always rings both…the desk phone and the mobile phone…

(the delay answering time of the mailbox of your mobile must be long enough, of course)

1 Like

Nope. He stated that he had also tried Follow-Me and forwarding from UCP.

1 Like

ok…I see…than he has to find out, why the forwarding to an external number adds a zero…
…and might have to adjust his outbound route…

1 Like

Nope. I’m nearly certain that his system permits (and probably requires) a zero before an external number. Just like many systems in North America require dialing 9 before an external number.

1 Like

Hi,

thanks for the reply

Are you using the Class of Service or Extension Routes module?

No

Or, do your Outbound Routes Dial Patterns have entries in the CallerID field?

No

Nope. I’m nearly certain that his system permits (and probably requires) a zero before an external number.

That’s right.
And the number entry works. If I call FROM internal to the number I set a forward (no matter followme or device forward or UCP forward) the call works.

The complete log:
https://pastebin.freepbx.org/view/2b3b28d7

+49176X. is the caller
+49814X. is the called number
+49171X. is the forward number

I just found “restricted route” in your log…I’ve never seen this on my systems…again I am no pro :wink:
Do you have any super special settings?
Just found this

2 Likes

another hint…did you buy and do you use the freePBX Extension Routes module?

2 Likes

I agree with @Charles_Darwin , you likely have Extension Routes installed and enabled (perhaps done by another admin). You need to allow ‘extensions’ beginning with + (or all extensions) to use the route in question.

2 Likes

No there is no Extension Routes module active (I didn’t bought that).
I can’t see no Extension Route settings inside the Outbound - Additional Settings nor is a Route CID defined

Here is another log from another system with the same problem:
https://pastebin.freepbx.org/view/ff969535

I configured the same provider with the same settings so the same numbers are used:

+49176X. is the caller
+49814X. is the called number
+49171X. is the forward number

But I have another system on this system the forward works with the exact same provider settings (so it did before on this system a few days before)

On the second system its even “better”…there you have 3 zeros instead of 2 as in the first (nonworking) system…followed by the digits of the area code (country code is missing)
pbx.c: Executing [00017xxxxxxxx@from-internal:

I am afraid I am not experienced enough…maybe there is something wrong with the context too? from-internal?

1 Like

It’s

+49 for germany

means

0049 to replace the +

and the 0 for outbound calls

so 0004989XXXX

yes, but it shows 00017…where 017x is the area code…this looks odd to me (the country code is missing). Maybe someone else with more experience can help you…

1 Like

The second system has a different problem with the same symptom.
5226 [2020-08-26 18:21:18] VERBOSE[97158][C-00000005] app_dial.c: Now forwarding PJSIP/MNet_ChanPJSIP(SRTP+SIPS)-00000011 to 'Local/000171359xxxx@from-internal' (thanks to PJSIP/10-00000012)
shows that the forwarding number was entered incorrectly.

It should either be 00171359xxxx or 00049171359xxxx or (if the system accepts it) +49171359xxxx.

1 Like

For the first system, please post 3 screenshots of the Oubound Route in question, showing the Route Settings, Dial Patterns and Additional Settings tabs.

1 Like