Dialplan problem with alphabetic usernames

Hello together,

im new with asterisk, just to let you all know before we start.
My current problem is that i want to name user’s in the sip.conf as seen below:



It is all working fine for me and i can call them but now i pluged in my hardphones and i can’t call “User1”.
Because i want to call a number as example 123456 and User1 should be called.

And i can’t create for every number a part in the dialplan, because the amount of users is to big to configurate them all seperatly.

exten => _123456, 1, Dial(SIP/User1, 30)

So as end result i want to keep the usernames (To register the hardphone as user1 not as a number) and
it should be “route” the number to the right user. So my question is, is there a way in the options to say that [User1]
has number 123456 and that the dialplan can work like exten => _X., 1, Dial(SIP/${EXTEN}, 30)?

Thanks in advance.

No, there is no mapping like that except for the one you have created in the dialplan or elsewhere (for example storing it in a database).