Trying to call 'SIP Alias' results in: rejected because extension not found in context 'from-sip-external'.`

Running FreePBX 17, all updates installed, with guest/anon SIP calls enabled.

New extension created, 511, I can successfully call [email protected] - the call is routed correctly.

I then added a SIP Alias to the extension 511 for user.name - then tried calling [email protected] but it results in:

NOTICE[478873] res_pjsip_session.c: anonymous: Call (UDP:xx.xx.xx.xx:31991) to extension 'user.name' rejected because extension not found in context 'from-sip-external'.

Would someone be so kind as to tell me what I’m possibly missing? Or am I misunderstanding the ‘SIP Alias’ on the extension?

Checking the from-sip-external dialplan, I see:

freepbx*CLI> dialplan show from-sip-external
[ Context 'from-sip-external' created by 'pbx_config' ]
  'h' =>            1. Hangup()                                   [extensions.conf:201]
  'i' =>            1. Hangup()                                   [extensions.conf:202]
  's' =>            1. GotoIf($["${SIPLANG}"!=""]?setlanguage:checkanon) [extensions.conf:189]
     [setlanguage]  2. Set(CHANNEL(language)=${SIPLANG})          [extensions.conf:190]
     [checkanon]    3. GotoIf($["${ALLOW_SIP_ANON}"!="yes"]?noanonymous) [extensions.conf:191]
                    4. Goto(from-trunk,${DID},1)                  [extensions.conf:192]
     [noanonymous]  5. Set(TIMEOUT(absolute)=15)                  [extensions.conf:193]
                    6. Set(receveip=${IF($["${CUT(CHANNEL,/,1)}" != "PJSIP"]?recvip:pjsip,remote_addr)}) [extensions.conf:194]
                    7. Log(WARNING,"Rejecting unknown SIP connection from ${CHANNEL(${receveip})}") [extensions.conf:195]
                    8. Answer()                                   [extensions.conf:196]
                    9. Wait(2)                                    [extensions.conf:197]
                    10. Playback(ss-noservice)                    [extensions.conf:198]
                    11. Playtones(congestion)                     [extensions.conf:199]
                    12. Congestion(5)                             [extensions.conf:200]
  't' =>            1. Hangup()                                   [extensions.conf:203]
  '_X.' =>          1. NoOp(Received incoming SIP connection from unknown peer to ${EXTEN}) [extensions.conf:186]
                    2. Set(DID=${IF($["${EXTEN:1:2}"=""]?s:${EXTEN})}) [extensions.conf:187]
                    3. Goto(s,1)                                  [extensions.conf:188]

However, the alias is set in extensions_additional.conf file - so I’m not sure if it’s not ‘seeing’ the alias, or whether extensions.conf automatically leads on to extensions_additional.conf?

This is the line that does the heavy lifting for from-sip-external

 '_X.' =>          1. NoOp(Received incoming SIP connection from unknown peer to ${EXTEN}) [extensions.conf:186]

See the _X., that will ONLY match a numeric sequence (or a string starting with digit, not sure). This was changed in version 17, because on 16, the line is:

'_.' =>           1. NoOp(Received incoming SIP connection from unknown peer to ${EXTEN}) [extensions.conf:186]

This is a 17 bug, we’ve seen another case of this where _. was changed to _X. in 17. Open a ticket on github.

1 Like

Will do - appreciate you taking the time to reply.

EDIT: Issue opened on issue-tracker:

1 Like

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