[resolved]Problems with BLF on Digium Phones

Hi,

I’m newbie on Digium Phones.
I’m testing a D40 and a D70.

Here is my setup :

/etc/asterisk/sip.conf

[code][general]
dtmfmode=auto
;dtmfmode=rfc2833
videosupport=yes
allowguest=no
faxdetect=yes

bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
transport=udp
bind=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)

allowsubscribe=yes
notifyringing = yes
notifyhold = yes
limitonpeers = yes
subscribecontext=hints-supervision

callcounter=yes

language=fr
nat=no
context=interne ; Default context for incoming calls

qualify=5000
qualifyfreq=10

disallow=all
;allow=g729:20
allow=alaw
allow=h261
allow=h263
allow=h263p
allow=h264

srvlookup=yes ; Enable DNS SRV lookups on outbound calls
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
sendrpid=yes
trustpid=yes
priindication=outofband
directmedia=no

; --------------------------
; DPMA - Digium Phones
; --------------------------
accept_outofcall_message=yes
outofcall_message_context=dpma_message_context
auth_message_requests=no

[0123456789]
username=0123456789
secret=1234
callerid=“TEST Digium D70” <0123456789>
mailbox=0123456789@default
type=friend
host=dynamic
context=i0123456789
call-limit=2
allow=ulaw,alaw,g729

[9876543210]
username=9876543210
secret=1234
callerid=“TEST Digium D40” <9876543210>
mailbox=9876543210@default
type=friend
host=dynamic
context=i9876543210
call-limit=2
allow=ulaw,alaw,g729[/code]

/etc/asterisk/res_digium_phone.conf

[code];------------------------
; – GENERAL ------------
;------------------------
[general]
; – Authentification Options
server_uuid=astsip1
userlist_auth=disabled
config_auth=pin
; – mDNS Discovery Options
service_discovery_enabled=no
; – Files Options
file_directory=/var/lib/asterisk/digium_phones

;------------------------
; – NETWORK ------------
;------------------------
[astsip1]
type=network
alias=astsip1 primary
cidr=172.25.0.0/16
registration_address=172.20.170.21
registration_port=5060
;alternate_registration_address=
;alternate_registration_port=
file_url_prefix=http://172.20.170.3/digium_phones
ntp_server=172.20.170.10
udp_ka_interval=60

;------------------------
; – FIRMWARE -----------
;------------------------
[D40]
type=firmware
model=D40
version=1_4_2_0_63880
file=firmware/1_4_2_0_63880_D40_firmware.eff ;into file_url_prefix

[D50]
type=firmware
model=D50
version=1_4_2_0_63880
file=firmware/1_4_2_0_63880_D50_firmware.eff ;into file_url_prefix

[D70]
type=firmware
model=D70
version=1_4_2_0_63880
file=firmware/1_4_2_0_63880_D70_firmware.eff ;into file_url_prefix

;------------------------
; – PHONES -------------
;------------------------
[TEST_D70]
type=phone
network=astsip1
firmware=D70
pin=1234
timezone=Europe/Paris
active_locale=fr_FR
ntp_resync=86400
web_ui_enabled=yes
full_name=Digium D70
line=0123456789
active_ringtone=Vibe
d40_logo_file=logos/adoma_D40.png ;------------------------
d50_logo_file=logos/adoma_D50.png ;> into file_url_prefix
d70_logo_file=logos/adoma_D70.png ;------------------------
blf_unused_linekeys=yes
contact=contacts/0123456789_contacts.xml ;> into file_directory
blf_contact_group=MYCOMPANY
blf_items=blfitems/0123456789_blfitems.xml ;> into file_url_prefix
blf_unused_linekeys=yes

[TEST_D40]
type=phone
network=astsip1
firmware=D40
pin=1234
timezone=Europe/Paris
active_locale=fr_FR
ntp_resync=86400
web_ui_enabled=yes
full_name=Digium D40
line=9876543210
active_ringtone=Techno
d40_logo_file=logos/adoma_D40.png ;------------------------
d50_logo_file=logos/adoma_D50.png ;> into file_url_prefix
d70_logo_file=logos/adoma_D70.png ;------------------------
blf_unused_linekeys=yes
contact=contacts/9876543210_contacts.xml ;> into file_directory
blf_contact_group=MYCOMPANY
blf_items=blfitems/9876543210_blfitems.xml ;> into file_url_prefix
blf_unused_linekeys=yes

;------------------------
; – LINES --------------
;------------------------
[0123456789]
type=line
line_label=0123456789
digit_map=[0-9]xxx|1[578]|11[0259]|116000|0[1-9]xxxxxxxx
transport=udp
voicemail_uri=8

[9876543210]
type=line
line_label=9876543210
digit_map=[0-9]xxx|1[578]|11[0259]|116000|0[1-9]xxxxxxxx
transport=udp
voicemail_uri=8[/code]

/var/lib/asterisk/digium_phones/contacts/0123456789_contacts.xml

<?xml version="1.0" ?> <phonebooks> <contacts group_name="MYCOMPANY" editable="0" id="0"> <contact id="15" first_name="TEST" last_name="D40" contact_type="sip" organization="MY COMPANY" job_title="" location="Siège" account_id="9876543210" subscribe_id="auto_hint_9876543210" > <actions> <action id="primary" dial="9876543210" label="Ligne" name="Numéro" /> </actions> </contact> </contacts> </phonebooks>

/var/lib/asterisk/digium_phones/contacts/9876543210_contacts.xml

<?xml version="1.0" ?> <phonebooks> <contacts group_name="MYCOMPANY" editable="0" id="0"> <contact id="15" first_name="TEST" last_name="D70" contact_type="sip" organization="MY COMPANY" job_title="" location="Siège" account_id="0123456789" subscribe_id="auto_hint_0123456789" > <actions> <action id="primary" dial="0123456789" label="Ligne" name="Numéro" /> </actions> </contact> </contacts> </phonebooks>

172.20.170.3/digium_phones/blfit … fitems.xml
172.20.170.3/digium_phones/blfit … fitems.xml

<config> <smart_blf> <blf_items> <blf_item location="side" index="0" contact_id="15"> <indicators> <indicator target_status="ringing" ring="1" led_color="amber" led_state="fast" /> <indicator target_status="on_the_phone" ring="0" led_color="red" led_state="off" /> </indicators> </blf_item> </blf_items> </smart_blf> </config>

Here is my sip subscriptions :

CLI> sip show subscriptions Peer User Call ID Extension Last state Type Mailbox Expiry 172.25.90.25 9876543210 4y0-Dd3xDwVwkja -- <none> mwi 9876543210 003600 172.25.90.26 0123456789 ZiU1CqlKvw-0hFL -- <none> mwi 0123456789 003600 2 active SIP subscriptions

Here is my hints :

[code]CLI> core show hints

-= Registered Asterisk Dial Plan Hints =-

auto_hint_0123456789@i0123456789 : SIP/0123456789,Custo State:Idle Watchers 0
auto_hint_9876543210@i9876543210 : SIP/9876543210,Custo State:Idle Watchers 0

  • 2 hints registered[/code]

And here is softwares versions :

[code]CLI> core show version
Asterisk 11.10.0 built by root @ astsip1 on a x86_64 running Linux on 2014-06-06 12:54:54 UTC

CLI> digium_phones show version
Digium Phone Module for Asterisk Version 11.0_2.0.0[/code]

When a phone rings, nothing happens on BLF items.

Can you help me ?

Thanks in advance.
Regards

I forgot to mention that I have no icon or LED color, next BLF.

Regards

Howdy,

It took me a bit to spot it, but I found it. :smiley:

First, you’re specifying “subscribe_id” for your contact in the contacts’ XML files. The correct parameter is “subscribe_to”

Next, DPMA is creating the subscriptions in the default context of the SIP peers, e.g. i0123456789 and i9876543210 but chan_sip is trying to match on a context called “hints-supervision” because of the global parameter in sip.conf. So, add a new subscribe context parameter to each SIP entry in sip.conf, i.e.:

[0123456789]
username=0123456789
secret=1234
callerid="TEST Digium D70" <0123456789>
mailbox=0123456789@default
type=friend
host=dynamic
context=i0123456789
subscribecontext=hints-supervision
call-limit=2
allow=ulaw,alaw,g729

and DPMA will respect that.

I also noticed that you had specified a server_uuid in the general section of res_digium_phone.conf but not for the contact in the contacts’ XML files. You either want it in both places or in neither.

Also, you double-entered blf_unused_linekeys in the type=phone sections in res_digium_phone.conf, you only need it once.

Thanks for your help !!
It works perfectly !!!
That’s to be overwhelmed…

I have one last question.
We will soon acquire over 1,100 phones Digium.
These phones will be distributed over 3 asterisks.

To track a phone between asterisk, it is better that I use :
subscribe_to=“auto_hint_1234” and the “server_uuid” parameter corresponding to the correct server asterisk
or
subscribe_to="sip:500@my.pbx.com"

[quote=“jusouschi”]Thanks for your help !!
It works perfectly !!!
That’s to be overwhelmed…
[/quote]

Awesome! :smile:

[quote=“jusouschi”]
I have one last question.
We will soon acquire over 1,100 phones Digium.
These phones will be distributed over 3 asterisks.

To track a phone between asterisk, it is better that I use :
subscribe_to=“auto_hint_1234” and the “server_uuid” parameter corresponding to the correct server asterisk
or
subscribe_to="sip:500@my.pbx.com"[/quote]

You should avoid using the @my.pbx.com because if you leave it off, the phone will use the user part at whatever host it’s registered to. That way, if you change networks and your path to the PBX changes, then you won’t have to update contacts files.

If you use auto_hint_ instead of just you will get user presence in addition to device state. That’s one of the features of Digium phones.

The server_uuid parameter was added as we started doing work around forwarding of voicemails. For now, it’s unused, since without it being specified, voicemail forwards will work just fine. But, we went ahead and documented it so that if something changed in the future, people would already be used to having it.