[SR-Users] Psresence dialoginfo question

2024-06-16 Thread Stefan Mititelu via sr-users

Hello,

I am doing BLF but I want different users to be able to setup different 
dialog info initial states. My question is if there's an already 
implemented way for doing that?


I've looked over docs and C code so far and this is what I've found:

1. modparam("presence_dialoginfo", "force_dummy_dialog", 1) => will force sending initial 
NOTIFY with dialog state "terminated"

2. Function calls: dlginfo_agg_nbody()->dlginfo_agg_nbody_empty() which 
will build the pre-defined xml body with that "terminated" state. If not 
implemented so far, maybe this can be used to set a different initial 
state for a user (e.g. export a cfg function or take that info from DB?) 
Any opinions on this?


Thank you,
Stefan
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] How to Check Source Port in Application Layer with Kamailio

2024-06-16 Thread sadik.oualla.mohamed--- via sr-users
Hello kamailio lovers,

I am currently working on a Kamailio configuration where I need to check the 
source port of incoming SIP messages. Initially, I used the $sp pseudo-variable 
to get the source port, which worked perfectly while testing with SIPp.
Here is the snippets code that I use
"
if ($sp != 5080 && $sp != 8080 && $sp != 5060){
sl_send_reply(403, "forbidden");
xlog("this $rm received, is forbidden\n");
exit;
}
"
 However, I encountered an issue when I switched to using sipsak for testing.

It seems that sipsak uses a randomly assigned port for the actual network 
connection, even though it sets the source port in the SIP headers (e.g., Via, 
To and Contact headers) to a specified port using the -l option.
Here is the sipsak command that I use "sipsak -vv -s 
sip:jack@192.168.1.2:5060-l 5080"

My goal is to have Kamailio check the source port as specified in the 
application layer, rather than the transport layer port (i.e., the ephemeral 
port assigned by the OS randomly like 54691, 33017...).

Could anyone guide me on how to properly configure Kamailio to extract and 
check the port from the application layer or SIP headers, or am I doing this in 
the wrong way? Any advice or examples would be greatly appreciated.

"I am not a native english speak, so I use chatGPT to make my questions clear" 

Thank you!
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe: