All,
According to RFC3261:
10.2.3<http://tools.ietf.org/html/rfc3261#section-10.2.3> Fetching Bindings
A success response to any REGISTER request contains the complete list
of existing bindings, regardless of whether the request contained a
Contact header field. If no Contact header field is present in a
REGISTER request, the list of bindings is left unchanged.
We should be able to fetch bindings from registrar. With my very limited knowledge of kamailio code (dialog-ng/dlg-handlers.c) :
if ((!msg->cseq && (parse_headers(msg, HDR_CSEQ_F, 0) < 0 || !msg->cseq))
|| !msg->cseq->parsed) {
LM_ERR("bad sip message or missing CSeq hdr :-/\n");
goto error0;
}
This condition should also have something like: msg->method != "REGISTER" otherwise it's throwing errors and I'm not getting any response back from kamailio. Request just times out. Can somebody confirm that this feature is/is not implemented ?
thank you
Dan.
Here is snippet of sipp xml scenario which I'm using to fetch bindings:
<scenario name="FetchBindings">
<label id="1"/>
<send>
<![CDATA[
REGISTER sip:[field2] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
From: <sip:[field0]@[field2]>;tag=aabbcc
To: <sip:[field0]@[field2]>
Call-ID: [call_id]
CSeq: [cseq] REGISTER
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER
User-Agent: IM-client/OMA1.0 sipp-script
P-Access-Network-Info: ADSL;utran-cell-id-3gpp=00000000
Privacy: none
P-Visited-Network-ID: [field2]
Supported: path
Content-Length: 0
]]>
</send>
<recv response="200" timeout="10000"/>
</scenario>
--
Daniel Ciprus
Integration engineer
http://www.acision.com
9954 Mayland Dr
Suite 3100
Richmond, VA 23233
USA
T: +1 804 762 5601
E: daniel.ciprus(a)acision.com<mailto:daniel.ciprus@acision.com>
________________________________
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you for understanding.
Hi all,
i have some strange performance issues (with Kamailio config file i guess):
using the default configuration file i can reach a 500 call/s rate, while
using the default configuration file in the dispatcher folder i can reach
just a 80 call/s rate (using the dispatching failover algorithm ...). The
dispatcher is in front on a very basic Kamailio-based IMS core. Something
has some hint about this issues?
Andrea
Hi all,
i have a strange performance problem: i placed a dispatcher in front of a
bundle of Kamailio proxies and, even with a really simple dispatching logic
route {
#ds_select_dstl("1", "2");
$du="sip:192.168.100.51:5060";
forward();
}
that actually doesn't even use the dispatcher module i get that when the
server's (192.168.100.51) CPU is 100% used the dispatcher's CPU is ~50%
used. Using the dispatching algorithm based on the hash of the From-URI or
the failover one (that should be the lightest dispatching algorithm,
computationally speaking ...) the performance are almost the same. So,
since i saw that in the documentation that the dispatcher module is
designed to be "suitable for handling heavy SIP traffic", my question is:
what i misconfigured? In my opinion it seems weird that the dispatcher
module is able to manage just (as my tests suggest) just 2 Kamailio SIP
proxies ...
Andrea
HI Alex,
Thanks for the suggestion. I tried using the function sl_send_reply(msg,
403, "Forbidden") in the receive.c file after including the header files.
But the following error is coming when compiling the kamailio.
CC (gcc) [kamailio] receive.o
receive.c: In function âsend_denialâ:
receive.c:375: warning: implicit declaration of function âsl_send_replyâ
LD (gcc) [kamailio] kamailio
receive.o: In function `send_denial':
/home/varun/EP1.0/kamailio-4.1.3_src/kamailio-4.1.3/receive.c:375:
undefined reference to `sl_send_reply'
collect2: ld returned 1 exit status
make: *** [kamailio] Error 1
Please suggest any solution to this problem. So I have make some changes in
the Makefile as it seems to be linking problem.
Thanks in advance.
Regards
Varun
Date: Wed, 14 May 2014 13:09:44 +0100
> From: varun pratapsingh <varunps2003(a)gmail.com>
> To: sr-users(a)lists.sip-router.org
> Subject: [SR-Users] How to reply an INVITE with 403
> Message-ID:
> <CAMSCRPnCHq+v3hbirAAGWTP2kNSFvmxM=8g=
> uWHAk8evaUEr7A(a)mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi All,
>
> I want to handle a special case in the Kamailio 4.1.3. When I receive
> INVITE from some UAC I wanto reply it with 403 message. I am using the
> Kamailio in Proxy mode when the INVITE comes I want to reply it with 403
> and do not want to send this INVITE to SIP Server.
>
> I expored the Kamailio source code and found that fucntion receive_msg() in
> file receive.c receives all the SIP messages. I am able to parse the SIP
> INVITE from such UACs but how to reply them with 403 SIP Code. I am unable
> to use the t_reply("403","Forbidden") here in this function/file. Also in
> this function finally the forward_reply(msg); is called which sends the
> INVITE to the Sip Server. But I dont want to send anything to SIP Server in
> this case but want to reply the UAC with 403. Can you please guide me how
> to do and where to do this.
>
> I am new to kamailio. Please help.
>
> Regards
> Varun
>
Hi All,
I am using the sl_send_reply function in the receive.c file. In included
the header file sl_funcs.h correctly in the receive.c and receive. compiles
fine. But when in gcc LD phase it gives the error
CC (gcc) [kamailio] cfg.tab.o
LD (gcc) [kamailio] kamailio
receive.o: In function `send_denial':
/home/varun/EP1.0/kamailio-4.1.3_src/kamailio-4.1.3/receive.c:365:
undefined reference to `sl_send_reply'
collect2: ld returned 1 exit status
make: *** [kamailio] Error 1
Please can anybody let me know why this error is coming. If more info is
needed I can provide that.
Thanks
Hello,
Can some one let me know the reason that there are these duplicate values
in the SDP ( o, c, m, nortpproxy)? Our server was working with kamailio and
asterisk on the same machine and had no problem. When we separated kamailio
and asterisk on different servers and added the dispatcher module I see
this error because of which there is not audio from an incoming PSTN call.
2014/05/15 18:55:19.972332 172.10.30.8:5060 -> 66.136.17.30:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 66.136.17.30:5060
;rport=5060;branch=z9hG4bK1sansay1225318698rdb6244.
Record-Route: <sip:54.108.18.75;lr=on;ftag=sansay1225318698rdb6244>.
Record-Route: <sip:sansay1225318698rdb6244@66.136.17.30:5060
;lr;transport=udp>.
From: <sip:xxxxxx85342@66.136.17.30>;tag=sansay1225318698rdb6244.
To: <sip:12142349395@54.108.18.75>;tag=as3414811d.
Call-ID: 537507353-0-1838374200(a)64.136.174.226.
CSeq: 1 INVITE.
Server: Asterisk PBX 1.8.17.0.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH.
Supported: replaces, timer.
Session-Expires: 1800;refresher=uac.
Contact: <sip:xxxxxxx9395@172.10.30.5:5080>.
Content-Type: application/sdp.
Content-Length: 385.
.
v=0.
o=root 1739301191 1739301191 IN IP4 54.108.18.7554.108.18.7554.108.18.75.
s=Asterisk PBX 1.8.17.0.
c=IN IP4 54.108.18.7554.108.18.7554.108.18.75.
t=0 0.
m=audio 388503885038850 RTP/AVP 0 8 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.
a=sendrecv.
a=nortpproxy:yes.
a=nortpproxy:yes.
a=nortpproxy:yes.
Thank you for the help.
Arun
Hi,
I'm trying to fill a hash table on startup in the htable:mod-init event
route. But it doesn't work. Kamailio doesn't start at all, but doesn't
print out an error in the log.
This is what the route looks like:
event_route[htable:mod-init] {
xlog("L_NOTICE", "Loading Carrier domains into Hash table.\n");
sql_query("ser", "select domain_name from carrier_domains",
"domains");
xlog("L_NOTICE", "Loaded from database...\n");
while($var(i)<$dbr(domains=>cols)) {
xlog("L_NOTICE", "Entry: $dbr(domains=>[$var(i),0])\n");
$sht(carrierips=>$var(i)) = $dbr(domains=>[$var(i),0]);
$var(i) = $var(i) + 1;
}
}
Of course, the necessary parameters are set.
modparam("htable", "htable", "carrierips=>size=6")
modparam("sqlops","sqlcon","ser=>mysql://user:password@127.0.0.1/ser")
In the log I see the following:
May 15 11:25:33 linux /usr/sbin/kamailio[20872]: NOTICE: <script>: Loading
Carrier domains into Hash table.
As you can see, there should be a lot more output, but nothing happens
anymore after that. In ngrep I see other queries going to the same database
from other modules, but my query from the event route is never executed.
Am I missing something?
Best Regards,
Sebastian
Hello,
Is it possible to use kamailio 4.1 to play sound for the caller during call
waiting?
I saw the module "mohqueue" but i m not sure that the called have
notification when a call is in a queue.
Regards,
i just noticed that my proxy had crashed on invite request from
attacker:
May 14 22:03:06 sars /usr/sbin/sip-proxy[10932]: INFO: INVITE <tel:004412127921\
94> by untrusted <sip:210.125.64.233> from <210.125.64.233>
May 14 22:03:06 sars /usr/sbin/sip-proxy[10932]: : <core> [mem/q_malloc.c:159]:\
qm_debug_frag(): BUG: qm_*: prev. fragm. tail overwritten(c0c0c000, abcdefed)[\
0xb70f6a64:0xb70f6a7c]!
May 14 22:03:08 sars /usr/sbin/sip-proxy[11014]: : <core> [pass_fd.c:293]: rece\
ive_fd(): ERROR: receive_fd: EOF on 24
May 14 22:03:08 sars /usr/sbin/sip-proxy[10913]: ALERT: <core> [main.c:775]: ha\
ndle_sigs(): child process 10932 exited by a signal 6
May 14 22:03:08 sars /usr/sbin/sip-proxy[10913]: ALERT: <core> [main.c:778]: ha\
ndle_sigs(): core was generated
Program terminated with signal 6, Aborted.
#0 0xb7782424 in __kernel_vsyscall ()
(gdb) where
#0 0xb7782424 in __kernel_vsyscall ()
#1 0xb7616941 in raise () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#2 0xb7619d72 in abort () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
#3 0x08179f86 in qm_debug_frag (qm=0xb6dea008, f=0xb70f6a64)
at mem/q_malloc.c:161
#4 0x0817ac3a in qm_malloc (qm=0xb6dea008, size=48,
file=0x81f3169 "<core>: action.c", func=0x81f42f0 "do_action", line=780)
at mem/q_malloc.c:386
#5 0x0805e798 in do_action (h=0xbffc1ca0, a=0xbffc1d48, msg=0xb72c6928)
at action.c:780
#6 0xb1c5ac1d in pv_set_ruri (msg=0xb72c6928, param=0xb6f75630, op=254,
val=0xbffc1e0c) at pv_core.c:2019
#7 0xb1b5df59 in tel2sip (_msg=0xb72c6928,
_uri=0xb6f75c70 "H\207\367\266\004",
_hostpart=0xb6f75530 "\254y\367\266\004", _res=0xb6f75624 "\006")
at checks.c:405
#8 0x0805fdf7 in do_action (h=0xbffc21e0, a=0xb6f77858, msg=0xb72c6928)
at action.c:1117
#9 0x08067293 in run_actions (h=0xbffc21e0, a=0xb6f77858, msg=0xb72c6928)
at action.c:1599
#10 0x080678e2 in run_actions_safe (h=0xbffc39ac, a=0xb6f77858, msg=0xb72c6928)
at action.c:1664
#11 0x081015fe in rval_get_int (h=0xbffc39ac, msg=0xb72c6928, i=0xbffc2528,
rv=0xb6f779fc, cache=0x0) at rvalue.c:924
#12 0x08103f83 in rval_expr_eval_int (h=0xbffc39ac, msg=0xb72c6928,
res=0xbffc2528, rve=0xb6f779f8) at rvalue.c:1918
#13 0x0810416e in rval_expr_eval_int (h=0xbffc39ac, msg=0xb72c6928,
res=0xbffc27c4, rve=0xb6f78360) at rvalue.c:1926
#14 0x0805fa26 in do_action (h=0xbffc39ac, a=0xb6f78820, msg=0xb72c6928)
at action.c:1075
#15 0x08067293 in run_actions (h=0xbffc39ac, a=0xb6f78820, msg=0xb72c6928)
at action.c:1599
#16 0x0805fca0 in do_action (h=0xbffc39ac, a=0xb6f788c4, msg=0xb72c6928)
at action.c:1094
---Type <return> to continue, or q <return> to quit---
#17 0x08067293 in run_actions (h=0xbffc39ac, a=0xb6f788c4, msg=0xb72c6928)
at action.c:1599
#18 0x0805fc5f in do_action (h=0xbffc39ac, a=0xb6f78968, msg=0xb72c6928)
at action.c:1090
#19 0x08067293 in run_actions (h=0xbffc39ac, a=0xb6f78968, msg=0xb72c6928)
at action.c:1599
#20 0x0805e00d in do_action (h=0xbffc39ac, a=0xb6e7720c, msg=0xb72c6928)
at action.c:715
#21 0x08067293 in run_actions (h=0xbffc39ac, a=0xb6e5161c, msg=0xb72c6928)
at action.c:1599
#22 0x0805e00d in do_action (h=0xbffc39ac, a=0xb6e50238, msg=0xb72c6928)
at action.c:715
#23 0x08067293 in run_actions (h=0xbffc39ac, a=0xb6e50238, msg=0xb72c6928)
at action.c:1599
#24 0x0805fc5f in do_action (h=0xbffc39ac, a=0xb6e50bfc, msg=0xb72c6928)
at action.c:1090
#25 0x08067293 in run_actions (h=0xbffc39ac, a=0xb6e4891c, msg=0xb72c6928)
at action.c:1599
#26 0x0806797a in run_top_route (a=0xb6e4891c, msg=0xb72c6928, c=0x0)
at action.c:1685
#27 0x080e2bcf in receive_msg (
buf=0x82f99e0 "INVITE tel:00441212792194 SIP/2.0\r\nVia: SIP/2.0/UDP 210.125.64.233;branch=z9hG4bK4KmbLm4c\r\nMax-Forwards: 69\r\nFrom: <sip:210.125.64.233>;tag=qua2A5c8s9VJZ\r\nTo: <tel:00441212792194>\r\nContact: <sip:210.1"...,
len=1115, rcv_info=0xbffc3bb0) at receive.c:211
#28 0x081702cd in udp_rcv_loop () at udp_server.c:536
#29 0x080ad9a0 in main_loop () at main.c:1617
#30 0x080b098f in main (argc=17, argv=0xbffc3e64) at main.c:2533
perhaps due to a bug in tel2sip function.
-- juha
Hello,
Here is the context: I use to terminate outgoing calls to a PSTN gateway.
The gateway is able to detect asymmetric RTP on IP side and then ended the
call after a configurable timer if asymmetric RTP is detected.
I'm working on the integration of a VoIP Trunk with a wholesaler and I'm
wondering how this behaviour can be transposed on full IP interconnection.
The first step will be to use Kamailio as an SBC and start the RTPProxy for
each session terminated on this wholesaler. Is there a similar mechanism on
RTPProxy sides that can detect this particular call-flow and hang up the
call?
Thanks for your suggestions.
Regards,
Igor.