Module: kamailio
Branch: master
Commit: 9fe51ed408918a85946b919e7101c231e983223b
URL: https://github.com/kamailio/kamailio/commit/9fe51ed408918a85946b919e7101c23…
Author: Ivan Myalkin <thereisnomorefreelogins(a)gmail.com>
Committer: Ivan Myalkin <thereisnomorefreelogins(a)gmail.com>
Date: 2016-10-25T12:13:00+03:00
Adding dialog replication via DMQ
Updating code base to actual state.
Adding repliation for DLG_STATE_EARLY to prevent hanging up unconfirmed dialogs and its infinite …
[View More]replication.
Fixing dialog removal on peers to prevent die on timeout and possible infinite replication.
Fixing dialog removal on peers when master node cleanly restart.
---
Added: modules/dialog/dlg_dmq.c
Added: modules/dialog/dlg_dmq.h
Modified: modules/dialog/dialog.c
Modified: modules/dialog/dlg_db_handler.c
Modified: modules/dialog/dlg_handlers.c
Modified: modules/dialog/dlg_hash.c
Modified: modules/dialog/dlg_hash.h
Modified: modules/dialog/dlg_profile.c
Modified: modules/dialog/doc/dialog_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/9fe51ed408918a85946b919e7101c23…
Patch: https://github.com/kamailio/kamailio/commit/9fe51ed408918a85946b919e7101c23…
[View Less]
Module: kamailio
Branch: master
Commit: aaec127fbf1f3be41e49601330d7eafe7353c53a
URL: https://github.com/kamailio/kamailio/commit/aaec127fbf1f3be41e49601330d7eaf…
Author: Timmo Verlaan <tverlaan(a)gmail.com>
Committer: Timmo Verlaan <tverlaan(a)gmail.com>
Date: 2016-10-28T14:56:54+02:00
rr: use default port for protocol if it is omitted in route header
When using double route headers the selection of the outgoing
socket is only done on IP address if the port is omitted in that
…
[View More]route header. This fix defaults the port to 5060/5061 depending on
protocol so the correct listen socket is chosen. When no socket is
found it will fallback to the current behaviour keeping backwards
interoperability.
---
Modified: modules/rr/loose.c
Modified: socket_info.h
---
Diff: https://github.com/kamailio/kamailio/commit/aaec127fbf1f3be41e49601330d7eaf…
Patch: https://github.com/kamailio/kamailio/commit/aaec127fbf1f3be41e49601330d7eaf…
---
diff --git a/modules/rr/loose.c b/modules/rr/loose.c
index 71d7d43..a0054ba 100644
--- a/modules/rr/loose.c
+++ b/modules/rr/loose.c
@@ -827,8 +827,9 @@ static inline int after_loose(struct sip_msg* _m, int preloaded)
}
if (!use_ob) {
- si = grep_sock_info( &puri.host, puri.port_no, puri.proto);
- if (si) {
+ if ((si = grep_sock_info( &puri.host, puri.port_no?puri.port_no:proto_default_port(puri.proto), puri.proto)) != 0) {
+ set_force_socket(_m, si);
+ } else if ((si = grep_sock_info( &puri.host, puri.port_no, puri.proto)) != 0) {
set_force_socket(_m, si);
} else {
if (enable_socket_mismatch_warning)
diff --git a/socket_info.h b/socket_info.h
index eec9dd4..03225ac 100644
--- a/socket_info.h
+++ b/socket_info.h
@@ -44,6 +44,8 @@
int socket2str(char* s, int* len, struct socket_info* si);
int socketinfo2str(char* s, int* len, struct socket_info* si, int mode);
+/* Helper macro that results in the default port based on the protocol */
+#define proto_default_port(proto) ((proto==PROTO_TLS)?SIPS_PORT:SIP_PORT)
/* struct socket_info is defined in ip_addr.h */
[View Less]
When using double route headers the selection of the outgoing
socket is only done on IP address if the port is omitted in that
route header. This fix defaults the port to 5060 so the correct
listen socket is chosen. When no socket is found it will fallback
to the current behaviour keeping backwards compatibility.
If backwards compatibility is not required the extra 'if else' could be removed. I'm not sure if `loose_route()` is being used in this way so I opted for keeping backwards …
[View More]compatibility.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/830
-- Commit Summary --
* rr: default to port 5060 if port is omitted in route header
-- File Changes --
M modules/rr/loose.c (5)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/830.patchhttps://github.com/kamailio/kamailio/pull/830.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/830
[View Less]