Asterisk - can't dial if hints are used

I'm trying to learn Asterisk by following the Definitive Guide. I'm trying to achieve the following:

Extensions

  • 7001
  • 7002
  • 7003

..each with hints so my IP phone handsets can show busy lights.

I seem to be able to calling to work OK, but as soon as I try to get hints working, I can no longer call (so it's calling or hints working, not both!). When I try to call, I get this message:

[Oct 14 15:25:51] NOTICE[3262][C-0000000a]: chan_sip.c:25545 handle_request_invite: Call from '7001' (192.168.8.129:5160) to extension '7002' rejected because extension not found in context 'LocalSets'.

Further debugging info

ubuntupbx*CLI> dialplan show 7003@LocalSets
[ Context 'LocalSets' created by 'pbx_config' ]
'7003' => hint: SIP/7003 [pbx_config]

-= 1 extension (1 priority) in 1 context. =-

ubuntupbx*CLI> dialplan show 7002@LocalSets
[ Context 'LocalSets' created by 'pbx_config' ]
'7002' => hint: SIP/7002 [pbx_config]

-= 1 extension (1 priority) in 1 context. =-

My config looks as follows:

sip.conf

[general]
localnet=192.168.8.0/255.255.255.0
context=unauthenticated
allowguest=no
srvlookup=yes
callcounter=yes
limitonpeers=yes

[office-phone](!)
type=friend
context=LocalSets
busylevel=1
host=dynamic
dtmfmode=auto
subscribecontext=LocalSets
allowsubscribe=yes
disallow=all
allow=g722
allow=ulaw
allow=alaw


[7001](office-phone)
secret=123

[7002](office-phone)
secret=456

[7003](office-phone)
secret=789

extensions.conf

[LocalSets]
exten => 7001,hint,SIP/7001
exten => 7002,hint,SIP/7002
exten => 7003,hint,SIP/7003

exten => 200,1,Answer()
        same => n,Playback(hello-world)
        same => n,Hangup()

exten => 600,1,Answer()
        same => n,ConfBridge(1234)

If I remove the "hint" wording and replace it with "1", calling works, but hints don't.

I've tried running with debugging on, but only see the same message, with additional info (IP addresses etc). I'm sure it's a schoolboy error, but I can't crack it. Can anyone help?

I'm running on Ubuntu 16.04 Server LTS, running Asterisk 13.1.0~dfsg-1.1ubuntu4 installed via apt-get.

0
задан 14 October 2016 в 17:26
1 ответ

Контекст подсказки должен быть отдельным контекстом, это основная причина, по которой вы получаете либо подсказки, либо Наберите , а не и то, и другое. Таким образом, помимо обычного контекста расширения для голосовых звонков, вы должны создать отдельный контекст подсказки, и именно его следует упомянуть в тексте абонента .

Например,

[local-ext]
exten => _7XXX,1,Dial(SIP/${EXTEN})

[hints]
exten => _X.,hint,Custom:DND${EXTEN}&SIP/${EXTEN}

или что-то в этом роде.

.
1
ответ дан 4 December 2019 в 16:28

Теги

Похожие вопросы