Content

Page tree

Hello all, 

I'm actually using a Snom D335 fw. 10.1.64.14 connected to a FreePBX with Asterisk 16.13.0 . 

I've configured phone to monitor extensions with BLF and it is working quite well actually, but I can't understand how to configure a LED OFF status (or any else) for unreachable/inactive/unavailable extensions.

I'm using this configuration on phone

<led_on perm="">ON IN_A_CALL CALLING IN_A_MEETING URGENT_INTERRUPTIONS_ONLY BUSY I-Am-Busy DND_ALL DND_SELF ACTIVE BE_RIGHT_BACK SEIZED CONNECTED ON_HOLD OFFHOOK RINGBACK I-Am-Ready AWAY idle AVAILABLE AVAILABLE_ON_MOBILE AVAILABLE_AT_DESK call_center_status_empty PhoneHasCall PhoneHasMissedCalls CurrentIdentityHasVoiceMessages PhoneHasVoiceMessages seized_local seized_remote active_local active_remote dialog_dnd</led_on>
<led_blink_fast perm="">RINGING PICKUP call_center_status_exceed PhoneHasCallInStateRinging alerting_local alerting_remote</led_blink_fast>
<led_red perm="">CONNECTED BUSY DND_ALL DND_SELF I-Am-Busy IN_A_CALL IN_A_MEETING URGENT_INTERRUPTIONS_ONLY UNAVAILABLE seized_remote alerting_remote active_remote held_remote</led_red>
<led_green perm="">idle AVAILABLE AVAILABLE_ON_MOBILE AVAILABLE_AT_DESK I-Am-Ready I-Am-Almost-Ready call_center_status_empty call_center_status_normal call_center_status_exceed seized_local alerting_local active_local held_local call_parked</led_green>
<led_orange perm="">RINGING AWAY BE_RIGHT_BACK KeyConfigActive dialog_dnd</led_orange>
<led_blue perm=""></led_blue>
<led_call_indicator_usage perm="">PhoneHasCallInStateRinging PhoneHasCallInStateCalling PhoneHasCallInStateRingback PhoneHasCallInStateConnected PhoneHasCallInStateOffhook PhoneHasCallInStateHolding PhoneHasCall PhoneHasMissedCalls DateOngoing DateReminding</led_call_indicator_usage>


I've already searched articles about this issue on community forum, but cannot find nothing viable

Read articles:

How to change the LED colour and behaviour for monitored extensions
How to obtain a SIP trace from a deskphone

HowTo - Extension Monitoring - Asterisk Presence

How to change the LED behaviour for monitored extensions in idle mode


can somebody help me to achieve this goal?

Thanks, 

Andrea

profilePicture

Andrea Biancalani

Registered Partner

Joined: 21.09.2022

2 Comments

  1. Hi,

    I can see you are actually a Snom partner so I suggest you raise a private ticket, and not a public Community thread, so we can investigate better.

    Anyway, since this can help other people: the phone cannot see if another phone is turned off or in a DND state for example, the BLF are based on some Notify SIP messages coming from the PBX.

    When the BLF is configured the phone sends a Subscribe message to the PBX, asking for updates via Notify for that extension.

    Usually the PBX sends different updates (bury, ringing or idle for example) when a phone is ringing or in a call or in idle state.

    There is no direct way to know if a phone sets itself on DND or is powered off on the phone with the active BLFs, the only way could be the PBX sending a specific Notify, but that usually doesn't happen because even the PBX doesn't know the state of the phone.

    As said, for further investigation, please raise a private ticket.

    Thank you

  2. Registered Partner Andrea Biancalani

    Hi Gianmaria, 

    I solved the problem using this how-to based on XML definitions adding the traslation for Unavailable as following


    HOW TO KB: https://service.snom.com/display/wiki/HowTo+-+Extension+Monitoring+-+Asterisk+Presence


    <general type=”AsteriskPresenceField”/>
    <!–
    Initialization:
    Here we define some variables used in the XML
    subscr_ext: this the extension of the SUBSCRIBE target
    subscr_proxy: this is the domain part of the SIP uri to SUBSCRIBE
    pickup_code: the pickup code to add in front of the extension in order to pickup the call
    subscr_uri: will be created sip:$(subscr_ext)@$(subscr_proxy) this is the SUBSCRIBE URI
    –>
    <initialization>
    <state value=”initial”/>
    <!– PLEASE EDIT THE “value” ATTRIBUTE WITH THE RIGHT EXTENSION –>
    <variable name=”subscr_ext” value=”123“/>

    <!– PLEASE EDIT THE “value” ATTRIBUTE WITH THE RIGHT PROXY IP ADDR –>
    <variable name=”subscr_proxy” value=”172.16.199.2“/>

    <!– PLEASE EDIT THE “value” ATTRIBUTE WITH THE RIGHT PICKU CODE –>
    <variable name=”pickup_code” value=”**“/>

    <!– DO NOT EDIT –>
    <variable name=”subscr_uri” value=”sip:$(subscr_ext)@$(subscr_proxy)”/>
    </initialization>

    <!– Define the kind of SUBSCRIBE –>
    <subscription type=”presence” to=”<$(subscr_uri)>” for=”$(subscr_uri)”/>

    <!– Verify the validity of the NOTIFY –>
    <NotifyParsingRules type=”applies”>
    <level1 translates_to=’OK’>/presence/tuple/contact[.=”$(subscr_uri)”]</level1>
    </NotifyParsingRules>

    <!– set the monitored extension state –>
    <NotifyParsingRules type=”state”>
    <!– if <ep:away/> tag is present se the status to “Away” –>
    <level1 translates_to=”Away”>/presence/pp:person/status/ep:activities/ep:away</level1>
    <!– when the status is closed set it “Offline” –>
    <level1-1 translates_to=”Offline”>/presence/tuple/status/basic[.=”closed”]</level1-1>
    <!– when the status is Unavailable set it “Offline” –>
    <level1-2 translates_to=”Offline”>/presence/note[.=”Unavailable”]</level1-2>
    <!– if <ep:busy/> tag is present se the status to “Busy” –>
    <level2 translates_to=”Busy”>/presence/pp:person/status/ep:activities/ep:busy</level2>
    <!– if <note> content is “Ringing” set the status to “Ringing” –>
    <level2-1 translates_to=”Ringing”>/presence/note[.=”Ringing”]</level2-1>
    <!– if <note> content is “On Hold” set the status to “Holding” (the phone is holding another call) –>
    <level2-2 translates_to=”Holding”>/presence/note[.=”On hold”]</level2-2>
    <!– if status is open set it as “Registered” –>
    <level3 translates_to=”Registered”>/presence/tuple/status/basic[.=”open”]</level3>
    </NotifyParsingRules>

    <action>
    <!– Dial the pickup code only in Ringing (dial is for backward compatibility) –>
    <dial target=”$(pickup_code)$(subscr_ext)” when=”on press” states=”Ringing”/>
    <invite target=”$(pickup_code)$(subscr_ext)” when=”on press” states=”Ringing”/>
    <!– Dial the extension when Registered –>
    <dial target=”$(subscr_ext)” when=”on press” states=”Registered”/>
    <invite target=”$(subscr_ext)” when=”on press” states=”Registered”/>
    <!– Nothing in all others status –>
    </action>