[SR-Users] [permissions] allow_source_address_group() always return -1
Hi all, Kamailio 4.3 (Debian Wheezy package) with db_mysql and permissions modules enabled. Once started, this is the cached content of the "address" table: ~# kamctl mi "address_dump" 22 <20, 99.23.86.78, 0> [TEST SERVER] Within the script: - xlog("L_INFO", "request_route() [method:$rm, si:$si, sp:$sp]\n"); $var(group) = allow_source_address_group(); if ($var(group) != -1) { // ALWAYS HERE :( xlog("L_WARN", "invalid source IP [si:$si]\n"); } - Then I send an INVITE from such an allowed IP, and got: INFO:
Re: [SR-Users] [permissions] allow_source_address_group() always return -1
Please forget me... if ($var(group) != -1) so yes, 20 != 1... Sorry! 2015-12-04 14:48 GMT+01:00 Iñaki Baz Castillo <i...@aliax.net>: > 2015-12-04 14:38 GMT+01:00 Iñaki Baz Castillo <i...@aliax.net>: >> - >> $var(group) = allow_source_address_group(); >> if ($var(group) != -1) { >> // ALWAYS HERE :( >> >> xlog("L_WARN", "invalid source IP [si:$si]\n"); >> } >> - > > Interesting. If I add a log: > > - > $var(group) = allow_source_address_group(); > > xlog("L_INFO", "rc:$var(group)\n"); > > if ($var(group) != -1) { > xlog("L_WARN", "invalid source IP [si:$si]\n"); > } > - > > Then I get: > > INFO:
Re: [SR-Users] [permissions] allow_source_address_group() always return -1
2015-12-04 14:38 GMT+01:00 Iñaki Baz Castillo <i...@aliax.net>: > - > $var(group) = allow_source_address_group(); > if ($var(group) != -1) { > // ALWAYS HERE :( > > xlog("L_WARN", "invalid source IP [si:$si]\n"); > } > - Interesting. If I add a log: - $var(group) = allow_source_address_group(); xlog("L_INFO", "rc:$var(group)\n"); if ($var(group) != -1) { xlog("L_WARN", "invalid source IP [si:$si]\n"); } - Then I get: INFO:
Re: [SR-Users] path uri problem
Juha, could you please paste here how the Path above looks with your change? Thanks a lot. 2013/4/10 Juha Heinanen j...@tutpro.com: below is patch that fixes receiced param value. i have not tested if kamalio that gets such a value is able to unescape the escaped chars. if not, that is a bug too. -- juha *** path.c Fri Mar 29 19:14:46 2013 --- /usr/src/sip-router/modules/path/path.c Wed Apr 10 08:09:43 2013 *** *** 145,171 if (param == PATH_PARAM_RECEIVED) { /* TODO: agranig: optimize this one! */ src_ip = ip_addr2a(_m-rcv.src_ip); ! rcv_addr.s = pkg_malloc(6 + IP_ADDR_MAX_STR_SIZE + 22); /* 'sip:ip:port;transport=sctp'\0 */ if(!rcv_addr.s) { LM_ERR(no pkg memory left for receive-address\n); goto out3; } switch (_m-rcv.proto) { case PROTO_UDP: ! rcv_addr.len = snprintf(rcv_addr.s, 6 + IP_ADDR_MAX_STR_SIZE + 6, 'sip:%s:%u', src_ip, _m-rcv.src_port); break; case PROTO_TCP: ! rcv_addr.len = snprintf(rcv_addr.s, 6 + IP_ADDR_MAX_STR_SIZE + 20, 'sip:%s:%u;transport=tcp', src_ip, _m-rcv.src_port); break; case PROTO_TLS: ! rcv_addr.len = snprintf(rcv_addr.s, 6 + IP_ADDR_MAX_STR_SIZE + 20, 'sip:%s:%u;transport=tls', src_ip, _m-rcv.src_port); break; case PROTO_SCTP: ! rcv_addr.len = snprintf(rcv_addr.s, 6 + IP_ADDR_MAX_STR_SIZE + 21, 'sip:%s:%u;transport=sctp', src_ip, _m-rcv.src_port); break; case PROTO_WS: case PROTO_WSS: ! rcv_addr.len = snprintf(rcv_addr.s, 6 + IP_ADDR_MAX_STR_SIZE + 19, 'sip:%s:%u;transport=ws', src_ip, _m-rcv.src_port); break; } --- 145,171 if (param == PATH_PARAM_RECEIVED) { /* TODO: agranig: optimize this one! */ src_ip = ip_addr2a(_m-rcv.src_ip); ! rcv_addr.s = pkg_malloc(6 + IP_ADDR_MAX_STR_SIZE + 24); /* sip:ip:port%3Btransport%3Dsctp\0 */ if(!rcv_addr.s) { LM_ERR(no pkg memory left for receive-address\n); goto out3; } switch (_m-rcv.proto) { case PROTO_UDP: ! rcv_addr.len = snprintf(rcv_addr.s, 6 + IP_ADDR_MAX_STR_SIZE + 4, sip:%s:%u, src_ip, _m-rcv.src_port); break; case PROTO_TCP: ! rcv_addr.len = snprintf(rcv_addr.s, 6 + IP_ADDR_MAX_STR_SIZE + 22, sip:%s:%u%%3Btransport%%3Dtcp, src_ip, _m-rcv.src_port); break; case PROTO_TLS: ! rcv_addr.len = snprintf(rcv_addr.s, 6 + IP_ADDR_MAX_STR_SIZE + 22, sip:%s:%u%%3Btransport%%3Dtls, src_ip, _m-rcv.src_port); break; case PROTO_SCTP: ! rcv_addr.len = snprintf(rcv_addr.s, 6 + IP_ADDR_MAX_STR_SIZE + 23, sip:%s:%u%%3Btransport%%3Dsctp, src_ip, _m-rcv.src_port); break; case PROTO_WS: case PROTO_WSS: ! rcv_addr.len = snprintf(rcv_addr.s, 6 + IP_ADDR_MAX_STR_SIZE + 21, sip:%s:%u%%3Btransport%%3Dws, src_ip, _m-rcv.src_port); break; } ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] path uri problem
2013/4/10 Juha Heinanen j...@tutpro.com: here is an example: Path: sip:192.98.102.10:5070;transport=tcp;lr;received=sip:192.98.102.11:35449%3Btransport%3Dtcp. Perfect. as you see, single quotes are gone, because they don't serve any purpose after escape. Not exactly, I want to insist on this: Single quotes did not server any purpose previously because using single quotes to delimit an URI param value is 100% wrong. As said in a previous mail, a perfect SIP parser would parse the initial wrong Path as follows (just info about URI params): transport :tcp lr : (no value) received : 'sip:192.98.102.10:58156 -- note the initial ' !!! transport :tcp' -- note the final ' So the single quote means nothing. There could be zero or N single quotes within or around an URI param value. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] path uri problem
Of course I assume that modules dont implement unescaping uris encoded as URI param value. That needs to be coded. Anyhow, why is the received stuff required at all? IMHO it is time for dropping custom/proprietary hacks and use rfc 5626 Outbound instead. Otherwise we must live with hacks in lot of places of the code and modules. -- Iñaki Baz Castillo i...@aliax.net El 10/04/2013 11:31, Juha Heinanen j...@tutpro.com escribió: Juha Heinanen writes: i tested and even when url path field contains escaped chars. however, i started to get these to syslog every 20 seconds Apr 10 12:17:08 wheezy1 /usr/sbin/sip-proxy[3900]: ERROR: nathelper [nathelper.c:2018]: can't parse contact uri most likely due to nat pinging. i haven't checked yet where they come from. contact field of the ua does not have any escaped chars in it. i added the uri to the error message and got: nathelper [nathelper.c:2019]: can't parse contact uri 'sip:192.98.102.11:35453%3Btransport%3Dtcp' single quotes are from my LM_ERR below, i.e., they are not in the uri itself. the uri in question is received uri and the call in nathelper.c is this: if (parse_uri(c.s, c.len, curi) 0) { LM_ERR(can't parse contact uri '%.*s'\n, c.len, c.s); so there clearly is a bug in parse_uri function. it cannot handle escaped chars. when i have time, i'll add tracker issue about it. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@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@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] path uri problem
There is no need at all for clients to be Outbound aware. The proxy can force it in the same way current alias / contact mangling / received stuff is used. -- Iñaki Baz Castillo i...@aliax.net El 10/04/2013 12:44, Juha Heinanen j...@tutpro.com escribió: Iñaki Baz Castillo writes: Anyhow, why is the received stuff required at all? IMHO it is time for dropping custom/proprietary hacks and use rfc 5626 Outbound instead. Otherwise we must live with hacks in lot of places of the code and modules. unfortunately it will take years before most sip clients implement outbound. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@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@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] path uri problem
2013/4/10 Juha Heinanen j...@tutpro.com: Olle E. Johansson writes: Can't you add and forward to yourself again? I do crazy stuff like that in many places. Just loop around to force a new transaction with new headers. Just an idea. Maybe totally stupid. could be done, but it adds complexity and overhead. there is enough time before 4.1 is out to get this properly solved. And hopefully received stuff is removed forever. So now in the above scenario the registrar sends an initial INVITE to Kamailio with a top Route like: Route: sip:192.98.102.10:5070;transport=tcp;lr;received=sip:192.98.102.11:35449%3Btransport%3Dtcp and Kamailio must decode the received param, parse the URI and forward the request to it. This is a annoying loose-routing mechanism XDDD Please, RFC 5626 is the solution for NAT. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] path uri problem
Remember that Outbound also works for UDP. In that case: a) The Outbound Flow Token (the URI username in the Record-Route) must encode the public source IP:port of the request, and the Outbound proxy must be capable of encoding and decoding it for routing the request to the client (OverSIP does it). b) The client should keepalive via STUN PING requests. Anyhow, nothing prevents Kamailio to mantain the keepalive by sending OPTIONS or whatever, as currently it does when using other NAT-fix custom mechanisms. Regards. 2013/4/10 Peter Dunkley peter.dunk...@crocodile-rcs.com: When using a non-outbound client like Jitsi you can keep-alive by getting it to re-REGISTER, OPTIONS ping, or '\r\n' frequently. IMHO that is far better solution than having the server run timers and generate keep-alives. Regards, Peter On 10/04/13 13:53, Klaus Darilion wrote: Who does keep-alive when outbound is used? If it is the client, then there still must be some tweaks in the server as the non-outbound client will not send keep-alive. regards klaus ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] path uri problem
2013/4/9 Juha Heinanen j...@tutpro.com: because path-value starts with name-addr and my interpretation is that since there are s around this path header body: Path: sip:192.98.102.10;transport=tcp;lr;received='sip:192.98.102.10:58156%3Btransport%3Dtcp' solely consists of name-addr and does not include any rr-params. sip uri included in name-addr in turn cannot have ; and = in its param values. In the above Path there is NO header params but JUST URI params (header params would be placed after the ). And indeed the above usage is INCORRECT. This is what happens when parsing a Route or Path header as the above: Path: sip:192.98.102.10;transport=tcp;lr;received='sip:192.98.102.10:58156%3Btransport%3Dtcp' Parsing result: - display name: null - schema: sip - user:null - host:192.98.102.10 (ipv4) - port:null - params: { transport=tcp', lr=null, received='sip:192.98.102.10:58156, transport= tcp' } Do you see it? the above Path is BNF valid but 100% unexpected as there are the following URI params/values (now without double quotes): transport :tcp lr : received : 'sip:192.98.102.10:58156 -- note the initial ' !!! transport :tcp' -- note the final ' So the received value added by Kamailio is invalid. Such a value cannot be the value of a SIP URI parameter at all. I strongly propose encoding it in base64 or escaping the = and the ; symbols when in a SIP URI param value as Juha suggests. Regards. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] path uri problem
2013/4/9 Richard Fuchs rfu...@sipwise.com: On 04/09/13 12:19, Iñaki Baz Castillo wrote: So the received value added by Kamailio is invalid. Such a value cannot be the value of a SIP URI parameter at all. I strongly propose encoding it in base64 or escaping the = and the ; symbols when in a SIP URI param value as Juha suggests. Would you and everyone else agree that unconditionally encoding the param in base64 would be the preferred solution? I have some pending additions to the path module and could include that as well. No. SIP already requires hex-(un)escaping in various places (i.e. the Replaces header requires it, a URI username could require it, etc), so it's expected that SIP libraries/clients/servers already include hex-(un)escaping support. In the other side I don't remember any place in core SIP protocol in which Base64 is used, neither I know wheter Kamailio has built-in code for it or not (well, it's an easy addition anyhow...). IMHO using the SIP core mechanisms for these kinds of needs (thus hex-(un)escaping) is the correct choice, but since the ;received URI param is a non standard hack which just Kamailio needs and understands, it can be done in any way. Regards. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] path uri problem
As I said before, this Path header Path: sip:10.59.1.195;lr;received='sip:10.59.1.241:5079;transport=tcp' has a URI with these params: - lr : no value - received : 'sip:10.59.1.241:5079 - transport : tcp' And this is because quoting a *URI param* between single quotes is a bug in Kamailio. Due to this bug, FreeSwitch finds a transport param in the Path URI with value tcp' (note the single quote ' at the end of tcp) and, maybe, it parses it as tcp so chooses TCP for sending the initial requests. Indeed, the Route header added by FS is: Route: sip:10.59.1.195;lr;received=sip:10.59.1.241:5079;transport=tcp Which means that it has transport=tcp and, of course, it tries TCP. I insist, this is a bug in Kamailio since single quote and = symbols should be escaped when present a SIP URI parameter value. 2013/4/10 Spencer Thomason spen...@5ninesolutions.com: Although slightly off topic, I've been trying to craft a Path header that will work with FreeSWITCH. See: http://jira.freeswitch.org/browse/FS-4989 It would be great if the Path header was compatible with what they want as well. BR, Spencer On Apr 9, 2013, at 4:05 PM, Iñaki Baz Castillo wrote: 2013/4/9 Richard Fuchs rfu...@sipwise.com: On 04/09/13 12:19, Iñaki Baz Castillo wrote: So the received value added by Kamailio is invalid. Such a value cannot be the value of a SIP URI parameter at all. I strongly propose encoding it in base64 or escaping the = and the ; symbols when in a SIP URI param value as Juha suggests. Would you and everyone else agree that unconditionally encoding the param in base64 would be the preferred solution? I have some pending additions to the path module and could include that as well. No. SIP already requires hex-(un)escaping in various places (i.e. the Replaces header requires it, a URI username could require it, etc), so it's expected that SIP libraries/clients/servers already include hex-(un)escaping support. In the other side I don't remember any place in core SIP protocol in which Base64 is used, neither I know wheter Kamailio has built-in code for it or not (well, it's an easy addition anyhow...). IMHO using the SIP core mechanisms for these kinds of needs (thus hex-(un)escaping) is the correct choice, but since the ;received URI param is a non standard hack which just Kamailio needs and understands, it can be done in any way. Regards. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@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@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR, SRV and sips vs. transport=tls
2012/12/11 Juha Heinanen j...@tutpro.com: Iñaki Baz Castillo writes: transport=tls has NEVER been real, no one RFC mentions it. transport=tls is very real. many sip UAs and proxies support it. I know that and I never said the opposite. I said that no one RFC standarizes transport=tls. funny that you now care about RFCs, when in the same message you don't care about them regarding sips. sips is a bad hack and a useless pseudo-security mechanism. An IETF fail. Don't you think that? -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR, SRV and sips vs. transport=tls
2012/12/11 Olle E. Johansson o...@edvina.net: In addition there is a lot of missing pieces to get SIPS: to work. LIke how a proxy can signal back to the originating UA that it could not set up a TLS connection because the certificate of the next hop was bad/expired/not signed by approved CA or something else. And there are more issues (I hate to remember them) that make SIPS unfeasible. After ten years, I think SIPS as a uri scheme is a lost cause. This does NOT mean that TLS is a lost cause, but I think we can't leave the decision about security to the end point user - and they can't decide whether or not they want to place a request for secure signalling in their call setup. The WebRTC way is better, just make every call more secure. Well, WebRTC just defines the media plane (which MUST be SRTP-DTLS) but the signaling plane is up to the application/web provider, which can be as secure (or insecure) as any SIP or HTTP deployment. Cheers. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR, SRV and sips vs. transport=tls
2012/12/1 Andreas Granig agra...@sipwise.com: Hi, Hope to get some guidance here over the usage of sips and sip plus transport=tls when following RFC3263. The RFC3263 says that a NATPR record could return something like this for a query like host -t NAPTR example.com: ; order pref flags service regexp replacement IN NAPTR 50 50 s SIPS+D2T _sips._tcp.example.com. IN NAPTR 90 50 s SIP+D2T_sip._tcp.example.com IN NAPTR 100 50 s SIP+D2U_sip._udp.example.com. This means that the client should use sips if possible when contacting example.com. The client yes, but a proxy not. This is, if the proxy is forwarding a request with RURI sip:al...@domain.com and NAPTR returns a SIPS+D2T (along others) the proxy could choose to send the request via TLS but must not modify the RURI scheme. Anyhow, I strongly discourage the usage of sips schema. It was a dream of the IETF. Nobody uses it, nobody can use it and it provides nothing (since an intermediary proxy could decide not to honor the requested security and forward the request via UDP/TCP). Some months ago I discussed this subject in sipcore WG and the conclusion is that nobody wants sips usage. A lot of clients and servers are sending sip:u...@example.com;transport=tls in request URIs and Contact headers and Record-Route headers, and you can check with uri_param(transport,tls) which transport socket to use. This is pretty useful as you can determine hop-by-hop whether or not to use TLS. This approach has been obsoleted by RFC3261 though, and there doesn't seem to be a mechanism in RFC3263 to indicate use schema sip, but use transport=tls. transport=tls has NEVER been real, no one RFC mentions it. On encounter of a NAPTR record like the one above, how does kamailio act? Does it set a sips schema for the next hop? As said before, the proxy could choose TLS for forwarding the request (so would add a top Via with TLS transport) but should not modify the URI scheme. And what's the general take on this sips schema? As far as I understand RFC3261, it means that if a client sends a request to a sips-URI, the request is sent to the domain via TLS, and from there the request is sent securely to the callee, but with security mechanisms that depend on the policy of the domain of the callee. (RFC3261, Chapter 4). What does this really mean in practice? When a client sends a request with SIPS in the RURI, the responses must have SIPS in all the Record-Route and Contact. And the same for incoming requests in the same dialog. Otherwise the client should terminate the dialog. Are you allowed to rewrite the schema to sip and pass it on for example via UDP to the callee if the callee didn't indicate transport=tls (deprecated anyways) or sips: in the Contact of the registration? Or should you keep sips as schema, but still send it via UDP, because you know based on local policy or based on client registration that the next hop is not supporting TLS? In this case the proxy should not attempt to forward the request and, instead, reject it with 416Unsupported URI Scheme. How would widespread clients react when getting a call to a sips URI, especially if they receive it via UDP? Good cuestion but IMHO there is no good response. They could reply normally but the UAC may later terminate the dialog when it realizes that the Contact URI in the response has no SIPS schema (since SIPS is not valid in UDP). As said before, the easiest way to live with this is by never using SIPS as it provides nothing and adds lot of undocumented issues. Also note that it's valid for a client (or a proxy) to send a request via a TLS connection and still setting a Contact URI with transport=tcp. This would be hard for receiving incoming requests but for that Outbound (RFC 5626) does exist (the proxy would route the requests over the connection initiated by the client, regardless it is TCP or TLS and regardless the URI schema in the Contact URI). Regards. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] [sr-dev] dns resolver issue (RFC3263)
2012/11/14 Daniel-Constantin Mierla mico...@gmail.com: On 11/12/12 10:50 AM, MÉSZÁROS Mihály wrote: Hi, I made some progress. As I stated before, I made a patch and submitted to git branch misi/dns_srv. I tested with dns cache. It works for me. I made it also available for case if no dns cache is used too, but it isn't tested yet. Please review my commit, and let me know if any corrections needed. if nobody does it meanwhile, I can look over it next week and also check properly what's all about this discussion, currently being out of the office. Hi, I will try to get some time this week to try the patch. I will play with custom and complex DNS NAPTR and SRV entries to analyze the behavior with the patch. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] [sr-dev] dns resolver issue (RFC3263)
2012/11/6 Iñaki Baz Castillo i...@aliax.net: 2012/11/5 Klaus Darilion klaus.mailingli...@pernau.at: Indeed, this is not implemented correctly. What is not implemented correctly? It MUST be correctly implemented, what is the exact problem? RFC 3263 is very clear in the steps to perform (first NAPTR and when not present try SRV in order of preperence based on local policy). Could you please describe the exact issue in Kamailio about this? Thanks a lot. BTW, OverSIP behavior when routing a request to cisco.com: DEBUG: RFC3263 4212866 DNS NAPTR error resolving 'cisco.com': dns_error_nodata DEBUG: RFC3263 4212866 no NAPTR records, performing SRV queries DEBUG: RFC3263 4212866 DNS SRV succeeded for domain 'cisco.com', service 'sips' and protocol 'tcp' DEBUG: RFC3263 4212866 DNS A succeeded for domain 'vcsgw.cisco.com' DEBUG: RFC3263 4212866 DNS SRV succeeded for domain 'cisco.com', service 'sip' and protocol 'tcp' DEBUG: RFC3263 4212866 DNS A succeeded for domain 'vcsgw.cisco.com' DEBUG: RFC3263 4212866 DNS SRV error resolving domain 'cisco.com', service 'sip' and protocol 'udp': dns_error_nxdomain DEBUG: Proxy proxy_out 4212866 DNS result has multiple values, randomizing DEBUG: Proxy proxy_out 4212866 trying target 1 of 2: tls:64.103.25.132:5061 DEBUG: SIP TLS IPv4 client TLS handshake not completed yet, waiting before sending the message DEBUG: SIP TLS IPv4 client received certificate num 1 from server DEBUG: SIP TLS IPv4 client TLS connection established to 64.103.25.132:5061 DEBUG: SIP TLS IPv4 client running OverSIP::SipEvents.on_server_tls_handshake()... INFO: SipEvents [user] validating TLS connection to IP 64.103.25.132 and port 5061 NOTICE: SipEvents [user] server provides an invalid TLS certificate with SIP identities [tandberg] (TLS error: 18, description: self signed certificate) It was hard to properly implement full RFC 3263 but it's done. What is the exact issue in Kamailio with this? -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] [OT] OverSIP SIP Proxy released
Hi all, I announce the first stable release of OverSIP SIP Proxy: http://www.oversip.net OverSIP features: - - SIP over UDP, TCP, TLS and WebSocket transports. - Full support for IPv4, IPv6 and DNS resolution (NAPTR, SRV, A, ). - Fully programmable using Ruby programming language. - The perfect Outbound (RFC 5626) Edge Proxy. - Fully asynchronous event-based design. OverSIP is not a replacement for well-known proxies as Kamailio (sip-router). OverSIP does not implement basic proxy features such as Digest authentication, registration or parallel forking. OverSIP can behave as an Outbound Edge Proxy between clients and SIP registrars, or can be placed anywhere for building custom SIP / WebSocket applications. Cheers. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] [ot] virtualization systems
2012/8/28 Daniel-Constantin Mierla mico...@gmail.com: Hello, just asking to see your experience deploying sip platforms on virtual systems. So far I was running Kamailio in virtual machines and no problems, but I insisted that media servers to be on physical machines. Lately is more pressure from the market to go everything virtual. So the question is more about having everything on virtual systems, proxy and media server, where the media server can deal with transcoding, conference rooms and IVRs. Any strong comments pro or against? What is your preferred virtualization system for such deployments? My company uses XEN virtual servers for various Kamailio and Rtp-Proxy deployments with high traffic. All goes really ok if the host has enough CPU and RAM, no latency problems at all. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] [sr-dev] Outbound and Registrar. No binding update
2012/7/30 Daniel-Constantin Mierla mico...@gmail.com: There is one situation that will not work even with gruu/ob -- in sip a phone can call without registering. A gruu contact is obtained via registration and then used for next requests by UA itself. By calling without registering, there is no gruu contact for it, so adding the src ip and port as alias parameter is still needed. I don't remember I have seen any rfc making registration mandatory before calling. Hi Daniel, RFC 5626 (Outbound) assumes that the UA registers after connecting to the (Outbound Edge) Proxy. In other words, just to summarize the gruu versus contact aliasing. I don't think this iw gruu versus contact aliasing but outbound versus contact aliasing. Outbound means that the proxy inserts a flow token in the Record-Route username and then, when a request with Route header arrives to the proxy, its Route username is inspected and the associated connection retrieved for routing the request without inspecting the RURI (unless it's a GRUU RURI). Regards. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Outbound and Registrar. No binding update
2012/7/31 José Luis Millán jmil...@aliax.net: Outbound provides the UAC a way to update a binding even if it reboots. For that, a unique and permanent value of instance-id is used, which in conjunction with the AoR and reg-id determines the binding to the UAC. Having said this, I guess that the CSeq comparison between the one in the Register request and the one in the binding does not apply in this scenario since it is not guaranteed that a UAC saves the CSeq value of the registration among reboots. This is correct. According to RFC 5626, when the REGISTER includes a Contact with +sip.instance and reg-id params the registrar MUST NOT check the call-id and cseq of the request, but just the +sip.instance and reg-id params (and the registering AoR in the To header of course). -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] [sr-dev] Outbound and Registrar. No binding update
2012/8/2 Peter Dunkley peter.dunk...@crocodile-rcs.com I believe for WebSockets the situation is exactly the same as you would have for a client connecting over TCP from behind a NAT. It should be exactly the same situation. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Outbound and Registrar. No binding update
2012/7/30 Daniel-Constantin Mierla mico...@gmail.com: After playing a bit more with it, I pushed some commits on master branch. Can you try to see if they fixed the issue you reported? Hi Daniel, we are testing it. It looks ok for now but we need further testing, please let us giving a better feedback today or tomorrow. Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Outbound and Registrar. No binding update
2012/7/30 Daniel-Constantin Mierla mico...@gmail.com: quick question to double check if what I understood when I read the specs was ok -- in gruu/ob, it does not matter anymore the callid/cseq combination, or there should still be some checks related to it? In fact that depends on Outbound instead of GRUU, and not, when using Outbound the registrar does NOT check the Call-ID and CSeq of the REGISTER (and using GRUU means that Outbound is also used, so the Contact has a +sip.instance and reg-id params which are inspected by the registrar to create/update/delete a binding). Cheers. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Outbound and Registrar. No binding update
Hi, full agree with this bug report. Adding the devel maillist. More comments at the end of the mail: 2012/7/26 José Luis Millán jmil...@aliax.net: Hi, I'm using Kamilio 3.3.0 as registrar server. I`m using an outbound proxy so 'use_path' parameter or 'registrar' module is enabled. According to RFC 5626, a re-registration from a specific combination of AoR, instance_id and reg_id must update the binding. If the registrar receives a re-registration for a specific combination of AOR, and instance-id and reg-id values, the registrar MUST update any information that uniquely identifies the network flow over which the request arrived if that information has changed, and SHOULD update the time the binding was last updated. In my installation this is not fullfilled as shown: AOR:: jmillan Contact:: sip:jmillan@MY_IP;transport=ws;ov-ob=a570655c14 Q= Expires:: 181 Callid:: 1hgq3khalq2rzfr Cseq:: 108 User-agent:: JsSIP 0.1.0 Path:: sip:OUTBOUND_IP:9090;transport=tcp;lr;ovid=de0c0b9f,sip:a570655c14@OUTBOUND_IP:10080;transport=ws;lr;ovid=de0c0b9f;ob State:: CS_SYNC Flags:: 0 Cflag:: 0 Socket:: tcp:KAM_IP:5060 Methods:: 783 Ruid:: uloc-50119d99-328e-1 Instance:: urn:uuid:38dce009-ae1f-4fd1-91dc-99ed9affddc1 Reg-Id:: 1 Contact:: sip:jmillan@MY_IP;transport=ws;ov-ob=1dd97b4d51 Q= Expires:: 193 Callid:: 1hgq3khalq2rzfr Cseq:: 110 User-agent:: JsSIP 0.1.0 Path:: sip:OUTBOUND_IP:9090;transport=tcp;lr;ovid=de0c0b9f,sip:1dd97b4d51@OUTBOUND_IP:10080;transport=ws;lr;ovid=de0c0b9f;ob State:: CS_SYNC Flags:: 0 Cflag:: 0 Socket:: tcp:KAM_IP:5060 Methods:: 783 Ruid:: uloc-50119d99-3290-2 Instance:: urn:uuid:38dce009-ae1f-4fd1-91dc-99ed9affddc1 Reg-Id:: 1 The scenario is such that when the client looses the connection with the Outbound Server, it reconnects and re-registers to Kamailio in order to replace registration and be able to receive in-dialog messages. Receiving in-dialog requests should work since GRUU is also being used. The problem is that the new REGISTER (after UA disconnection) does not update the previous one (as this thread reports) so Kamailio still chooses the previous binding which does not work anymore. Regards. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] GRUU support in Kamailio
2012/7/11 Olle E. Johansson o...@edvina.net: I see that the gruu_enabled() parameter enables gruu if there's an instance ID in the contact. The requirement is also that there has to be a supported: gruu The instance ID is used without GRUU (like in OUTBOUND), so just checking that is not a good indication that you have GRUU support in the UA. When a UA compliant to this specification generates a REGISTER request (initial or refresh), it MUST include the Supported header field in the request. The value of that header field MUST include gruu as one of the option tags. This alerts the registrar for the domain that the UA supports the GRUU mechanism. From RFC 5627. I agree that checking gruu option tag in the Supported/Require header of the REGISTER is needed. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] GRUU support in Kamailio
2012/7/11 Olle E. Johansson o...@edvina.net: Remember that I might have missed that part of the code. I will try to test :-) It might just be a documentation error. Sure, I just mean that it should work as you pointed out :) -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Single-quoted vs double-quoted params in Path/Route
2012/6/4 Andreas Granig agra...@sipwise.com: Now while doing some interop tests with another platform, it turned out that double-quotes are not allowed in URI params (see https://lists.cs.columbia.edu/pipermail/sip-implementors/2008-May/019335.html, and in the grammar the allowed chars in the unreserved definition are alphanum and mark, where mark is only - / _ / . / ! / ~ / * / ' / ( / ) ). Anyways, to fully comply with RFC3261, I'd like to push a bugfix to path module to use single-quotes instead, however it also needs a change in the parser to use parse_quoted_param() also in case of single-quoted params (which hasn't been handled at all until now). My question now is if there are any concerns on your side with handling single-quoted URI params the way we handle double-quoted ones? If we were strict, we'd actually need to remove the handling for double-quoted ones, but for backwards-compatibility I'd rather keep it there. IMHO the more friendly solution would be parse_quoted_param() to allow both single and double quoted values. Be liberal with receiving and strict while sending :) -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] early media: How to change to tag
2012/3/29 Andreas Granig agra...@sipwise.com: I recently learned that for example Siemens switches implement Request Disposition: no-fork defined in http://www.ietf.org/rfc/rfc3841.txt, Annoying spec. Now the client can tell the proxy please don't fork... WTF? -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] early media: How to change to tag
2012/3/28 Min Wang ser.ba...@gmail.com: In order to properly proxy the msg to GW1, Kamailio seems need to change the to tag from B to A. Totally wrong. Multiple (early-)dialogs are 100% valid according to RFC 3261. If you find some SIP device failing when it receives multiple 180/183/200 responses with different To-tag, then drop it -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] XMLOPS xpath issues
2012/2/27 Daniel-Constantin Mierla dan...@kamailio.org: However, there is a mismatching between the xml standards and SIP/SIMPLE specs. In XML, the namespaces are bound to prefixes, while the guys at IETF added by their own so called default namespace, which has no prefix for it. That results in not being able to use directly xpath from libxml2 with SIMPLE bodies. There were some discussions out there (you can google, iirc Inaki was in couple of them), in one side, the devs of libxml2 said they don't want to break XML standards by allowing bogus xpath queries with such namespaces. Right. IETF SIMPLE group decided to break xpath 1.0 compatibility (what libxml2 implements) to save just a fews bytes in the XML ! Really annoying. Some time ago I did an ugly workaround in a C project to fix it. What Daniel suggests is similar and unfortunately is the way to go in this century. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Kamailio TLS with intermediate CA certificates
2012/1/29 Daniel Pocock dan...@pocock.com.au: It's a little bit different in Apache, where the user specifies a file containing intermediate certs - many of the CAs give instructions for adding that file in Apache, but they make no mention of OpenSSL/Kamailio/concatenating everything, so I imagine people will get stuck on things like this If your certificate is not signed by a root CA then you will be also provided with an intermediary certificate which is signed by a root CA, and that intermediary certificate validates yours. So to use it, you must take your public certificate and the intermediate certificate in PEM format and concatenate both, having your public certificate at the top of the resulting file. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] [Kamailio-Business] New feature: embedded MSRP relay
2012/1/17 Daniel-Constantin Mierla mico...@gmail.com: Hello, a new module is now on development branch, named msrp, offering an embedded MSRP relay. Message Session Relay Protocol is specified by IETF ( core and relay part in RFC4975 and RFC4976), one of typical use cases is Instant Messaging sessions negotiated via INVITE-200ok-ACK, a different approach than SIP MESSAGE request. There is no external dependency, the transport layer from core is reused to manage TCP/TLS connections used for MSRP. A MSRP relay is pretty much an independent node, thus you can run Kamailio just to deal with MSRP traffic. But there is no problem to run Kamailio to handle SIP and MSRP traffic in the same instance, same or different sockets (it is working even when SIP/MSRP are sent over the same connection or different connections to same port). I couldn't find a reliable and trustable open source SIP phone to test with it so far (hints are welcome), the module was tested with network tools and chaining Kamailio instances. Help with testing and feedback is very appreciated -- I can provide guidelines to adjust the config file to fit tester's needs, just contact me off list or via IRC channel. For the moment, the relation (user,session) management is done in the config, using htable module for example (see the README), it may be added inside the module for the future to make it easier overall, although is less than 10 lines of config -- this is mainly for extra security reasons, to check if the session id matches the connection that was opened when the session was created, otherwise the user authentication functionality is done reusing existing functions from auth module. Another benefit is performances, storing local socket and connection IP/port saves some time to lookup the connection. Building MSRP relay on top of SIP server was done first for the benefit of reusing the transport layer from the core for IPv4/IPv6 and TCP/TLS, which is mature, scalable and offers asynchronous communication. Besides that, you have most of the config tools to route SIP requests available for routing MSRP (authentication, authorization, IP checking, accounting, a.s.o.). I made a news post with more details: * http://www.kamailio.org/w/2012/01/new-module-embedded-msrp-relay/ The readme of the new module is available at: * http://kamailio.org/docs/modules/devel/modules/msrp.html Hi Daniel, congratulations for this great addition, really good. About a SIP phone implementing MSRP, I just know Blink, no more. It has a well tested MSRP stack. Cheers. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] lcr module and IPv6
2011/12/21 Andreas Granig agra...@sipwise.com: We could argue whether to not support square brackets and just allow plain IP format, I've no strong opinions on that. I agree. IPv6 has no brackets, that's just a notation for using in URI's. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] How long (in bytes) is an AVP which reads an Integer from DB?
Hi, I need to read from a MySQL table a 32 bits long Integer column. My question is: how many bytes does Kamailio use for storing integer values fetched from a DB query? does it depend on the 32/64 bits architecture? Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] [OT] SIP on the Web
2011/10/11 Olle E. Johansson o...@edvina.net: I think this is awsome. If I understand this right, this is based on your SIP over websocket draft, which basically adds a new transport to SIP. So for Kamailio, we would need a new transport. http://tools.ietf.org/html/draft-ibc-rtcweb-sip-websocket-00 Right. All this stuff is based on a new transport for SIP: WebSocket. This transport is a bit more exotic as it not a layer 4 transport (WebSocket is a transport layer built on top of TCP/TLS, and it's a message boundary transport as UDP or SCTP). -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] [OT] SIP on the Web
2011/10/11 David da...@styleflare.com: This is really awesome. Is any of that stuff on the video open to play with? Not yet, but it will be. (I know it does not support audio but the SIP chat aspect is really great). It's based on SIP MESSAGE. Implementing MSRP will be the next step :) For audio/video we must wait for RTCweb to become an standard. Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] [OT] SIP on the Web
2011/10/11 David da...@styleflare.com: If I understand what I saw correctly you have implemented a JS SIP stack which runs native in the browser over web-sockets. Yes, it's a JavaScript code implementing a full SIP stack (parsing, transactions, dialogs...) and uses a WebSocket connection for sending/receiving SIP requests/responses. There is also in the picture a SIP proxy implementing the WebSocket transport, if not, the JavaScript client could not interoperate with SIP networks ;) Regards. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] [OT] SIP on the Web
2011/10/11 Juha Heinanen j...@tutpro.com: i read your slides and have question about the example: is OverSIP sip proxy still needed if Kamailio sip proxy/registrar would implement websocket transport? No, it isn't. But OverSIP is not just a proxy providing WebSocket transport ;) -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] [OT] SIP on the Web
2011/10/11 Juha Heinanen j...@tutpro.com: i would prefer not to add more servers into my sip platform, because there is already sip proxy, registrar, presence server, xcap server, msrp server, and sems that provides several services. hopefully yours would replace some of those rather than add yet another one. I plan to add a MSRP relay server on top of OverSIP (MSRP over TCP, TLS and WebSocket, still to be defined) and also plan to build a presence server, but not a SIMPLE/XCAP presence server, a new specification instead: http://sip-space.net/ Cheers. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Problem with Route containing two elements
2011/10/11 davy van de moere davy.van.de.mo...@gmail.com: IMHO if I could convince Kamailio to always take the last part of the Route header into account and ignore the first one it would correctly work. What would be a good approach? Rewriting the route header looks abit harsch. That does not make sense at all. The order of the URI's within a Route header (or splited into varios Route headers) is the opposite depending on who sends the request, the caller or the callee. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] limiting concurrent calls with dialog module
2011/10/10 Jim Lucas li...@cmsws.com: On 10/8/2011 6:03 PM, Timo Reimann wrote: As explained by myself in Flyspray issue #146[1], a fix to this problem is quite feasible. Overall, I believe that dialog module usage should be more robust and work out of the box; that is, it shouldn't matter where you place dlg_manage(), things should just work and handle the tricky cases intelligently. I'm sure the developers would welcome you to submit a patch. Humm, Time *is* the developer here ;) -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] limiting concurrent calls with dialog module
2011/10/3 Jon Bonilla ma...@aholab.ehu.es: Due to a couple of bugs in the dialog module I'd suggest you to run this code after the user auth has been successfull. You'll need to call dlg_manage() function first. The other bug makes the dialog not being freed if you send a sl reply generated by the proxy. You should call t_newtran + t_reply to send a statefull reply to the user. Mixing two points above into a single one: - Just call dlg_manage() after the authentication and authorization has been made. As a recommendation, call dlg_manage() just before t_relay() and you are done (and you will avoid both bugs explained by Jon). -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] [sr-dev] 10 years of SER - statistics
2011/8/31 Daniel-Constantin Mierla mico...@gmail.com: a quick reminder for those still planing to send some statistics, it is about one day left to 10 Years SER conference. I got many reports, thanks everyone that did so far. Most of the reports focused on monthly call minutes, good figures so far, but it is clear we do much more in reality... Hi Daniel, the person in my company who can provides me such statistics comes back tomorrow from long holidays. I will ask him tomorrow morning. Sorry for the super delay. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Cancel issue
Right. If pedantic=yes, then Asterisk assumes the same wrong concept you have understood and fails to match a 200 Cancelled with different Totag (when coming from a proxy). It's a bug in *Asterisk*. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Modifying $rU after lookup()
2011/8/9 Klaus Darilion klaus.mailingli...@pernau.at: AFAIK no. But you can do it in a branch route for every branch separately. And isn't it a bug? why the RURI username is just changed in a single branch? Theorically operations over RURI made in a route block should affect to all the branches, am I wrong? it's the very same as giving value to a flag or AVP after doing loockup and fetching multiple contacts. If I inspect such flag or AVP in branch_route I should find it for every branches. Why should changing the RURI behave different? IMHO it's a bug, or do I miss something? -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Modifying $rU after lookup()
2011/8/9 Klaus Darilion klaus.mailingli...@pernau.at: I wouldn't call it a bug. It is a limitation of how sip-router works, probably a design decision from early SER days. To overcome this limitation and allow manipulation of all branches (not only the main branch), features like the branch route were added. Any maybe I only want to manipulate a single branch. IMO manipulating all branches is as buggy as manipulating just a single branch - it depends on what the user needs. The behaviour is unexpected. Imagine you do lookup (which fetchs 2 contacts) and after that, still in route block, do setflag(1). Such flag is set in branch_route for both generated branches. Why setting the $rU in same circumstances should behave different? -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Modifying $rU after lookup()
2011/8/9 Alex Hermann a...@speakup.nl: $rU is related to the 'main' branch in request_route. Which is supposed to be the main branch when doing lookup() and fetching 2 or more contacts/branches? The reply is: random, probably the first retrieved contact from the location table (or memory). Is it really an expected/correct/arguable behavior? I don't think so. NOTE: Anyhow this is the way in which it works. Regards. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Cancel issue
2011/8/9 Carl Wagner carl.wag...@verbalworld.com: Iñaki, Thank you. Nice explanation. I plan to open a bug on this with Asterisk. Are there any RFC section(s) that I can reference, in case they interpret 3261 the same way I did? Hi Carl, AFAIR the bug is already (somehow) reported in Asterisk (not sure however). I don't remember where exactly what I've explained is defined in the RFC, but for sure in the CANCEL section. Please let me know when you report the issue in Asterisk so I can participate in it. Regards. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] How to reset t_on_failure/branch?
Hi, I remember that in Kamailio 1.5.X t_on_branch and t_on_failure still remain after rouning failure_route[XX], and I think there was a way to reset them. In 3.X it seems that t_on_branch and t_on_failure must be set again in failure_route to take effect in next t_relay() call, am I right? Thanks. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] How to reset t_on_failure/branch?
2011/8/4 Daniel-Constantin Mierla mico...@gmail.com: To reset, just use the parameter 0 or for t_on_xyz(). Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] About RTimer module
Hi RTimer module doc says: -- The module executes route blocks on a timer base. It can create new timer processes and execute many route blocks on same timer. -- What does it mean It can create new timer processes? Let's suppose I run a blocking call (i.e. sending an HTTP request which takes too long) from a route block called by a timer of RTimer. What would it occur? Thanks. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] About RTimer module
2011/7/28 Klaus Darilion klaus.mailingli...@pernau.at: AFAIK this single timer process is blocked as well. If this single time request is used for other periodically executed routes too, than those might be affected as well. Hi, yes, I suppose that the timer process would also block (fully normal if I do a blocking call there). But reading the doc about It can create new timer processes maybe it creates N timer processes to balance the work. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] About RTimer module
2011/7/28 Iñaki Baz Castillo i...@aliax.net: 2011/7/28 Klaus Darilion klaus.mailingli...@pernau.at: AFAIK this single timer process is blocked as well. If this single time request is used for other periodically executed routes too, than those might be affected as well. Hi, yes, I suppose that the timer process would also block (fully normal if I do a blocking call there). But reading the doc about It can create new timer processes maybe it creates N timer processes to balance the work. Well, I assume such magic (automatically creating more processes) does not occur. So, assuming that the route block called by a timer (RTimer module) performs a blocking action, then it can be a bottleneck if there is heavy traffic. Imagine this case: - For each received INVITE Kamailio sends some data via Mqueue module. - RTimer module has a timer running each second calling route[N]. - route[N] invokes a blocking call (i.e. an HTTP request). If case of high INVITE traffic, the kamailio process running the timer would be a real bottleneck, am I right? -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] About RTimer module
2011/7/28 Daniel-Constantin Mierla mico...@gmail.com: Indeed, there is no process created auto-magically, but if you expect lot of traffic for blocking ops, you can create more rtimer processes that will execute same route block which consumes mqueue items. Creating many rtimer processes is by setting 'timer' parameter more than one with different name attribute and mode=1, then set also many exec parameters accordingly. Nice, that would be enough. Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Kamailio 1.5: replying a 200 (OPTIONS) with SDP
2011/7/24 Andreas Heise ahe...@gmx.de: which kind of Alcatel PBX it is? I use OPTIONS with and without SDP in 200 without problems since several years with Alcatel OmniPCX Enterprise systems. It's strange as we also work with other Alcatel OXE and OXO with no problems. In this exact case, the PBX performs SIP registration and later sends periodic OPTIONS with Accept: application/sdp. Since the 200 is replied by my proxy Kamailio, it has no SDP (of course) and the Alcatel PBX ignores the reply and sends retransmissionts until it decides that the proxy is down. If you need I could try to get the exact PBX model (and firmware). -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Kamailio 1.5: replying a 200 (OPTIONS) with SDP
2011/7/24 Andreas Heise ahe...@gmx.de: this is not a problem of missing SDP in your replies, there was a bug in OXE sipmotor when registration and options supervision are managed for the same gateway. Great to know. It was really strange the need of receiving a 200 OK with SDP for a monitorization OPTIONS. If needed I could provide more details by pm as it's OT for the Kamailio community. I would really appreciate it. Could you please send me (to my mail) some info about such bug in the OXE? it's exactly what I need. Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] [sr-dev] issue tracking system
2011/7/19 Daniel-Constantin Mierla mico...@gmail.com: I see two major options: A) going to use a source code hosting portal for bug traker (like sourceforge, berlios, github, a.s.o.) B) going to use an existing software to be installed on our server and managed by us I tend to go for A) as the maintenance of the software will not be done by us. I do not know which would be the best choice to go for. Of course, we should consider possible down times (like it happened in the past) or slow connection to their servers. B) will give us full control, but then it is about the time to maintain it (upgrades, security patches, a.s.o.). More than that, it is about selecting the right software to go with. Since SEMS code is now hosted in GIT repo of sip-router.org, maybe the tracker can be used by them as well, eventually by future related projects hosted in our git. I vote for installing Redmine (the best multri project tracker/wiki I've ever seen) or hosting the project in Github. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] bypass rtp traffic.
Hi. Kamailio and rtpproxy does NOT decide to send rtp to asterisk. It is asterisk who decides to receive it and that entirely depends on asterisk sip condigurarion and asterisk sip peers configuration. Your question is not related to kamailio but just to asterisk. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] async processing in a module
2011/6/27 Daniel-Constantin Mierla mico...@gmail.com: just to close this thread. A new module named async has been introduced in GIT master, showing how to use the tm functions for asynchronous sip request processing. Hi Daniel, good addition. Let me a question, the module description says: Note that after invoking the an asyncronous operation, the processing will continue later, in another application process. Therefore, do not rely on variables stored in private memory, used shared memory if you want to get values after the processing is resumend (e.g., $shv(...) of htable $sht(...)). - I assume that using AVP's is also valid (as AVP's are stored within the transaction), perhaps the doc could also mention them? -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] async processing in a module
2011/6/27 Daniel-Constantin Mierla mico...@gmail.com: Hi Inaki, yes, transaction avps and xavps should be also available when resuming the processing. You can add a phrase to explain that at your convenience. Ok, added. Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] OT: are there still asymmetric SIP clients?
2011/6/22 Klaus Darilion klaus.mailingli...@pernau.at: Just a small survey: Are you still using NAT detection checks? I prefer to apply NAT traversal always (never trust the contact header) which of course only works if all the clients are symmetric. I would like to tell a recent issue I've suffered in my company: - Kamailio with public IP and optional rtpproxy server. - Two users behind same NAT. - Both users use STUN so announce public IP:ports in headers and SDP. - User A calls to B. - Kamailio does not detect NAT (due to STUN) so doesn't apply rtpproxy, neither when routes the call to user B. - So user A sends RTP to the public IP of its NAT router, same as user B. - In some routers this work, but in this case it does not properly perform NAT port forwarding and there is no audio. Solutions: 1) Remove STUN from clients (not always feasible). 2) Always use RtpProxy. Easier. Thus - do you still see asymmetric SIP clients? Yes, I've seen some Alcatel OXO using asymmetric SIP. A pain if you do force_rport. Solution: - Just perform force_rport if the client is detected as behind NAT (note that assymetric SIP clients can ***NEVER*** run behind NAT). -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Keeping transactions in standby till future events
2011/6/20 Henning Westerholt henning.westerh...@1und1.de: as Alex already wrote, its probably not the best or correct thing to do - but have you already looked to the tm module? It provides some asynchronous support. From the module README: [t_supend] This function together with t_continue() can be used to implement asynchronous actions: t_suspend() saves the transaction, returns its identifiers, and t_continue() continues the SIP request processing. Hi Henning, which would be the difference if the script does t_newtran(), then reply 100 trying (of before) and then exit()? -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Keeping transactions in standby till future events
2011/6/20 Iñaki Baz Castillo i...@aliax.net: [t_supend] This function together with t_continue() can be used to implement asynchronous actions: t_suspend() saves the transaction, returns its identifiers, and t_continue() continues the SIP request processing. Hi Henning, which would be the difference if the script does t_newtran(), then reply 100 trying (of before) and then exit()? Auto reply: I think it would just generate a ready-to-expire server transaction. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Security in proxy
2011/6/16 Anto potx...@gmail.com: Is there any way to implement something that detects unusual behavior on the user (referred to countries that do not ever called, excessive traffic, etc)?. This requirement is too complex to implement it in a generic module (IMHO). For example, if we are a Spanish telco operator and our clients are mostly Spanish, they usually call Spanish numbers. If one of them starts making lot of calls to Slovenia it could be an attack. But maybe we have a client that, in fact, makes lot of calls to Slovenia por any valid reason (businness model and so). So each client could require a different security profile. We are planning to build a system for this purpose. The idea is having a separate custom server (not a SIP server, or maybe) that collects clients calls and analyze them against a security profiles backend (a DB or whatever). When kamailio receives a call it would communicate with this server in some way and ask it client wants to make a call tu NNN, should I allow it?. Then the custom server would apply internal logic and give a fast response (yes/no). I think this is too complex and could make sense to build a separate/custom server for this purpose, and then, maybe create a custom Kamailio module for communicating Kamailio with the server (some communication protocol and so). -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] How to check a bit (1/0) of a pseudo-variable?
Hi, summarizing I have two pseudo-variables: $var(allowed_zones) = 5; $var(id_zone) = 2; The binary representation of 5 (3+2), assuming 8 bits lenght, is: 0101 so bit 0 = 1, bit 1 = 0, bit 2 = 1 ... Now I just need to know if bit number 2 ($var(id_zone)) of $var(allowed_zones) is 0 or 1. Is there any function like isflagset() but for pseudo-variables? Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] How to check a bit (1/0) of a pseudo-variable?
2011/6/16 Iñaki Baz Castillo i...@aliax.net: Now I just need to know if bit number 2 ($var(id_zone)) of $var(allowed_zones) is 0 or 1. Is there any function like isflagset() but for pseudo-variables? I've found isavpflagset() right now: http://sip-router.org/wiki/cookbooks/core-cookbook/devel#isavpflagset But it has no description. How is it supposed to work? -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] How to check a bit (1/0) of a pseudo-variable?
2011/6/16 Iñaki Baz Castillo i...@aliax.net: I've found isavpflagset() right now: http://sip-router.org/wiki/cookbooks/core-cookbook/devel#isavpflagset But it has no description. How is it supposed to work? The Changelog file says: --- Every AVP may by flaged from script via setavpflag(avpid, flag) (it's similar like message flags setflags,resetflags,isflagset). AVP flags must be declared using avpflags statement. Flags may be tested via isavpflagset(avpid, flag). Both the setting and testing may also be processed in a module. It's currently used in the rr module for dialog_cookies. Such module should register flag using register_avpflag(flag_id). Example: avpflags myflag, dialog_cookie; $a = 123; setavpflag($a, myflag); if (isavpflagset($a, myflag)) { $dlg_foo = foo; $dlg_bar = bar; setavpflag($f./^dlg_, dialog_cookie); -- But is says that I must use setavpflag() to set flags in the AVP. In my case, I retrieve the AVP value from a database (an integer field). Could it work? -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] How to check a bit (1/0) of a pseudo-variable?
2011/6/16 Daniel-Constantin Mierla mico...@gmail.com: that function is probably for ser-like AVPs. back to your original need, you can use directly if conditions like: if($var(x) 2) { ... } will be true if the second bit is set. You have to use the power of two for the appropriate integer value to match the bit position.The master branch has bitwise left/right shift operations as well Ok, so the above example if($var(x) 2) { ... } will just work because the number 2 has the bit 2 with value 1 (well, in fact the bit 1 as the first one is the bit 0). But if I want to compare the bit 5 I need first to get 2^5 (for the second operator) which I can get using bitwise left/right shift functions, am I right? (since there is no way in kamailio to calculate 2^N directly). -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Use of mtree module having multiple trees in the same table
2011/6/16 Javier Gallart jgalla...@gmail.com: not sure what you want to accomplish, but in case it might help this is how we use the mtree module. Our 3 columns are: partition, prefix, route Partition is just a name that defines a group, this is done inside the script before calling mt_match (via a table lookup for instance). Let's say if a call comes from ip x we assign it to partition 400; if it comes from ip y we assign it to partition 401. Each partition is a different tree. Consider these entries in the tree table: 400,123456,A 401,123456,A 401,1234567,B Let's say both x and y send a call with $rU 1234567; mt_match will return A for ip x, and B for ip y; we use that information for taking further routing decisions. A common situation might be: x has a unique route for a whole country while y has that entry but has more defined routes for more specific area codes inside that country. The column route could also be for instance the setid of a group of gw's for the dispatcher module, etc... Hi Javier, indeed this is very similar to the usage we give now to mtree, by using different partitions of the table. We have it already working (as Jose Luis told in his last mail in this thread) :) Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] How to check a bit (1/0) of a pseudo-variable?
2011/6/16 Daniel-Constantine Mierla mico...@gmail.com: You can do 2*2*2... to get the power of two. Doing it in a while loop gives dynamic power parameter. Other option is to use Lua for example. A bit exotic just to calculate a simple mathematical operation :) ... until the left shift gets in 3.1 - if you can test the patch from master and all goes fine, then it may happen faster :-) We have it already working using that ;) -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR priorities doesn't seem to work properly
2011/6/9 Iñaki Baz Castillo i...@aliax.net: 2011/6/9 Alex Hermann a...@speakup.nl: The way I read rfc2915, there is no failover mechanism. The application pick the first target that it supports and uses that. There is no mention of trying other records afterwards. Matching/finding NAPTR records stops once the first match is completed. All other records are discarded. From section 2: Hi Alex, two comments: 1) What you say does not explain my issue (as in any case TLS or TCP have more priority in my NAPTR's than UDP). In fact, my exact problem is that my Kamailio is not performing NAPTR query. The problem is fixed now, it was an error related to the NAPTR service flag (sip-router expected it to be s case-sensitive, while it should also allow S). 2) About your quoted text, indeed RFC 2915 says that. But that just means that, an application (in this case a SIP client) must take *first* the valid NAPTR record with better order (lowest value). But RFC 2915 is just about NAPTR, it can not mandate that applications or protocols cannot try other NAPTR records as failover mechanism. Any SIP client or proxy implementing NAPTR records does failover to the next NAPTR record in case the first one failed (at least those I've tested). It seems that sip-router behaves exactly as you describe. This it, it performs the NAPTR resolution, chooses the record with best 'order' (for the supported transports) and just uses it (it would do SRV failover and so, but would never try other NAPTR records with less 'order'). However I've seen other SIP stacks also performing failover by taking next NAPTR records. But indeed, RFC 2915 does not mandate it, instead it says MUST NOT. So you are right. Regards. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR priorities doesn't seem to work properly
2011/6/15 Alex Hermann a...@speakup.nl: However I've seen other SIP stacks also performing failover by taking next NAPTR records. But indeed, RFC 2915 does not mandate it, instead it says MUST NOT. So you are right. I forgot about a discussion i had about this issue a few years ago with a customer and just remembered the outcome now. (Optional) failover can be provided by different 'Preference' field within the same 'Order'. From rfc 2915/3403 section 2: The important difference between Order and Preference is that once a match is found the client MUST NOT consider records with a different Order but they MAY process records with the same Order but different Preferences. I.e., Preference is used to give weight to rules that are considered the same from an authority standpoint but not from a simple load balancing standpoint. Yes, 100% right. Unfortunately this wasn't possible with Kamailio =1.5. Have you tried 3.x with equal 'Order' but different 'Preference' or just with different 'Order'? Not yet, but I'll do it and comment here :) -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR priorities doesn't seem to work properly
2011/6/15 Iñaki Baz Castillo i...@aliax.net: Unfortunately this wasn't possible with Kamailio =1.5. Have you tried 3.x with equal 'Order' but different 'Preference' or just with different 'Order'? Not yet, but I'll do it and comment here :) Kamailio just takes one of the NAPTR records, even if the first fails and there are more NAPTR records with same order (tested right now). The file doc/dns-txt confirms it: dns_try_naptr = on | off - if on sip-router will first try a NAPTR lookup for destinations that don't have the protocol or port specified and are not simple ip addresses (as described in RFC 3263). This will introduce a slight performance penalty and will probably cause extra DNS lookups. For example a lookup for a non-existing domain will produce one extra query: NAPTR(domain), SRV(_sip._udp.domain) and A/(domain). If the result of a query contains several NAPTR records, sip-router will select among them according to the RFC2915 and sip-router preference towards a specific protocol (see dns_udp_pref, dns_tcp_pref and dns_tls_pref below). For an RFC3263 compliant configuration (choose the remote side preferred protocol if supported), set dns_udp_pref, dns_tcp_pref and dns_tls_pref to the same value (=0), e.g. 0. Default: off -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Use of mtree module having multiple trees in the same table
2011/6/13 jose luis millan doctor...@gmail.com: I wonder if anyone could help me understanding how can I use this module in a scenario where multiple mtrees are defined behind the same database table. I can't guess how to speficy to 'mt_match' the mtree I want to match against, since the 'mtree' module parameter defines a specific memory tree based on a specific table, but not based on a specific 'tname' value. Indeed we have a table with these colums: - prefix:string to identify number destination. This is the regex column. - id_zone: integer, points to other table. This is the value column. - scope:integer, can be 0 or 1. So wee need two instances of mtree: 1) those rows with scope 0. 2) those rows with scope 1. Is it possible with current mtree module? or maybe we'd do better by creating two views of the table (one for entries with scope 0 and another for entries with scope 1)? Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR priorities doesn't seem to work properly
2011/6/13 Daniel-Constantin Mierla mico...@gmail.com: I saw Andrei jumped in and added case insensitive comparison of naptr flags -- just to conclude this discussion, is it working on now? Hi Daniel, I've tested it right *now* :) Yes, it works. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Double tuple in notify
The id of both tuples are different so the server must keep both. However the client sholud use if-match header on the second PUBLISH to ensure it will replace the existing one. El 10/06/2011 21:32, Eugen Dedu eugen.d...@pu-pm.univ-fcomte.fr escribió: Hi again, Then it is the time for Eugen to add it in his sip client and send the patch for enhancing kamailio's presence server with rfc4481, as well :o) I start my application, and make my own status be shown. I change my status back and forth a few times between Away and DoNotDisturb (each time a publish is sent), the status returned (in notify) is good. When I change my status to Online/Available (and only to this), kamailio returns a double tuple. Is it normal to have a double tuple? If yes, which one to choose (the one with latest timestamp)? Here it is: NOTIFY sip:eugen.dedu@82.238.108.175:**5060http://sip:eugen.dedu@82.238.108.175:5060SIP/2.0 CSeq: 7 NOTIFY Via: SIP/2.0/UDP 86.64.162.35;branch=**z9hG4bK7634.4d863c14.0 User-Agent: Kamailio (1.5.3-notls (i386/linux)) From: sip:eugen.d...@ekiga.net;tag=**f85b0bd16aaafa8479586ac9f88b31**98-29fc Call-ID: 8a0d723b-0f8d-e011-84d7-**0024d693d8e8@snoopy To: sip:eugen.d...@ekiga.net;tag=**7c75723b-0f8d-e011-84d7-**0024d693d8e8 Contact: sip:86.64.162.35:5060 Subscription-State: active;expires=270 Event: presence Content-Length: 938 Content-Type: application/pidf+xml Max-Forwards: 70 ?xml version=1.0 encoding=UTF-8? presence xmlns=urn:ietf:params:xml:ns:**pidf xmlns:dm=urn:ietf:params:xml:**ns:pidf:data-model xmlns: rpid=urn:ietf:params:xml:ns:**pidf:rpid entity=pres:eugen.dedu@ekiga.** net pres%3aeugen.d...@ekiga.net tuple id=T0002 status basicopen/basic /status contact priority=1sip:eugen.dedu@**ekiga.netsip%3aeugen.d...@ekiga.net /contact noteonline - /note timestamp2011-06-04T13:55:**56+02:00+02:00/timestamp /tuple tuple xmlns=urn:ietf:params:xml:ns:**pidf id=T0001 status basicopen/basic /status contact priority=1sip:eugen.dedu@**ekiga.netsip%3aeugen.d...@ekiga.net /contact noteaway - jjk/note timestamp2011-06-04T13:54:**37+02:00+02:00/timestamp /tuple dm:person xmlns:dm=urn:ietf:params:xml:**ns:pidf:data-model xmlns:rpid=urn:ietf:params:**xml:ns:pidf:rpid id=pid1 rpid:activities rpid:away/ /rpid:activities /dm:person /presence -- Eugen __**_ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**usershttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR priorities doesn't seem to work properly
2011/6/10 Iñaki Baz Castillo i...@aliax.net: Then if you use a simple config with t_relay(), go to tm module, see where t_relay() is defined, follow a bit the code and set a breakpoint by file and line number at a convenient location (as much as close to dns lookup functions if you can spot them in the code), so you don't do next/next/ too many times. Hi Daniel, I tryed to extract some useful data but got nothing. I've set breakpoints by indicating file:line of tm module as well as resolve.c file. The same using function names as breakpoints, etc. No result at all, I just get stuf about UDP, IO, read and so. Anyhow I've make some other tests and concluded that the issue is very simple: Kamailio performs NAPTR query but completely ignores its result. I've reported the bug in the tracker: http://sip-router.org/tracker/index.php?do=detailstask_id=135 Cheers. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR priorities doesn't seem to work properly
2011/6/10 Klaus Darilion klaus.mailingli...@pernau.at: My Kamailio 3.1.3 performs NATPR lookups: use_dns_cache = yes dns_try_naptr = yes dns_udp_pref=1 dns_tcp_pref=1 dns_tls_pref=1 dns_sctp_pref=1 dns_use_search_list=no dns_try_ipv6=yes dns_retr_time=1 dns_retr_no=1 With your exact configuration, my kamailio 3.2.0-dev5 (debian package) does not perform NAPTR :( -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR priorities doesn't seem to work properly
2011/6/10 Iñaki Baz Castillo i...@aliax.net: With your exact configuration, my kamailio 3.2.0-dev5 (debian package) does not perform NAPTR :( Klaus, could you provide me the following information? 1) kamailio -V 2) Is compiled? a deb package? 3) Could you please call sip:anyth...@oversip.net and show me kamailio logs by filtering dns ( grep | dns ) ? Really thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR priorities doesn't seem to work properly
2011/6/10 Klaus Darilion klaus.mailingli...@pernau.at: Kamailio performs NAPTR lookups, but chooses UDP. I do not know why. You are fully right. I've captured DNS traffic and wireshark clearly shows a NAPTR record. And indeed kamailio prefers SIP over UDP with no reason (it should prefer TCP as my kamailio does not speak TLS): $ host -t naptr oversip.net oversip.net has NAPTR record 5 50 S SIPS+D2T _sips._tcp.oversip.net. oversip.net has NAPTR record 10 50 S SIP+D2T _sip._tcp.oversip.net. oversip.net has NAPTR record 20 50 S SIP+D2U _sip._udp.oversip.net. oversip.net has NAPTR record 40 50 S SIP+D2S _sip._sctp.oversip.net. oversip.net has NAPTR record 50 50 S SIPS+D2S _sips._sctp.oversip.net. Maybe kamailio is taking the order field of the NAPTR incorrectly and gives priority with higher values? I will check it ASAP. Thanks a lot Klaus. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR priorities doesn't seem to work properly
2011/6/10 Iñaki Baz Castillo i...@aliax.net: Maybe kamailio is taking the order field of the NAPTR incorrectly and gives priority with higher values? I will check it ASAP. Ok, I've created domain whose NAPTR record just includes a single SIP+D2T entry (just SIP over TCP). My Kamailio (which uses UDP and TCP) indeed performs the NAPTR queries, but it seems it doesn't like the response and ignores it. Then it performs an usual _sip._udp SRP query. My DNS domains and NAPTR/SRV/A records work OK with any other SIP client implementing RFC 3263. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR priorities doesn't seem to work properly
2011/6/10 Daniel-Constantin Mierla mico...@gmail.com: Could you set children to 1, attach with gdb to the sip worker handling the invite, send the call and execute step by step to see which condition fails? A simple config with t_relay() should make the debugging easier. Hi Daniel. Which worker should I attach? My kamailio listens in UDP and TCP. I send the request via UDP and it should do NAPTR stuf and choose SIP TCP (best priority). So: Process:: ID=0 PID=26913 Type=attendant Process:: ID=1 PID=26914 Type=udp receiver child=0 sock=192.168.1.16:8080 Process:: ID=2 PID=26915 Type=slow timer Process:: ID=3 PID=26916 Type=timer Process:: ID=4 PID=26917 Type=MI FIFO Process:: ID=5 PID=26918 Type=ctl handler Process:: ID=6 PID=26919 Type=tcp receiver child=0 Process:: ID=7 PID=26920 Type=tcp main process Which process should I attach? udp receiver? I've tryed to attach udp receiver process in gdb, and by pressing next, next, next (running gdb in the kamailio sources directory) I see nothing about dns functions. Could you please give me some indications please? Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR priorities doesn't seem to work properly
2011/6/10 Daniel-Constantin Mierla dan...@kamailio.org: yes, attach to the process that receives the sip request, in this case the udp receiver. Then if you use a simple config with t_relay(), go to tm module, see where t_relay() is defined, follow a bit the code and set a breakpoint by file and line number at a convenient location (as much as close to dns lookup functions if you can spot them in the code), so you don't do next/next/ too many times. Understood. Let me some time to do it and I'll come back. Thanks. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Meaning of empty body in NOTIFY
2011/6/10 Daniel-Constantin Mierla mico...@gmail.com: have you spotted in SIP/SIMPLE specs what has to be sent when the presentity is offline? My quick google was not that succesful. Maybe Inaki has the specs more fresh indexed in memory and can help. If the user has not published a offline presentity, then the server must not generate one. Sending an empty NOTIFY is the correct behaviour, which means unknown state (most of the subscribers should interpret it as offline). What is the purpose of publishing a presentity with offline status? Well, as most of the SIMPLE presence stuff, it's just a way to make things hyper-complex. There is however an exception: RFC 4827. The client goes on holidays for long time and decides to upload,, via *XCAP* a *permanent* (non expirable as a PUBLISH publication) pidf document in which it set the info it desires (maybe a status offline with a message I'm on holiday until June 20). I based my assumption that the sip/simple presence server should not generate itself a presence/pidf document with status closed/offline since the pidf has a tuple id=... node that is generated by presentity device. Right. The presence server must never generate a pidf document in behalf of the user. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Meaning of empty body in NOTIFY
2011/6/10 Daniel-Constantin Mierla mico...@gmail.com: Specifically, the RFC says: During composition, a presence agent (PA) may encounter a stored timed-status element that covers the present time. The PA MAY either discard that element or MAY convert it to a regular status element if it considers that information more credible. So, if a client uploads a presence document that contains a timed-status element, that element could be sent by the PA when the client goes offline, rather than the entire document being discarded (which is what I suspect is happening now). we don't have this rfc implemented in kamailio at this time. Is any UA you know doing this kind of thing? That is anohter hyper-exotic and ugly SIMPLE-Presence feature. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] NAPTR priorities doesn't seem to work properly
Hi, I'm testing Kamailio's NAPTR resolution: version: kamailio 3.2.0-dev4 (x86_64/linux) flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB DNS related configuration: dns_servers_no=2 dns_srv_lb=yes dns_try_naptr=yes dns_use_search_list=no use_dns_cache=yes use_dns_failover=yes dns_tls_preference=1 dns_tcp_preference=1 dns_udp_preference=1 As the doc says it should respect the priorities of the NAPTR records, see http://kamailio.org/dokuwiki/doku.php/core-cookbook:3.1.x#dns_sctp_pref_dns_tcp_pref_dns_tls_pref_dns_udp_pref: To use the remote site preferences set all dns_*_pref to the same positive value (e.g. dns_udp_pref=1, dns_tcp_pref=1, dns_tls_pref=1, dns_sctp_pref=1) So my kamailio receives an INVITE for an external domain oversip.net (no transport param neither port in the RURI) and does a t_relay. Request RURI is sip:q...@oversip.net. According to NAPTR: ~$ host -t naptr oversip.net oversip.net has NAPTR record 5 50 S SIPS+D2T _sips._tcp.oversip.net. oversip.net has NAPTR record 10 50 S SIP+D2T _sip._tcp.oversip.net. oversip.net has NAPTR record 20 50 S SIP+D2U _sip._udp.oversip.net. oversip.net has NAPTR record 40 50 S SIP+D2S _sip._sctp.oversip.net. oversip.net has NAPTR record 50 50 S SIPS+D2S _sips._sctp.oversip.net. So it should try TLS over TCP first, if it fails try TCP and if it fails try UDP. However it just uses UDP, why?? Even if I set a minor value to dns_tls_preference (so higher priority I expect) it still uses UDP. Am I doing something wrong? Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR priorities doesn't seem to work properly
2011/6/9 Iñaki Baz Castillo i...@aliax.net: So as my domain oversip.net has no entries with same order, preference value doesn't matter. And of course, SIP over TLS should take preference. Also my SRV records are ok (using other SIP clients they choose TLS first): $ host -t srv _sips._tcp.oversip.net. _sips._tcp.oversip.net has SRV record 1 80 9091 sip1.oversip.net. $ host -t a sip1.oversip.net. sip1.oversip.net has address 91.121.79.216 -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR priorities doesn't seem to work properly
2011/6/9 Iñaki Baz Castillo i...@aliax.net: According to NAPTR: ~$ host -t naptr oversip.net oversip.net has NAPTR record 5 50 S SIPS+D2T _sips._tcp.oversip.net. oversip.net has NAPTR record 10 50 S SIP+D2T _sip._tcp.oversip.net. oversip.net has NAPTR record 20 50 S SIP+D2U _sip._udp.oversip.net. oversip.net has NAPTR record 40 50 S SIP+D2S _sip._sctp.oversip.net. oversip.net has NAPTR record 50 50 S SIPS+D2S _sips._sctp.oversip.net. So it should try TLS over TCP first, if it fails try TCP and if it fails try UDP. However it just uses UDP, why?? This is the Kamailio's log about DNS resolution for the above request (note that I've restarted kamailio before the request in order to clean any possible DNS cache): DEBUG: core [dns_cache.c:567]: dns_hash_find(oversip.net(11), 35), h=956 DEBUG: core [resolve.c:924]: get_record: skipping 0 NS (p=0x826fdd, end=0x826fdd) DEBUG: core [resolve.c:940]: get_record: parsing 0 ARs (p=0x826fdd, end=0x826fdd) DEBUG: core [dns_cache.c:1777]: dns_get_related(0x7f359f68db50 (oversip.net, 35), 35, *(nil)) (0) DEBUG: core [dns_cache.c:870]: dns_cache_add: adding oversip.net(11) 35 (flags=0) at 956 DEBUG: core [dns_cache.c:567]: dns_hash_find(_sip._udp.oversip.net(21), 33), h=23 DEBUG: core [resolve.c:924]: get_record: skipping 0 NS (p=0x826f0a, end=0x826f0a) DEBUG: core [resolve.c:940]: get_record: parsing 0 ARs (p=0x826f0a, end=0x826f0a) DEBUG: core [dns_cache.c:1777]: dns_get_related(0x7f359f68de08 (_sip._udp.oversip.net, 33), 33, *(nil)) (0) DEBUG: core [dns_cache.c:870]: dns_cache_add: adding _sip._udp.oversip.net(21) 33 (flags=0) at 23 DEBUG: core [dns_cache.c:2362]: dns_srv_get_nxt_rr(0x7f359f68de08, 0, 0, 1367445037): selected 0/1 in grp. 0 (rand_w=0, rr=0x7f359f68de60 p=0 w=0 rsum=0) DEBUG: core [dns_cache.c:567]: dns_hash_find(sip.oversip.net(15), 1), h=400 DEBUG: core [resolve.c:924]: get_record: skipping 0 NS (p=0x826ef1, end=0x826ef1) DEBUG: core [resolve.c:940]: get_record: parsing 0 ARs (p=0x826ef1, end=0x826ef1) DEBUG: core [dns_cache.c:1777]: dns_get_related(0x7f359f68def0 (sip.oversip.net, 1), 1, *(nil)) (0) DEBUG: core [dns_cache.c:870]: dns_cache_add: adding sip.oversip.net(15) 1 (flags=0) at 400 DEBUG: core [dns_cache.c:2982]: dns_a_resovle(sip.oversip.net, 0) returning 0 DEBUG: core [dns_cache.c:3236]: dns_srv_resolve_ip(_sip._udp.oversip.net, 0, 0), ret=0, ip=91.121.79.216 DEBUG: core [dns_cache.c:3358]: dns_sip_resolve(oversip.net, 0, 0), srv0, ret=0 As per these logs I understand that no NAPTR record is taking place, but just SRV for _sip._udp.oversip.net. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR priorities doesn't seem to work properly
2011/6/9 Iñaki Baz Castillo i...@aliax.net: Even if I set a minor value to dns_tls_preference (so higher priority I expect) it still uses UDP. By reading the doc it seems that higher values of dns_xxx_preference take preference (it's the opposite to NAPTR records order). However as I said I'm trying setting the same value for all the transports. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR priorities doesn't seem to work properly
2011/6/9 Daniel-Constantin Mierla mico...@gmail.com: I kind of lost the conclusion on your replies, is it not working as documented/expected, or still not? Sorry for so many mails. No, it doesn't work as documented or expected. Summarizing: My Kamailio is not performing NAPTR query for a Request URI sip:x...@oversip.net (no transport, no port). It just does SRV query for SIP over UDP. Kamailio info: version: kamailio 3.2.0-dev5 (x86_64/linux) flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: unknown compiled on 04:43:00 Jun 9 2011 with gcc 4.4.3 --- A MESSAGE with RURI sip:q...@oversip.net arrives (no transport param, no port), t_relay() is invoked, and kamailio just performs a SRV query for SIP over UDP (as logs show): --- DEBUG: core [dns_cache.c:567]: dns_hash_find(oversip.net(11), 35), h=956 DEBUG: core [dns_cache.c:1777]: dns_get_related(0x7f98eebec390 (oversip.net, 35), 35, *(nil)) (0) DEBUG: core [dns_cache.c:870]: dns_cache_add: adding oversip.net(11) 35 (flags=0) at 956 DEBUG: core [dns_cache.c:567]: dns_hash_find(_sip._udp.oversip.net(21), 33), h=23 DEBUG: core [dns_cache.c:1777]: dns_get_related(0x7f98eebec648 (_sip._udp.oversip.net, 33), 33, *(nil)) (0) DEBUG: core [dns_cache.c:870]: dns_cache_add: adding _sip._udp.oversip.net(21) 33 (flags=0) at 23 DEBUG: core [dns_cache.c:2362]: dns_srv_get_nxt_rr(0x7f98eebec648, 0, 0, 1616155624): selected 0/1 in grp. 0 (rand_w=0, rr=0x7f98eebec6a0 p=0 w=0 rsum=0) DEBUG: core [dns_cache.c:567]: dns_hash_find(sip.oversip.net(15), 1), h=400 DEBUG: core [dns_cache.c:1777]: dns_get_related(0x7f98eebec730 (sip.oversip.net, 1), 1, *(nil)) (0) DEBUG: core [dns_cache.c:870]: dns_cache_add: adding sip.oversip.net(15) 1 (flags=0) at 400 DEBUG: core [dns_cache.c:2982]: dns_a_resovle(sip.oversip.net, 0) returning 0 DEBUG: core [dns_cache.c:3236]: dns_srv_resolve_ip(_sip._udp.oversip.net, 0, 0), ret=0, ip=91.121.79.216 DEBUG: core [dns_cache.c:3358]: dns_sip_resolve(oversip.net, 0, 0), srv0, ret=0 My DNS related configuration in Kamailio: --- dns_try_ipv6=no dns_retr_time=1 dns_retr_no=2 dns_servers_no=2 dns_srv_lb=yes dns_try_naptr=yes dns_use_search_list=no dns_search_full_match=no use_dns_cache=yes dns_cache_init=yes use_dns_failover=yes dns_tls_preference=1 dns_tcp_preference=1 dns_udp_preference=1 --- According to the doc it should perform NAPTR query (it's compiled with USE_NAPTR as kamailio -V says, and parameter dns_try_naptr has value yes). Could somebody try to send a MESSAGE or INVITE through Kamailio 3.X with RURI sip:whate...@oversip.net? According to NAPTR/SRV records, destinations should be (in order of preference): 1) TLS 91.121.79.216:9091 2) TCP 91.121.79.216:9090 3) UDP 91.121.79.216:9090 -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR priorities doesn't seem to work properly
2011/6/9 Alex Hermann a...@speakup.nl: The way I read rfc2915, there is no failover mechanism. The application pick the first target that it supports and uses that. There is no mention of trying other records afterwards. Matching/finding NAPTR records stops once the first match is completed. All other records are discarded. From section 2: Hi Alex, two comments: 1) What you say does not explain my issue (as in any case TLS or TCP have more priority in my NAPTR's than UDP). In fact, my exact problem is that my Kamailio is not performing NAPTR query. 2) About your quoted text, indeed RFC 2915 says that. But that just means that, an application (in this case a SIP client) must take *first* the valid NAPTR record with better order (lowest value). But RFC 2915 is just about NAPTR, it can not mandate that applications or protocols cannot try other NAPTR records as failover mechanism. Any SIP client or proxy implementing NAPTR records does failover to the next NAPTR record in case the first one failed (at least those I've tested). But anyhow, my main problem is that my Kamailio is not performing NAPTR query :) Cheers. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] NAPTR priorities doesn't seem to work properly
2011/6/9 Iñaki Baz Castillo i...@aliax.net: According to the doc it should perform NAPTR query (it's compiled with USE_NAPTR as kamailio -V says, and parameter dns_try_naptr has value yes). Could somebody try to send a MESSAGE or INVITE through Kamailio 3.X with RURI sip:whate...@oversip.net? According to NAPTR/SRV records, destinations should be (in order of preference): 1) TLS 91.121.79.216:9091 2) TCP 91.121.79.216:9090 3) UDP 91.121.79.216:9090 I've tested in other Kamailio 3.X boxes, with same configuration for DNS and support for UDP and TCP. In all cases the same, Kamailio is *NOT* performing a NAPTR query. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Using =~ to get the group identifier with longest match
Hi, I wonder how feasible is the folowing: I have a regular expresion like: REGEXP = ^((1|20)|(13|3|4)|(5|6)) There are 3 matching groups: 1) (1|20) 2) (13|3|4) 3) (5|6) I want to match the RURI user, let's suppose $rU = 138787686223. In this case the above regexp matches groups 1 and 2, but since group 2 matching is longest (13 is longest than 1) I want to get value 2. In case $rU = 99 I need to get null, in case $rU = 122323 I need to get 1. AFAIK there is no way to do it with current regular expression utils in Kamailio, but maybe I miss something. Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Using =~ to get the group identifier with longest match
2011/6/6 Daniel-Constantin Mierla mico...@gmail.com: one option that comes in my mind is to break it in several if conditions, matching one group at a time, written in the order of preferences. The problem is that it would require perform N regular expression matching and such expressions will be very long (all the country prefixes in the world). The main problem is that some groups would contain prefixes starting with, for example, 12, while in other group there is the prefix 1 (an the very same in multiple cases, so doing it manually would be too much manual work and any change in the world would require hard modifications). I'm evaluating building a custom function for this purpose. Thanks. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Using =~ to get the group identifier with longest match
2011/6/6 Juha Heinanen j...@tutpro.com: perhaps you could use dialplan module. it there is overlapping regular expressions, one is selected based on its priority. Thanks. I don't need different priorities, I just need that, in case of multiple matching (i.e. ^1 , ^10) the longest matching wins. Does the dialplan module allow it? By reading the doc it seems that it's not possible, so I should need to assign lower priority to those shorter country prefixes. It could be a solution however. Thanks to both. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Using =~ to get the group identifier with longest match
2011/6/6 Henning Westerholt henning.westerh...@1und1.de: if you just want to have the longest match on a prefix tree, this is what carrierroute was build for. In case $rU = 99 I need to get null, in case $rU = 122323 I need to get 1. Its works a bit differently, but this is similar to the logic that we use. You've a bunch of specific prefixes with special routing, normal country prefixes that you want to route differently and then a default routing for the rest Thanks Henning. I do know that CR and LCR operate with longest prefix matching, but I don't want this feature now for routing purposes, but for blacklist purposes. So using dialplan module with higher priorities in longer prefixes would be valid in my case. Thanks a lot. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Using =~ to get the group identifier with longest match
2011/6/6 Henning Westerholt henning.westerh...@1und1.de: We use the userblacklist module for this, it works with the same longest prefix match logic as cr. Ops, I missed that module :) I'll take a look to it. Thanks. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Using =~ to get the group identifier with longest match
2011/6/6 Iñaki Baz Castillo i...@aliax.net: 2011/6/6 Henning Westerholt henning.westerh...@1und1.de: We use the userblacklist module for this, it works with the same longest prefix match logic as cr. Ops, I missed that module :) I'll take a look to it. Thanks. It's not valid for my custom case as I need a function returning an id of the matched groups. This is, I have various geo-zone groups: 1: Europe (prefixes of Europe) 2: North America (prefixes of North America) ... Each client has a boolean field to set permission for calls to each geo-zones. So I think it's better for me to use dialplan module and return the geo-zone id in the attrs AVP. Thanks. -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Using =~ to get the group identifier with longest match
2011/6/6 Juha Heinanen j...@tutpro.com: do both of them also support regular expressions, what inaki was asking for? Dialplan module allows setting a regular expression per table entry (by setting the column match_op to 1 (regexp). -- Iñaki Baz Castillo i...@aliax.net ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users