Mappings
The mappings.json file is used to determine where to place faxes when they are received. At minimum, the mappings file must contain a default field and a outboundfolder field. A mappings field can be provided with the value being an array of json objects that contain to, from, path, and printer fields. to and from fields are matched using "starts with" against their respective numbers starting with the to field then the from field. Both to and from must match otherwise the default folder is used. Empty to or from fields match all. The first match found in the array is used. The path can contain the following templates:
* {{to}} and {{from}}
* These are replaced with the to and from fields in the mapping.
* {{to_full}} and {{from_full}}
* These are replaced with the full to and from numbers.
If a path is not given with a printer field, the default folder is used.
Here is an example given the following mappings.json file.
{
"mappings": [
{
"to": "1555123",
"from": "1555456",
"path": "C:\\Faxes\\{{to_full}}\\{{from}}"
},
{
"to": "15551234",
"from": "1555789",
"path": "C:\\Faxes\\{{to_full}}\\{{from_full}}",
"printer": "Copier"
}
],
"default": "C:\\Faxes\\{{to}}",
"outboundfolder": "C:\\Faxes\\Outbound"
}
A fax sent to 15551234567 from 15557890123 would be placed in C:\Faxes\15551234567\15557890123.
A fax sent to 15551234568 from 15554566789 would be placed in C:\Faxes\15551234568\1555456 and printed to the local printer named Copier.
A fax sent to 15551234569 from 15558907654 would be placed in C:\Faxes\15551234569.