[SR-Users] cfg values read from Database possible?

2014-05-19 Thread Juha Heinanen
Daniel Vukicevic writes: > I am setting different cfg Parameters via XMLRPC. Which is good for > changing parameters per runtime and being independent from database > lookups when kamailio is running. > Unfortunately cfg settings will be lost and empty after Restarting > Kamailio if cfg values ar

Re: [SR-Users] mtree reload commands don't remove items from memory

2014-05-18 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Can you try with code after next commit? i tried and now mtree reload works fine. thanks, juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.si

Re: [SR-Users] mtree reload commands don't remove items from memory

2014-05-18 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I guess you are talking about master/development branch, isn't it? sorry, yes, i should have used sr-dev list. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-ro

[SR-Users] mtree reload commands don't remove items from memory

2014-05-18 Thread Juha Heinanen
i started to wonder why routing was sometimes wrong in my proxy and after studying the issue, i came to the conclusion that mtree reload commands (mi or rpc) don't remove entries from memory when they are removed from database. i started my proxy with empty mtrees db table (and empty memory table)

Re: [SR-Users] uri parameter value case sensitiveness

2014-05-16 Thread Juha Heinanen
daniel, how is kamailio doing regarding param case-insensitivity (uri_param, check_route_param functions, uri param and parameter list transformations, etc)? they should all be case-insensitive. -- juha ___ SIP Express Router (SER) and Kamailio (OpenS

Re: [SR-Users] uri parameter value case sensitiveness

2014-05-16 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Thanks for this information, clear with comparison. However, more > specific to what I am looking for: > > If I add in INVITE: > > Record-Route: > > Is allowed to the other party to set next header in BYE? > > Route: my interpretation is that that is allo

[SR-Users] uri parameter value case sensitiveness

2014-05-16 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > For a specific example, is it allowed that the value of a parameter in > contact header uri is changed to upper/lower case when building the > sequential request (so this appears in request uri)? Same would be for > Recor-Route uri parameter that would appear

Re: [SR-Users] q_malloc crash

2014-05-15 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > The issue was with previous fragment (misread the log message in the > first place). But was easy to spot what could be the previous fragment > and I think I fixed with commit: > > - > http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7992a2

Re: [SR-Users] DB select htable:mod-init doesn't work

2014-05-15 Thread Juha Heinanen
Sebastian Damm writes: > you're right, but if that was the problem, we should at least see the > second log line after the sql_query. $var(i) is used only after this. are you saying that sql_query() never returns? -- juha ___ SIP Express Router (SER)

[SR-Users] DB select htable:mod-init doesn't work

2014-05-15 Thread Juha Heinanen
Sebastian Damm writes: > event_route[htable:mod-init] { > xlog("L_NOTICE", "Loading Carrier domains into Hash table.\n"); > sql_query("ser", "select domain_name from carrier_domains", > "domains"); > xlog("L_NOTICE", "Loaded from database...\n"); > while($var(i)<$db

Re: [SR-Users] q_malloc crash

2014-05-14 Thread Juha Heinanen
there was one more crash during the night caused by the same invite from attacker. i reproduced the tel2sip call that my sip proxy runs, but i didn't get the crash: $ru = "tel:00441212792194"; $avp(from_uri) = "sip:210.125.64.233"; xlog("L_INFO", "tel2sip $ru, $(avp(from_uri){uri.host

Re: [SR-Users] q_malloc crash

2014-05-14 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > What version are you using? this is version 4.1 taken from git on may 12. > It looks like a buffer overflow somewhere. Can you give the output of > next commands in gdb: > > frame 3 > p *f i got this: (gdb) frame 3 #3 0x08179f86 in qm_debug_frag (qm=0xb6de

[SR-Users] q_malloc crash

2014-05-14 Thread Juha Heinanen
i just noticed that my proxy had crashed on invite request from attacker: May 14 22:03:06 sars /usr/sbin/sip-proxy[10932]: INFO: INVITE by untrusted from <210.125.64.233> May 14 22:03:06 sars /usr/sbin/sip-proxy[10932]: : [mem/q_malloc.c:159]:\ qm_debug_frag(): BUG: qm_*:

Re: [SR-Users] Need an explanation of the contents of the LCR gw_uri_avp for replacement I am making to some of the functionality of the LCR module

2014-04-29 Thread Juha Heinanen
Will Ferrer writes: > gw_index | scheme | strip | prefix | tag | ip_addr | hostname | port | > params | transport | flags > > Most of these things are clearly retrievable from the DB (just look at the > lcr_gw table and you will see the values there) but I found 2 things worthy > of note: > > 1)

[SR-Users] LCR from_uri help

2014-04-28 Thread Juha Heinanen
just to complete this thread, it turned out that from uri matching didn't happen because load_gws() was called without caller uri argument. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org

[SR-Users] Presence request authentication

2014-04-28 Thread Juha Heinanen
Muhammad Shahzad writes: > The main server manages SIP register, calls, messages and so, however it > does not support presence at all. It returns SIP response "405 Method Not > Allowed" for any SIP PUBLISH, SUBSCRIBE or NOTIFY. > > The presence server is a Kamailio server, which unfortunately ha

Re: [SR-Users] $(hdr(name)[N]) question

2014-04-28 Thread Juha Heinanen
Juha Heinanen writes: > are used all over the place and it would thus not be a good idea to edit > them. perhaps adding a new ones: > > #define PV_HDR_DELIM ", " > #define PV_HDR_DELIM_LEN (sizeof(PV_HDR_DELIM) - 1) > > would be ok. in the above ", " s

Re: [SR-Users] $(hdr(name)[N]) question

2014-04-28 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > >> I guess the $hdr(X[*]) uses comma-space for separation (haven't checked > >> the sources). In your example, the second header test has two values in > >> one line and $hdr(...) is simply returning all of them. > > since there is no need for space, it should no

Re: [SR-Users] $(hdr(name)[N]) question

2014-04-28 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I guess the $hdr(X[*]) uses comma-space for separation (haven't checked > the sources). In your example, the second header test has two values in > one line and $hdr(...) is simply returning all of them. since there is no need for space, it should not be there

Re: [SR-Users] Double attempt to record-route

2014-04-27 Thread Juha Heinanen
Alex Balashov writes: > I wonder what happens if you add a Record-Route header manually in the > branch_route, with append_hf(), e.g. > > append_hf("Record-Route: \r\n"); that would work, but is not that simple due to all kinds of r-r params and socket that depend on many things. but it lo

[SR-Users] Need an explanation of the contents of the LCR gw_uri_avp for replacement I am making to some of the functionality of the LCR module

2014-04-26 Thread Juha Heinanen
Will Ferrer writes: > I have found you can overwrite the contents of the gw_uri_avp (default: > $avp(i:709)) substitute this function call. However I am a bit unclear > about what goes in this avp. I was wondering if any one knew of a place I > could find this information. gw_uri_avp is internal

Re: [SR-Users] No secure attributes from rtpengine in SRTP/RTP bridge mode

2014-04-26 Thread Juha Heinanen
Alexey Rybalko writes: > There is no such attribute in SDP payload from the latest Mozilla (v.29). > > v=0 > o=Mozilla-SIPUA-29.0 371 0 IN IP4 0.0.0.0 > s=SIP Call > t=0 0 > a=ice-ufrag:083b4837 > a=ice-pwd:dac461d48770be5e1dae6c450e144bf3 > a=fingerprint:sha-256 > C3:AA:DB:75:D7:60:FC:B6:94:A7:8

Re: [SR-Users] LCR from_uri help

2014-04-25 Thread Juha Heinanen
Geoffrey Mina writes: > What can I do to debug this? I checked and we aren't seeing any of the > "failed to compile regex" errors in the logs. We have 4 servers that are > all displaying the same behavior (read: ignoring the from_uri match on a > lower priority). you didn't answer if this issue

[SR-Users] $(hdr(name)[N]) question

2014-04-25 Thread Juha Heinanen
Juha Heinanen writes: > wiki was this related to $(hdr(name)[N]): > > If [N] is omitted then the body of the first header is printed. The > first header is got when N=0, for the second N=1, a.s.o. In case of a > comma-separated multi-body headers, it returns all the bo

[SR-Users] $(hdr(name)[N]) question

2014-04-24 Thread Juha Heinanen
wiki was this related to $(hdr(name)[N]): If [N] is omitted then the body of the first header is printed. The first header is got when N=0, for the second N=1, a.s.o. In case of a comma-separated multi-body headers, it returns all the bodies, comma-separated. i don't understand the last s

[SR-Users] test if record_route() has been called already?

2014-04-23 Thread Juha Heinanen
is there any means to test if record_route() has been called already on the request? if it is called more than once, error message is issued. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.

Re: [SR-Users] LCR from_uri help

2014-04-23 Thread Juha Heinanen
Geoffrey Mina writes: > Right now, I would think that with our Priority of 0 on the route with the > from_URI match, the algorithm should always look at that one first and > route the calls accordingly. > > Since we have the priority correctly set to evaluate in the order we want, > what next can

Re: [SR-Users] LCR from_uri help

2014-04-22 Thread Juha Heinanen
Geoffrey Mina writes: > OK. WE have made a change so that the priority is 0 for the route that has > the from_uri. We are still not seeing this route get matched > properly. i tried to say that from uri plays no role in your lcr setup, because +1 matches both rules 31 and 5. if you want it mat

[SR-Users] LCR from_uri help

2014-04-21 Thread Juha Heinanen
Geoffrey Mina writes: > The LCR module is behaving in a way that is inconsistent with our old 1.5 > versions. We have a customer that passes a certain caller-id. That > from_uri should be routing over a specific trunk. Here are the relevant > bits of the LCR data from kamcmd. > > I would expec

Re: [SR-Users] event_route[tm:branch-failure] question

2014-04-18 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > well, $branch is actually not dealing with r-uri branch in > request_route. branch_route deals with current branch in tm, which can > be an additional branch to the r-uri and $branch() with proper index > should work to retrieve the details. But it might not b

Re: [SR-Users] event_route[tm:branch-failure] question

2014-04-18 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > The $branch(...) var might need to be extended for instance. Also, not > sure it gets the right values in branch_route... but it is a way to try > if you haven't done it already. according to wiki, $branch only deals with additional branches, not the main bran

Re: [SR-Users] event_route[tm:branch-failure] question

2014-04-18 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > As an option to implement now, try using hash table to store attributes > using keys like: > > $sht(t=>$T(id_label)::$T(id_index)::$T(branch_index)::ru) = $ru; > $sht(t=>$T(id_label)::$T(id_index)::$T(branch_index)::du) = $du; > ... > > Then use them to create

Re: [SR-Users] event_route[tm:branch-failure] question

2014-04-17 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I pushed a patch to mater, can you try it? If ok, you can backport it > as you need. i tried and now $T(branch_index) is ok also in branch-failure route. thanks, -- juha ___ SIP Express Router (SER) and Kamailio (Op

Re: [SR-Users] event_route[tm:branch-failure] question

2014-04-17 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Can you print also the htable key to see which of its values are not > set? Like: > > xlog("key is: t=>$T(id_label)::$T(id_index)::$T(branch_index)::ru\n"); > > in both places. Apr 17 17:06:23 siika /usr/sbin/sip-proxy[5957]: INFO: Key in branch route is: t=

Re: [SR-Users] event_route[tm:branch-failure] question

2014-04-16 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > It would require C coding to get it nicely, I see three options: > - try to get the values as in branch_route -- seems complex at first look > - try to get the values via $T_branch(attr) -- sounds simpler now > - try to get a function t_reuse_branch() -- create a

Re: [SR-Users] event_route[tm:branch-failure] question

2014-04-16 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Why would you need all attributes of the branch that just failed, do you > want to send the request to the same destination again? that is exactly the requirement. the idea is to assign some avps/branch flags differently so that mediaproxy-offer in branch rout

Re: [SR-Users] event_route[tm:branch-failure] question

2014-04-16 Thread Juha Heinanen
Hugh Waite writes: > As you and Daniel saw from the code, I replicated the behaviour of the > 'failure-route' but with the current branch index. I didn't deliberately > choose the behaviour of $ru etc. so I'm happy with it being classed as a bug > if that's what's expected in this situation. > >

[SR-Users] [sr-dev] RFC: updating default values

2014-04-16 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > - default private memory is 4MB - if the config is not that small, it > might not be sufficient free pkg to play with (e.g., for sql_query() > result, storage of $var(...) values). Should it be increased to 8MB or > other value? Debian/Centos have startup scri

Re: [SR-Users] event_route[tm:branch-failure] question

2014-04-14 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > To get the branch attributes, the code should be similar to execution of > failure_route. In failure_route, the attributes are taken from winning > branch. In branch-failure, the attributes should be taken from current > branch. But in both cases is dealing wi

Re: [SR-Users] event_route[tm:branch-failure] question

2014-04-14 Thread Juha Heinanen
daniel, what would it take to make append_branch() call in branch-failure route to re-create the branch of the corresponding branch route? is that currently possible by any means? if not, what new stuff would need to be introduced? -- juha ___ SIP Ex

Re: [SR-Users] event_route[tm:branch-failure] question

2014-04-14 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Flags needs to be re-sync'ed on the other hand: > http://kamailio.org/docs/modules/stable/modules/tmx.html#idp24432 could that function be used as a model to re-sync also other transaction attributes? on the other hand, we have been discussing here branch attri

Re: [SR-Users] event_route[tm:branch-failure] question

2014-04-14 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > The fix (or a new option to run if the current behavior was wanted by > developer) is to run branch-failure with the attributes from outgoing > request of the branch (not the incoming request, as it is now). i got it now. in my opinion, attributes of branch-f

Re: [SR-Users] event_route[tm:branch-failure] question

2014-04-14 Thread Juha Heinanen
i called t_newtran() also when request came from proxy itself and after that $ru was aor, not contact uri, in branch-failure route also during the second iteration. so somehow calling t_newtran() before t_relay() breaks branch-failure route. it would be nice to get it fixed. -- juha ___

Re: [SR-Users] event_route[tm:branch-failure] question

2014-04-14 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Print $ru before the function that creates the transaction (t_relay() or > t_newtran() in config) and see if they are the same for the two cases. > If yes, then you have to look inside tm code for this event route -- I > am not the developer of this features,

Re: [SR-Users] event_route[tm:branch-failure] question

2014-04-14 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Incoming request is stored in transaction with all the changes done in > request_route until the transaction is created. A matter of what was the > r-uri at the moment of creating transaction, you will retrieve it in the > tm specific routing blocks when such

Re: [SR-Users] event_route[tm:branch-failure] question

2014-04-14 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I guess the event route is executed with the incoming request. I would > expect to have there the branch attributes, but I haven't developed the > feature. it would be important to get access to branch attributes in branch-failure event route so that when appe

[SR-Users] event_route[tm:branch-failure] question

2014-04-13 Thread Juha Heinanen
i did some more tests and got very puzzling result. this time i tested with 488 response, but response code does not matter. sip proxy forwards invite based on location lookup to contact of registered local user: Apr 14 09:13:33 siika /usr/sbin/sip-proxy[8001]: INFO: INVITE is to local user A

[SR-Users] event_route[tm:branch-failure] question

2014-04-13 Thread Juha Heinanen
in branch route i execute: t_on_branch_failure("contact"); xlog("L_INFO", "Routing $rm <$ru> to contact\n"); and in branch_failure route i have: event_route [tm:branch-failure:contact] { if (t_check_status("486")) { xlog("L_INFO", "Got 486 response to <$ru>\n");

[SR-Users] about tls client certificates

2014-04-11 Thread Juha Heinanen
i read tls code and docs more carefully and found that if tls server is configured like this: [server:default] verify_certificate = yes require_certificate = no tls_method = SSLv23 private_key = /etc/sip-proxy/certs/sip-proxy/key.pem certificate = /etc/sip-proxy/certs/sip-proxy/cert.pem ca_list =

[SR-Users] about tls client certificates

2014-04-10 Thread Juha Heinanen
while doing some tls tests, i noticed that if tls.cfg has a section like this [server:default] verify_certificate = no require_certificate = no tls_method = SSLv23 private_key = /etc/sip-proxy/certs/sip-proxy/key.pem certificate = /etc/sip-proxy/certs/sip-proxy/cert.pem ca_list = /etc/ssl/certs/ca

Re: [SR-Users] LCR

2014-04-10 Thread Juha Heinanen
Keith writes: > I am having issues with trying to use multiple lcr_ids so I can route to > different groups. When I reload lcr it always only shows one group. I have > copied the first group exactly and just changed the number but can't work > out why it's not working. check lcr_count module para

Re: [SR-Users] $sel(tls.peer.subject.cn) error

2014-04-10 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Note that there should be direct pv alternative, as I could see in the > module, such as $tls_peer_subject_cn -- see tls_pv structure inside > tls_select.c file of the tls module. Not sure if they were documented > somewhere. those seem to work without modify

Re: [SR-Users] $sel(tls.peer.subject.cn) error

2014-04-10 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > the $sel(...) should work, I wonder if selects can add themselves > dynamically at runtime, so 'peer' is only when a tls connection is > established. Can you try with other selects pointing to own certificate, > iirc should be like: $sel(tls.my.subject.cn)? i

[SR-Users] $sel(tls.peer.subject.cn) error

2014-04-10 Thread Juha Heinanen
i have these two lines in config: $var(common_name) = @tls.peer.subject.cn; $var(common_name) = $sel(tls.peer.subject.cn); the latter gives error at startup: 0(24214) ERROR: [select.c:316]: resolve_select(): Unable to resolve select 'tls' at level 0 0(24214) ERROR: [select.c

Re: [SR-Users] SIP client TCP behaviour

2014-04-07 Thread Juha Heinanen
Alex Balashov writes: > Yeah, but my Kamailio already defaults to UDP. It means I have to do > extra work to override this preference. Since the next hop is opaque to > the client, why should it have a say in choosing the transport used to > reach it? Why should it care? it should not care exc

Re: [SR-Users] uac_replace_from

2014-04-07 Thread Juha Heinanen
i'm not sure if uac_replace_from is a proper tool for anonymizing a call. it is not enough that you anonymize initial invite. you also have to handle in-dialog requests from the caller. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-

Re: [SR-Users] Kamailio with rtpproxy-ng and mediaproxy-ng: Error rewriting SDP

2014-04-06 Thread Juha Heinanen
Olli Heiskanen writes: > Thanks, I'll look into the rtpengine, had a busy weekend but next week I'll > have better time. what comes to peter's slideshare failure_route example, i think it only works in very simple unrealistic scenario when there is no forking or serial routing. also, its nathelp

Re: [SR-Users] Kamailio with rtpproxy-ng and mediaproxy-ng: Error rewriting SDP

2014-04-04 Thread Juha Heinanen
Olli Heiskanen writes: > if ( sdp_get_line_startswith("$avp(mline)", "m=") ) { > if ($avp(mline) =~ "SAVPF") { in order to simplify the above, how about introducing a new function sdp_with_transport_like(transport)? that function would return 1 if string of the param is included in the transport

Re: [SR-Users] Regarding Websocket module

2014-04-02 Thread Juha Heinanen
Premchandiran writes: > Not able to find libunistring-dev rpm for Linux 2.6.18-274.el5. almost 4 > hours I am searching for the rpm. switch to debian, -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists

Re: [SR-Users] XMLRPC problem

2014-04-01 Thread Juha Heinanen
Kelvin Chua writes: > i was able to apply the RET_ARRAY fix to htable.dump in 4.0.5 > however unable to share the patch as htable_rpc[] is nowhere to be found on > trunk > was there any changes from 4.0.x to trunk with regards to rpc? see rpc_export_t htable_rpc[] = { {"htable.dump", hta

[SR-Users] loose_route() problem

2014-04-01 Thread Juha Heinanen
i figured out why loose_route() did not work as expected. it is because the party that sent the bye, had messed up its request uri and replaced the host:port of remote target with host:port of the proxy causing loose_route() to work in strict mode. teaching: if you see these headers in a request

[SR-Users] loose_route() problem

2014-04-01 Thread Juha Heinanen
my proxy is listening at udp/tcp ip:port 192.98.102.30:5060 and my script has this for in-dialog requests: route [IN_DIALOG_REQUEST] { # handle in-dialog request if (!loose_route()) { xlog("L_INFO", "Loose route failed on $hdr(route)\n"); ... exit; }; xlog("L_

[SR-Users] XMLRPC problem

2014-03-30 Thread Juha Heinanen
Kelvin Chua writes: > i am currently having problems on xmlrpc > i am using node-xmlrpc and it fails when htable.dump returns more than 1 > row. > i raised this issue on the node-xmlrpc group and this is the explanation i > got. > > Each node inside is supposed to only have one child node, > so

Re: [SR-Users] Kamailio + TLS

2014-03-20 Thread Juha Heinanen
Adrian writes: > Yes, but i dont understand. It's something with tls module? read again: Mar 13 11:35:27 server /usr/sbin/kamailio[3827]: ERROR: tls [tls_domain.c:417]: load_cert(): TLSs: Unable to load certificate file '/etc/certs/demoCA/ps.sip.uniza.sk/cert.pem' -- juha ___

[SR-Users] Kamailio + TLS

2014-03-20 Thread Juha Heinanen
Adrian writes: > Hi. I have configured Kamailio with Websockets. I want to add TLS. I > generated certifikates with openssl and configured tls.cfg. But when i try > to run kamailio, it gives me error, failed to start. > This my syslog . Can anybody help me > please?

Re: [SR-Users] Does tls/wss actually work or What is required for tls/wss

2014-03-19 Thread Juha Heinanen
Peter Dunkley writes: > There is an example websocket.cfg in the examples directory in Git. Have > you tried using this? peter, regarding the example, i noticed today that i had to make a small change to it in order to cope with hhtp get from my firefox browser: if ($hdr(Upgrade)=~"web

[SR-Users] error messages from pv functions

2014-03-17 Thread Juha Heinanen
in order to avoid scripting errors, it would be nice if pv functions would return an error message when applied to non-applicable pvs. for example, pv_isset() and pv_unset() applied on a script variable. -- juha ___ SIP Express Router (SER) and Kamaili

Re: [SR-Users] bug in textops module

2014-03-14 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > > i didn't understand. if i'm not using rpid related siputils functions > > that deal with avps, why am i required to load pv module? > looking strictly to that, you are not, set the rpid related parameter > > to "". it should be the other way around, i.e., the

Re: [SR-Users] bug in textops module

2014-03-14 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > However, so far dependencies in the readme were listing the modules to > which are internal bindings to access their functions/values. In this > case is no direct binding from siputils to pv. The pv framework is in > the core and it is what siputils uses, but

Re: [SR-Users] bug in textops module

2014-03-14 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Is it really about textops module, because the logs are from siputils, > or I am missing something obvious? sorry, my bad. it was late in the evening and i wrote wrong module name. it is siputils where the bug is. -- juha

[SR-Users] bug in textops module

2014-03-14 Thread Juha Heinanen
according to textops readme: 2.1. Kamailio Modules The following modules must be loaded before this module: * sl -- Stateless replies. however, i get these errors if pv module is not loaded before textops module: Mar 14 10:14:52 wheezy1 sip-proxy[4707]: ERROR: [pvapi.c:790]: pv_parse_

Re: [SR-Users] Routing based on destination and source

2014-03-12 Thread Juha Heinanen
Keith writes: > I am looking for the best module to route calls based on the authenticated > user that call came from and the destination number. Is there any current > module to do this? lcr module allows selection of gateways based on those two entities. see readme. -- juha __

Re: [SR-Users] how to get value of route param?

2014-03-10 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > this should work, provided you use $sel(rr.uri) -- iirc, transformations > cannot be applied directly to @xyz $sel(rr.uri.params) didn't produce anything. i ended up with this: $(route_uri{uri.param,name}); -- juha __

[SR-Users] how to get value of route param?

2014-03-09 Thread Juha Heinanen
rr module has check_route_param(re) function that can be used to check if local route header has a param that matches re. however, there does not exist a function to find out what is the value of a given rr param. for example, if route header has param ;param=foo, how to extract value foo of param

Re: [SR-Users] geoip crash

2014-03-05 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > you can make the diff between master and 4.1 branches for geoip module - > there were no other changes iirc. Or wait for the new release, I am > going to backport anyhow. i saw that you had backported the patches to 4.1. i tried with latest 4.1 and didn't get

Re: [SR-Users] invalid xmlrpc response from pkg.stats?

2014-03-04 Thread Juha Heinanen
i found the reason why pkg.stats result is not returned as an array: RET_ARRAY flag was missing from the export. pkg.stats export needs to be defined like this: rpc_export_t kex_pkg_rpc[] = { {"pkg.stats", rpc_pkg_stats, rpc_pkg_stats_doc, RET_ARRAY}, {0, 0, 0, 0} }; i'll

Re: [SR-Users] geoip crash

2014-03-04 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > You don't have the two patches, on master, the code there is: > > default: /* cc */ > if(gpv->item->r.record==NULL) > return pv_get_null(msg, param, res); > return pv_geoip_get_strzval(msg, param, res, >

Re: [SR-Users] invalid xmlrpc response from pkg.stats?

2014-03-04 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Perhaps the responses for xmlrpc have to be reviewed. I am not sure it > can be fixed all in xmlrpc module or commands have to be reviewed as well. > > What comes in my mind now, for a solution in xmlrpc module, is to wrap > always the data in the response in

Re: [SR-Users] geoip crash

2014-03-04 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Can you give here what is in your file geoip_pv.c at line 334? I find > there a return that should not be a reason for crash. Be sure you have > the two patches done lately to the module. i may have lost what is going on, but i do have return statement on that

[SR-Users] invalid xmlrpc response from pkg.stats?

2014-03-04 Thread Juha Heinanen
i tried make xmlrpc query on pkg.stats, but my xmlrpc lib was not able to parse the response (below). according to xmlrpc spec: The body of the response is a single XML structure, a , which can contain a single which contains a single which contains a single . according to the spec is s

Re: [SR-Users] geoip crash

2014-03-04 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I pushed more safety checks for this case. Can you give it another try > with the patch from the master (along with the older one)? didn't help, still crashing. -- juha (gdb) where #0 pv_get_geoip (msg=0xb72206a4, param=0xb6fcfce4, res=0xbfc0367c) at geoip_

[SR-Users] sqlops crash after out of memory

2014-03-03 Thread Juha Heinanen
pkg memory run out here: Mar 4 09:00:20 localhost /usr/sbin/sip-proxy[31923]: ERROR: sqlops [sql_api.c:318]: sql_do_query(): no more memory then sip proxy crashed here: (gdb) where #0 0xb5fce89b in sql_reset_result (res=0xb6ce3438) at sql_api.c:233 #1 0xb5fd18db in sql_do_query (con=0xb6cd1e

Re: [SR-Users] geoip crash

2014-03-03 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > No, but you can do it and if all goes fine, it can be pushed to remote > repository. I don't have a geoip deployment at hand these days. i backported the patch to my 4.1 source and still got a crash (i don't remember if this is the same or new one). -- juha P

Re: [SR-Users] geoip crash

2014-03-03 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Not clear for me -- have you tested with 4.1 and all is ok? i thought that you didn't cherry pick the commit to 4.1 yet. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@li

Re: [SR-Users] geoip crash

2014-03-01 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I just pushed a patch to master, but I didn't have the geoip libs > installed, thus no test. > > If everything is ok, you can backport at your convenience, otherwise I > will do it when I get the first chance. i tried and noticed that i don't have a working m

Re: [SR-Users] geoip crash

2014-02-26 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Can you send the backtrace? Getting geo db and setting up a testing > environment to reproduce takes time. below, juha (gdb) where #0 pv_get_geoip (msg=0xb722976c, param=0xb6fe3778, res=0xbf8e7c9c) at geoip_pv.c:329 #1 0x080d7714 in pv_get_spec_value (ms

[SR-Users] geoip crash

2014-02-26 Thread Juha Heinanen
i made a typo in my script and $gip(src=>cc) was referenced before geoip_match() call. the reference resulted in crash. to reproduce, execute statement $var(test) = $gip(src=>cc); as first thing in your script. -- juha ___ SIP Express Router (SER) an

[SR-Users] 500 Forking capacity exceeded (12/SL)

2014-02-22 Thread Juha Heinanen
Camila Troncoso writes: > If one gateway is full, busy, down or answers with any failed response to > LCR , I jump to the next gateway in the list. I´m presenting the problem > that its stops jumping after 12 gateways and returns the message 500 > Forking capacity exceeded (12/SL). I need to incr

Re: [SR-Users] Memory leak in http_query() function (utils module)

2014-02-18 Thread Juha Heinanen
Guillaume Bour writes: > Hi Juha, here it is thanks, i just committed the patch. -- 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-

Re: [SR-Users] Memory leak in http_query() function (utils module)

2014-02-17 Thread Juha Heinanen
Guillaume Bour writes: > Can't you directly apply my patch on 4.0 branch ? i can if you send me all changes in one patch. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.si

[SR-Users] Memory leak in http_query() function (utils module)

2014-02-14 Thread Juha Heinanen
Guillaume Bour writes: > I attached patches to fix those issues (applies to 4.0 branch) thanks for the patch. since it was for 4.0 i had to manually apply the changes to master and then i did cherry pick to 4.1. cherry pick to 4.0 failed. -- juha __

Re: [SR-Users] LCR help

2014-01-25 Thread Juha Heinanen
Pete Ashdown writes: > Thank you Juha. I'm muddling through this. One thing that is puzzling > to me is that LCR entries are ranked by weight and priority, both > integers. When I have a rate deck of costs like .003211 per minute per > prefix, translating thousands of those to integers between

[SR-Users] LCR help

2014-01-22 Thread Juha Heinanen
Pete Ashdown writes: > 2) How do I populate the rest of the LCR database? It appears that > using "kamctl lcr" has been depreciated. Am I supposed to use Siremis? > Is there any way to do this via shell? Does anyone have any scripts > that digest csv rate decks from trunkers into the db for cr

[SR-Users] gateway authentication with the lcr module

2014-01-07 Thread Juha Heinanen
Rene Montilva writes: > is there any option with lcr module to authenticate gateways with digest > method for outbound calls?, or whats the best practice for that > scenario. lcr module does have capability to authenticate outbound calls. -- juha ___

[SR-Users] tag column on address table

2014-01-04 Thread Juha Heinanen
Kelvin Chua writes: > is the peer_tag_avp used on allow_source_address_group? based on fast scan of permissions module source, it appears that peer_tag_avp is set only by allow_trusted function. -- juha ___ SIP Express Router (SER) and Kamailio (OpenS

[SR-Users] How can I block friendly-scanner?

2013-12-30 Thread Juha Heinanen
Visetel LLC writes: > I added the following rules on iptables, but it does not work. might be easier to use fail2ban and let it deal with iptables. -- juha ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-

Re: [SR-Users] kamailio presence server becomes unresponsive

2013-12-26 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I looked quickly over the code and it seems that in 4.0 there are some > error cases when an acquired lock is not released. yes, there was a few error and done goto cases where lock was not released. hopefully i caught them all. if i don't see any objections,

[SR-Users] kamailio presence server becomes unresponsive

2013-12-23 Thread Juha Heinanen
Juha Heinanen writes: > file http://box.tutpro.com/tmp/gdb_kamailio_20131223_145323 contains gdb bt > of all presence server processes when presence server is not responding to > any new requests. looks like several processes are in futexlock.h if that > tells something. >

[SR-Users] kamailio presence server becomes unresponsive

2013-12-23 Thread Juha Heinanen
file http://box.tutpro.com/tmp/gdb_kamailio_20131223_145323 contains gdb bt of all presence server processes when presence server is not responding to any new requests. looks like several processes are in futexlock.h if that tells something. this is with kamailio 4.0. -- juha __

Re: [SR-Users] kamailio presence server becomes unresponsive

2013-12-23 Thread Juha Heinanen
Klaus Darilion writes: > utils/kamctl: new command 'trap' > - useful to get a full bt dump of all kamailio processes > - handy in dead-lock investigatigations klaus, thanks for the pointer. i pulled out shell script from it (below). it would be still nice to know how kamailio is dispatchin

<    1   2   3   4   5   6   7   8   9   10   >