Hello,
We are having an issue here where Kamailio is complaining about duplicate
To header, while in the SIP Packet there is just one. See below the log
message:
DEBUG: tm [t_msgbuilder.c:391]: build_local_reparse(): duplicate To header
ERROR: tm [t_msgbuilder.c:531]: build_local_reparse(): cannot build CANCEL
request
ERROR: tm [t_cancel.c:297]: cancel_branch(): attempt to build a CANCEL
failed
ERROR: tm [t_fwd.c:1434]: e2e_cancel(): cancel error
And this is the sip message:
CANCEL sip:123456789@1.2.3.4:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.1:19373
;branch=z9hG4bK-524287-1---7774073fad1a3264;rport
Max-Forwards: 70
To: <sip:123456789@1.2.3.4:5060>
From: "101"<sip:101@1.2.3.4:5060>;tag=6f373b66
Call-ID: hC2O6zx8ZaUJ1di046
CSeq: 2 CANCEL
Proxy-Authorization: Digest
username="101",realm="1.2.3.4",nonce="YJKbfWCSmlFTHxdJfKmySydF9L7FzfaqcgyOo4A=",uri="
sip:123456789@1.2.3.4:5060
",response="2bf2ba8ef2374d6aa8c39d650613077d",algorithm=MD5
User-Agent: TEST
Content-Length: 0
version: kamailio 5.5.0 (x86_64/linux) d4c1a1
The route itself, is like in the standard documentation:
# CANCEL processing
if KSR.is_CANCEL() :
KSR.info(RANDOM_LOG + 'KSR.is_CANCEL')
if KSR.tm.t_check_trans()>0 :
self.ksr_route_relay(msg)
return 1
def ksr_route_relay(self, msg):
if KSR.is_method_in("IBSU") :
if KSR.tm.t_is_set("branch_route")<0 :
KSR.tm.t_on_branch("ksr_branch_manage")
if KSR.is_method_in("ISU") :
if KSR.tm.t_is_set("onreply_route")<0 :
KSR.tm.t_on_reply("ksr_onreply_manage")
if KSR.is_INVITE() :
if KSR.tm.t_is_set("failure_route")<0 :
KSR.tm.t_on_failure("ksr_failure_manage")
if KSR.tm.t_relay()<0 :
KSR.sl.sl_reply_error()
return -255
Thanks
Hello!
I'm testing call recording with Rtpengine. It works fine when the
"record-call=on" flag is added to the *rtpengine_offer* or *start_recording* is
used in the *request_route*.
But I was wondering if the call recording can be managed by a separate
application. So I add the following lines to the
*event_route[xhttp:request]* and triggered it with an HTTP request after
the call was established. The call-id value was taken from the Rtpengine
log and sent with the request.
* if ($hu =~ "^/CALL_RECORD_START/") {*
* $var(call_id) = *"call-id=" + *$(hu{s.select,2,/});*
xlog("L_DBG", "$var(call_id)");
* start_recording($var(call_id));*
exit;
* }*
In this case, Kamailio will log errors and will not send the Rtpengine
command to start call recording.
*Apr 27 18:25:00 test /usr/sbin/kamailio[5347]: DEBUG: <script>:
call-id=3de74068278ede4417086eb82bdf5a06@127.0.0.1:5080.0*
*Apr 27 18:25:00 test /usr/sbin/kamailio[5347]: DEBUG: <core>
[core/parser/msg_parser.c:89]: get_hdr_field(): found end of header*
*Apr 27 18:25:00 test /usr/sbin/kamailio[5347]: ERROR: rtpengine
[rtpengine_funcs.c:294]: get_callid(): call-id not found*
*Apr 27 18:25:00 test /usr/sbin/kamailio[5347]: ERROR: rtpengine
[rtpengine.c:2383]: rtpp_function_call(): can't get Call-Id field*
Have anyone tried to call functions *start_recording* and *stop_recording*
inside *event_route[xhttp:request]*?
Thanks a lot!
Kamailio v5.5.0 is out – it comes with 6 new modules and a considerable
set of improvements touching again more than 80 existing modules.
You can read detailed release notes at:
* https://www.kamailio.org/w/kamailio-v5-5-0-release-notes/
Many thanks to all developers and community members that made possible
this release.
v5.5.0 brings more flexibility and optimizations across many components,
enhancements to distributed message queue (dmq module), load balancer,
http client, STIR/SHAKEN support, IMS/VoLTE, rtpengine and tls as well
as to make available more functions to KEMI interface ... just to list
only a few here. Enjoy Kamailio v5.5.0!
Thank you for flying Kamailio!
Stay safe and healthy!
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
* https://www.asipto.com/sw/kamailio-advanced-training-online/
Hello guys,
I'm using the dialog module, params are:
# ----- dialog params -----
modparam("dialog", "db_mode", 0)
modparam("dialog", "dlg_flag", 20)
modparam("dialog", "ka_timer", 10)
modparam("dialog", "ka_interval", 30)
modparam("dialog", "ka_failed_limit", 2)
modparam("dialog", "send_bye", 1)
modparam("dialog", "timer_procs", 1)
When receiving an INVITE, i'm doing
dlg_set_property("ka-src");
dlg_set_property("ka-dst");
dlg_set_property("timeout-noreset");
I have a couple questions:
The flow is the following:
clientA>-\
kamailio<->freeswitch
clientB<-/
Kamailio receives an INVITE from ClientA, which I forward to freeswitch,
which in turn forwards it back to Kamailio.
In reality I would like to monitor only the client legs, but I'm having
problems, so I'm enabling OPTIONS on all legs.
On the ClientA legs, I see OPTIONS going from kamailio to both freeswitch
and the client.
But on the ClientB legs i don't see any OPTIONS at all.
Can someone point me in the right direction to enable it on all legs?
Something else i'm seeing is even though i set "ka_failed_limit" to 2,
kamailio is sending several OPTIONS before sending BYEs to both legs
(clientA, since there are no OPTIONS on clientB)
Thanks all,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
Hello,
after almost 4 weeks since development was frozen, it is time to plan
releasing the next major stable version, respectively 5.5.0, therefore I
propose to do it on Wednesday, May 5, 2021.
The branch 5.5 was already created about one week ago, several doc
resources were published (core/variables/transformations/rpcs/stats
cookbooks, alphabetic indexes, ...).
If anyone is testing an upgrade from branch 5.4 to 5.5 and encounters
changes that should be done in Kamailio config, add notes about at:
* https://www.kamailio.org/wiki/install/upgrade/5.4.x-to-5.5.0
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
* https://www.asipto.com/sw/kamailio-advanced-training-online/
Hello guys,
I'm possible using this wrong, but here it is;
I need to get a previously set parameter to rr, named "wsconnid":
$var(wsconnid) = $(hdr(Route){param.value,wsconnid})
xlog("L_ERR", "Connection ID parameter: $var(wsconnid)");
And i'm getting:
May 3 19:24:45 ip-10-231-32-37 /usr/sbin/kamailio[10015]: ERROR: <script>:
WS Connection ID 13>
May 3 19:24:49 ip-10-231-32-37 /usr/sbin/kamailio[10014]: ERROR: <script>:
Got an OPTIONS We now need to get the connection id from rr
This is an example:
Route: <sip:10.231.32.37;r2=on;lr;wsconnid=13>
The function is returning "13>" instead of "13".
Thanks all,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
Hello guys,
I don't have a lot of experience with webrtc (websocket).
I'm trying to get $conid when i receive an INVITE via UDP which is GOING to
a ws, how do i do that?
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
Hi,
Any one have some idea about this? Or how it should be configured in order to still have the original response received in kamailio instead of the mapping one?
Thanks in advance,
Regards,
Tiago
Hello guys,
I'm trying to do the following:
On INVITE, i add a param to RR "wsconnid" which is the connection id of the
WS socket.
Afterwards, i get an OPTIONS including said param.
Next I want to retrieve the param and check if the connection is alive.
NOTE: using simply "$(hdr(Route){param.value,wsconnid})" returns an extra
">" from the end of the string, and i haven't been able to remove that any
other way but with "striptail", it works fine.
***
$var(conid) = $(hdr(Route){param.value,wsconnid});
$var(conid) = $(var(conid){s.striptail,1});
xlog("L_ERR", "Connection ID parameter: [$var(conid)]");
if (tcp_conid_alive("$var(conid)")) {
xlog("L_ERR", "WS Connection ID $var(conid) is alive");
} else {
xlog("L_ERR", "WS Connection ID $var(conid) is NOT alive");
}
***
With that, "$var(conid)" contains the connection id properly:
***
ERROR: <script>: Connection ID parameter: [2]
***
but tcp_conid_alive complaints:
***
ERROR: <core> [core/sr_module.c:1638]: get_int_fparam(): Could not convert
PV to int
ERROR: tcpops [tcpops_mod.c:374]: w_tcp_conid_state(): invalid parameter
'conid' (must be a number)
***
Using a hardcoded number such as "1" generates no complaints.
Kamailio version:
version: kamailio 5.3.7 (x86_64/linux)
Not sure what's going on here, any ideas?
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
Hi
I have a configuration with sip accounts which authenticate with the real
name of the customers
ex:
customer1(a)sip.myvoip.dev
customer2(a)sip.myvoip.dev
...
INBOUND call of multiple numbers are connected with alias_db to the
accounts
ex:
+331234567890 | sip.myvoip.dev | customer1 | sip.myvoip.dev |
+331234567891 | sip.myvoip.dev | customer1 | sip.myvoip.dev |
+341234567893 | sip.myvoip.dev | customer2 | sip.myvoip.dev |
+341234567894 | sip.myvoip.dev | customer2 | sip.myvoip.dev |
...
and all works perfectly.
OUTBOUND call
after authentication with the username kamailio change the caller id and
the ip of my ISP-SIP-TRUNK
to relay the call with the correct CID for the ISP using the variable $fn
(display name in the From header)
[SIP-GW-ISP]
{
#out with ISP
route(CID);
$ru = "sip:" + $rU + "@" + "IP_ADDRESS_MY-ISP";
route(RELAY);
exit;
}
ROUTE[CID]
{
$var(caller) = $(fn{re.subst,/"//g});
uac_replace_from("$var(caller)","sip:$var(caller)@$fd");
}
Is possible do it with a different approach for example using
Remote-Party-ID , PPI P-Preferred-Identity ?
Is possible to check if the customer uses the correct outbound number
present in the alias_db table ?
ex
for customer1 only +331234567890 or +331234567891 numbers
many thanks
Luca