Reference11r1:PBX/Config/Import: Difference between revisions

From innovaphone wiki
Jump to navigation Jump to search
No edit summary
 
Line 7: Line 7:
== XML ==
== XML ==


Any imported XML file needs to contain xml header plus data must be inside the tags <info></info>, often when we edit exported XML files this is deleted and then the import fails.
Any imported XML file needs to contain xml header plus data must be inside the <info> tag.


'''<?xml version="1.0" encoding="utf-8"?><info>'''
Example: add new user (simple)
<user cn="BYU_Fax_223" e164="**28223" h323="BYU_Fax_223" text="Umleitung Faxbox zu Fax Service" loc="PBX-Bayreuth" node="PBX-Bayreuth" hide="true"><pseudo type="map"><match><dest e164="226"/></match></pseudo></user>
 
'''</info>'''
<code xml>
<?xml version="1.0" encoding="utf-8"?>
<info>
  <user  
    cn="John Doe"
    e164="217"
    dn="John Doe"
    h323="john.doe"
    loc="pbx_name"
    node="node_name"
    config="config_template"
  >
</info>
</code>
 
Example: add new user (advanced)
<code xml>
<?xml version="1.0" encoding="utf-8"?>
  <info>
    <user
      cn="John Doe"
      e164="217"
      dn="John Doe"
      h323="john.doe"
      loc="pbx_name"
      node="node_name"
      config="config_template"
    >
    <presence c="tel:" s="closed" n="on the way to search for jane"/>
    <device hw="009033000000" text="Deskphone" admin="true"/>
    <phone>
      <f id='0' label='Jane Doe' ro='1'>
        <p h323='jane.doe' ci='1' pr='1' di='1'></p>
      </f>
      <f id='1' label='Jane mobile' ro='1'>
        <dial e164='0049123456'/>
      </f>
    </phone>
    <profile id="1" name="buddys">
      <c id="1" num="0049123456"/>
      <c id="2" num="0049123456"/>
    </profile>
    <grp name="waiting-queue" dyn="out"/>
    <grp name="partner" mode="active"/>
    <grp name="tapi"/>
  </user>
</info>
</code>
 
Example: update an existing user (attribute guid exist)
 
<code xml>
<?xml version="1.0" encoding="utf-8"?>
<info>
  <user
    cn="John Doe"
    guid="7888cd285e76a54a9240957b72d6600f"
    e164="217"
    dn="John Doe"
    h323="john.doe"
    loc="pbx_name"
    node="node_name"
    config="config_template"
  >
</info>
</code>


== CSV ==
== CSV ==

Latest revision as of 12:50, 23 August 2018

With the import function a file containing PBX objects can be uploaded.

New Objects will be added
Existing Objects will be updated (guid)

With the XML format, the complete information of the PBX objects can be provided, with CSV only a subset of the complete configuration is possible. Please keep in mind that when importing no validation of the data takes place as in the GUI.

XML

Any imported XML file needs to contain xml header plus data must be inside the <info> tag.

Example: add new user (simple)

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

 <user 
   cn="John Doe"
   e164="217"
   dn="John Doe"
   h323="john.doe"
   loc="pbx_name"
   node="node_name"
   config="config_template"
 >

</info>

Example: add new user (advanced) <?xml version="1.0" encoding="utf-8"?>

 <info>
   <user 
     cn="John Doe"
     e164="217"
     dn="John Doe"
     h323="john.doe"
     loc="pbx_name"
     node="node_name"
     config="config_template"
   >
   <presence c="tel:" s="closed" n="on the way to search for jane"/>
   <device hw="009033000000" text="Deskphone" admin="true"/>
   <phone>
     <f id='0' label='Jane Doe' ro='1'>

     </f>
     <f id='1' label='Jane mobile' ro='1'>
       <dial e164='0049123456'/>
     </f>
   </phone>
   <profile id="1" name="buddys">
     <c id="1" num="0049123456"/>
     <c id="2" num="0049123456"/>
   </profile>
   <grp name="waiting-queue" dyn="out"/>
   <grp name="partner" mode="active"/>
   <grp name="tapi"/>
 </user>

</info>

Example: update an existing user (attribute guid exist)

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

 <user 
   cn="John Doe"
   guid="7888cd285e76a54a9240957b72d6600f"
   e164="217"
   dn="John Doe"
   h323="john.doe"
   loc="pbx_name"
   node="node_name"
   config="config_template"
 >

</info>

CSV

If a row starts with '&' in the first field, it is assumed, that this is a row which defines the content of the columns of the following rows. The following definitions are available.

File should be saved in format utf-8 (BOM should be present) or latin-1.

&n
Long Name
&h323
Name
&e164
Number
&dn
Display name
&node
Node
&pbx
PBX
&config
Config Template Name
pseudo/&type
Type of a pseudo object (e.g. trunk)
&pwd
Password
grp/&name
Group name
grp/&mode
Group mode
device/&hw
Device hardware id
device/&text
Device text

By default, the following definition is used:

&n; &h323; &e164; &config; &node; &pbx; pseudo/&type; &pwd; grp/&name; grp/&mode; device/&hw; device/&text

PBX Import 11.png