How to divide internal and external incoming calls

well, thank you )
but I think that the trick by lgaetzLorne Gaetz will do)))
regards
sergey

Go read the reply I left in …Why register multiple lines on same phone to same extension?

I’m also locking for means to handle internal and external calls differently. Could you elaborate on how you implemented that?

The simplest solution is to set up ring groups for your inbound calls and always route the calls from your trunks and inbound routes to one of them. This way, your ring group options take precedence over the extension settings and your extensions can process the calls directly.

If that’s too simple (or doesn’t meet your needs) you can write a special context to do almost anything you want.

Thank you Dave, I have to evaluate that. It might be enough. But since there is also a need for a DND/Forward-Override, I’ll have to dig into the dialplan and customizing anyway.

Now I’m looking into how to adapt the forwarding behavior on busy and no answer based on the CID of the caller. So far it seems I have to adapt [ext-local] by putting [ext-local-custom] into extensions_custom.conf. But until now I have no clue what to put in there

this line:
exten => 454,n,GotoIf($["${DIALSTATUS}"=“NOANSWER”]?from-did-direct,101,1)

has to be extended to eval e.g. the CID of the caller. And only forward to 101 if the caller is from outside. First a simple solution to get it going and understand it. Later there must be some kind of central macro used for every extension, since I don’t want to edit everything, when new phones or extensions are configured.