Hi,
I use Kamailio 5.3.1 with rtpengine to offer an siptrunk endpoint for my
customers.
I observe that someone of them use tls to encrypt signaling but forgotten
to encrypt rtp.
I want to reject this invites.
Are there any hints how to do this?
Thought about reading the sdp and search for a=crypto line and if not send
reply with (what code ever will be good for that).
Cheers
Karsten
Hello
I have a problem with some phone numbers at Telenor. Our door telephone
does not reply with an ACK on the 200 OK.
All I found was a weird SDP response with two "connection information" lines
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): BroadWorks 307119541 1 IN IP4 194.247.61.31
Session Name (s): -
Connection Information (c): IN IP4 194.247.61.31
Time Description, active time (t): 0 0
Session Attribute (a): sendrecv
Media Description, name and address (m): audio 23116 RTP/AVP 8 101
Connection Information (c): IN IP4 194.247.61.31
Media Attribute (a): rtpmap:8 PCMA/8000
Media Attribute (a): rtpmap:101 telephone-event/8000
Media Attribute (a): fmtp:101 0-15
Media Attribute (a): maxptime:40
Media Attribute (a): bsoft:1 image udptl t38
Media Attribute (a): sendrecv
Media Attribute (a): silenceSupp:off - - - -
Media Attribute (a): setup:actpass
To debug, I would like to remove one of the "Connection Information (c):
IN IP4 194.247.61.31", to see if this is what confuses the door telephone.
But how do I do that?
I tried with this but nothing happeded
onreply_route[DOOR_MANAGE_REPLY] {
if (is_method("INVITE|SUBSCRIBE"))
{
sdp_remove_line_by_prefix("c=IN IP4 194");
}
return 1;
}
--
--------------------- Med Liberalistiske Hilsner ----------------------
Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
Den ikke akademiske hjemmeside for liberalismen -www.liberalismen.dk <http://www.liberalismen.dk>
Hi I am using kamailio server to forward the request to a new
kamailio-server which listens only on TLS.
*problem: Not able to specify the dispatcher with tls protocol*
I am using the below configuration in dispatcher.list
kamailio version:4.4.2
*# setid(integer) destination(sip uri) flags (integer, optional),
priority(int,opt), attrs (str,optional)1 sip:mynetwork.com
<http://mynetwork.com>;transport=tls 8 1 socket=tls:mynetwork.com:5328
<http://mynetwork.com:5328>*
and if I specify the destination as just sip:mynetwork.com:5328 with out
attrs and transport=tls if is falling back to UDP.
Thank you
vinod.M.N
Hi I am using kamailio server to forward the request to a new
kamailio-server which listens only on TLS.
*problem: Not able to specify the dispatcher with tls protocol*
I am using the below configuration in dispatcher.list
kamailio version:4.4.2
*# setid(integer) destination(sip uri) flags (integer, optional),
priority(int,opt), attrs (str,optional)1 sip:mynetwork.com
<http://mynetwork.com/>;transport=tls 8 1 socket=tls:mynetwork.com:5328
<http://mynetwork.com:5328/>*
and if I specify the destination as just sip:mynetwork.com:5328 with out
attrs and transport=tls if is falling back to UDP.
Thank you
vinod.M.N
Hi all,
I’m trying to write a basic Kamailio module from scratch and have run into an area where I’m in need of a couple pointers (pun not intended). :-) I have the module loading correctly and can call a function in my routing script like this:
mymod_getinfo(“5551234”);
This, for now, just triggers a print of the submitted parameter.
What I’d like to do next is have it accept and print the From URI in configuration script like so:
mymod_getinfo(“$fU”);
For now, this prints the string literal of “$fU” and I’m trying to extract the value of the referenced variable and print that. The example module “print” does not involve this concept of pseudo-variables. The skeleton module example in the wiki also does not mention variables.
I’ve looked into other modules to see how it works but they all seem to have a slightly different handling of this task. Can someone point me to an example in the modules which accomplishes this?
What I’ve been searching for is a replace_all function which accepts a string containing pseudo-variables and returns a new string with them all replaced with their corresponding values.
Thanks in advance and apologies if I’ve overlooked a relevant piece of developer documentation or if I’m looking at this incorrectly.
Regards,
-Michael
Hello!
I have notice some issues with lookup(aliases) since I upgraded to 5.2 from
5.1:
First with kamctl: If this default command is executed:
ctl_cmd_run ul.add "$USRLOC_TABLE" "$OSERUSER@$OSERDOMAIN" "$2" \
"$UL_EXPIRES" "$DEFAULT_Q" "$UL_PATH" "$UL_FLAGS" "$BR_FLAGS" "$ALL_METHODS"
as $ALL_METHODS is not defined, there is a huge value in methods and then
lookup(aliases) fails with -2.
I have to update kamctl script and put -1 ("-1") instead of the variable.
So, now, methods is a NULL value in DB and my alias is not ignored. But I
use to make my alias like this: sip:number@blabla_1.local
Which is no longer works: ERROR: registrar [common.c:62]: extract_aor():
failed to parse AoR [sip:number@blabla_1.local]
Any idea of the difference since 5.2 with this behaviour? Without the
underscore, the AoR seems to be valid but I need to support underscore as
before.
Regards,
Igor.
I noticed this in t_newtrans() README:
Note that any flag operations (e.g. for accounting) after this
function has been called will be ignored. You can use the the tmx
module function t_flush_flags() to flush the altered flags to the
already created transaction.
The text is wrong. I have for ages set bflags after calliing
t_newtrans() and the sets are NOT ignored.
Here is an example:
In route blocks:
Dec 12 08:41:53 /usr/bin/sip-proxy[231131]: INFO: ********* called t_newtrans()
Dec 12 08:41:53 /usr/bin/sip-proxy[231131]: INFO: ************ set bflag 9
In failure route block:
Dec 12 08:41:58 /usr/bin/sip-proxy[231195]: INFO: ************ bflag 9 is set
-- Juha
Hi All,
I need some expert help to trouble shoot a problem I have seen, S-CSCF send BYE to tear down a call. I have make some progress to trace the problem to impurecord.c in ims_usrloc_scscf module, _c->first_dialog_data !=0 while try to delete an expired contact. I need some help to find out why _c->first_dialog_data is not 0 for an expired contact.
To reproduce the problem, I began with the following for user1. Contact id 4098, 4114, and 4115 would expire and a call was using id 4116. When the time to delete contact, somehow scscf mistakenly think id 4098 still has a dialog, but the dialog was with id 4116 which was NOT expired. Therefore, S-CSCF send BYE to tear down the call, so end user see call drop. Please note, if id 4098 never make calls before, first call was working fine. But once a call was make, you will see this problem for next call. it seem S-CSCF did not clean up the dialog_data from last call properly and some data still hanging with the contact caused this problem. any insight how to fix or avoid this would be appreciated.
id contact params path received user_agent expires callid
2192 sip:user2@192.168.164.136:62837;rinstance=bca96a7c77f53916;transport=UDP NULL <sip:term@pcscf.ims.mnc001.mcc001.3gppnetwork.org;lr> Zoiper rv2.10.3.2 2019-12-12 15:50:10 UPIM_gl22a13wlo47aeHRQ..
4098 sip:user1@192.168.164.9:61946;rinstance=7ab86c5e85643767;transport=UDP NULL <sip:term@pcscf.ims.mnc001.mcc001.3gppnetwork.org;lr> Zoiper rv2.10.3.2 2019-12-12 15:49:21 ocl7UYxJLo8TnMw2p2-6NQ..
4114 sip:user1@192.168.164.9:61946;rinstance=65afabdb886de0a7;transport=UDP NULL <sip:term@pcscf.ims.mnc001.mcc001.3gppnetwork.org;lr> Zoiper rv2.10.3.2 2019-12-12 15:50:11 GZrZHDyL3ojhDlLDPpJnvQ..
4115 sip:user1@192.168.164.9:61946;rinstance=074e2e926212237b;transport=UDP NULL <sip:term@pcscf.ims.mnc001.mcc001.3gppnetwork.org;lr> Zoiper rv2.10.3.2 2019-12-12 15:50:13 DCKsqvUjZ1dAfJLfJ3nOhA..
4116 sip:user1@192.168.164.9:61946;rinstance=38cc0c6188509aea;transport=UDP NULL <sip:term@pcscf.ims.mnc001.mcc001.3gppnetwork.org;lr> Zoiper rv2.10.3.2 2019-12-12 15:50:15 gF3fphqyrSbQwaN0eW4JLw..
13(18) DEBUG: ims_usrloc_scscf [udomain.c:384]: mem_timer_udomain(): *** mem_timer_udomain - checking IMPUs - FINISHED ***
13(18) DEBUG: ims_usrloc_scscf [udomain.c:406]: mem_timer_udomain(): deleting contact [sip:user1@ims.mnc001.mcc001.3gppnetwork.org]
13(18) DEBUG: ims_usrloc_scscf [impurecord.c:598]: delete_scontact(): Deleting contact: [sip:user1@192.168.164.9:61946;rinstance=074e2e926212237b;transport=UDP]
13(18) DEBUG: ims_usrloc_scscf [usrloc_db.c:370]: db_delete_ucontact(): Deleting ucontact [sip:user1@192.168.164.9:61946;rinstance=074e2e926212237b;transport=UDP]
13(18) DEBUG: ims_usrloc_scscf [impurecord.c:310]: mem_delete_ucontact(): Checking if dialog_data is there and needs to be torn down
13(18) DEBUG: ims_usrloc_scscf [impurecord.c:312]: mem_delete_ucontact(): first dialog is 0!
13(18) DEBUG: ims_usrloc_scscf [udomain.c:406]: mem_timer_udomain(): deleting contact [sip:user1@ims.mnc001.mcc001.3gppnetwork.org]
13(18) DEBUG: ims_usrloc_scscf [impurecord.c:598]: delete_scontact(): Deleting contact: [sip:user1@192.168.164.9:61946;rinstance=7ab86c5e85643767;transport=UDP]
13(18) DEBUG: ims_usrloc_scscf [usrloc_db.c:370]: db_delete_ucontact(): Deleting ucontact [sip:user1@192.168.164.9:61946;rinstance=7ab86c5e85643767;transport=UDP]
13(18) DEBUG: ims_usrloc_scscf [impurecord.c:310]: mem_delete_ucontact(): Checking if dialog_data is there and needs to be torn down
13(18) DEBUG: ims_usrloc_scscf [impurecord.c:314]: mem_delete_ucontact(): first dialog is not 0
13(18) DEBUG: ims_usrloc_scscf [impurecord.c:317]: mem_delete_ucontact(): Going to tear down dialog with info h_entry [1081] h_id [2579]
13(18) DEBUG: ims_dialog [dlg_hash.c:887]: lookup_dlg(): ref dlg 0x7f803f803108 with 1 -> 3
13(18) DEBUG: ims_dialog [dlg_hash.c:889]: lookup_dlg(): dialog id=2579 found on entry 1081
13(18) DEBUG: ims_dialog [dlg_hash.c:1066]: unref_dlg(): unref dlg 0x7f803f803108 with 1 -> 2
13(18) DEBUG: ims_dialog [dlg_req_within.c:379]: dlg_terminate(): terminating confirmed dialog
Thanks,
--Charles
CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient and may contain material that is proprietary, confidential, privileged or otherwise legally protected or restricted under applicable government laws. Any review, disclosure, distributing or other use without expressed permission of the sender is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies without reading, printing, or saving.
Hello,
I have Kamailio installed as SIP redirect for an SBC to make routing decisions.
I'm using SQLOps module with postgresql 11.5 where I have multiple tables containing each around 6M record of routing codes:
Code options
392342 sup1|sup2|sup3
Where code field is of prefix_range data type and has a gist index.
I'm sending traffic of 300 CPS to SBC which is forwarding it to Kamailio, and Kamailio respond with 300 multiple choice with the routing decision.
In normal cases, everything is going smoothly where Kamailio repsonds up to 50 ms.
But during the process of loading data to the routing tables, Kamailio response to SBC is dramatically delayed , where for some calls it takes up to 7 seconds to respond.
Noting that during this process the data are loaded to staging tables and not to live tables used by Kamailio.
Kamailio is installed on a VM with 32GB RAM and 16 vcores.
Following configuration is used in Kamailio:
fork=yes
children=10
following are the customized parameters in postgresql.conf
max_connections = 100
shared_buffers = 8GB
effective_cache_size = 24GB
maintenance_work_mem = 2GB
checkpoint_completion_target = 0.7
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 5242kB
min_wal_size = 1GB
max_wal_size = 2GB
max_worker_processes = 16
max_parallel_workers_per_gather = 8
max_parallel_workers = 16
Following is the routing logic I'm using:
route{
if (is_method("INVITE")) {
$var(inc) = $(ct{param.value,tgrp});
xlog("L_INFO","CONTACT : $var(inc)" );
xlog("L_INFO","from number : $rU" );
if($var(inc)!=0)
route(customer);
route(block);
}
}
route[customer]
{
sql_query("cb", "select caid from customeridentification where trunk='$var(inc)'", "ra");
$var(cid)=$dbr(ra=>[0,0]);
sql_result_free("ra");
xlog("L_INFO","cid: $var(cid) \n");
sql_query("cb", "select routetablename from carrieraccount where caid=$var(cid)", "ra");
$var(tid)=$dbr(ra=>[0,0]);
sql_result_free("ra");
if($var(cid)!=0)
route(query);
else
route(block);
}
route[query]
{
#sql_query("cb", "select supplierid from route_$var(cid) where prefix @>'$rU' order by prefix limit 1", "ra");
sql_query("cb", "select get_routing('$var(tid)','$rU')", "ra");
$var(sup)=$dbr(ra=>[0,0]);
sql_result_free("ra");
xlog("L_INFO","supplieris: $var(sup) \n");
#$var(x)=$(var(sup){s.replace,|,}{s.len})/4;
$var(a)=$(var(sup){s.len});
$var(z)=$(var(sup){s.replace,|,});
$var(b)=$(var(z){s.len});
$var(suplen)=$var(a) - $var(b);
if($var(sup)!=0)
route(send);
else
route(block);
}
route[send]
{
xlog("L_INFO","Inside Send \n");
$var(i)=0;
append_to_reply("Contact:");
while($var(i)<$var(suplen) + 1)
{
$var(s)=$(var(sup){s.select,$var(i),|});
$var(s)=$(var(s){s.select,0,;});
append_to_reply("<sip:$rU;tgrp=$(var(s){s.ltrim})@ xxx.xxx.xxx.xxx:5060;user=phone>");
if($var(i)<$var(suplen)) append_to_reply(",");
$var(i)=$var(i)+1;
}
append_to_reply("\r\n");
sl_send_reply("300","Multiple Choices");
exit;
}
route[block]
{
xlog("L_INFO","INSIDE BLOCK" );
append_to_reply("Contact:<sip:$rU;tgrp=999999@xxx.xxx.xxx.xxx:5060;user=phone>\r\n");
sl_send_reply("300","Multiple Choices");
exit;
}
How can we enhance the Kamailio response in case of load on the postgresql server.
Regards,
Ali Taher