[asterisk-users] sip.conf best practices?
Eric "ManxPower" Wieling
eric at fnords.org
Wed Sep 19 09:34:44 CDT 2007
We use the MAC of the phone (all lower case) with a -a, -b, -c, etc
tacked onto the end of the MAC to specify the line appearance.
One thing you MUST remember is that a sip.conf entry is NOT an
extension. Extensions are totally different from sip.conf entries.
sip.conf entries are DEVICES.
Using the extension as the SIP account ID will cause MORE work as you
have requests for oddball and custom call routing.
We do something like this as an extension:
exten => 3727,1,Set(FAX_DEST=pmas at stirling.org)
exten => 3727,n,Set(DIAL_DEST=SIP/0004f211f9a6-a)
exten => 3727,n,Set(CFBL_DEST=SIP/0004f211f9a6-b)
exten => 3727,n,Macro(std-exten-v2)
The std-exten-v2 handles the call based on the variables set before the
macro is run.
Here is another example:
exten => 3733,1,Set(DIAL_DEST=SIP/0004f2127e9c-a)
exten => 3733,n,Set(CFBL_DEST==SIP/0004f2127e9c-b)
exten => 3733,n,Set(CFNA_DEST=Local/912124012455 at local-access)
exten => 3733,n,Set(OPER_DEST=Local/912124012455 at local-access)
exten => 3733,n,Set(FAX_DEST=bshelton at era.com)
exten => 3733,n,Macro(std-exten-v2)
Telecom newbies seem to think dialplans can be simple or short or
elegant. They are not. Dialplans are ugly and complex beasts. Users
want custom call routing, users want this, users want that, etc. No
matter how hard you try to make your dialplan simple, it won't stay that
way.
Erik Anderson wrote:
> All - I've been wrestling with how to best structure the sip device
> accounts on a new asterisk server I'm deploying. All of the sip
> devices (currently only Linksys SPA941s) will reside on the same
> subnet as the server, and I have already set up a decent automatic
> provisioning system for the phones. When the rollout is complete,
> there will be about 100 SIP devices authenticating and routing calls
> through this server. The question is what to use for the username
> portion of the SIP account.
>
> Part of me says that I should standardize on using each phone's MAC
> address as the sip account UID, like so:
>
> ; Joe Smith, x123
> [000E08DA0409]
> secret = blahblah
> ... and so on and so forth
>
> Doing it that way is nice for standardization's sake, but it makes the
> dialplan quite a bit more complex.
>
> The obvious alternative is to use the extension as the sip UID:
>
> ; Joe Smith, x123
> [123]
> secret = blahblah
> ...
>
> This makes the dialplan *much* more simple, but when looking through
> sip.conf, it's not as immediately obvious what device should be
> authenticating with that account.
>
> Since this is my first large-ish asterisk deployment, I'm seeking the
> advice of those who have gone before me. What tactic (one of the
> above options or otherwise) is best to keep your sip.conf sane?
>
> Thanks!
> -Erik
>
More information about the asterisk-users
mailing list