[sr-dev] git: new commits in branch master

Daniel-Constantin Mierla miconda at gmail.com
Tue Feb 26 17:25:20 CET 2019


- URL:  https://github.com/kamailio/kamailio/commit/9ce119126c6d618b83fe2a2ba6caeeac698c63eb
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: rename command "deny" to "reject"

Since the command effectively "rejects" an invitation, the word
"reject" is a better match. Keep "deny" as an alias to the command for
backward compatibility.

- URL:  https://github.com/kamailio/kamailio/commit/196c2e360d29189e318f6a16c6d79453a40b8e0d
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: minor language fixes

- URL:  https://github.com/kamailio/kamailio/commit/cc4778b4ec537cabdd7cceb0d2cfde041647e459
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: rename "exit" to "leave", keep backward compatiblity

The command name "leave" better describes what the command does and is
less confusing for users (coincidentally, source code comments and
debugging messages also use leave, not exit).

The command name "exit" is kept as an alias for backward
compatibility.

- URL:  https://github.com/kamailio/kamailio/commit/3261a0aefbcd9c9d7e412b699ef34312e6af09e3
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: remove code duplication.

A significant portion of the functions handling invite and remove was
duplicated code. Refactor the code into a common function.

- URL:  https://github.com/kamailio/kamailio/commit/3318a7f95fb4c5b38d1da0afd60db0365b0f16fc
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: collect chat room related strings in one place.

Rather than embedding strings directly in the functions that use them,
it is better to have them collected at one place so that they can be
easily modified. Later, we may turn the strings into module parameters
so that they can be customized at startup time, e.g., to translate them.

- URL:  https://github.com/kamailio/kamailio/commit/95335ae341085f6eeecde53362bc0db8370c7ec5
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: use STR_FMT in formatted string arguments.

This makes the code somewhat shorter and safer.

- URL:  https://github.com/kamailio/kamailio/commit/b66870a0ff94399d9af284062a16ceb564b19995
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: use correct command prefix in the invite message.

When showing the INVITATION to the user, make sure to show the actual
command prefix that has been configured via the module parameter.

- URL:  https://github.com/kamailio/kamailio/commit/4e2a3682569ebdfb33f09a3251382b2c2da3039f
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: make behavior of "#join" when room does not exist configurable

Before, the command "#join" would automatically create the room and
add the user to the room if it does not exist. That behavior can be
confusing, especially on mobile where it is easy to miss-type room
name. With the default behavior, the user would be added to the wrong
room in that case.

This patch introduces module parameter "create_on_join" which makes
this behavior configurable. If set to 0, command join will not create
the room if it does not exist and would send an error back to the user
instead.

- URL:  https://github.com/kamailio/kamailio/commit/ab87f61a5889ad90229b0d3ec9dcae0c16506385
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: define message prefix with a macro

This simple change makes it much easier to consistently change the
prefix across all messages sent to the user. By default, the prefix is
"*** ".

- URL:  https://github.com/kamailio/kamailio/commit/56c012664e9aadcb5f61f1093710d73f9ea3156e
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: make behavior of "#create" configurable when room already exists

The default behavior of the create command is to silently add the user
to a group of one already exists. This can be confusing in some
scenarios, e.g., when the user miss-types the room number. This patch
adds a module parameter called "check_on_create" which makes it
possible to customize this behavior. If set and the user attempts to
create a room that already exists, the command will report an error.

- URL:  https://github.com/kamailio/kamailio/commit/dbdf69264d65a72490bea33b68b2d04115eb71b6
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: pass both parsed and unparsed URIs to all command handlers

In order for the command handler to be able to send a response back
when the corresponding room does not exist, e.g., when sending an
error message, the handler must have access to the original unparsed
URI.

This change fixes one bug on the side: when sending a response, the
response will be sent to the correct part number which was part of the
original SIP URI. Previously, port numbers were ignored since the SIP
URI to send the message to was constructed just from the username and
domain parts.

- URL:  https://github.com/kamailio/kamailio/commit/b39822eff0c0857f9b5a5220504ad6d36fa944b6
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: consistent handling of command parameters.

Most (all) commands takes parametes in one of the following forms:
username, username at domain, sip:username at domain. The purpose of this
change is to provide consistent handling of such parameters across all
commands and their arguments.

If a command takes a user or a room as a parameter, the user can
provide just a username, username at domain, or a full URI
sip:username at domain. The imc module will automatically obtain missing
parts from other parts of the message, e.g., the Request-URI or From
headers.

In addition, all debugging and logging messages print the full URI of
users and rooms. This significantly helps with debugging and
development.

- URL:  https://github.com/kamailio/kamailio/commit/b00433b7710b7c4f879341258edad78ff4a622fc
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: make #create command arguments optional

With no arguments, the room name is taken from To header and the room
will be made public.

With one argument, if the value is 'private', a private room with name
from To is created. If the value of the single argument is anything
else, it is taken as room name and the room will be made public.

With two argument, the first argument is room name and the second
argument must be string 'private'.

This change makes the #create command consistent with all other
commands where the room/user name is also optional.

- URL:  https://github.com/kamailio/kamailio/commit/39457968f10be50b5ccf3f81c71dd68c078af344
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: rename command #list to #members.

List was not very good name for the command, because the user would
not know whether the command lists rooms or members within a room.

The alias "list" is kept for backward compatibility.

- URL:  https://github.com/kamailio/kamailio/commit/e10974fd6d0ace3654e6b45eb6b5a9e13d270903
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: cleanup in invite related messages.

In the original version, when the user receives an invitation to join
the room, it was not obvious who is inviting.

- URL:  https://github.com/kamailio/kamailio/commit/d7e3d921a41de6ebc40ed13a788b9a06c26c3045
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: consistent formatting of room/user names.

No matter in which message a room URI or user URI is printed, always
use the same function to consistent format the resulting string. In
most cases, this means printing just the username portion of the full
URI.

- URL:  https://github.com/kamailio/kamailio/commit/3de5f6da6a07c2d1afec7ddd3fdd6d1f8d7a1b7b
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: improved #join command handling

This patch improves the overall handling of the #join command on the
chat server. If a user attempts to join a room they are already a
member of, notify the user, instead of sending a broadcast that the
user has joined again to the entire room.

If a user attempts to join a private room, notify them that private
rooms are by invitation only with a unicast message and send a
broadcast to the entire room about the join attempt so that
administrators can see the join attempt in order to decide whether or
not to send an invitation to the user.

- URL:  https://github.com/kamailio/kamailio/commit/afe2a81a8e9ded484b4b161e3cd629e56a665747
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: notify user #leaving a room.

When a user chooses to leave a room, send the broadcast first. That
way, the broadcast will include the leaving user and they will be able
to see that they have left the room successfully. Also, this behavior
is consistent with the behavior of #join.

- URL:  https://github.com/kamailio/kamailio/commit/7ad7bb300e4ef2feb9691d7e6e0b2be57f1f6366
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: make message buffer larger

Enlarge the buffer so that longer messages and user lists can be sent.
A larger buffer is fine when TCP and or TLS is used.

- URL:  https://github.com/kamailio/kamailio/commit/ce45d49d837d5ba0f02ebba48899ef5c872aba71
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: a small fix in #join

When a user has left or been removed from a room and try to join
again, make sure to test the IMC_MEMBER_DELETED flag, otherwise they'd
be getting a message that they are already in the room.

- URL:  https://github.com/kamailio/kamailio/commit/d6760d680bed15d0f90c402ffca9b98a01eb7274
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: check arguments in #invite

The command has one required argument: the name/URI of the user to be
invited to the room.

- URL:  https://github.com/kamailio/kamailio/commit/ec243a6a205b647a83e3a3535fca3626ad91fba7
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: implement command #add

The command can be used by room owners and administrators to
explicitly add other users as members to the room. It works a bit like
the command #invite, except that the added user will have no chance to
accept or reject the request.

- URL:  https://github.com/kamailio/kamailio/commit/e742fe4dc56e8ba37b4058996e037c851301c2d4
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: implement command #rooms

The command can be used to list all the rooms available on the chat
server.

- URL:  https://github.com/kamailio/kamailio/commit/1073c6d0a133df342983829e430415a33b227ddc
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: add In-Reply-To header to MESSAGEs generated in response

When generating a MESSAGE in response to a command, add a In-Reply-To
header field to the second message with the Call-ID of the (original)
message that carried the command. A chat client could then use the
In-Reply-To header field to correlate requests and responses carried
in-band in chat messages.

- URL:  https://github.com/kamailio/kamailio/commit/42a66e4f075c244e41e8b828f394e949974e2363
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: add Supported header to all chat room MESSAGEs.

The header contains value "kamailio/imc" which indicates that the
end-point is a chat room that supports the in-band signaling protocol
implemented by Kamailio's imc module.

- URL:  https://github.com/kamailio/kamailio/commit/ba4de81405c7e1801ea7cafb5bbf5c8849a1b3d4
Author: Jan Janak <janakj at cs.columbia.edu>
Date:   2019-02-26T17:24:33+01:00

imc: report error if room owner sends #leave

Previously, if the room owner send the #leave command, the room would
have been automatically destroyed. That is somewhat dangerous and
error prone, e.g., if the user sends the #leave command to the wrong
room. With this patch, #leave reports an error if used by a room
owner and the user is encouraged to use #destroy instead.





More information about the sr-dev mailing list