Hi,
I am using app_lua to frequently store some data in htable and avp
entries, using sr.pv.sets. When I read the values using sr.pv.get
immediately after writing them, they seem correct. However, when I read
them later from Lua, I have noticed that sometimes the value is
incorrect or nil. Am I doing something wrong?
The following code uses rtimer to duplicate the problem on startup,
printing the errors to syslog.
Tested on version: kamailio 3.3.1 (i386/linux) 2d0f6f
###############
# kamailio.cfg
###############
loadmodule "pv.so"
loadmodule "xlog.so"
loadmodule "htable.so"
loadmodule "rtimer.so"
loadmodule "app_lua"
modparam("htable", "htable", "status=>size=14;autoexpire=0;")
modparam("rtimer", "timer", "name=ta;interval=10;mode=1")
modparam("rtimer", "exec", "timer=ta;route=LUA_TEST")
# the following path may need to change depending on filesystem setup
modparam("app_lua", "load", "/etc/kamailio/kamailio.lua")
route
{
route(LUA_TEST);
}
route[LUA_TEST] {
$var(lua_test_key) = $(pp{s.toupper}) + "::";
lua_runstring("htable_test([[status=>$var(lua_test_key)]])");
lua_runstring("avp_test([[status=>$var(lua_test_key)]])");
}
----------------
-- kamailio.lua
----------------
-- Test of sr.pv operations in Lua
function htable_test (namekey)
local pvar_prefix = "$sht("..namekey
pvar_test(pvar_prefix)
end
function avp_test ( name )
local pvar_prefix = "$avp("..name
pvar_test(pvar_prefix)
end
function pvar_test ( pvar_prefix )
for value = 10000, 10050 do
local pvar = pvar_prefix..value..")"
--sr.log("info", "Lua attempting to set '"..pvar.."' to value
'"..value.."'")
sr.pv.sets(pvar, value)
end
for value = 10000, 10050 do
-- now we check what was stored
local pvar = pvar_prefix..value..")"
local checkvar = sr.pv.get(pvar)
if ( tostring(checkvar) ~= tostring(value) ) then
sr.err(string.format("CHECK: Lua checking pvar '%s' and got value
'%s' which is NOT '%s'",
tostring(pvar),
tostring(checkvar),
tostring(value)
))
end
end
end
-- end of kamailio.lua
Thanks,
-Andrew
Hello,
I'm forwarding registrations to Freeswitch and adding a Path header using add_path_received() for endpoints behind NAT. When TCP is used, this results in a header like this:
Path: <sip:a.a.a.a:5070;lr;received="sip:b.b.b.b:35430;transport=tcp">
Freeswitch doesn't like the transport protocol inside the quotations and refuses to route a call to the registered user.
Constructing the header manually without the quotes such as:
append_hf("Path: <sip:$Ri:$Rp;lr;received=sip:$si:$sp;transport=$pr>\r\n");
solves the problem.
Is there a reason for the quotes?
Best Regards,
Spencer
Hello,
My setup includes a cellphone that uses Wi-Fi to hookup to the internet
with IP 192.168.1.101. Cellphone app, tries to register with VOIPSwitch
through an outbound proxy server(Kamailio + rtpproxy), which rewrites SDP
to force rtp through an rtpproxy.
I can make a call from the cellphone to a PSTN number. When the PSTN
endpoint hangs up, VOIPSwitch relays a BYE message to the proxy that looks
like :
No. Time Source Destination Protocol Info
27 18.383929 IPaddr_VoipSwitch IPaddr_proxy SIP
Request: BYE sip:1234@IPaddr_VoipSwitch
Frame 27 (420 bytes on wire, 420 bytes captured)
Ethernet II, Src: Unispher_40:b5:39 (00:90:1a:40:b5:39), Dst:
Supermic_bd:b9:bc (00:30:48:bd:b9:bc)
Internet Protocol, Src: IPaddr_VoipSwitch , Dst: IPaddr_proxy
User Datagram Protocol, Src Port: sip (5060), Dst Port: 7160 (7160)
Session Initiation Protocol
Request-Line: BYE sip:1234@IPaddr_VoipSwitch SIP/2.0
Method: BYE
[Resent Packet: False]
Message Header
Route: <sip:IPaddr_proxy:7160;lr=on;nat=yes>
CSeq: 1 BYE
Via: SIP/2.0/UDP IPaddr_VoipSwitch:5060;
branch=z9hG4bk180242100434182912333954
From: sip:5678@IPaddr_VoipSwitch;tag=18024210041929123187506289
Call-ID: LUOyIDm-ecy36NcUfj5G3v1lM6g5snkM
To: "1234"
<sip:1234@IPaddr_VoipSwitch>;tag=9XHJmiuf58vTrF7.vwflEK-G63JVPQSi
Content-Length: 0
The request URI in the above message is the IP address of VOIPSwitch
itself, which causes the proxy to forward the BYE message back to
VOIPSwitch. The cellphone never receives the BYE message and consequently
never hangs up.
Any suggestions on how i can get around this problem ?
Thanks and Regards,
Vikram.
Hi,
First of all say that I'm new to Kamailio. I've been working with asterisk
for a while now and it's time to get started with the sip router project.
My idea for a start is to reduce the load of our asterisk servers and once
we have good knowledge on how kamailio works, migrate some of our services.
I've setup a server in our lab with kamailio 3.3.0 and siremis
3.3.0, created a user (subscriber) and registered with a softphone. So far
OK.
Now I'm trying to make a call and route it through one of our asterisk
servers for testing. To do this I need LCR module (thanks Sébastien, I
wasn't subscribed to this list yet) and configure it.
After reading
http://kamailio.org/docs/modules/stable/modules/lcr.html#id2553110 I've
added in kamailio.cfg:
#!define WITH_LCR
#!ifdef WITH_LCR
loadmodule "lcr.so"
#!endif
#!ifdef WITH_LCR
# ----- lcr params -----
modparam("lcr", "db_url", DBURL)
modparam("lcr", "gw_uri_avp", "$avp(i:709)")
modparam("lcr", "ruri_user_avp", "$avp(i:500)")
modparam("lcr", "tag_avp", "$avp(lcr_tag)")
#!endif
And now I see LCR module being loaded at startup. But, I don't understand
what gw_uri_avp, ruri_user_avp or tag_avp mean. Where can I find some
doc/manual to understand what AVP means and does? (For example the
$avp(i:709), etc.)
I've added a LCR GW, LCR TARGET and LCR RULE with the following data (I
have no idea if it's completely wrong):
mysql> select * from lcr_gw;
+----+--------+---------+--------------+--------------------------+------+--------+------------+-----------+-------+--------+------+-------+---------+
| id | lcr_id | gw_name | ip_addr | hostname | port |
params | uri_scheme | transport | strip | prefix | tag | flags | defunct |
+----+--------+---------+--------------+--------------------------+------+--------+------------+-----------+-------+--------+------+-------+---------+
| 1 | 0 | TEST | XX.XXX.XXX.X | test12345678.testing.com | 5060 |
NULL | 1 | 1 | NULL | NULL | NULL | 0 | NULL |
+----+--------+---------+--------------+--------------------------+------+--------+------------+-----------+-------+--------+------+-------+---------+
1 row in set (0.00 sec)
mysql> select * from lcr_rule;
+----+--------+--------+----------+-------------+---------+---------+
| id | lcr_id | prefix | from_uri | request_uri | stopper | enabled |
+----+--------+--------+----------+-------------+---------+---------+
| 1 | 1 | .* | | | 0 | 1 |
+----+--------+--------+----------+-------------+---------+---------+
1 row in set (0.00 sec)
mysql> select * from lcr_rule_target;
+----+--------+---------+-------+----------+--------+
| id | lcr_id | rule_id | gw_id | priority | weight |
+----+--------+---------+-------+----------+--------+
| 1 | 1 | 1 | 1 | 1 | 1 |
+----+--------+---------+-------+----------+--------+
1 row in set (0.00 sec)
mysql>
Am I still missing basic stuff to be able to place a call ? (To get started
I'd like to route all calls to our Asterisk server)
I'm glad to read documentation so If all of this is already somewhere
please guide me cause I haven't found too much...
Thanks in advanced.
Regards,
Joel.
I'd be curious to know if your performance might actually be higher, owing to improved CPUs since the study was done, hyperthreading, more frames per NIC interrupt, etc.
-- Alex
--
Sent from my Samsung mobile, and thus lacking in the refinement one might expect from a proper keyboard.
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/Mino Haluz <mino.haluz(a)gmail.com> wrote:Thank you, setting ulimits worked! And the performance is the same as
stated in the document I mentioned! :)
One more thing, I found these errors in syslog:
Sep 13 18:38:18 perftest kamailio[5268]: ERROR: <core>
[parser/sdp/sdp.c:211]: Invalid payload location
Sep 13 18:38:18 perftest kamailio[5268]: ERROR: <core>
[parser/sdp/sdp.c:227]: Invalid payload location
Sep 13 18:38:18 perftest kamailio[5270]: ERROR: <core>
[parser/sdp/sdp.c:227]: Invalid payload location
This is possibly something related to my sipp scenario, this is the
INVITE sent from sipp
<![CDATA[
INVITE sip:800@perftest.vm SIP/2.0
Via: SIP/2.0/[transport] 10.0.2.36:[local_port];branch=[branch]
From: "700" <sip:500@10.0.2.36>;tag=[call_number]
To: <sip:800@perftest.vm>
Call-ID: [call_id]
CSeq: 1 INVITE
Contact: "700" <sip:700@10.0.2.36:[local_port]>
Max-Forwards: 70
Subject: Performance Test
Content-Type: application/sdp
Content-Length: [len]
v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] 10.0.2.36
s=-
c=IN IP[local_ip_type] 10.0.2.36
t=0 0
m=audio [auto_media_port] RTP/AVP 8
a=rtpmap:8 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11,16
]]>
Do you see something that could cause this error ? Otherwise the call
is initiated ok, but I really dont understand what is so strange to
kamailio in this INVITE.
On Thu, Sep 13, 2012 at 6:37 PM, Peter Lemenkov <lemenkov(a)gmail.com> wrote:
> 2012/9/13 Mino Haluz <mino.haluz(a)gmail.com>:
>> You mean on the proxy side? I'm running rtpproxy as root, limits are
>> still applied ? ulimit -s unlimited should do the trick ?
>
> Yes, they usually applied even for superuser, and yes - this should
> help (if that's the issue).
>
>
> --
> With best regards, Peter Lemenkov.
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users(a)lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
based on the outcome of the discussion carried in the thread:
http://lists.sip-router.org/pipermail/sr-users/2012-August/074480.html
I am looking again the clarify some aspects out there in the VoIP world.
So, as mainly dealing with proxy/sip signaling deployments, it's very
often to be the first one hit by support issues claiming things don't
work. Then you investigate and end up in conclusions like in the above
thread:
"The problem was at the SBC, __where I did not expect it__."
The underlined part heats me up a bit, because I never understood from
where it comes this perception that SBC is a MUST-TO-HAVE and the
PERFECT (never mistaken or breaking things) node in a VoIP networks.
To some extent, the SBC is just a very costly SIP ALG, and a SIP ALG is
there to break the things.
I don't want to start like a flame war, but is it something that I am
obviously missing in regards to what benefits a SBC can bring? I see
only inconveniences:
- another point of failure
- it is a b2bua, therefore very unlikely to offer the same performances
of a proxy
- if transcoding is needed, a media server can be used behind the proxy,
properly protected of attacks by the proxy and eventually deployed as a
farm load balanced by the proxy
- if topology hinding is wanted in the b2bua fashion (not the proxy
fashion with encoding headers), then the b2bua can be behind the proxy,
properly protected of attacks by the proxy and eventually deployed as a
farm load balanced by the proxy
- nat traversal was solved long time ago in proxy environment, being
scalable by deploying a farm of rtp proxy
I don't want to go to other features, including the transport layer,
it's a clear win of the proxy in my experience (ok, being deep involved
in this project).
Then, what makes the SBC so desirable in many companies/voip
deployments? If any SBC user here that can share, what was the reason to
buy such a device? Any conceptual functionality that cannot be achieved
with the proxy as the first hop in front of the (wild) clients?
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat
dear kamilio developers :
i read the kamilio 3.3.0' s new features , it say it support
outbound , and i have place to handle reg-id and sip.instance . so , i
wonder if the kamilio3.3.0 support RFC5626 now,so that the
kamilio can be used as a edge proxy . i ask why because i can't find where
kamilio add flow-token and path for the register request.
thanks
Hello fellow OpenSER/Kamailio users,
I hope this is the right method of contact - I was unable to find a forum
on which to post any queries.
In essence, I've set up a Kamailio server of the latest version - logging
on to clients works fine, etc.
The idea of my setting up was for forwarding SIP messages to our test
server, that's where I got stuck.
The following link explains everything on Kamailio it seems -
http://www.kamailio.org/wiki/cookbooks/3.3.x/core#forward
So, I've added to the kamailio.cfg the following -
forward("10.0.0.10","5060");
But you see, I'm not sure where I should have added it. I've tried adding
to a variety of places, such as - route[SIPOUT] and
onreply_route[MANAGE_REPLY] - but none are working.
Cheers guys/girls.
Best,
Eddie
Hi,
On a Gentoo Linux system I'm getting the following compile-time warnings (kamailio-3.3.1 ebuild):
* python_msgobj.c:529:5: warning: dereferencing type-punned pointer will break strict-aliasing rules
* ld_con.c:241:4: warning: implicit declaration of function 'ldap_simple_bind_s'
* perl.c:340:2: warning: null argument where non-null required (argument 2)
* perl.c:340:2: warning: null argument where non-null required (argument 1)
Hopefully I can just ignore these messages.
Thanks,
Vieri