Please enable JavaScript to view this site.

A-Shell Reference

Updated April 2020

xcall XMPP, opcode, status, fromid, pw, server, port, toid, msg, msgid, flags {, timeout {, rcvfile}}

(Linux only) XMPP enables the sending of instant messages using the XMPP protocol (Extensible Message and Presence Protocol, aka Jabber) to third party instant messaging systems implementing that protocol. Compatible examples include the OpenFire messaging server and Pidgin client.

Parameters

op  (Num)  [in]

Operation code:

Value

Meaning

1

connect, send message, disconnect

2

connect, receive message(s), disconnect

3

connect, send message, receive message(s), disconnect

 

status  (signed Num)  [out]

Return code:

Value

Meaning

0 :

ok (for op 1)

>0 :

# messages received (ops 2 and 3)

-1 :

routine abort during startup

-2 :

error opening the xmpp.log file (when debug flags set)

-3 :

failure to create a connection context

-4 :

error during configuration of connection options

-5 :

failure to connect

-6 :

failure to disconnect

 

fromid  (String)  [in]

JID (Jabber ID) of sender, using syntax name@domain. Must be recognized by server for authentication.

pw (String)  [in]

Authentication password for sender. Plain text, or may be optionally encrypted using MX_PWCRYPT. Modes 1-3 are supported; in the case of mode 3, use the FROMID as the encryption seed and omit the key parameter, to use the internal A-Shell generated key.

server (String)  [in]

Hostname or IP address of messaging server

port (Num)  [in]

Port to connect to server on (0 = default: 5222)

toid (String)  [in]

JID of the receipient (individual or group), e.g. name@domain

msg (String)  [in]

Text of message. There is no inherent limit to the length; dynamic strings (S,0) supported.

msgid (String)  [in]

Short string to identify message, preferably unique. Mainly of use for tracking messages within the server.

flags (Num)  [in]

Option flags (zero or more of the following):

Value

 

Meaning

AXMPPF_LOG

&h0001

output traces to ashmpp.log

AXMPPF_TRUST_TLS

&h0002

trust all TLS certs

AXMPPF_DISABLE_TLS

&h0004

disable TLS; use insecure connect

AXMPPF_DEBUG

&h0008

low level tracing to xmpp.log

 

timeout  (Num)  [in]

Number of seconds to wait for messages to be received.

rcvfile (String)  [in]

File specification (A-Shell or native) of file to receive messages in. If not specified, default is ashxmpp.xml.

History

2020 April, A-Shell 6.5.1678:  Added opcode 2 and 3, revised status meanings, added new parameters timeout and rcvfile. Requires the libashxmpp.so.1 library to be upgraded to version 1.0.102+.

2020 February, A-Shell 6.5.1676:  Routine added to A-Shell.