[asterisk-users] Single * multiple offices
Thomas Kenyon
digium at sanguinarius.co.uk
Mon Feb 11 06:26:24 CST 2008
Nhadie wrote:
> Hi Thomas,
>
> Thank you for reply, please correct me if i did not understand it correctly.
>
> i need create sip_customerA.conf sip_customerB.conf sip_customerB.conf
>
> under sip_customerA.conf
>
You only need one sip.conf file and one extensions.conf, you just may
find it simpler to have 2.
> i will have [company-A-100] up to [company-A-110] with
> context=company-A-context
>
Yeah, if the handsets are sip handsets, then you just need a
context=line in each to segregate them in the dialplan.
You may be able to have the sip clients with the same name and have
asterisk match by host, but I don't know if this still works. (Haven't
tried it for a very long time).
> under sip_customerB.conf
>
> i will have [company-B-100] up to [company-B-105] with
> context=company-B-context
>
> under sip_customerC.conf
>
> i will have [company-C-100] up to [company-C-110] with
> context=company-C-context
>
>
> and then i also need to create extensions_customerA.conf,
> extensions_customerB.conf and extensions_customerC.conf
>
They can all be in the same file, as I said before, using multiple
though may make administration a bit simpler.
In your example you'd need an extensions.conf with containing nothing
more than.
#include /etc/asterisk/extensions_customerA.conf
#include /etc/asterisk/extensions_customerB.conf
#include /etc/asterisk/extensions_customerC.conf
> which will then contain dial plans for each offices and all the contexts
> company-A-context, company-B-context and company-C-context.
>
> what do i need to do in the dial plan so that when an extension in
> customer A dial 101, it will only ring on extension 101 under customer A
> and not 101 in B and C.
>
Set the context in sip.conf for the handset in company A to point to a
context that can dial the phones in company A.
Eg:
sip.conf:
[general]
bindport = 5060
bindaddr = 0.0.0.0
[CustomerA-100]
type=friend
secret=password
context=outgoingcompanya
accountcode=companya ;useful for billing using cdr
.. (then codec stuff and voicemail settings)
[CustomerA-101]
type=friend
secret=password
context=outgoingcompanya
accountcode=companya ;useful for billing using cdr
.. (then codec stuff and voicemail settings)
[CustomerB-100]
type=friend
secret=password
context=outgoingcompanyb
accountcode=companya ;useful for billing using cdr
.. (then codec stuff and voicemail settings)
[CustomerB-101]
type=friend
secret=password
context=outgoingcompanyb
accountcode=companya ;useful for billing using cdr
.. (then codec stuff and voicemail settings)
etc ...
extensions.conf:
[outgoingcompanya]
exten => _10.,1,Dial(SIP/CustomerA-${EXTEN})
[outgoingcompanyb]
exten => _10.,1,Dial(SIP/CustomerB-${EXTEN})
> thanks again in advanced
>
Obviously this is all oversimplified, but you get the gist.
Try reading about sip.conf and extensions.conf won www.voip-info.org and
reading the sample configuration files that come with asterisk.
> regards,
> Ron
>
More information about the asterisk-users
mailing list