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/[email protected]' (thanks to PJSIP/38-00000ee7)
VERBOSE[32507][C-0000049d] app_dial.c: Not accepting call completion offers from call-forward recipient Local/[email protected];1




VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:1] Macro("Local/[email protected];2", "user-callerid,LIMIT") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:1] Set("Local/[email protected];2", "TOUCH_MONITOR=1598443038.5435") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:2] Set("Local/[email protected];2", "AMPUSER=+49176XXXXXXX3") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:3] Set("Local/[email protected];2", "[email protected];2") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:4] Set("Local/[email protected];2", "[email protected]") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:5] Set("Local/[email protected];2", "HOTDESKCALL=0") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:6] ExecIf("Local/[email protected];2", "0?Set(HOTDESKCALL=1)") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:7] ExecIf("Local/[email protected];2", "0?Set(CALLERID(name)=)") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:8] GotoIf("Local/[email protected];2", "0?report") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:9] ExecIf("Local/[email protected]0324;2", "1?Set(REALCALLERIDNUM=+49176XXXXXXX3)") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:10] Set("Local/[email protected];2", "AMPUSER=") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:11] GotoIf("Local/[email protected];2", "0?limit") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:12] Set("Local/[email protected];2", "AMPUSERCIDNAME=") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:13] ExecIf("Local/[email protected];2", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:14] GotoIf("Local/[email protected];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 [[email protected]:23] NoOp("Local/[email protected];2", "Macro Depth is 1") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:24] GotoIf("Local/[email protected];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 [[email protected]:25] GotoIf("Local/[email protected];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 [[email protected]:44] Set("Local/[email protected];2", "CALLERID(number)=+49176XXXXXXX3") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:45] Set("Local/[email protected];2", "CALLERID(name)=+49176XXXXXXX3") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:46] GotoIf("Local/[email protected];2", "0?cnum") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:47] Set("Local/[email protected];2", "CDR(cnam)=+49176XXXXXXX3") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:48] Set("Local/[email protected];2", "CDR(cnum)=+49176XXXXXXX3") in new stack
VERBOSE[32530][C-0000049d] pbx.c: Executing [[email protected]:1] Set("Local/[email protected];2", "_ZULU_ID=d2c38XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1cefd") in new stack
VERBOSE[32530][C-0000049d] pbx.c: Executing [[email protected]:2] Set("Local/[email protected];2", "HASH(_SIPHEADERS,X-Zulu-Id)=d2c38XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1cefd") in new stack
VERBOSE[32530][C-0000049d] pbx.c: Executing [[email protected]:3] Stasis("Local/[email protected];2", "zulu-desktop-call-processing,300,90,") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:49] Set("Local/[email protected];2", "CHANNEL(language)=de_DE") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:2] Set("Local/[email protected];2", "ROUTEUSER=36") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:3] Set("Local/[email protected];2", "ROUTEUSER=230") in new stack
VERBOSE[32528][C-0000049d] pbx.c: Executing [[email protected]:4] GotoIf("Local/[email protected];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 [[email protected]:7] GotoIf("Local/[email protected];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/[email protected];2' status is 'UNKNOWN'



VERBOSE[32507][C-0000049d] pbx.c: Executing [[email protected]gupcall:4] NoOp("PJSIP/Telekom_Magenda_230-00000ee3", "Local/[email protected];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/[email protected] 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 [[email protected]:

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/[email protected]' (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