Hello,
I wonder if it is allowed using transport protocol UDP for SIP NOTIFY
requests (which are generated by Kamailio/presence module), when the
SUBSCRIBE dialog was established using TCP as transport protocol.
In other words: this is a principal question if it is allowed changing
the transport protocol for in-dialog transactions e.g. from TCP to UDP.
Initially I rather thought that in-dialog transactions shall use the
same transport protocol as the dialog itself (e.g. SIP INFO requests
within a standard media session), except the message would be too big
for UDP, where a change to TCP is recommended.
Can anybody give me a hint, if the current behaviour of Kamailio is
correct or not? Or - how can I bind Kamailio to a specific transport
protocol (for messages that are created by modules themselves)? Kamailio
is sending NOTIFY requests with UDP, even when the subscription was done
with TCP (see excerpt below).
09:58:10.360749 IP (tos 0x0, ttl 64, id 35302, offset 0, flags [DF],
proto TCP (6), length 444) 10.1.1.14.37883 > 10.1.1.44.5060: P, cksum
0x1cb3 (correct), 1:393(392) ack 1 win 457 <nop,nop,timestamp 624699305
795715664>
SUBSCRIBE sip:116006@10.1.1.44;transport=TCP SIP/2.0
Via: SIP/2.0/TCP 10.1.1.14:5070;rport;branch=z9hG4bK1540213071
From: <sip:1@10.1.1.14:5070>;tag=620071678
To: <sip:116006@10.1.1.44;transport=TCP>
Call-ID: 449986375
CSeq: 20 SUBSCRIBE
Contact: <sip:1@10.1.1.14:37883>
Max-Forwards: 70
Expires: 1200
Event: presence
Content-Length: 0
09:58:10.361324 IP (tos 0x10, ttl 64, id 65438, offset 0, flags [DF],
proto TCP (6), length 431) 10.1.1.44.5060 > 10.1.1.14.37883: P, cksum
0x29fb (correct), 1:380(379) ack 393 win 215 <nop,nop,timestamp
795715792 624699305>
SIP/2.0 202 OK
Via: SIP/2.0/TCP 10.1.1.14:5070;rport=37883;branch=z9hG4bK1540213071
From: <sip:1@10.1.1.14:5070>;tag=620071678
To:
<sip:116006@10.1.1.44;transport=TCP>;tag=4f7a7e54f75c89f5b968c90011d693b5-9eed
Call-ID: 449986375
CSeq: 20 SUBSCRIBE
Expires: 1200
Contact: <sip:10.1.1.44:5060;transport=tcp>
Content-Length: 0
09:58:10.361507 IP (tos 0x10, ttl 64, id 32295, offset 0, flags [none],
proto UDP (17), length 484) 10.1.1.44.5060 > 10.1.1.14.37883: SIP,
length: 456
NOTIFY sip:1@10.1.1.14:37883 SIP/2.0
Via: SIP/2.0/UDP
10.1.1.44;branch=z9hG4bKc408.509e6347000000000000000000000000.0
To: sip:1@10.1.1.14;tag=620071678
From: sip:116006@10.1.1.44;tag=4f7a7e54f75c89f5b968c90011d693b5-9eed
CSeq: 2 NOTIFY
Call-ID: 449986375
Content-Length: 0
User-Agent: kamailio (4.0.4 (i386/linux))
Max-Forwards: 70
Event: presence
Contact: <sip:10.1.1.44:5060;transport=tcp>
Subscription-State: active;expires=1200
Thx
Klaus
Hello,
Kamailio SIP Server v4.1.4 stable release is out.
This is a maintenance release of the latest stable branch, 4.1, that
includes fixes since release of v4.1.3. There is no change to database
schema or configuration language structure that you have to do on
installations of v4.1.x. Deployments running previous v4.x.x versions
are strongly recommended to be upgraded to v4.1.4.
For more details about version 4.1.4 (including links and guidelines to
download the tarball or from GIT repository), visit:
* http://www.kamailio.org/w/2014/06/kamailio-v4-1-4-released/
RPM, Debian/Ubuntu packages will be available soon as well.
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Hi,
I am trying to authentication MSRP connection using the example code of
msrp event route in module documentation here,
http://kamailio.org/docs/modules/4.1.x/modules/msrp.html#idp119248
--
...
} else if ($msrp(method)=="AUTH") {
...
if (!pv_www_authenticate("WEBRTC_SIP_REALM", "$var(passwd)", "0",
"$msrp(method)"))
{
if (auth_get_www_authenticate("WEBRTC_SIP_REALM", "0",
"$var(wauth)"))
{
xlog("L_INFO", "Generated www authenticate header for MSRP
is [$var(wauth)] \n");
msrp_reply("401", "Unauthorized", "$var(wauth)");
} else {
msrp_reply("500", "Internal Server Error");
};
exit;
};
...
--
However i see in logs following error message and authentication fails,
--
ERROR: auth [auth_mod.c:690]: pv_www_authenticate2(): failed to get method
value
--
Which is indicates that value of $msrp(method) is null. However, as you can
see in example code in URL provided above we have an IF condition which
explicitly checks $msrp(method) == "AUTH".
For the sake of testing i even replaced the variable with actual string
value, and still get the same error. So i am guessing it is a bug.
What do you guys suggest?
Kamailio: v4.1.3 (i386/linux) 236326
MSRP Lib: Crocodile MSRP - v1.0.0
Thank you.
Hi,
I cannot find the link to download the SER SIP server. I went to http://www.iptel.org/download, but do not see how to download 0.9.6 version.
Could you please point me to the link.
Thanks,
Priyam.
Hi,
I have a scenario where I want to send a custom SIP package whenever a call
is successfully established or definitely missed. This works pretty well,
except when a user has multiple devices online.
I need to send exactly one packet. When initiating the call I set a flag,
in the reply route I check for that flag, and on the first 4xx or 2xx
response the packet gets sent out. After that I reset the flag, so no other
packet is generated for another response coming in.
Now when a user has two devices and rejects the call on the first one but
accepts it on the second, I see this call as missed, not answered. So I
need to use the first 2xx response or the last 4xx response. For that I
need to find out how many branches are open at the moment. But I'm missing
something. I registered two devices on the same AOR. I tried accessing
$branch(count) in the onreply route, but it is always 0. $br and $bR are
<null>.
Does anyone have an idea, how to get that information in the reply_route?
Best Regards,
Sebastian
Hello,
I am considering to release v4.1.4 next week, in one of the days within
the interval June 10-12, depending on work that has to be done.
If anyone is aware of issue not reported on tracker or patches that have
not been backported, add to the tracker or write a message to sr-dev
mailing list.
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
I am trying to set up XCAP support for SIP SIMPLE, and using jitsi as the sample client. The kamailio database was previously configured using ODBC and kamailio-4.1.3 and was apparently working correctly. I was following the guide at
http://nil.uniza.sk/instant-messaging/simple/configuring-xcap-support-im-an… as well as the standard documentation at http://kamailio.org/docs/modules/4.1.x/modules/xcap_server.html . However, the rls support is
currently disabled. When I use jitsi to connect, and add one contact to the empty contact list, I see the database being populated (mysql backend):
mysql> select * from xcap;
+----+-------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+-----------------------+--------+-----------------------------------------------------------------------+------+
| id | username | domain | doc | doc_type | etag | source | doc_uri | port |
+----+-------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+-----------------------+--------+-----------------------------------------------------------------------+------+
| 3 | avillacisIM | pbx.elastix.com | <?xml version="1.0" encoding="UTF-8" standalone="no"?><resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists"><list name="RootGroup"><entry
uri="sip:bmacias@pbx.elastix.com"><display-name>bmacias</display-name></entry></list></resource-lists> | 4 | sr-1401316328-31413-1 | 0 | /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index | 0 |
| 4 | avillacisIM | pbx.elastix.com | <?xml version="1.0" encoding="UTF-8" standalone="no"?><ruleset xmlns="urn:ietf:params:xml:ns:common-policy"><rule id="presence_allow"><conditions><identity><one
id="sip:bmacias@pbx.elastix.com"/></identity></conditions><actions><sub-handling xmlns="urn:ietf:params:xml:ns:pres-rules">allow</sub-handling></actions><transformations><provide-devices
xmlns="urn:ietf:params:xml:ns:pres-rules"><all-devices/></provide-devices><provide-persons xmlns="urn:ietf:params:xml:ns:pres-rules"><all-persons/></provide-persons><provide-services
xmlns="urn:ietf:params:xml:ns:pres-rules"><all-services/></provide-services></transformations></rule></ruleset> | 2 | sr-1401316328-31416-1 | 0 | /xcap-root/pres-rules/users/sip:avillacisIM@pbx.elastix.com/presrules | 0 |
+----+-------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+-----------------------+--------+-----------------------------------------------------------------------+------+
2 rows in set (0.00 sec)
As far as I can see, both XML documents are well formed.
However, if I shutdown and then restart jitsi, I see (with wireshark) that the server returned a 500 Server Error when trying to fetch resource-lists . At the same time, the following appears on the log:
May 28 17:39:12 elx /usr/sbin/kamailio[31421]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/xcap-caps/global/index
May 28 17:39:12 elx /usr/sbin/kamailio[31421]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/xcap-caps/global/index
May 28 17:39:12 elx /usr/sbin/kamailio[31421]: ALERT: <script>: ===== xhttp: xcap-caps : <null>
May 28 17:39:12 elx /usr/sbin/kamailio[31413]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index
May 28 17:39:12 elx /usr/sbin/kamailio[31413]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index
May 28 17:39:12 elx /usr/sbin/kamailio[31413]: ALERT: <script>: ===== xhttp: resource-lists : sip:avillacisIM@pbx.elastix.com
May 28 17:39:12 elx /usr/sbin/kamailio[31413]: ERROR: xcap_server [xcap_server.c:758]: xcaps_get_db_doc(): invalid xml doc retrieved from database
May 28 17:39:12 elx /usr/sbin/kamailio[31413]: ERROR: xcap_server [xcap_server.c:1171]: w_xcaps_get(): could not fetch xcap document
What can I do to solve this issue. This is preventing contacts from being retrieved or added once the first contact is stored.
My event-route looks like this (WITH_XCAPSRV is defined elsewhere in the configuration):
#!ifdef WITH_XHTTP
event_route[xhttp:request] {
#!ifdef WITH_XHTTP_RPC
$var(xhttp_rpc_root) = $(hu{s.substr,0,9});
if ($var(xhttp_rpc_root) == "/http_rpc") {
dispatch_xhttp_rpc();
}
#!endif
#!ifdef WITH_XHTTP_PI
$var(xhttp_rpc_root) = $(hu{s.substr,0,8});
if ($var(xhttp_rpc_root) == "/http_pi") {
dispatch_xhttp_pi();
}
#!endif
#!ifdef WITH_XCAPSRV
if ($hu =~ "^/xcap-root/") {
route(XCAPSRV);
}
#!endif
set_reply_close();
set_reply_no_connect();
# if ($Rp != 80
##!ifdef WITH_TLS
# && $Rp != 443
##!endif
# ) {
#
# xlog("L_WARN", "HTTP request received on $Rp\n");
# xhttp_reply("403", "Forbidden", "text/html", "Forbidden");
# exit;
# }
xlog("L_DBG", "HTTP Request Received\n");
if ($hdr(Upgrade)=~"websocket"
&& $hdr(Connection)=~"Upgrade"
&& $rm=~"GET") {
# Validate Host - make sure the client is using the correct
# alias for WebSockets
if ($hdr(Host) == $null || !is_myself("sip:" + $hdr(Host))) {
xlog("L_WARN", "Bad host $hdr(Host)\n");
xhttp_reply("403", "Forbidden", "", "");
exit;
}
# Optional... validate Origin - make sure the client is from an
# authorised website. For example,
#
# if ($hdr(Origin) != "http://communicator.MY_DOMAIN"
# && $hdr(Origin) != "https://communicator.MY_DOMAIN") {
# xlog("L_WARN", "Unauthorised client $hdr(Origin)\n");
# xhttp_reply("403", "Forbidden", "", "");
# exit;
# }
# Optional... perform HTTP authentication
# ws_handle_handshake() exits (no further configuration file
# processing of the request) when complete.
if (ws_handle_handshake())
{
# Optional... cache some information about the
# successful connection
exit;
}
}
xhttp_reply("200", "OK", "text/html",
"<html><body>Wrong URL $hu</body></html>");
}
#!endif
#!ifdef WITH_XCAPSRV
route[XCAPSRV] {
xlog("L_ALERT", "===== xhttp: request [$rv] $rm => $hu\n");
# Remove port specification from Host header and use as authentication domain
$var(http_domain) = $(hdr(Host){s.select,0,:});
if (!www_authorize("$var(http_domain)", "subscriber")) {
www_challenge("$var(http_domain)", "0");
exit;
}
set_reply_close();
set_reply_no_connect();
if ($hu=~"^/xcap-root/oma_status-icon/users/.*/.*$")
$var(doc_uri) = $(hu{re.subst,/(^\/xcap-root\/)oma_status-icon(\/users\/.*\/).*$/\1org.openmobilealliance.pres-content\2oma_status-icon\/preseImage/});
else
$var(doc_uri) = $hu;
# xcap ops
$xcapuri(u=>data) = $var(doc_uri);
if($xcapuri(u=>xuid)=~"^sip:.+@.+")
$var(uri) = $xcapuri(u=>xuid);
else if($xcapuri(u=>xuid)=~".+@.+")
$var(uri) = "sip:" + $xcapuri(u=>xuid);
else
$var(uri) = "sip:"+ $xcapuri(u=>xuid) + "@" + $Ri;
xlog("L_ALERT", "===== xhttp: $xcapuri(u=>auid) : $xcapuri(u=>xuid)\n");
if ($xcapuri(u=>auid) == "xcap-caps") {
if ($rm == "GET") {
$var(xbody) =
"<?xml version='1.0' encoding='UTF-8'?>
<xcap-caps xmlns='urn:ietf:params:xml:ns:xcap-caps'>
<auids>
<auid>rls-services</auid>
<auid>pidf-manipulation</auid>
<auid>xcap-caps</auid>
<auid>resource-lists</auid>
<auid>pres-rules</auid>
<auid>org.openmobilealliance.pres-rules</auid>
<auid>org.openmobilealliance.user-profile</auid>
<auid>org.openmobilealliance.pres-content</auid>
<auid>org.openmobilealliance.search</auid>
<auid>org.openmobilealliance.xcap-directory</auid>
</auids>
<extensions></extensions>
<namespaces>
<namespace>urn:ietf:params:xml:ns:rls-services</namespace>
<namespace>urn:ietf:params:xml:ns:pidf</namespace>
<namespace>urn:ietf:params:xml:ns:xcap-caps</namespace>
<namespace>urn:ietf:params:xml:ns:resource-lists</namespace>
<namespace>urn:ietf:params:xml:ns:pres-rules</namespace>
<namespace>urn:oma:xml:xdm:user-profile</namespace>
<namespace>urn:oma:xml:prs:pres-content</namespace>
<namespace>urn:oma:xml:xdm:search</namespace>
<namespace>urn:oma:xml:xdm:xcap-directory</namespace>
</namespaces>
</xcap-caps>";
xhttp_reply("200", "OK", "application/xcap-caps+xml", "$var(xbody)");
} else {
append_to_reply("Allow: GET\r\n");
xhttp_reply("405", "Method Not Allowed", "", "");
}
exit;
}
# be sure auth user access only its documents
if ($au != $(var(uri){uri.user})) {
xhttp_reply("403", "Forbidden", "text/html", "<html><body>$si:$sp</body></html>");
exit;
}
switch($rm) {
case "PUT":
xcaps_put("$var(uri)", "$var(doc_uri)", "$rb");
if ($xcapuri(u=>auid) =~ "pres-rules") {
pres_update_watchers("$var(uri)", "presence");
pres_refresh_watchers("$var(uri)", "presence", 1);
# } else if ($xcapuri(u=>auid) =~ "rls-services" || $xcapuri(u=>auid) =~ "resource-lists") {
# rls_update_subs("$var(uri)", "presence");
} else if ($xcapuri(u=>auid) =~ "pidf-manipulation") {
pres_refresh_watchers("$var(uri)", "presence", 2, "$xcapuri(u=>uri_adoc)", "$xcapuri(u=>file)");
}
exit;
break;
case "GET":
xcaps_get("$var(uri)", "$var(doc_uri)");
exit;
break;
case "DELETE":
xcaps_del("$var(uri)", "$var(doc_uri)");
if ($xcapuri(u=>auid) =~ "pres-rules") {
pres_update_watchers("$var(uri)", "presence");
pres_refresh_watchers("$var(uri)", "presence", 1);
# } else if ($xcapuri(u=>auid) =~ "rls-services" || $xcapuri(u=>auid) =~ "resource-lists") {
# rls_update_subs("$var(uri)", "presence");
} else if ($xcapuri(u=>auid) =~ "pidf-manipulation") {
pres_refresh_watchers("$var(uri)", "presence", 2, "$xcapuri(u=>uri_adoc)", "$xcapuri(u=>file)");
}
exit;
break;
case "POST":
if ($xcapuri(u=>auid) =~ "search") {
xhttp_reply("501", "Not Implemented", "", "");
} else {
if ($xcapuri(u=>auid) =~ "xcap-directory") {
append_to_reply("Allow: GET\r\n");
} else {
append_to_reply("Allow: DELETE, GET, PUT\r\n");
}
xhttp_reply("405", "Method Not Allowed", "", "");
}
exit;
break;
}
# other http requests
xhttp_reply("404", "Not Found", "", "");
exit;
}
#!endif
Found the problem per a previous post. I had uncommented in kamctlrc by
mistake.
#STANDARD_MODULES="standard acc lcr domain group permissions registrar
usrloc msilo
# alias_db uri_db speeddial avpops auth_db pdt dialog
dispatcher
# dialplan"
Thanks
CR
De: Carlos Rangel [mailto:crangel@globaltelesourcing.com]
Enviado el: miércoles, 11 de junio de 2014 02:19 p.m.
Para: sr-users(a)lists.sip-router.org
Asunto: Kamailio and Asterisk
Hello
Trying to do my first Kamailio and Asterisk integration following the
tutorial
http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
I am using Centos though.
Everything goes well except when trying to create the kamailio DB. The core
tables cannot be created.
Any ideas how to solve this problem??.
Thanks
CR
[root@gt-ev-i08 kamailio-4.1.3]# /usr/local/sbin/kamdbctl create
MySQL password for root:
INFO: test server charset
INFO: creating database kamailio ...
INFO: granting privileges to database kamailio ...
INFO: creating standard tables into kamailio ...
/usr/local/lib64/kamailio//kamctl/kamdbctl.mysql: line 264:
/usr/local/share/kamailio//mysql/#-create.sql: No such file or directory
ERROR: Creating core tables failed at #!
Hello
Trying to do my first Kamailio and Asterisk integration following the
tutorial
http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
I am using Centos though.
Everything goes well except when trying to create the kamailio DB. The core
tables cannot be created.
Any ideas how to solve this problem??.
Thanks
CR
[root@gt-ev-i08 kamailio-4.1.3]# /usr/local/sbin/kamdbctl create
MySQL password for root:
INFO: test server charset
INFO: creating database kamailio ...
INFO: granting privileges to database kamailio ...
INFO: creating standard tables into kamailio ...
/usr/local/lib64/kamailio//kamctl/kamdbctl.mysql: line 264:
/usr/local/share/kamailio//mysql/#-create.sql: No such file or directory
ERROR: Creating core tables failed at #!