The mystery of the trunks and contexts [solved]

I have a trunk that is equipped with several consecutive numbers

To intercept and use them to divert to extensions to use my choice “context=from-pstn-toheader” in “PEER Details” configuration

Everything seems to work, but in all other trunks that have only one number I use “context=from-pstn&from-pstn” but they stop working …

Someone explain why?

You can’t join together contexts like that. It needs to be just “from-pstn”

so I can not use “from-pstn” and “from-pstn-to header” even if they are different contexts?
but then what do I do?
if you use a custom context “extensions_custom.conf” like this:
[Custom-get-did-from-sip]
exten => 01821985050.1, Goto (from-trunk, $ {CUT (CUT (SIP_HEADER (To), @, 1),:, 2)}, 1)
It gives me problems too …
there will be a way to run a multi trunk number and simultaneously one or more trunks with a single number …?

Right now I am using for all trunk from-pstn-toheader

even for those with single number …

so it works

but not like in qunto AMI AGI level change the answers …

and then some software made by me behave in a different way …

ok now using “from-pstn-to header” runs everything and even AMI AGI react well
I had to work on incoming routes …
obviously the numbers are ported changing this rule behave differently … it is one thing to keep in mind
Thank you for the information was useful to me