FollowMe doesn't actually call any number

I have FollowMe setup to place a call in it’s own context and verified everythings correct. Despite that when it comes time in the dialplan to activate FollowMe it instead immediately proceeds onwards acting as though it already tried and failed to find me so I’m never actually called. I can’t figure out where things may be going wrong.

  1. Caller dials into number and hears main menu
  2. Caller presses 5 to reach me at work with FollowMe
  3. FollowMe instead immediately exits never calling the number and tells the caller it couldn’t find me at work
  4. The Dialplan then tells the caller their being taken back to the main menu
  5. FollowMe tells the caller again they can’t find me
  6. The Dialplan tells the caller again their being taken back to the main menu (Twice now)
  7. The caller is finally taken to the main menu

The error FollowMe reports is of an invalid extension in a context but the extension is actually there. Furthermore it doesn’t report the error until it never Follows me the first time around and then seems to fall through of sorts which is odd and only then does it report the odd error message.

= Setting global variable 'SIPDOMAIN' to '###'
    -- Executing [###@external:1] answer("PJSIP/###-inbound-00000015", "")
       > 0x### -- Strict RTP learning after remote address set to: ###:14408
       > 0x### -- Strict RTP switching to RTP target address ###:14408 as source                                                                                                 
    -- Executing [###@external:1] Goto("PJSIP/###-inbound-00000015", "main_menu,#,1")
    -- Goto (main_menu,#,1)
    -- Executing [#@main_menu:1] background("PJSIP/###-inbound-00000015", "custom/thanks-for-calling")                                                                                        
    -- <PJSIP/###-inbound-00000015> Playing 'custom/thanks-for-calling.slin' (language 'en')
       > 0x### -- Strict RTP learning complete - Locking on source address ###:14408                                                                                             
    -- Executing [5@main_menu:1] FollowMe("PJSIP/###-inbound-00000015", "work,sn")
    -- <PJSIP/###-inbound-00000015> Playing 'custom/followme-unable-to-locate.slin' (language 'en')                                                                                           
    -- <PJSIP/###-inbound-00000015> Playing 'custom/followme-pls-hold.slin' (language 'en')
    -- Started music on hold, class 'default', on channel 'PJSIP/###-inbound-00000015'
[2018-12-31-01:42:33] ERROR[12757][C-0000000c]: app_followme.c:1085 findmeexec: Extension '104@secure_internal' doesn't exist                                                                      
    -- No more steps left.
    -- Stopped music on hold on PJSIP/###-inbound-00000015
    -- <PJSIP/###-inbound-00000015> Playing 'custom/followme-unable-to-locate.slin' (language 'en')                                                                                           
    -- Executing [5@main_menu:1] Goto("PJSIP/###-inbound-00000015", "#,1")
    -- Goto (main_menu,#,1)
    -- Executing [#@main_menu:1] background("PJSIP/###-inbound-00000015", "custom/thanks-for-calling")                                                                                        
    -- <PJSIP/###-inbound-00000015> Playing 'custom/thanks-for-calling.slin' (language 'en')

I can’t figure it out

The error seems fairly explicit to me. Either the destination number or the context is wrong.

Earlier I had said:

In other words the error only pops up as a result of it not working right the first time around and seems to snow ball leading to the error you mentioned.

Regardless I’m dropping using it as in my dialplan I’ve found my own solution that would workout better than Follow Me so I no longer need support on this.

It uses the standard internal API for checking whether an extension exists and immediately calls the error message based on the same context and extension:

/* We check if the extension exists, before creating the ast_channel struct */

if (!ast_exists_extension(caller, tpargs-&gt;context, number, 1, S_COR(ast_channel_caller(caller)->id.number.valid, ast_channel_caller(caller)->;id.number.str, NULL))) {

    ast_log(LOG_ERROR, "Extension '%s@%s' doesn't exist\n", number, tpargs->context);

    continue;

}

The only subtlety is that it actually does a full test, including caller ID, but doesn’t log the caller ID.

When reporting a problem that relates to extension not found errors, they obvious thing to do is to supply the diaplan that defines that extension. Without that, I’ll just have to ask you if you are using "ex-girlfriend logic on priority one of that extension.