Module: kamailio
Branch: master
Commit: a70fd487a7509be41e558a9f54efaa7f038fd3e2
URL: https://github.com/kamailio/kamailio/commit/a70fd487a7509be41e558a9f54efaa7…
Author: denyspozniak <denys.pozniak(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-02-27T09:05:03+01:00
dispatcher: more details for use_default param with dispatcher.list file
---
Modified: src/modules/dispatcher/doc/dispatcher_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/a70fd487a7509be41e558a9f54efaa7…
Patch: https://github.com/kamailio/kamailio/commit/a70fd487a7509be41e558a9f54efaa7…
---
diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml
index d28324f20d..580959f046 100644
--- a/src/modules/dispatcher/doc/dispatcher_admin.xml
+++ b/src/modules/dispatcher/doc/dispatcher_admin.xml
@@ -301,9 +301,10 @@ modparam("dispatcher", "force_dst", 1)
The name of the XAVP which will hold the list with addresses and
associated properties, in the order they have been selected by the
chosen algorithm. If use_default is 1, the values of last XAVP correspond
- to the last address in destination set. The first XAVP is the current
- selected destination. All the other addresses from the destination set
- will be added in the XAVP list to be able to implement serial forking.
+ to the last address in destination set. In case of using dispatcher.list file,
+ you have to set the priority field for each destination to ensure a particular order there.
+ The first XAVP is the current selected destination. All the other addresses
+ from the destination set will be added in the XAVP list to be able to implement serial forking.
</para>
<note>
<para>
Hi,
My name is Ionut and I am a new developer in VoIP dev team in 1&1. Maybe you can help me with the following problem. I have the following scenario: UAC sends invite to UAS via Kamailio proxy, UAS responds with 491. I am trying to catch the ACK from the UAC in siptrace module using TMCB_ACK_NEG_IN. I successfully trace this message but there's one more unwanted call to this callback. It gets called for an INVITE request which I don't want to trace since the callback is called ACK_NEG_IN. From my understanding, this call is issued right after the ACK is sent to the UAS, which, for me, doesn't seem to be correct, since the callback should trace in ACKs not outs. TM code that's calling this callback is in t_reply.c:2291. Is this a bug? I can fix this issue easily in my code by checking whether or not the current message is an ACK in siptrace but it would be great if we would work for a fix to this issue.
Regards,
Ionut
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds new functionality)
- [x] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
This patch set contains a bunch of improvements to the imc module. Most of the changes are backwards-compatible, but some change the semantics of individual imc commands slightly. I have tested the changes with the Zoiper client on Android and with a custom WebRTC client. The motivation behind these changes was to make the imc module a bit more consistent, predictable, and usable.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1869
-- Commit Summary --
* Rename command "deny" to "reject"
* Minor language fixes
* Rename "exit" to "leave", keep backward compatiblity
* Remove code duplication.
* Collect chat room related strings in one place.
* Use STR_FMT in formatted string arguments.
* Use correct command prefix in the invite message.
* Make behavior of "#join" when room does not exist configurable
* Define message prefix with a macro
* Make behavior of "#create" configurable when room already exists
* Pass both parsed and unparsed URIs to all command handlers
* Consistent handling of command parameters.
* Make #create command arguments optional
* Rename command #list to #members.
* Cleanup in invite related messages.
* Consistent formatting of room/user names.
* Improved #join command handling
* Notify user #leaving a room.
* Make message buffer larger
* A small fix in #join
* Check arguments in #invite
* Implement command #add
* Implement command #rooms
* Add In-Reply-To header to MESSAGEs generated in response
* Add Supported header to all chat room MESSAGEs.
* Report error if room owner sends #leave
-- File Changes --
M src/modules/imc/README (6)
M src/modules/imc/doc/imc_admin.xml (62)
M src/modules/imc/imc.c (92)
M src/modules/imc/imc.h (8)
M src/modules/imc/imc_cmd.c (1595)
M src/modules/imc/imc_cmd.h (66)
M src/modules/imc/imc_mng.c (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1869.patchhttps://github.com/kamailio/kamailio/pull/1869.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1869
- URL: https://github.com/kamailio/kamailio/commit/9ce119126c6d618b83fe2a2ba6caeea…
Author: Jan Janak <janakj(a)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/196c2e360d29189e318f6a16c6d7945…
Author: Jan Janak <janakj(a)cs.columbia.edu>
Date: 2019-02-26T17:24:33+01:00
imc: minor language fixes
- URL: https://github.com/kamailio/kamailio/commit/cc4778b4ec537cabdd7cceb0d2cfde0…
Author: Jan Janak <janakj(a)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/3261a0aefbcd9c9d7e412b699ef3431…
Author: Jan Janak <janakj(a)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/3318a7f95fb4c5b38d1da0afd60db03…
Author: Jan Janak <janakj(a)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/95335ae341085f6eeecde53362bc0db…
Author: Jan Janak <janakj(a)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/b66870a0ff94399d9af284062a16ceb…
Author: Jan Janak <janakj(a)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/4e2a3682569ebdfb33f09a3251382b2…
Author: Jan Janak <janakj(a)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/ab87f61a5889ad90229b0d3ec9dcae0…
Author: Jan Janak <janakj(a)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/56c012664e9aadcb5f61f1093710d73…
Author: Jan Janak <janakj(a)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/dbdf69264d65a72490bea33b68b2d04…
Author: Jan Janak <janakj(a)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/b39822eff0c0857f9b5a5220504ad6d…
Author: Jan Janak <janakj(a)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@domain, sip:username@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@domain, or a full URI
sip:username@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/b00433b7710b7c4f879341258edad78…
Author: Jan Janak <janakj(a)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/39457968f10be50b5ccf3f81c71dd68…
Author: Jan Janak <janakj(a)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/e10974fd6d0ace3654e6b45eb6b5a9e…
Author: Jan Janak <janakj(a)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/d7e3d921a41de6ebc40ed13a788b9a0…
Author: Jan Janak <janakj(a)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/3de5f6da6a07c2d1afec7ddd3fdd6d1…
Author: Jan Janak <janakj(a)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/afe2a81a8e9ded484b4b161e3cd629e…
Author: Jan Janak <janakj(a)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/7ad7bb300e4ef2feb9691d7e6e0b2be…
Author: Jan Janak <janakj(a)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/ce45d49d837d5ba0f02ebba48899ef5…
Author: Jan Janak <janakj(a)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/d6760d680bed15d0f90c402ffca9b98…
Author: Jan Janak <janakj(a)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/ec243a6a205b647a83e3a3535fca362…
Author: Jan Janak <janakj(a)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/e742fe4dc56e8ba37b4058996e037c8…
Author: Jan Janak <janakj(a)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/1073c6d0a133df342983829e430415a…
Author: Jan Janak <janakj(a)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/42a66e4f075c244e41e8b828f394e94…
Author: Jan Janak <janakj(a)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/ba4de81405c7e1801ea7cafb5bbf5c8…
Author: Jan Janak <janakj(a)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.