's' extensions "not found"

Hello,

I recently created extensions ‘s’ in my dialplan to make my life easier :slight_smile:

‘s’ => 1. GotoIf(["{CALLERID(num)}" = “778988027”]?oui:non) [extensions.conf:51]
[oui] 2. Set(CALLERID(num)={CALLERID(name)}) [extensions.conf:52] 3. Goto(appel_interne_LGE,1{CALLERID(dnid):8},1) [extensions.conf:53]
[non] 4. NoOp({CALLERID(nun)}) [extensions.conf:54] 5. Goto(appel_interne_LGE,1{CALLERID(dnid):8},1) [extensions.conf:55]

But when I call a linked number, it doesn’t take the ‘s’ extension and tells me that it can’t find the number

[May 6 11:59:46] NOTICE[1801][C-00003677]: chan_sip.c:26522 handle_request_invite: Call from ‘778988225’ (109.69.219.174:5060) to extension ‘+3243495354’ rejected because extension not found in context ‘appel_in’.

I do not understand, if the extension does not exist, it is not supposed to go to the extensions ‘s’?

Thanks :slight_smile:

No. The “s” extension is only used if the extension is not known - not if the extension is specified (+3243495354 in this case) and not found.

You’d want to use a pattern match instead.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.