Non-numeric usernames - dialplan

What is the best method to handle non-numeric sip usernames (for security) but still have a dynamic dial plan rather than hardcoding each call rule

Well. Digium recommends use “non-numeric” sip users but in my opinion I prefer use numbers.

It’s more easy to configure when configuring a Dialplan. You only need to use very very strongs passwords and you are done.

Now, based in your case, you will need to create each SIP user as global variable in sip.conf.

Ex: User1 have the sip account: [ikf84jc3] and you want to say that user is going to be ext: 232.
You will need to define someting like this in you [globals] in sip.conf
[globals]
232=ikf84jc3

then in the dialplan

exten=>232,1,Dial(SIP/232)

At this point, when someone dial 232, it will dial: SIP/ikf84jc3

232 is a fake.

Hope this help!

__
Manuel knows as gnu :stuck_out_tongue:

You can also do it in the dialplan:

exten =>_X.,n,…
exten => 1234,n,Dial(SIP/xxxxx)
exten => 4567,same,Dial(SIP/yyyyy)
exten => 8901,same,Dial(SIP/zzzzz)
exten => _X.,n,…${DIALSTATUS}…

or you could do the same tactic, but set a variable, used in a common Dial call, or you could use a database lookup.

I haven’t checked if the functions do do this exist, but you might be able to define a hint for the extension, and look up the value of that hint.