SIP multiple user configuration

Hi !
Every time I add a new SIP user to my system, I don’t want to add a specific section for each user to sip.conf. Is it possible ? How can I let the user configure his own password ?

And how do I tell asterisk how to reach this new user ? Do I have to put one line for each user in extensions.conf ? (that what i do now) :

[quote][incoming]
exten => a1, 1, Dial(SIP/a1@192.168.0.51)

exten => a18, 1, Dial(SIP/a18@192.168.0.68)
…[/quote]
Tell me that there is a better way to do it !
Thank you.

Do I have to put one line for each user in extensions.conf ?

You may use patterns in extensions.conf, let’s say your users are named something like u01 from u99 and every user register to this Asterisk server and you want to reach the user dialing a two digits extension (from 01 to 99):

exten=>_XX,1,Dial(SIP/u${EXTEN})

Hope this helps.

Cheers.

Marco Bruni

Grazie mille Marco !

Yes it helps ! Now I understand better the usage of $EXTEN.

I just did

Because i’m not dealing with number, but with SIP username.
But i read in the doc that “_.” should never be used. So how ?

But do I still have to fill my sip.conf manualy :frowning: ?
I have to write a little perl script which extract username and password from a database filled via a web interface ?

Thank you.

Use “_X.”.

No, check voip-info.org/tiki-index.php … ysql+peers .
Also check voip-info.org/wiki/view/Aste … Extensions .

Cheers.

Marco Bruni