3.9 Instant messaging
Instant messaging is realized through the SIP SIMPLE. The addressing mechanism is based on the local dialing plan the same way as it is used for calling (todo link).
When a user sends a message to another user a SIP MESSAGE request is created with the text of the message in its body. The To header contain the SIP login of the user B (addressee). The FROM header is constructed similarly as for INVITE. The softphones always show the Display Name for incoming messages, unless the user is added to the Contacts already, then the Contact name is shown.
On voipswitch the routing for ONNET messages is same as for calls, it goes through the entry in the dialing plan which points to “look up” function with Retail client type.
The MESSAGE request is delivered to the user B immediately if B is online. Its copy is saved to the sms_inbox table in voipswitch scheme with status field set to (TODO ile?)