If your ITSP passed the number in the standard SIP way (request URI user part), I would expect an error message about the number not being found, so I assume your ITSP is not passing the called number, or not passing it in the standard SIP way. You will need to find out how they are passing it. It may be in the To: header. Unfortunately, whilst Asterisk will set To: based on CALLERID(dnid), in the versions I have looked at, it will not do the reverse. If that is the case, you will need to get the header and analyse it with string manipulation functions.
I’m assuming that you are quoting the dialplan directly under the context specified in sip.conf, not in some macro or subroutine.
For a well behaving ITSP, you would match using an extension pattern match, rather than explicitly reading ${EXTEN}.