Tapes

[myBLF]

exten => myBLF,hint,Custom:myBLF
exten => 2001,hint,PJSIP/${EXTEN},CustomPresence:2001
exten => 2002,hint,PJSIP/${EXTEN},CustomPresence:2002

Drogon*CLI> core show hints

-= Registered Asterisk Dial Plan Hints =-
1000@demo : SIP/1000 State:Unavailable Presence:not_set Watchers 0
1001@demo : SIP/1001 State:Unavailable Presence:not_set Watchers 0
myBLF@myBLF : Custom:myBLF State:Idle Presence:not_set Watchers 3
2002@myBLF : PJSIP/2002,CustomPre State:Idle Presence:not_set Watchers 0
2001@myBLF : PJSIP/2001,CustomPre State:Idle Presence:not_set Watchers 1
1234@default : SIP/1234 State:Unavailable Presence:not_set Watchers 0


- 6 hints registered

You can see that the phone tries to register for the subscription every 30 seconds and makes two tries.
Configuring the phone to say eventlistURI=myBLF causes this to happen. It only stops if I remove that config from the phone. But if I change the eventListURI to a single extension number, it works correctly. That defeats the whole point of having a subscription. If I wanted to configure 8 BLF buttons on the phone, I think I have to have a subscription. This config is at the account level on the phone, not at the button level. The subscription is supposed to give all of the states of all of the extensions at once.

[Oct 10 17:26:03] NOTICE[44594] res_pjsip_exten_state.c: Endpoint '2002' state subscription failed: Extension 'myBLF' does not exist in context 'local' or has no associated hint
[Oct 10 17:26:04] NOTICE[44594] res_pjsip_exten_state.c: Endpoint '2002' state subscription failed: Extension 'myBLF' does not exist in context 'local' or has no associated hint
[Oct 10 17:26:34] NOTICE[44594] res_pjsip_exten_state.c: Endpoint '2002' state subscription failed: Extension 'myBLF' does not exist in context 'local' or has no associated hint
[Oct 10 17:26:35] NOTICE[44594] res_pjsip_exten_state.c: Endpoint '2002' state subscription failed: Extension 'myBLF' does not exist in context 'local' or has no associated hint
[Oct 10 17:27:05] NOTICE[44594] res_pjsip_exten_state.c: Endpoint '2002' state subscription failed: Extension 'myBLF' does not exist in context 'local' or has no associated hint
[Oct 10 17:27:06] NOTICE[44594] res_pjsip_exten_state.c: Endpoint '2002' state subscription failed: Extension 'myBLF' does not exist in context 'local' or has no associated hint
[Oct 10 17:27:36] NOTICE[44594] res_pjsip_exten_state.c: Endpoint '2002' state subscription failed: Extension 'myBLF' does not exist in context 'local' or has no associated hint
[Oct 10 17:27:37] NOTICE[44594] res_pjsip_exten_state.c: Endpoint '2002' state subscription failed: Extension 'myBLF' does not exist in context 'local' or has no associated hint

Here is what the server shows for extensions having hints. It doesn't show myBLF alone but it does appear to recognize that extensions 2001 and 2002 belong to that context.

Drogon*CLI> core show hints
-= Registered Asterisk Dial Plan Hints =-
1000@demo : SIP/1000 State:Unavailable Presence:not_set Watchers 0
1001@demo : SIP/1001 State:Unavailable Presence:not_set Watchers 0
2002@myBLF : PJSIP/2002,CustomPre State:Idle Presence:not_set Watchers 0
2001@myBLF : PJSIP/2001,CustomPre State:Idle Presence:not_set Watchers 1
1234@default : SIP/1234 State:Unavailable Presence:not_set Watchers 0


- 5 hints registered
Drogon*CLI>

The ones that are in the @myBLF context are mine. The others are from some demo config that came with the Asterisk install. I took all of that out of the config files but it still shows up here. I don't know how to get rid of it.

My suspicion is that the phone configuration URI needs to have some prefix is something other than just the subscription name but I cannot find any examples of it anywhere.

Asterisk Command Line

https://superuser.com/questions/1261534/pre-bridge-handlers-asterisk-playback-issue

config list
core reload (maybe not used)
core set debug
core set debug channel (debug a channel)
core set trace
core set verbose
core show applications
core show calls [uptime]
core show channels [consise|verbose|count]
core show channel
core show functions
core show help
core show hints
core show hint
core show sounds
core show sysinfo
core stop now (shutdown now)
database show
devstate list (show device states)
dialplan debug
dialplan reload
dialplan show
http show status
iax2 show peers
logger mute
Logger rotate
logger set level DEBUG|TRACE|NOTICE|WARNING|ERROR|VERBOSE|DTMF on|off
moh reload
moh show files
pjsip list aors/auths/channels/contacts/endpoints/registrations/subscriptions/transports
pjsip set logger on|off|host|add|verbose|pcap
pjsip show (same options as pjsip list
presencestate list
reload
sip (same basic stuff as pjsip)

This will return the SRV record for the CNET server
dig _sip._udp.ckts.info @std.ckts.info -t srv
Returns:
;; ANSWER SECTION:
_sip._udp.ckts.info. 10800 IN SRV 10 10 5060 prlkmnxp44g.ckts.info.
—————————————
This query actually worked:
dig @std.ckts.info 0.0.0.5.6.3.7.1.std.ckts.info ANY

[macro-dialcnet]
exten => s,1,NoOp
exten => s,n,Set(ENUM=${ENUMLOOKUP(${ARG1},iax21,std.ckts.info)})
exten => s,n,GotoIf($[${LEN(${ENUM})} = 0 ]?noenumfound)
exten => s,n,Dial(IAX2/${ENUM},120
)
exten => s,n,DumpChan()
exten => s,n,NoOp({HANGUPCAUSE}=${HANGUPCAUSE})
exten => s,n,Macro(${DIALSTATUS},${HANGUPCAUSE})
exten => s,n(noenumfound),Macro(cnet-unassigned,${ARG1})
exten => s,n,Wait(5)
exten => s,n,Hangup()
;
[macro-invalid-office-code]
exten => s,1,Congestion
exten => s,2,Hangup
;
[macro-invalid]
exten => s,1,Congestion
exten => s,2,Hangup
;
[macro-Milliwatt]
exten => s,1,Answer
exten => s,2,Playtones(1004)
exten => s,3,Wait(${ARG1})
exten => s,4,Hangup

[cnet-out]
exten => _NXXXXXX,1,Macro(dialcnet,1${EXTEN})
exten => _NXXXXXX,2,Congestion
;
exten => 011.,1,Macro(dialcnet,${EXTEN:3})
exten => 011.,1,Congestion
;
[outbound]
;
include => cnet-out
;
exten => i,1,Macro(invalid)

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License