Concept Flash Directory

From innovaphone wiki
Jump to navigation Jump to search

The flash directory is a software module on top of the flash management module. It serves firmware-internally as a database offering an LDAP-like API.

Applies To

This information applies to

  • innovaphone PBXs, V9, V10


More Information

+-------+ +-------------+ +-----------------+ | | | | | | | PBX | | LDAP Server | | LDAP Replicator | +-------+ +-------------+ +-----------------+ | | | | | +-----------+ | | | | +-----------------+ | +-------+ +-----------------+ +---| |----+ | | | |

   | Flash Directory |         | VARS  |    | FW Upload       |
   +-----------------+         +---+---+    +--------+--------+
           |  +--------------------+                 |
           |  |  +-----------------------------------+
           |  |  |
   +---------------+
   |               |
   | Flash Manager |
   +---------------+

Above: Illustration of the flash directory residing in between its applications and the flash manager. Other clients of the flash manager are shown.

Investigating Flash Directory Space

The current assignment of the available space for the flash directory can be investigated by issuing the following command towards the flash manager. mod cmd FLASHMAN0 info

The output may look as follows bottom 0xfe020000 base 0xfe020000 top 0xfffc0000 segsize 0x20000 segments 253 LDAP - used 6944k avail 87k owned 7040k (max 9728k) VARS - used 10k avail 90k owned 128k (max 256k)

 ...

Within the above excerpt the line beginning with LDAP shows the flash directory's utilization of flash space.

  • used 6944k tells how much payload is effectively in use
  • avail 87k tells how much space is available within the current 64KB segment. I.e. this value does not tell how much overall space is remaining.
  • owned 7040k tells how much space is occupied by the payload plus space that wasn't freed, yet
  • max 9728k tells how much space would be available as maximum

Whereby only the two values used 6944k and max 9728k are of practical interest for an administrator. The total available space is calculated by 9728k-6944k and equals 2784k.

Increasing Flash Directory Space

Warning: The procedure described here shall always be applied after consulting the innovaphone support.

If for whatever reason the available space for the flash directory doesn't suffice the following tweak may help: config change FLASHDIR0 /seg <number-of-64KB-segments> Where <number-of-64KB-segments> is a number, denoting the available space in multiples of 64KB. Note: If the /seg parameter was once specified and is later on about to be removed or lowered, a loss of data will happen.

Example Calculation: 152 segments of 64KB yield a total of 9961472 Bytes or roughly 9.5MB.

Default settings for the flash directory segments(in number of 64KB segments)

  • IPxx10 128
  • IP6000 50
  • IP800 50
  • IP30x 50
  • IPVA up to 900

Obsolete V8 parameter /max

Within version 8 an additional parameter /max allowed to specify the maximum amount of object entries within the flash directory. E.g. as follows config change FLASHDIR0 /seg 80 /max 14000 This parameter /max has been deprecated from on version 9, where's no such limit in a practical sense.

IPVA Aspects

This procedure shouldn't be applied into an IPVA. The IPVA increases the /seg parameter automatically depending on the available RAM.

Accessing Error Messages

The flash directory maintains a backlog of a few recent error messages.

Those messages are accessible either via the replicator status page or via the LDAP expert:

  • Services/LDAP/Rep-Status/Flash Directory Status
  • Services/LDAP/Expert/Flash Directory Status

Escape Rule For Object Values

This section explains an escaping mechanism, that is to be introduced with firmware version 10. In version 9 it'll be also available from on V9HF25. The mechanism's motivation is to avoid unnecessary binary encodings, to spare some length per configuration line and to ease manual search+replace operations.

After downloading a configuration file, flash directory objects will appear alike the following sample mod cmd FLASHDIR0 add-item 102 (cn=Nitram \28S.\29)(dn=Nitram\\\\\\das waren drei Backslashes\\Das war ein Backslash,Am Ende nochmal ein Backslash\\)(h323=Nitram\\\28)(e164=371)(loc=.)(node=root)(pbx=<user/>)(pbx=<device hw="Nitram"/>)(pbx=<presence c="tel" s="open" a="appointment" n="Hallo,\0D\0A;ballo.\0D\0A\0D\0A;Denno\0D\0ABenno"/>)(guid;bin=07040A9AE909D311B4B9000C29142AF8)(usn=596399) A line of configuration displays the PBX object Nitram (S.).


Without going into all details the general outline is

  • (<Attribute-Name>=<Attribute-Value>)

If the attribute's name received the suffix ;bin, then the attribute's value is printed as a string of hexadecimal digits 0-9, A-F. The only such attribute will be the guid-attribute as can be seen above. This mechanism was already in place in previous firmware versions.


For all other attribute values an escaping mechanism applies:

  • If the attribute contains values less than decimal 32(i.e. less the space character), then the value is going to be escaped
  • If the attribute contains the characters (, ) or \ then then the value is going to be escaped


The afore-mentioned escaping mechanism works as simple as follows

  • A backslash \ is being printed as two backslashes \\
  • All other values will be printed as <backslash><hexadecimal value>. Here come a few:
    • ( as \28
    • ) as \29
    • Carriage Return as \0D
    • Line Feed as \0A

Long Name+-------------+ Display Name+------------------------------------------------------------------------------------------+

        | Nitram (S.) |               | Nitram\\\das waren drei Backslashes\Das war ein Backslash,Am Ende nochmal ein Backslash\ |
        +-------------+               +------------------------------------------------------------------------------------------+
    Name+-------------+		  
        | Nitram\(    | 
        +-------------+

The PBX object Nitram (S.) from above as it appears in the Web UI.