Looks like you are using python to dynamically generate your subscriber directory files?  I suspect the bug is in the python script which is populating a context variable into the generated file.
On Aug 12, 2016, at 3:36 PM, acheraime . <acheraime@gmail.com> wrote:

This is a call from an internal registered user to another one.

2016-08-12 18:24:47.965022 [DEBUG] switch_core_state_machine.c:473 (sofia/internal/401942957943@sip.cvraptzg6qbq5lmj) Running State Change CS_NEW
2016-08-12 18:24:47.965022 [DEBUG] sofia.c:9099 sofia/internal/401942957943@sip.cvraptzg6qbq5lmj receiving invite from 10.10.250.3:5060 version: 1.7.0 git bd371f4 2015-08-24 13:36:23Z 64bit
2016-08-12 18:24:47.965022 [DEBUG] sofia.c:9266 IP 10.10.250.3 Rejected by acl "domains". Falling back to Digest auth.
2016-08-12 18:24:47.965022 [DEBUG] switch_core_state_machine.c:492 (sofia/internal/401942957943@sip.cvraptzg6qbq5lmj) State NEW
2016-08-12 18:24:47.965022 [DEBUG] sofia.c:2147 detaching session 6614a55f-bbf1-4b9e-8a25-d5e31e576bb4
2016-08-12 18:24:48.025008 [DEBUG] sofia.c:2255 Re-attaching to session 6614a55f-bbf1-4b9e-8a25-d5e31e576bb4
2016-08-12 18:24:48.045005 [DEBUG] sofia.c:9099 sofia/internal/401942957943@sip.cvraptzg6qbq5lmj receiving invite from 10.10.250.3:5060 version: 1.7.0 git bd371f4 2015-08-24 13:36:23Z 64bit
2016-08-12 18:24:48.045005 [DEBUG] sofia.c:9266 IP 10.10.250.3 Rejected by acl "domains". Falling back to Digest auth.
2016-08-12 18:24:48.045005 [NOTICE] mod_python.c:212 Invoking py module: switch_connector.handler
2016-08-12 18:24:49.124969 [DEBUG] mod_python.c:283 Call python script
.........

2016-08-12 18:24:49.304970 [DEBUG] mod_sofia.c:141 sofia/internal/401942957943@sip.cvraptzg6qbq5lmj SOFIA ROUTING
2016-08-12 18:24:49.304970 [DEBUG] switch_core_state_machine.c:166 sofia/internal/401942957943@sip.cvraptzg6qbq5lmj Standard ROUTING
2016-08-12 18:24:49.304970 [INFO] mod_dialplan_xml.c:637 Processing 401942957943 <401942957943>->2320 in context public

From there the extension will not be found and the call will be dropped. The next call I try will be successful. 

Below is a successful one.
-------------------------------------------------------------------------------------------------------------------
2016-08-12 18:31:34.205008 [NOTICE] switch_channel.c:1089 New Channel sofia/internal/401942957943@sip.cvraptzg6qbq5lmj [d3eeae13-a4e6-4cf1-b311-4cff5bff4523]
2016-08-12 18:31:34.205008 [DEBUG] switch_core_state_machine.c:473 (sofia/internal/401942957943@sip.cvraptzg6qbq5lmj) Running State Change CS_NEW
2016-08-12 18:31:34.205008 [DEBUG] sofia.c:9099 sofia/internal/401942957943@sip.cvraptzg6qbq5lmj receiving invite from 10.10.250.3:5060 version: 1.7.0 git bd371f4 2015-08-24 13:36:23Z 64bit
2016-08-12 18:31:34.205008 [DEBUG] sofia.c:9266 IP 10.10.250.3 Rejected by acl "domains". Falling back to Digest auth.
2016-08-12 18:31:34.205008 [DEBUG] switch_core_state_machine.c:492 (sofia/internal/401942957943@sip.cvraptzg6qbq5lmj) State NEW
2016-08-12 18:31:34.205008 [DEBUG] sofia.c:2147 detaching session d3eeae13-a4e6-4cf1-b311-4cff5bff4523
2016-08-12 18:31:34.804982 [DEBUG] sofia.c:2255 Re-attaching to session d3eeae13-a4e6-4cf1-b311-4cff5bff4523
2016-08-12 18:31:34.804982 [DEBUG] sofia.c:9099 sofia/internal/401942957943@sip.cvraptzg6qbq5lmj receiving invite from 10.10.250.3:5060 version: 1.7.0 git bd371f4 2015-08-24 13:36:23Z 64bit
2016-08-12 18:31:34.804982 [DEBUG] sofia.c:9266 IP 10.10.250.3 Rejected by acl "domains". Falling back to Digest auth.
2016-08-12 18:31:34.824970 [NOTICE] mod_python.c:212 Invoking py module: switch_connector.handler
....
2016-08-12 18:31:34.944971 [DEBUG] switch_core_state_machine.c:473 (sofia/internal/401942957943@sip.cvraptzg6qbq5lmj) Running State Change CS_ROUTING
2016-08-12 18:31:34.944971 [DEBUG] switch_channel.c:2239 (sofia/internal/401942957943@sip.cvraptzg6qbq5lmj) Callstate Change DOWN -> RINGING
2016-08-12 18:31:34.944971 [DEBUG] switch_core_state_machine.c:532 (sofia/internal/401942957943@sip.cvraptzg6qbq5lmj) State ROUTING
2016-08-12 18:31:34.944971 [DEBUG] mod_sofia.c:141 sofia/internal/401942957943@sip.cvraptzg6qbq5lmj SOFIA ROUTING
2016-08-12 18:31:34.944971 [DEBUG] switch_core_state_machine.c:166 sofia/internal/401942957943@sip.cvraptzg6qbq5lmj Standard ROUTING
2016-08-12 18:31:34.944971 [INFO] mod_dialplan_xml.c:637 Processing 401942957943 <401942957943>->2320 in context Local_d7082761-3178-4cab-955a-bddaee110767
2016-08-12 18:31:34.944971 [NOTICE] mod_python.c:212 Invoking py module: switch_connector.handler




On Fri, Aug 12, 2016 at 3:15 PM, Dave Horton <daveh@beachdognet.com> wrote:
can you post some debug logs?  I imagine that would make it clear
On Aug 12, 2016, at 12:09 PM, acheraime . <acheraime@gmail.com> wrote:

Hi,

I'm experiencing an issue where for some reason, internal authenticated calls land to the public context. This is very random and the next attempt always go to the right context.
Any idea of what might be the root cause?


Thanks and Happy Friday!


--
Adolphe CHER-AIME

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



--
Adolphe CHER-AIME

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org