Jump to content
Vodia PBX forum
ahennis@voicespring.net

Turn off DND from Snom menu button

Recommended Posts

We often disable the DND button on our Snom phones so people don't accidentally turn it on. The problem we are having is that even with the DND hard button disabled there is still an option to turn on DND from the Menu hard button but there is never an option to turn DND off. These are 720 and D725 phones.

After working with Snom on this issue I found out that Vodia remaps the Menu button to a custom configuration menu.xml. I have included the menu.xml file below and have a few questions.

1. Is the menu.xml file global for the server or can I configure different menu.xml files for domain and individual phones.

2. The default menu.xml file from the server below looks ike it has an option the turn DND off but it does not ever display. I am think the code to disable DND is not working correctly.

 

<?xml version="1.0" encoding="utf-8"?>
<SnomIPPhoneMenu>

{ssi load extensions ext dnd agent_login}
 <Title>{lng title}</Title>

{ssi ifn dnd true}    <----- Should this be checking for dnd set to false?
 <MenuItem>
  <Name>{lng dnd_on}</Name>
  <URL>{ssi link snom/menu.xml &amp;name=dnd&amp;value=true}</URL>
 </MenuItem>
{ssi fin dnd true}

{ssi if dnd true}
 <MenuItem>
  <Name>{lng dnd_off}</Name>
  <URL>{ssi link snom/menu.xml &amp;name=dnd&amp;value=false}</URL>
 </MenuItem>
{ssi fi dnd true}

{ssi if agent_login false}
 <MenuItem>
  <Name>{lng agent_on}</Name>
  <URL>{ssi link snom/menu.xml &amp;name=agent_login&amp;value=true}</URL>
 </MenuItem>
{ssi fi agent_login false}

{ssi ifn agent_login false}
 <MenuItem>
  <Name>{lng agent_off}</Name>
  <URL>{ssi link snom/menu.xml &amp;name=agent_login&amp;value=false}</URL>
 </MenuItem>
{ssi fin agent_login false}

 <MenuItem>
  <Name>{lng snom/cell_number.xml#title}</Name>
  <URL>{ssi link snom/cell_number.xml}</URL>
 </MenuItem>
 
<MenuItem>
  <Name>{lng snom/cell_include.xml#title}</Name>
  <URL>{ssi link snom/cell_include.xml}</URL>
 </MenuItem>
  <MenuItem>
    <Name>{lng snom/redirect_all.xml#title}</Name>
    <URL>{ssi link snom/redirect_all.xml}</URL>
  </MenuItem>
  <MenuItem>
    <Name>{lng snom/redirect_busy.xml#title}</Name>
    <URL>{ssi link snom/redirect_busy.xml}</URL>
  </MenuItem>
  <MenuItem>
    <Name>{lng snom/redirect_noanswer.xml#title}</Name>
    <URL>{ssi link snom/redirect_noanswer.xml}</URL>
  </MenuItem>
  <MenuItem>
    <Name>{lng snom/set_name.xml#title}</Name>
    <URL>{ssi link snom/set_name.xml}</URL>
  </MenuItem>
  <MenuItem>
    <Name>{lng snom/set_email.xml#title}</Name>
    <URL>{ssi link snom/set_email.xml}</URL>
  </MenuItem>
  {ssi start_enabled lync}
  <MenuItem>
    <Name>{lng snom/set_lync.xml#title}</Name>
    <URL>{ssi link snom/set_lync.xml}</URL>
  </MenuItem>
  {ssi end_enabled lync}
  <MenuItem>
    <Name>Ring Melody</Name>
    <URL>{ssi link snom/set_ring_melody.xml}</URL>
  </MenuItem>
  <SoftKeyItem>
    <Name>CANCEL</Name>
    <Softkey>F_ABORT</Softkey>
 </SoftKeyItem>
</SnomIPPhoneMenu>

 

Share this post


Link to post
Share on other sites

Hi,

2 hours ago, ahennis@voicespring.net said:

1. Is the menu.xml file global for the server or can I configure different menu.xml files for domain and individual phones.

Yes you can edit the template files on all Admin, Domain and Extension level as well. The priority of taking effect is the order of Extension First, then Domain and Least is Admin.

 

2 hours ago, ahennis@voicespring.net said:

{ssi ifn dnd true}    <----- Should this be checking for dnd set to false?

Yes.

Share this post


Link to post
Share on other sites

I made the changes for a single Snom d725 as follows and rebooted the phone. It does not seem to be working. If DND is on or off it only has the option to turn DND on.

How should it work? If DND is off we should see only see a menu option to "Turn DND on" and if DND is ON we should see a menu option to "Turn DND off"?

Where will the new menu.xml files for the server, domain and each phone be located on the on the PBX? I searched the entire file system and found no files called menu.xml.

 

{ssi ifn dnd false}
 <MenuItem>
  <Name>{lng dnd_on}</Name>
  <URL>{ssi link snom/menu.xml &amp;name=dnd&amp;value=true}</URL>
 </MenuItem>
{ssi fin dnd false}

{ssi if dnd true}
 <MenuItem>
  <Name>{lng dnd_off}</Name>
  <URL>{ssi link snom/menu.xml &amp;name=dnd&amp;value=false}</URL>
 </MenuItem>
{ssi fi dnd true}

Share this post


Link to post
Share on other sites

I just noticed that the first IF statement is ifn so it should work when it is compared to true.

 

{ssi ifn dnd false}
 <MenuItem>
  <Name>{lng dnd_on}</Name>
  <URL>{ssi link snom/menu.xml &amp;name=dnd&amp;value=true}</URL>
 </MenuItem>
{ssi fin dnd false}

{ssi if dnd true}
 <MenuItem>
  <Name>{lng dnd_off}</Name>
  <URL>{ssi link snom/menu.xml &amp;name=dnd&amp;value=false}</URL>
 </MenuItem>
{ssi fi dnd true}

Share this post


Link to post
Share on other sites

I did some additional debugging.

If I remove the IF statements from the MenuItems I get a choice to turn DND on and one to turn DND off and they both work.

<MenuItem>
  <Name>{lng dnd_on}</Name>
  <URL>{ssi link snom/menu.xml &amp;name=dnd&amp;value=true}</URL>
 </MenuItem>

 <MenuItem>
  <Name>{lng dnd_off}</Name>
  <URL>{ssi link snom/menu.xml &amp;name=dnd&amp;value=false}</URL>
 </MenuItem>

If I keep the original code with th IF statements it does not work and I only get the option to turn DND on. I am guessing that there is something wrong with {ssi load extensions ext dnd agent_login} not populating the variables or the variables are not being set.


{ssi ifn dnd true}
 <MenuItem>
  <Name>{lng dnd_on}</Name>
  <URL>{ssi link snom/menu.xml &amp;name=dnd&amp;value=true}</URL>
 </MenuItem>
{ssi fin dnd true}

{ssi if dnd true}
 <MenuItem>
  <Name>{lng dnd_off}</Name>
  <URL>{ssi link snom/menu.xml &amp;name=dnd&amp;value=false}</URL>
 </MenuItem>
{ssi fi dnd true}

Share this post


Link to post
Share on other sites

The points was to show only the menu item that makes sense... If you are on DND, you don't want to turn it on again... and vice versa. ifn and fin need to match, and so does if and fi. The problem might be that the dnd variable might just be empty, that is why it is better to compare always to the same value, e.g. if true .. ifn true. This way it must be either the first or the second.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×