[sr-dev] [kamailio/kamailio] i want write smpp server module (Issue #2899)

2021-10-24 Thread tarikogut
hello i want write smpp module do you have any documentation ?*

-- 
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/issues/2899___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Allow setting AMQP-Headers when publishing messages (Issue #2895)

2021-10-24 Thread mihovilkolaric
Yes, but that module does not seem to provide that provide that functionality 
either.

-- 
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/issues/2895#issuecomment-950362453___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:5.4:c09e6453: core: tcp - add alias for cinfo dst IP

2021-10-24 Thread Federico Cabiddu
Module: kamailio
Branch: 5.4
Commit: c09e6453db91cc71b1d853b05601a53869718550
URL: 
https://github.com/kamailio/kamailio/commit/c09e6453db91cc71b1d853b05601a53869718550

Author: Federico Cabiddu 
Committer: Federico Cabiddu 
Date: 2021-10-24T11:12:17+02:00

core: tcp - add alias for cinfo dst IP

(cherry picked from commit 110200ce8e5c4cf7500e57e27a23f76e18044ad5)

---

Modified: src/core/tcp_main.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/c09e6453db91cc71b1d853b05601a53869718550.diff
Patch: 
https://github.com/kamailio/kamailio/commit/c09e6453db91cc71b1d853b05601a53869718550.patch

---

diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c
index 84fec376a3..f657b05571 100644
--- a/src/core/tcp_main.c
+++ b/src/core/tcp_main.c
@@ -1478,7 +1478,12 @@ inline static struct tcp_connection*  tcpconn_add(struct 
tcp_connection *c)
 * the second alias is for (peer_ip, peer_port, local_addr, 0) 
-- for
 *  finding any conenction to peer_ip, peer_port from 
local_addr 
 * the third alias is for (peer_ip, peer_port, local_addr, 
local_port) 
-*   -- for finding if a fully specified connection exists */
+*   -- for finding if a fully specified connection exists 
+* the fourth alias is for (peer_ip, peer_port, cinfo_addr, 0) 
-- for
+*  finding any connection to peer_ip, peer_port from address 
stored into cinfo (e.g. when proxy protocol is used)
+* the fifth alias is for (peer_ip, peer_port, cinfo_addr, 
cinfo_port) 
+*   -- for finding if a fully specified connection exists 
using address
+*  and port stored into cinfo*/
_tcpconn_add_alias_unsafe(c, c->rcv.src_port, _ip, 0,

new_conn_alias_flags);
if (likely(c->rcv.dst_ip.af && ! ip_addr_any(>rcv.dst_ip))){
@@ -1487,6 +1492,14 @@ inline static struct tcp_connection*  tcpconn_add(struct 
tcp_connection *c)
_tcpconn_add_alias_unsafe(c, c->rcv.src_port, 
>rcv.dst_ip,

c->rcv.dst_port, new_conn_alias_flags);
}
+   if (unlikely(c->cinfo.dst_ip.af && ! 
ip_addr_any(>cinfo.dst_ip) &&
+   ! 
ip_addr_cmp(>rcv.dst_ip, >cinfo.dst_ip))){
+   _tcpconn_add_alias_unsafe(c, c->rcv.src_port, 
>cinfo.dst_ip, 0,
+   
new_conn_alias_flags);
+   _tcpconn_add_alias_unsafe(c, c->rcv.src_port, 
>cinfo.dst_ip, c->cinfo.dst_port,
+   
new_conn_alias_flags);
+   }
+
/* ignore add_alias errors, there are some valid cases when one
 *  of the add_alias would fail (e.g. first add_alias for 2 
connections
 *   with the same destination but different src. ip*/
@@ -1604,7 +1617,8 @@ struct tcp_connection* _tcpconn_find(int id, struct 
ip_addr* ip, int port,
((l_port==0) || 
(l_port==a->parent->rcv.dst_port)) &&
(ip_addr_cmp(ip, 
>parent->rcv.src_ip)) &&
(is_local_ip_any ||
-   ip_addr_cmp(l_ip, 
>parent->rcv.dst_ip))
+   ip_addr_cmp(l_ip, 
>parent->rcv.dst_ip) ||
+   ip_addr_cmp(l_ip, 
>parent->cinfo.dst_ip))
   ) {
LM_DBG("found connection by peer address (id: 
%d)\n",
a->parent->id);


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:5.5:e43ea4b3: core: tcp - add alias for cinfo dst IP

2021-10-24 Thread Federico Cabiddu
Module: kamailio
Branch: 5.5
Commit: e43ea4b3e011e410ec36bb470889170f836e93b5
URL: 
https://github.com/kamailio/kamailio/commit/e43ea4b3e011e410ec36bb470889170f836e93b5

Author: Federico Cabiddu 
Committer: Federico Cabiddu 
Date: 2021-10-24T11:12:03+02:00

core: tcp - add alias for cinfo dst IP

(cherry picked from commit 110200ce8e5c4cf7500e57e27a23f76e18044ad5)

---

Modified: src/core/tcp_main.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/e43ea4b3e011e410ec36bb470889170f836e93b5.diff
Patch: 
https://github.com/kamailio/kamailio/commit/e43ea4b3e011e410ec36bb470889170f836e93b5.patch

---

diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c
index 3b46026027..4338806ce6 100644
--- a/src/core/tcp_main.c
+++ b/src/core/tcp_main.c
@@ -1478,7 +1478,12 @@ inline static struct tcp_connection*  tcpconn_add(struct 
tcp_connection *c)
 * the second alias is for (peer_ip, peer_port, local_addr, 0) 
-- for
 *  finding any conenction to peer_ip, peer_port from 
local_addr 
 * the third alias is for (peer_ip, peer_port, local_addr, 
local_port) 
-*   -- for finding if a fully specified connection exists */
+*   -- for finding if a fully specified connection exists 
+* the fourth alias is for (peer_ip, peer_port, cinfo_addr, 0) 
-- for
+*  finding any connection to peer_ip, peer_port from address 
stored into cinfo (e.g. when proxy protocol is used)
+* the fifth alias is for (peer_ip, peer_port, cinfo_addr, 
cinfo_port) 
+*   -- for finding if a fully specified connection exists 
using address
+*  and port stored into cinfo*/
_tcpconn_add_alias_unsafe(c, c->rcv.src_port, _ip, 0,

new_conn_alias_flags);
if (likely(c->rcv.dst_ip.af && ! ip_addr_any(>rcv.dst_ip))){
@@ -1487,6 +1492,14 @@ inline static struct tcp_connection*  tcpconn_add(struct 
tcp_connection *c)
_tcpconn_add_alias_unsafe(c, c->rcv.src_port, 
>rcv.dst_ip,

c->rcv.dst_port, new_conn_alias_flags);
}
+   if (unlikely(c->cinfo.dst_ip.af && ! 
ip_addr_any(>cinfo.dst_ip) &&
+   ! 
ip_addr_cmp(>rcv.dst_ip, >cinfo.dst_ip))){
+   _tcpconn_add_alias_unsafe(c, c->rcv.src_port, 
>cinfo.dst_ip, 0,
+   
new_conn_alias_flags);
+   _tcpconn_add_alias_unsafe(c, c->rcv.src_port, 
>cinfo.dst_ip, c->cinfo.dst_port,
+   
new_conn_alias_flags);
+   }
+
/* ignore add_alias errors, there are some valid cases when one
 *  of the add_alias would fail (e.g. first add_alias for 2 
connections
 *   with the same destination but different src. ip*/
@@ -1604,7 +1617,8 @@ struct tcp_connection* _tcpconn_find(int id, struct 
ip_addr* ip, int port,
((l_port==0) || 
(l_port==a->parent->rcv.dst_port)) &&
(ip_addr_cmp(ip, 
>parent->rcv.src_ip)) &&
(is_local_ip_any ||
-   ip_addr_cmp(l_ip, 
>parent->rcv.dst_ip))
+   ip_addr_cmp(l_ip, 
>parent->rcv.dst_ip) ||
+   ip_addr_cmp(l_ip, 
>parent->cinfo.dst_ip))
   ) {
LM_DBG("found connection by peer address (id: 
%d)\n",
a->parent->id);


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev