How can we help you today?
Start a new topic

General Purpose XML descriptions

 Hi everybody,


I'm trying to a general purpose xml description (actually the one from docs.snom.io) via provisioning. So far my D345 does not import the xml definitions, as I don't see anything in the configuration.


I'm pretty sure I messed something up on the way and the solution might be that simple, but I currently can't figure it out.



 This is my snom345-test.htm (replaced the actual server url):

<?xml version="1.0" encoding="utf-8" ?>
 <setting-files>
  <file url="http://someserver.domain/snom345general.xml" />
 </setting-files>

 

And this is the snom345general.xml:

<?xml version="1.0" encoding="utf-8"?>
<settings>
 <general_purpose_xml_descriptions idx="0" perm="R">
<general type='PhoneState'/>
<initialization>
  <variable name='current_state' value=''/>
  <variable name='subscr_uri' value='sip:1001@sipgate.de'/>
  <state value='initial'/>
</initialization>
<subscription type='dialog' to='&lt;$(subscr_uri)&gt;' for='$(subscr_uri)'/>
<NotifyParsingRules type='applies'>
  <level1 translates_to='OK'>/dialog-info[@entity='$(subscr_uri)']</level1>
</NotifyParsingRules>
<NotifyParsingRules type='state'>
  <level1 translates_to='me_in_a_call'>/dialog-info/dialog/state[.='early']</level1>
  <level2 translates_to='me_in_a_call'>/dialog-info/dialog/state[.='proceeding']</level2>
  <level3 translates_to='me_in_a_call'>/dialog-info/dialog/state[.='confirmed']</level3>
  <level4 translates_to='me_offhook'>/dialog-info/dialog/state[.='trying']</level4>
  <level5 translates_to='me_free'/>
</NotifyParsingRules>
<NotifyParsingRules type='variable' id='remote_name'>
  <level1 fetch_attribute='display'>/dialog-info/dialog/remote/identity[@display]</level1>
  <level2 fetch_attribute='uri'>/dialog-info/dialog/remote/target[@uri]</level2>
</NotifyParsingRules>
<NotifyParsingRules type='variable' id='local_name' states='offhook,free'>
  <level1 fetch_attribute='display'>/dialog-info/dialog/local/identity[@display]</level1>
  <level2 fetch_attribute='uri'>/dialog-info/dialog/local/target[@uri]</level2>
</NotifyParsingRules>
<NotifyParsingRules type='variable' id='call_id' states='ringing'>
  <level1 fetch_attribute='call-id'>/dialog-info/dialog[@call-id]</level1>
</NotifyParsingRules>
<NotifyParsingRules type='variable' id='remote_tag' states='ringing'>
  <level1 fetch_attribute='remote-tag'>/dialog-info/dialog[@remote-tag]</level1>
</NotifyParsingRules>
<NotifyParsingRules type='variable' id='local_tag' states='ringing'>
  <level1 fetch_attribute='local-tag'>/dialog-info/dialog[@local-tag]</level1>
</NotifyParsingRules>
<NotifyParsingRules type='variable' id='remote_uri' states='ringing'>
  <level1 fetch_attribute='uri'>/dialog-info/dialog/remote/target[@uri]</level1>
</NotifyParsingRules>
<action>
  <assign when='on notify'>
    <source context='local' id='state'/>
    <destination context='local' id='current_state'/>
  </assign>
</action>

</general_purpose_xml_descriptions>
</settings>

 

As far as I can see from the phone logs, the files are downloaded and being processed:

 

Oct 19 11:24:19.738 [INFO ] PHN: Config setup: code: 200, uri: https://someserver.domain:443/snom345general.xml

Oct 19 11:24:19.740 [NOTICE] PHN: read_xml_settings: found settings (container) XML header

Oct 19 11:24:19.740 [NOTICE] PHN: read_xml_settings: found no XML header; probably old style format

Oct 19 11:24:19.741 [NOTICE] PHN: Config setup: found xml style settings

Oct 19 11:24:19.741 [NOTICE] PHN: last prov successful:1; uri: >https://someserver.domain/snom345-test.htm<; default uri: >http://provisioning.snom.com/snomD345/snomD345.php?mac={mac}< 

 But when I look at the phone config:

user_ringer_forwarded_calls10=Ringer3
user_ringer_forwarded_calls11=Ringer3
user_ringer_forwarded_calls12=Ringer3
general_purpose_xml_descriptions0=
general_purpose_xml_descriptions1=
general_purpose_xml_descriptions2=
general_purpose_xml_descriptions3=
general_purpose_xml_descriptions4=

 From my understanding general_purpose_xml_descriptions0 should be populated.


I'm currently using firmware version snomD345-SIP 8.9.3.46.


I'm pretty sure someone can point me into the right direction.


Thanks in advanced,

Hendrik

 

1 Comment

Oh man never mind, I forgot to include <phone-settings e="2">...</phone-settings>

Maybe this helps anyone who is struggling with the XML configuration. Download your current phone configuration as xml file (the complete version, not just the non default values) and you can clearly see the whole structure ;-)

 

Login or Signup to post a comment