Есть задача:
В наличии 4 внешних номера, по юридически каждый номер привязан под каждую компанию, и когда бухгалтерия, или менеджеры набирают на внешний номер, то попадают на один и тот же номер.
Как сделать так чтобы была возможность выбор линии, можно взять к примеру первую цифру 1 и потом городской на первую внешнюю линию, либо 2 на вторую городскую и т.д.
Заранее спасибо.
Из конфигов:
[extensions.conf]
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
[outcoling]
;exten => _XXXXXXXXXX,1,Set(CALLERID(all)=044xxxxxx)
exten => _XXXXXXXXXX,1,Set(CALLERID(name)="044xxxxxxx")
exten => _XXXXXXXXXX,n,Set(CALLERID(number)=044xxxxxx)
exten => _XXXXXXXXXX,n,Dial(SIP/out2/${EXTEN})
;;exten => _XXXXXXXXXX,1,Dial(SIP/out1/${EXTEN})
exten => _XXX,1,Dial(SIP/${EXTEN},,m)
;exten => _1XXXXXXXXXX,1,Set(CALLERID(name)="044xxxxx")
;exten => _1XXXXXXXXXX,n,Set(CALLERID(number)=044xxxxxx)
;exten => _1XXXXXXXXXX,n,Dial(SIP/out1/${EXTEN:1})
;exten => _2XXXXXXXXXX,2,Set(CALLERID(name)="044xxxxxx")
;exten => _2XXXXXXXXXX,n,Set(CALLERID(number)=044xxxxxx)
;exten => _2XXXXXXXXXX,n,Dial(SIP/out2/${EXTEN:1})
;exten => _3XXXXXXXXXX,3,Set(CALLERID(name)="044xxxxxx")
;exten => _3XXXXXXXXXX,n,Set(CALLERID(number)=044xxxxxx)
;exten => _3XXXXXXXXXX,n,Dial(SIP/out3/${EXTEN:1})
;exten => _4XXXXXXXXXX,4,Set(CALLERID(name)="044xxxxxx")
;exten => _4XXXXXXXXXX,n,Set(CALLERID(number)=044xxxxxx)
;exten => _4XXXXXXXXXX,n,Dial(SIP/out4/${EXTEN:1})
;exten => _[1-4]{1}XXXXXXXXXX,n,Dial(SIP/out4/${EXTEN:1})
;exten => _XXX,1,Dial(SIP/${EXTEN},,m)
[incoming]
exten => _XXXXXXXX44,1,Answer
exten => _XXXXXXXX44,n,Dial(SIP/102,15,tT)
exten => _XXXXXXXX44,n,HangUp()
exten => _XXXXXXXX41,1,Answer
exten => _XXXXXXXX41,n,Dial(SIP/102,15,tT)
exten => _XXXXXXXX41,n,HangUp()
exten => _XXXXXXXX42,1,Answer
exten => _XXXXXXXX42,n,Dial(SIP/102,15,tT)
exten => _XXXXXXXX42,n,HangUp()
exten => _XXXXXXXX03,1,Answer
exten => _XXXXXXXX03,n,Dial(SIP/102,15,tT)
exten => _XXXXXXXX03,n,HangUp()
Далее конфиг
[sip.conf]
[out1]
deny=0.0.0.0/0.0.0.0
permit=ip
host=ip
port=5060
insecure=port,invite
type=friend
disallow=all
allow=alaw:20
allow=ulaw:20
dtmfmode=rfc2833
context=incoming
qualify=yes
canreinvite=no
nat=force_rport,comedia
fromuser=044xxxxxx
fromdomain=ip
[out2]
deny=0.0.0.0/0.0.0.0
permit=ip
host=ip
port=5060
insecure=port,invite
type=friend
disallow=all
allow=alaw:20
allow=ulaw:20
dtmfmode=rfc2833
context=incoming
qualify=yes
canreinvite=no
nat=force_rport,comedia
fromuser=044xxxxxx
fromdomain=ip
[out3]
deny=0.0.0.0/0.0.0.0
permit=ip
host=ip
port=5060
insecure=port,invite
type=friend
disallow=all
allow=alaw:20
allow=ulaw:20
dtmfmode=rfc2833
context=incoming
qualify=yes
canreinvite=no
nat=force_rport,comedia
fromuser=044xxxxxx
fromdomain=ip
[out4]
deny=0.0.0.0/0.0.0.0
permit=ip
host=ip
port=5060
insecure=port,invite
type=friend
disallow=all
allow=alaw:20
allow=ulaw:20
dtmfmode=rfc2833
context=incoming
qualify=yes
canreinvite=no
nat=force_rport,comedia
fromuser=044xxxxxx
fromdomain=ip
[102]
deny=0.0.0.0/0.0.0.0
permit=192.168.0.0/24
type=friend
regexten=102
secret=xxxxx
username=102
context=outcoling
host=dynamic
;callerid="Sekretar"
disallow=all
allow=alaw
allow=ulaw
language=ru
callgroup=1
pickupgroup=1
qualify=yes
canreinvite=no
call-limit=4
allowguest=no
;exten => _XXXXXXXXXX,1,Set(CALLERID(all)=044xxxxxx)
exten => _XXXXXXXXXX,1,Set(CALLERID(name)="044xxxxxxx")
exten => _XXXXXXXXXX,n,Set(CALLERID(number)=044xxxxxx)
exten => _XXXXXXXXXX,n,Dial(SIP/out2/${EXTEN})
;;exten => _XXXXXXXXXX,1,Dial(SIP/out1/${EXTEN})
exten => _XXX,1,Dial(SIP/${EXTEN},,m)
;exten => _1XXXXXXXXXX,1,Set(CALLERID(name)="044xxxxx")
;exten => _1XXXXXXXXXX,n,Set(CALLERID(number)=044xxxxxx)
;exten => _1XXXXXXXXXX,n,Dial(SIP/out1/${EXTEN:1})
;exten => _2XXXXXXXXXX,2,Set(CALLERID(name)="044xxxxxx")
;exten => _2XXXXXXXXXX,n,Set(CALLERID(number)=044xxxxxx)
;exten => _2XXXXXXXXXX,n,Dial(SIP/out2/${EXTEN:1})
;exten => _3XXXXXXXXXX,3,Set(CALLERID(name)="044xxxxxx")
;exten => _3XXXXXXXXXX,n,Set(CALLERID(number)=044xxxxxx)
;exten => _3XXXXXXXXXX,n,Dial(SIP/out3/${EXTEN:1})
;exten => _4XXXXXXXXXX,4,Set(CALLERID(name)="044xxxxxx")
;exten => _4XXXXXXXXXX,n,Set(CALLERID(number)=044xxxxxx)
;exten => _4XXXXXXXXXX,n,Dial(SIP/out4/${EXTEN:1})
;exten => _[1-4]{1}XXXXXXXXXX,n,Dial(SIP/out4/${EXTEN:1})
;exten => _XXX,1,Dial(SIP/${EXTEN},,m)
[incoming]
exten => _XXXXXXXX44,1,Answer
exten => _XXXXXXXX44,n,Dial(SIP/102,15,tT)
exten => _XXXXXXXX44,n,HangUp()
exten => _XXXXXXXX41,1,Answer
exten => _XXXXXXXX41,n,Dial(SIP/102,15,tT)
exten => _XXXXXXXX41,n,HangUp()
exten => _XXXXXXXX42,1,Answer
exten => _XXXXXXXX42,n,Dial(SIP/102,15,tT)
exten => _XXXXXXXX42,n,HangUp()
exten => _XXXXXXXX03,1,Answer
exten => _XXXXXXXX03,n,Dial(SIP/102,15,tT)
exten => _XXXXXXXX03,n,HangUp()
Далее конфиг
[sip.conf]
[out1]
deny=0.0.0.0/0.0.0.0
permit=ip
host=ip
port=5060
insecure=port,invite
type=friend
disallow=all
allow=alaw:20
allow=ulaw:20
dtmfmode=rfc2833
context=incoming
qualify=yes
canreinvite=no
nat=force_rport,comedia
fromuser=044xxxxxx
fromdomain=ip
[out2]
deny=0.0.0.0/0.0.0.0
permit=ip
host=ip
port=5060
insecure=port,invite
type=friend
disallow=all
allow=alaw:20
allow=ulaw:20
dtmfmode=rfc2833
context=incoming
qualify=yes
canreinvite=no
nat=force_rport,comedia
fromuser=044xxxxxx
fromdomain=ip
[out3]
deny=0.0.0.0/0.0.0.0
permit=ip
host=ip
port=5060
insecure=port,invite
type=friend
disallow=all
allow=alaw:20
allow=ulaw:20
dtmfmode=rfc2833
context=incoming
qualify=yes
canreinvite=no
nat=force_rport,comedia
fromuser=044xxxxxx
fromdomain=ip
[out4]
deny=0.0.0.0/0.0.0.0
permit=ip
host=ip
port=5060
insecure=port,invite
type=friend
disallow=all
allow=alaw:20
allow=ulaw:20
dtmfmode=rfc2833
context=incoming
qualify=yes
canreinvite=no
nat=force_rport,comedia
fromuser=044xxxxxx
fromdomain=ip
[102]
deny=0.0.0.0/0.0.0.0
permit=192.168.0.0/24
type=friend
regexten=102
secret=xxxxx
username=102
context=outcoling
host=dynamic
;callerid="Sekretar"
disallow=all
allow=alaw
allow=ulaw
language=ru
callgroup=1
pickupgroup=1
qualify=yes
canreinvite=no
call-limit=4
allowguest=no