get channel-parameter()
This function returns the parameters of partner channel a as a CSV text line. A comma is used as CSV delimiter. The fields have the following meaning.
<channel>,<localid>,<remoteid>,<remoteaddress>,<type> |
With the optional parameter b=true, the result of the function can be extended by the contact data of the partner channel. The result will then contain the following fields.
<channel>,<localid>,<remoteid>,<remoteaddress>,<type>,<error>,<name>,<phone>,<fax>,<email>,<language> |
The determination of the contact data requires more resources. If an error occurs, the function does not abort. Instead, the field <error> contains an error message. Otherwise, <error> is empty and the following fields contain the contact details if they have been maintained for the channel.
If no channel with the given ID is found, an empty string is returned.
If parameter a=header, the headers will be returned (instead of the values).
If parameter a=h, alternative headers (each consisting only of one lowercase letter) will be returned. Both the long form and the short form of the header can be used as a key to access the individual values of the optional map c.
The name of a map can be specified in optional parameter c, which allows access to the individual values under the header name as a key. The map is emptied before. If parameter c is empty, no map will be used.
If parameter a contains a non-empty value that is neither a positive integer nor one of the keys header or h, the function aborts with an error.
Parameters
Parameter |
Description |
a |
Channel ID . |
b |
(optional) true if contact information should also be provided. |
c |
(optional) Name of a map that allows access to individual fields of the result under the header name of the field as a key. |
Examples
Assume the channel administration contains two channels for partner Lobster with the following attributes (simplified):
Channel ID |
Name |
1 |
Lobster:FTP |
2 |
Lobster:AS2 |
This will deliver the following results.
Parameter a |
Parameter b |
Parameter c |
Result |
1 |
|
|
Lobster:FTP,Lobster_Test,Partner,ftp://example.com:21 |
2 |
|
|
Lobster:AS2,L_AS2_P,Other_AS2,https://other.example.net:443/partner/AS2Retrieve/ |