Restricted route

I have 2 pbx linked together by iax.
I can call from pbx1 to pbx2
From pbx2 to pbx1 it only works with a soft-phone, with the physical phones, i get this in the log;

Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] Macro(“SIP/4003-00000067”, “user-callerid,LIMIT”) in new stack
– Executing [[email protected]:1] Set(“SIP/4003-00000067”, “TOUCH_MONITOR=1457366880.139”) in new stack
– Executing [[email protected]:2] Set(“SIP/4003-00000067”, “AMPUSER=4003”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/4003-00000067”, “0?report”) in new stack
– Executing [[email protected]:4] ExecIf(“SIP/4003-00000067”, “1?Set(REALCALLERIDNUM=4003)”) in new stack
– Executing [[email protected]:5] Set(“SIP/4003-00000067”, “AMPUSER=4003”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/4003-00000067”, “0?limit”) in new stack
– Executing [[email protected]:7] Set(“SIP/4003-00000067”, “AMPUSERCIDNAME=Sandrine Bousquet”) in new stack
– Executing [[email protected]:8] GotoIf(“SIP/4003-00000067”, “0?report”) in new stack
– Executing [[email protected]:9] Set(“SIP/4003-00000067”, “AMPUSERCID=4003”) in new stack
– Executing [[email protected]:10] Set(“SIP/4003-00000067”, “__DIAL_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:11] Set(“SIP/4003-00000067”, “CALLERID(all)=“Sandrine Bousquet” <4003>”) in new stack
– Executing [[email protected]:12] GotoIf(“SIP/4003-00000067”, “0?limit”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/4003-00000067”, “1?Set(GROUP(concurrency_limit)=4003)”) in new stack
– Executing [[email protected]:14] ExecIf(“SIP/4003-00000067”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [[email protected]:15] GotoIf(“SIP/4003-00000067”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,29)
– Executing [[email protected]:29] Set(“SIP/4003-00000067”, “CALLERID(number)=4003”) in new stack
– Executing [[email protected]:30] Set(“SIP/4003-00000067”, “CALLERID(name)=Sandrine Bousquet”) in new stack
– Executing [[email protected]:31] Set(“SIP/4003-00000067”, “CDR(cnum)=4003”) in new stack
– Executing [[email protected]:32] Set(“SIP/4003-00000067”, “CDR(cnam)=Sandrine Bousquet”) in new stack
– Executing [[email protected]:33] Set(“SIP/4003-00000067”, “CHANNEL(language)=fr”) in new stack
– Executing [[email protected]:2] Set(“SIP/4003-00000067”, “ROUTEUSER=4003”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/4003-00000067”, “1?notblind”) in new stack
– Goto (from-internal,3010,6)
– Executing [[email protected]:6] GotoIf(“SIP/4003-00000067”, “1?restrictedroute-cfcd208495d565ef66e7dff9f98764da,3010,2:outbound-allroutes,3010,2”) in new stack
– Goto (restrictedroute-cfcd208495d565ef66e7dff9f98764da,3010,2)
[2016-03-07 11:08:00] WARNING[6514][C-0000005f]: pbx.c:6796 __ast_pbx_run: Channel ‘SIP/4003-00000067’ sent to invalid extension but no invalid handler: context,exten,priority=restrictedroute-cfcd208495d565ef66e7dff9f98764da,3010,2
– Executing [[email protected]:1] Hangup(“SIP/4003-00000067”, “”) in new stack
== Spawn extension (restrictedroute-cfcd208495d565ef66e7dff9f98764da, h, 1) exited non-zero on ‘SIP/4003-00000067’
– Remote UNIX connection
– Remote UNIX connection disconnected
– Remote UNIX connection
– Remote UNIX connection disconnected
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] Macro(“SIP/4003-00000068”, “user-callerid,LIMIT”) in new stack
– Executing [[email protected]:1] Set(“SIP/4003-00000068”, “TOUCH_MONITOR=1457366899.140”) in new stack
– Executing [[email protected]:2] Set(“SIP/4003-00000068”, “AMPUSER=4003”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/4003-00000068”, “0?report”) in new stack
– Executing [[email protected]:4] ExecIf(“SIP/4003-00000068”, “1?Set(REALCALLERIDNUM=4003)”) in new stack
– Executing [[email protected]:5] Set(“SIP/4003-00000068”, “AMPUSER=4003”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/4003-00000068”, “0?limit”) in new stack
– Executing [[email protected]:7] Set(“SIP/4003-00000068”, “AMPUSERCIDNAME=Sandrine Bousquet”) in new stack
– Executing [[email protected]:8] GotoIf(“SIP/4003-00000068”, “0?report”) in new stack
– Executing [[email protected]:9] Set(“SIP/4003-00000068”, “AMPUSERCID=4003”) in new stack
– Executing [[email protected]:10] Set(“SIP/4003-00000068”, “__DIAL_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:11] Set(“SIP/4003-00000068”, “CALLERID(all)=“Sandrine Bousquet” <4003>”) in new stack
– Executing [[email protected]:12] GotoIf(“SIP/4003-00000068”, “0?limit”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/4003-00000068”, “1?Set(GROUP(concurrency_limit)=4003)”) in new stack
– Executing [[email protected]:14] ExecIf(“SIP/4003-00000068”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [[email protected]:15] GotoIf(“SIP/4003-00000068”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,29)
– Executing [[email protected]:29] Set(“SIP/4003-00000068”, “CALLERID(number)=4003”) in new stack
– Executing [[email protected]:30] Set(“SIP/4003-00000068”, “CALLERID(name)=Sandrine Bousquet”) in new stack
– Executing [[email protected]:31] Set(“SIP/4003-00000068”, “CDR(cnum)=4003”) in new stack
– Executing [[email protected]:32] Set(“SIP/4003-00000068”, “CDR(cnam)=Sandrine Bousquet”) in new stack
– Executing [[email protected]:33] Set(“SIP/4003-00000068”, “CHANNEL(language)=fr”) in new stack
– Executing [[email protected]:2] Set(“SIP/4003-00000068”, “ROUTEUSER=4003”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/4003-00000068”, “1?notblind”) in new stack
– Goto (from-internal,3010,6)
– Executing [[email protected]:6] GotoIf(“SIP/4003-00000068”, “1?restrictedroute-cfcd208495d565ef66e7dff9f98764da,3010,2:outbound-allroutes,3010,2”) in new stack
– Goto (restrictedroute-cfcd208495d565ef66e7dff9f98764da,3010,2)
[2016-03-07 11:08:19] WARNING[6569][C-00000060]: pbx.c:6796 __ast_pbx_run: Channel ‘SIP/4003-00000068’ sent to invalid extension but no invalid handler: context,exten,priority=restrictedroute-cfcd208495d565ef66e7dff9f98764da,3010,2
– Executing [[email protected]:1] Hangup(“SIP/4003-00000068”, “”) in new stack
== Spawn extension (restrictedroute-cfcd208495d565ef66e7dff9f98764da, h, 1) exited non-zero on ‘SIP/4003-00000068’

I checked both extensions and they both have access to the link route.

http://wiki.freepbx.org/display/FPG/Outbound+Routes+Module talks about the outbound route module, including using restricted routes. I’m pretty sure I sent you to this the last time you asked, since I looked it up about 10 days ago.