Re: [SR-Users] CNXCC Max Call control on Version 4.1.4
Hi Jonathan, Cnxcc was heavily updated a couple of months ago, so I suggest you update your copy and let me know if the update fixes this bug. Regards, Carlos On Feb 20, 2015 8:45 AM, Jonathan Hunter hunter...@hotmail.com wrote: Hi Guys, Using kamailio Version 4.1.4 on Centos 6.5 I have an issue when using cnxcc to control max call duration for all outbound calls. In my configuration I set the following; # -Dialog params - modparam(dialog, dlg_flag, 4) modparam(cnxcc, dlg_flag, 4) modparam(cnxcc, credit_check_period, 1) Then I look to set some parameters for outbound calls; ###Set Max Call Duration for MT Call # $var(customer) = MTPublic; $var(max_time) = $var(MTMaxCallDuration); xlog(L_INFO,For setting Call Duration we have ProfileID=$var(profileIDMD) and we have var(max_time)=$var(max_time)\n); cnxcc_set_max_time($var(customer), $var(max_time)); xlog(L_INFO,Max Call duration set to $var(max_time) seconds\n); Feb 20 14:20:26 voip01 /usr/sbin/kamailio[1950]: INFO: script: Max Call duration set to 600 seconds Feb 20 14:20:35 voip01 /usr/sbin/kamailio[1960]: ALERT: cnxcc [cnxcc_check.c:157]: check_calls_by_time(): [74d7c02e-33ae-1233-edba-005056a48754] call has exhausted its time. Breaking the loop Feb 20 14:20:35 voip01 /usr/sbin/kamailio[1960]: INFO: script: [74d7c02e-33ae-1233-edba-005056a48754]: call killed as Max Call Duration Expired Feb 20 14:20:35 voip01 /usr/sbin/kamailio[1960]: ERROR: cnxcc [cnxcc_mod.c:1068]: terminate_call(): Error executing dlg_end_dlg command. Return code was [404] Now as you can see, as soon as the Called party answers, the cnxcc module drops the call stating that Max Call duration has expired, however it was set to 600 seconds. If I restart kamailio this clears the issue and it works fine allowing calls to run up to 600 seconds. Any help/comment on this would be great, is it just configuration related? Thanks Jon ___ 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] usrloc: Unregister client on TCP connection close
Well, in websocket module you have the event route that's triggered when a connection is lost [1]. You wouldn't be able to use the unregister function of the registrar module, because a faked SIP message is used to trigger the event, but you can always write a custom SQL to delete the record of the location table using the socket information, to which you do have access: $si, $sp. [1] http://kamailio.org/docs/modules/stable/modules/websocket.html#websocket.e.closed Regards, Carlos On Wed, Oct 22, 2014 at 8:08 AM, Camille Oudot camille.ou...@orange.com wrote: Hi, I'm looking for a mechanism to unregister clients when the corresponding TCP connection is closed, but had no success so far. I've tried the handle_lost_tcp parameter of usrloc, but it didn't work: the user was not unregistered, whereas the connection was seen as closed by kamailio. Is it still a relevant option? Otherwise, is there any mechanism that would trigger some kind of event_route whenever a connection (TCP, TLS, WS, WSS) is lost or closed? Cheers, -- Camille ___ 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 -- Carlos http://caruizdiaz.com ___ 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] Call Group versus MAX_BRANCHES limit
Hi Daniel, would it be inappropriate to increase the branch number to the maximum possible, by default? Regards, Carlos On Tue, Sep 30, 2014 at 5:28 AM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, On 29/09/14 22:47, João Vitor Arruda wrote: Hi folks, I have a question related with the limited number of branches being 12 in config.h #define MAX_BRANCHES12 /*! maximum number of branches per transaction */ I am trying to implement a Call Group that consists in trying each member of the group (that can result in a parallel forking when lookup() is used) in sequence (similar to serial forking). Currently I have written code that is similar to the one described here: http://www.kamailio.org/dokuwiki/dokuphp/tutorials:avpops#serial_forking The only difference is that for each member I call lookup() and then in the failure_route(), I pull the next member from the stack and call lookup() again. The code works fine when used for groups with less than 12 members. However, call groups with 12 or more members fails as I can never reach remaining extensions once MAX_BRANCHES limit is reached. I've tried another approach using the functions described here: http://kamailio.org/docs/modules/4.1.x/modules/tm.html#tm.serial_forking but it too uses a new branch for every group member until the 12 limit is reached out. I also tried to use the functions remove_branch(index) and clear_branches() (both of which are poorly documented. In fact the only reference I ever found for these functions was here: http://www.kamailio.org/wiki/features/new-in-3.2.x#functions). Unfortunately, I wasn't able to prevent the MAX_BRANCHES limit from being reached. Ultimately, my goal is to have a limitless Call Group. Do you have any suggestions? (other than increasing the hard coded MAX_BRANCHES limit) the easiest is probably recompiling with more branches. There was someone saying that he is going to submit a patch on making the number of branches more dynamic, but I haven't seen it back. From routing point of view, you can try a workaround with: - append 11 branches to the same sip address (see append_branch() function) and relay - be sure you allow traffic from server itself - now you get 12 INVITE coming back to kamailio, so you get 12 INVITE requests and you can set 12 different destinations for each, ending up with 144 over-all branches in the group call - if you need more, you can loop back again one or more of those INVITE requests with branches pointing to same SIP address Cheers, Daniel -- Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda ___ 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 -- Carlos http://caruizdiaz.com ___ 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] R: Re: R: Re: RTPPROXY BRANCH
Hi Richard, this is more or less the same problem that I am experiencing. To understand it better, just assume one branch needs to do SRTP, and the other simple RTP. To make this happen, you will have to enable rtpengine differently for the same call, and this is where the crash/error happens. Regards, Carlos On Tue, Sep 30, 2014 at 2:51 AM, Marino Mileti marino.mil...@alice.it wrote: Unfortunately rtpengine doesn't work in this way. At the end of the calls this is the output log: Final packet stats: Tag 'Fw3D7R0', created 0:41 ago, in dialogue with 'TTPyT~Hdw' Media #1, port 30224192.168.10.20:7078 , 540 p, 92880 b, 0 e Media #1, port 30225192.168.10.20:7079 (RTCP), 3 p, 324 b, 0 e Media #2, port 30256192.168.10.20:9078 , 0 p, 0 b, 0 e Media #2, port 30257192.168.10.20:9079 (RTCP), 3 p, 264 b, 0 e Tag 'qWE6Gsh', created 0:41 ago, in dialogue with 'TTPyT~Hdw' Media #1, port 30140192.168.10.50:7078 , 533 p, 91068 b, 0 e Media #1, port 30141192.168.10.50:7079 (RTCP), 5 p, 444 b, 0 e Media #2, port 30170192.168.10.50:9078 , 0 p, 0 b, 0 e Media #2, port 30171192.168.10.50:9079 (RTCP), 1 p, 88 b, 0 e Tag 'TTPyT~Hdw', created 0:41 ago, in dialogue with 'Fw3D7R0' Media #1, port 30206172.20.11.208:7078 , 1070 p, 183736 b, 0 e Media #1, port 30207172.20.11.208:7079 (RTCP), 4 p, 496 b, 0 e Media #2, port 30240172.20.11.208:9078 , 4188 p, 1435946 b, 0 e Media #2, port 30241172.20.11.208:9079 (RTCP), 4 p, 400 b, 0 e 192.168.10.x clients are natted..it seems that rtpengine open 2 ports (for example video) for each receiver (30256 30170) and 1 port for the caller (30240). But on the INVITE of Kamailio only video port 30170 is offered to receivers, instead on caller side there are 2 distinct 183s message that offer 30190 30240. It's a little bit strange because some of these port doesn't appear in the log of rtpengine. At the end I can see video only on one receiver I don't know if the problem is on Kamailio (rtpproxy-ng module) or in the rtpengine :) Without rtpproxy: - A offers port a1,a2 (audio video) in INVITE to B,C (in case of no natted client so no needs of rtpproxy) - B offers port b1,b2 (183) - C offers port c1,c2 (182). - A starts to send audio/video RTP to B on port b1,b2 - A starts to send audio/video RTP to C on port c1,c2 With rtpproxy: - A offers port a1,a2 (audio video) in INVITE to Kamailio - Kamailio contact rtpproxy because BC are natted clients - rtpproxy check callid and offer offers port k1,k2 - Kamailio sends INVITE to B offering k1,k2 - Kamailio sends INVITE to C offering k1,k2 - B offers port b1,b2 (183) - C offers port c1,c2 (182) - Kamailio sends 183 to A (for B leg) offering p1,p2 - Kamailio sends 183 to A (for B leg) offering p3,p4 - A starts to stream on p1,p2,p3,p4 but only one receiver can see the video (B or C depends who will be the first:)) I don't know if it depends on that B C receives same ports; i don't know if rtpproxy is able to duplicate stream received from A to all receiver If A sends two streams, there is no need for duplication. A sending to p1 should be forwarded to B (b1) and A sending to p3 should be forwarded to C (c1). Both should be able to receive media sent by A. I believe that's what rtpengine does (but I haven't tested it). The reverse direction might be more confusing, but a final 200 OK with SDP should fix that. cheers ___ 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 -- Carlos http://caruizdiaz.com ___ 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] cnxcc serial fork
Hi Kelvin, this is an interesting scenario. I will have to reproduce it myself in order to reply you properly. Answering your question, yes, it should be updated to 200. Let me check ASAP. Regards, Carlos On Thu, Aug 28, 2014 at 4:31 AM, Kelvin Chua kel...@gmail.com wrote: hi carlos, i have a serial forking scenario to several providers as failover. and i used cnxcc_set_max_credit to control the session credit/time. just wanted to make sure it does what i think it should do so i made a little experiment. the logic goes this way. 1. cnxcc_set_max_credit - $100, cost per second - $1 2. call will fail, try the next provider 3. cnxcc_set_max_credit - $200, cost per second - $2 what i am expecting to see is, if i do kamctl kamcmd cnxcc.active_clients i would see $200 as the max_amount. but in kamailio 4.1.5, i still see $100, should it be updated to $200? is there an override in cnxcc_set_max_credit when called twice or after failure_route? Kelvin Chua ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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] CNXCC curious case
Thank you for the feedback Kelvin. On Thu, Aug 21, 2014 at 2:48 AM, Kelvin Chua kel...@gmail.com wrote: just to close this issue, it does not happen on 4.1.5 Kelvin Chua On Thu, Jul 10, 2014 at 9:26 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Hi Kevin, what are the steps to reproduce this? Also, do you have the latest update of the module? I remember fixing a deadlock that could be the root cause of this problem. Regards, Carlos On Thu, Jul 10, 2014 at 12:03 AM, Kelvin Chua kel...@gmail.com wrote: I am using cnxcc_set_max_channels and set the max channels to 1 after the 1st call goes through and hangs up, the 2nd one would be blocked even if there are no more active dialogs. could it be a dialog state issue? Kelvin Chua ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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 on Mac
Thank you for the suggestion Victor. I'll make some tests using it. Daniel, do you develop Kamailio using VMs on your Mac, or do you natively compile and run Kamailio on OS X? Thanks, Carlos On Wed, Jul 30, 2014 at 3:47 AM, Daniel-Constantin Mierla mico...@gmail.com wrote: On 30/07/14 09:50, Victor Seva wrote: On 07/27/2014 01:46 AM, Carlos Ruiz Díaz wrote: Hi all, I'm switching my development environment from Linux to Mac. Is there any tutorial on how to setup Kamailio on this OS? It may be an Unix flavor, but it's still quite different from Linux :). Maybe using docker can help you... https://docs.docker.com/installation/mac/ I see docker is installing virtualbox (if I got right the the docs at the quick look). Then, in this direction, installing a VM with linux on mac will do the job as well. I use a lot of virtualbox on mac for testing on various linux distributions when needed. On the other hand, anyone one here that has played with kamailio and docker? Any pitfalls? I noticed searching the web a reference to a kamailio docker container by guardianproject. Cheers, Daniel -- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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] Kamailio on Mac
Hi all, I'm switching my development environment from Linux to Mac. Is there any tutorial on how to setup Kamailio on this OS? It may be an Unix flavor, but it's still quite different from Linux :). Thanks, -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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] CNXCC curious case
Hi Kevin, what are the steps to reproduce this? Also, do you have the latest update of the module? I remember fixing a deadlock that could be the root cause of this problem. Regards, Carlos On Thu, Jul 10, 2014 at 12:03 AM, Kelvin Chua kel...@gmail.com wrote: I am using cnxcc_set_max_channels and set the max channels to 1 after the 1st call goes through and hangs up, the 2nd one would be blocked even if there are no more active dialogs. could it be a dialog state issue? Kelvin Chua ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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] Calls per second
Hi, do you know how the autoexpire is implemented in the htable module? If it's a timer doing the polling and checking the expiration value, it may not be ideal for your CPU do it that way. Several entries will surely impact negatively on the performance. I'm planning to implement this for cnxcc module, and I'd like to know your opinion according to the experience you have with this approach. Thanks, Carlos On Thu, Jul 3, 2014 at 7:41 AM, Alex Balashov abalas...@evaristesys.com wrote: On 07/03/2014 08:31 AM, Olle E. Johansson wrote: I really need per second, not average. I need to react FAST. That was why I picked an interval of 3. It seemed the shortest practicable interval in which to collect meaningful sampling. But if the volume of calls is so large that 1-second collection will do, simply use that as the collection interval. -- Alex Balashov - Principal Evariste Systems LLC Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/ Please be kind to the English language: http://www.entrepreneur.com/article/232906 ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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] Calls per second
Ok. Thanks Alex. On Thu, Jul 3, 2014 at 8:00 AM, Alex Balashov abalas...@evaristesys.com wrote: On 07/03/2014 08:52 AM, Carlos Ruiz Díaz wrote: Hi, do you know how the autoexpire is implemented in the htable module? If it's a timer doing the polling and checking the expiration value, it may not be ideal for your CPU do it that way. Several entries will surely impact negatively on the performance. It is implemented as a timer, unfortunately: http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a= blob;f=modules/htable/ht_api.c;h=f55e784ee4efbd6e7846f57e154068 69df3e24dd;hb=HEAD#l896 -- Alex Balashov - Principal Evariste Systems LLC Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/ Please be kind to the English language: http://www.entrepreneur.com/article/232906 ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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] RTP to SRTP encryption with Kamailio.
Hi, you are on the right track. Mediaproxy-ng/rtpengine does the conversion of SDP profiles for you, so basically, you will only need to flag the call with the right parameters and rtpengine will do the rest. Check out the webrtc example that comes with Kamailio, or my example [1]. You can use this as a starting point to understand how rptengine does the translations. And in regards of TLS, check out the tls module documentation, but in summary, you can choose to encrypt communication in one socket, and maintain clear UDP/TCP in another. Kamailio will handle the routing among the two. [1] https://github.com/caruizdiaz/kamailio-ws Regards, Carlos On Thu, Jun 26, 2014 at 3:35 AM, Dani Kamailio dani.kamai...@gmail.com wrote: Hello, I need to build a VoIP system who receives SIP and RTP traffic in a public IP and encrypt both of them with TLS and SRTP respectively. The main point is to have security inside of the local network (I know it may sound unuseful). So, I was trying to build the whole system in Kamailio but I got stucked with the RTP to SRTP bridge and I do not really know how to do it. I know that there are some modules like rtpproxy-ng and rtpengine as media relay that can handle SRTP... any ideas? I just want to make sure that I am in the right way. If it could be done in Kamailio, have I to write the code to encrypt RTP, like the algorithm or something? Would it be convenient to send the RTP packets to Asterisk? (and Asterisk would somehow encrypt them?) I am pretty new with all of this, any help will be apreciate, thank you. ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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] Disabling rtpengine abrt handler
The core file is usually stored in the working directory where the executable was invoked. Regards, Carlos On Sun, Jun 22, 2014 at 9:28 AM, Alex Balashov abalas...@evaristesys.com wrote: On 06/21/2014 10:01 PM, Richard Fuchs wrote: This is not something that rtpengine is doing. You'd have to look within your system installation/distribution, possibly here: https://access.redhat.com/site/documentation/en-US/Red_ Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-abrt.html Thanks for that, Richard. I was not aware that this was something done by the surrounding environment. -- Alex Balashov - Principal Evariste Systems LLC Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/ Please be kind to the English language: http://www.entrepreneur.com/article/232906 ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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] Disabling rtpengine abrt handler
I've been through the same problem some time ago, even with the same misleading syslog message. Turned out the core file was not where the logs said they were put, but in the exact working directory where I manually started the service. Try running rtpengine without the init.d scripts. Rtpengine has its way of daemonizing itself anyway. If you are unlucky even after doing this, maybe a standard shell find could help you. # find / -name core.pid-reported-in-the-logs -type f # find / -name core.1123 -type f On Sun, Jun 22, 2014 at 10:01 AM, Alex Balashov abalas...@evaristesys.com wrote: On 06/22/2014 10:59 AM, Carlos Ruiz Díaz wrote: The core file is usually stored in the working directory where the executable was invoked. Yeah, if it's not being caught and then mishandled by a specious endeavuor like ABRT, conceived by cretins and imbeciles. -- Alex Balashov - Principal Evariste Systems LLC Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/ Please be kind to the English language: http://www.entrepreneur.com/article/232906 ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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] CNXCC and multiple servers
Hi Kelvin, actually, it's something I wanted to do myself for like 4 months, but I haven't found the time to work on this. If you do, you are welcome to implement your idea :). I believe it's doable, and my original script was about using a proxy that should be aware of where the calls belonging to a specific client went, so it can send the calls to the right place (kamailio with cnxcc). What's your idea with dmq? Regards, Carlos On Wed, Jun 4, 2014 at 8:25 AM, Kelvin Chua kel...@gmail.com wrote: I was just playing around with the dmq module when i thought of an idea, cnxcc being able to track users across servers. cnxcc would have to be aware of dialogs created on another server. is this something doable? Kelvin Chua ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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] cnxcc
Hi Kelvin, thank you for the feedback. This will surely help others to troubleshoot their problems :). Regards, Carlos On Mon, Jun 2, 2014 at 9:49 PM, Kelvin Chua kel...@gmail.com wrote: hi guys, just to close this issue, i figured the problem only affects scenarios where dlg_manage() comes before cnxcc_set_max_credits() Kelvin Chua On Mon, May 12, 2014 at 10:00 AM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Hi, Check this commitdiff [1], it has some subtle lines of code that remove the deadlock. Rtimer is not required, it is only used in the sample configuration file to display the amount of concurrent calls and to grant more time when needed, but strictly in the business logic sense. Internally, dialog is the only module that is a dependency. [1] http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=commitdiff;h=d0f0ba702bd44524bc9f52e07341db03267b15f7 Regards, Carlos On Sun, May 11, 2014 at 9:57 AM, Kelvin Chua kel...@gmail.com wrote: hi carlos, i'm looking at the commitdiff, seems like it's just indentations http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=commitdiff;h=d0f0ba702bd44524bc9f52e07341db03267b15f7 is there something i am missing? by the way, based on the module documentation, the only dependency is the dialog module, shouldn't it include the rtimer module? is it really required? what if i would only use CNXCC_MONEY and not CNXCC_TIME or CNXCC_CHANNEL? should i still load rtimer.so before loading cnxcc.so? Kelvin Chua On Mon, Apr 28, 2014 at 9:13 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: I'm glad that it worked. Please don't forget to git pull to update your cnxcc copy. Regards, Carlos On Mon, Apr 28, 2014 at 3:17 AM, Andrzej Ciupek andrzej.ciu...@hotmail.com wrote: Hello again It works perfect, I was missing setflag(DLG_FLAG); in my main route. Thank You very much for help. Greetings Andrzej Ciupek From: andrzej.ciu...@hotmail.com To: carlos.ruizd...@gmail.com CC: sr-users@lists.sip-router.org Subject: RE: [SR-Users] cnxcc Date: Mon, 28 Apr 2014 09:54:30 +0200 Hello You are amazing !! Your example work perfect, but I have to work with mine cfg, because when I use part of Your route into my config it doesn't work like it should. I think I have some problems with dialog module, because when I start Your script I get: Apr 28 09:47:31 kamailio /usr/local/sbin/kamailio[3060]: INFO: script: dialog started I don't see it using my config, so it looks like dialog module doesn't work in my config file in proper way. I will let You know when I find a bug in my script. Now when I have working example it will be easier. Greetings Andrzej Ciupek Date: Sun, 27 Apr 2014 21:29:34 -0500 Subject: Re: [SR-Users] cnxcc From: carlos.ruizd...@gmail.com To: andrzej.ciu...@hotmail.com CC: sr-users@lists.sip-router.org Kelvin, can you update your copy and try again? Maybe your problem was related to this, or maybe not. In either case, I will try to reproduce your issue later this week :). Regards, On Sun, Apr 27, 2014 at 9:27 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Hi Andrzej, I found a deadlock situation using the script you posted, thanks to an unusual way of using the functions that the module exports. About the script itself: I found a few inconsistencies that would have caused a problem with handing the calls even if there was no bug in the software. For example: - if you want to set the maximum amount of calls per user, use the function cnxcc_set_max_channel - the call-shutdown event route is only executed if the call runs out of credit, never for normal call clearing. For that, use dialog:end or dialog:failed instead. - you cannot access $var(client) from outside the process that created it. This means that when the call is killed, $var(client) will have a NULL value since this event is processed by a completely different process. If you want to have this information available everywhere, use a shared memory variable instead ($sht). I created a sample script [1] that applies your requirements in a slightly different way: - it authorizes the call by checking the balance - it kills the call when the credit is over - it doesn't allow more than one call per customer [1] https://gist.github.com/caruizdiaz/11359122 In this example I used a shared memory variable, to give you an idea of how to persist the customer's ID across processes. Regards, Carlos - On Sat, Apr 26, 2014 at 10:34 AM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: I did find a bug, using your config script, I will fix it this weekend. Try with this configuration file [1]. [1] https
Re: [SR-Users] mediaproxy
Hi, make sure you are using the right control protocol. Check --listen-udp and --listen-ng parameters when starting mediaproxy-ng daemon. Rtpproxy-ng uses the ng protocol, rtpproxy uses the classic one. Regards, On Tue, Jun 3, 2014 at 11:56 AM, Slava Bendersky volga...@networklab.ca wrote: Hello Everyone, I am trying setup mediappoxy on the gateway and log get fill up with this message. Jun 3 12:28:11 /usr/sbin/kamailio[3595]: ERROR: rtpproxy-ng [rtpproxy.c:1425]: rtpp_test(): proxy responded with invalid response Jun 3 12:28:11 /usr/sbin/kamailio[3597]: ERROR: rtpproxy-ng [rtpproxy.c:1425]: rtpp_test(): proxy responded with invalid response Jun 3 12:17:59 mediaproxy-ng[3294]: Failed to properly parse UDP command line '3394_0 d7:command4:pinge' from 127.0.0.1:59326, using fallback RE Jun 3 12:17:59 mediaproxy-ng[3294]: Failed to properly parse UDP command line '3402_1 d7:command4:pinge' from 127.0.0.1:51867, using fallback RE [root@sipgw01 kamailio]# rpm -qa | grep kam kamailio-4.1.3-2.1.x86_64 Any help thank you Slava. ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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] JSSIP with Kamalio with SIP end points
Just proxy the authentication to their SIP providers, and let kamailio put itself in the path so it can bridge between UDP (probably) and WS transport. You can use dispatcher, carrierroute, whatever module you want. The only non-ordinary thing here are the UA's communicating via websockets, and this scenario can be handled with websockets module. Maybe this example can suit you [1]. [1] https://github.com/caruizdiaz/kamailio-ws Regards On Sat, May 31, 2014 at 7:43 AM, Steve Ng steveng.1...@gmail.com wrote: Hi, My users are from a web application using JSSIP. They each have a sip trunk account, which could be from any provider. JSSIP would connect to Kamailio's websocket server passing the SIP trunk credential information and Kamailio will relay it to that specific sip trunk provider? Is there anyway that I could use Kamailio as the middleman? Is it a combination of dispatcher module and websocket module? Thanks! Regards, Steve ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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] JSSIP with Kamalio with SIP end points
On Sat, May 31, 2014 at 9:45 AM, Steve Ng steveng.1...@gmail.com wrote: Hi, I've managed to set up WS, users with JSSIP can connect to Kamailio after reading up on the websocket module documentation. However, the proxying part of authentication to SIP provider through Kamailio is something that I need advice on (how to set in the config how). I don't know your variables, but setting Kamailio as outbound proxy for all requests coming from your webrtc UA could make the trick. Do you have any config that do something like this to share? Regards On Sat, May 31, 2014 at 10:10 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Just proxy the authentication to their SIP providers, and let kamailio put itself in the path so it can bridge between UDP (probably) and WS transport. You can use dispatcher, carrierroute, whatever module you want. The only non-ordinary thing here are the UA's communicating via websockets, and this scenario can be handled with websockets module. Maybe this example can suit you [1]. [1] https://github.com/caruizdiaz/kamailio-ws Regards On Sat, May 31, 2014 at 7:43 AM, Steve Ng steveng.1...@gmail.com wrote: Hi, My users are from a web application using JSSIP. They each have a sip trunk account, which could be from any provider. JSSIP would connect to Kamailio's websocket server passing the SIP trunk credential information and Kamailio will relay it to that specific sip trunk provider? Is there anyway that I could use Kamailio as the middleman? Is it a combination of dispatcher module and websocket module? Thanks! Regards, Steve ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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] CNXCC PrePaid module
Get the latest updates, by cloning the repository and recompiling/reinstalling it. $ git clone git://git.sip-router.org/kamailio kamailio Regards, Carlos On Mon, May 12, 2014 at 2:21 PM, Rene Montilva renemonti...@gmail.comwrote: Hi carlos, sorry my ignorance, where is it the master link? the test with only integers works perfect On Sun, May 11, 2014 at 10:48 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Yep, assignment failed because the variables contain floating point values and Kamailio does not handle well this kind of precision. I patched the module to add the check before initiating the call, it is in master. As a way of testing your code, replace those values with integer ones, like 5 and 6, and check if the call is actually terminated or even initiated. This will give you a quick diagnosis of your routing script. Regards, Carlos On Sun, May 11, 2014 at 9:04 PM, Rene Montilva renemonti...@gmail.comwrote: Hi Carlos kamailio version 4.1 El 11/05/2014 21:32, Carlos Ruiz Díaz carlos.ruizd...@gmail.com escribió: What Kamailio version are you using? On Sat, May 10, 2014 at 9:33 PM, Rene Montilva renemonti...@gmail.comwrote: Hi Carlos kamailio config: log(L_INFO, saldo:$var(credit) y seg:$var(cost_per_sec) ); if($var(cost_per_sec) $var(credit)) { sl_send_reply(402,payment required); exit; } if (!cnxcc_set_max_credit($var(client), $var(credit), $var(cost_per_sec), $var(i_pulse), $var(f_pulse))) { sl_send_reply(503, something's wrong in the server); exit; } i got this by syslog $var(credit) = 0.0005; $var(cost_per_sec) = 0.0006; #$var(credit) = $dbr(ra=[0,0]); # 30$ of credit #$var(cost_per_sec) = $dbr(ra=[0,1]); # 1$ per sec $var(i_pulse) = 1; # 1$ to establish the call $var(f_pulse) = 1; # 1$ per second if (!cnxcc_set_max_credit($var(client), $var(credit), $var(cost_per_sec), $var(i_pulse), $var(f_pulse))) { sl_send_reply(402, Sin saldo PAPA); xlog(Error setting up credit control); exit; } /usr/sbin/kamailio[13336]: INFO: script: Setting up money based credit control /usr/sbin/kamailio[13336]: INFO: script: saldo:0.0005 y seg:0.0006 /usr/sbin/kamailio[13336]: WARNING: core [rvalue.c:1016]: rval_get_int(): automatic string to int conversion for 0.0005 failed /usr/sbin/kamailio[13336]: WARNING: core [rvalue.c:1920]: rval_expr_eval_int(): rval expression conversion to int failed (707,17-707,17) /usr/sbin/kamailio[13336]: WARNING: core [rvalue.c:1016]: rval_get_int(): automatic string to int conversion for 0.0006 failed /usr/sbin/kamailio[13336]: WARNING: core [rvalue.c:1920]: rval_expr_eval_int(): rval expression conversion to int failed (707,19-707,36) it still established the call with the function, kamailio doesn't evaluate the variable if($var(cost_per_sec) $var(credit)) { sl_send_reply(402,payment required); exit; } On Fri, May 9, 2014 at 4:41 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: On Fri, May 9, 2014 at 3:52 PM, Rene Montilva renemonti...@gmail.com wrote: these are the values before the function call: /usr/sbin/kamailio[24933]: INFO: script: saldo:0.000500 y seg:0.000667 You are printing then before the assigment. *xlog(L_INFO, saldo:$dbr(ra=[0,0]) y seg:$dbr(ra=[0,1]) );* use *xlog(L_INFO, saldo:$var(credit) y seg:$var(cost_per_second) );* I just run a test with your values, and they did work. $var(credit) = 0.0005; $var(cost_per_second) = 0.0006; *if (!cnxcc_set_max_credit($var(client),* this function doesn't work, maybe are the long value: *if ($var(credit) $var(cost_per_second)) {* *sl_send_reply(402, payment required);* *exit;* *}* Did not get that, what does not work? On Fri, May 9, 2014 at 3:48 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Oops, correction: *if ($var(credit) $var(cost_per_second)) {* *sl_send_reply(402, payment required);* *exit;* *}* By the way, please inform of your results after doing your tests. Thanks, Carlos On Fri, May 9, 2014 at 3:17 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Hello, i_pulse and f_pulse are direct translations of the Spanish (I noticed you speak it) phrases pulso inicial and pulso final, which I don't think have the same meaning in English. Updating the docs and using the proper terminology are pending matters on this module. Both values represent the initial and interim costs of the call, in your case, it is being billed second by second (1:1), subtracting 0.000667 every second from a pool of credit that is equal to 0.000650 . The message that's being shown, looks like a precision loss error, which is unlikely because I used numbers even smaller than yours. Please print the values
Re: [SR-Users] cnxcc
Hi, Check this commitdiff [1], it has some subtle lines of code that remove the deadlock. Rtimer is not required, it is only used in the sample configuration file to display the amount of concurrent calls and to grant more time when needed, but strictly in the business logic sense. Internally, dialog is the only module that is a dependency. [1] http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=commitdiff;h=d0f0ba702bd44524bc9f52e07341db03267b15f7 Regards, Carlos On Sun, May 11, 2014 at 9:57 AM, Kelvin Chua kel...@gmail.com wrote: hi carlos, i'm looking at the commitdiff, seems like it's just indentations http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=commitdiff;h=d0f0ba702bd44524bc9f52e07341db03267b15f7 is there something i am missing? by the way, based on the module documentation, the only dependency is the dialog module, shouldn't it include the rtimer module? is it really required? what if i would only use CNXCC_MONEY and not CNXCC_TIME or CNXCC_CHANNEL? should i still load rtimer.so before loading cnxcc.so? Kelvin Chua On Mon, Apr 28, 2014 at 9:13 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: I'm glad that it worked. Please don't forget to git pull to update your cnxcc copy. Regards, Carlos On Mon, Apr 28, 2014 at 3:17 AM, Andrzej Ciupek andrzej.ciu...@hotmail.com wrote: Hello again It works perfect, I was missing setflag(DLG_FLAG); in my main route. Thank You very much for help. Greetings Andrzej Ciupek -- From: andrzej.ciu...@hotmail.com To: carlos.ruizd...@gmail.com CC: sr-users@lists.sip-router.org Subject: RE: [SR-Users] cnxcc Date: Mon, 28 Apr 2014 09:54:30 +0200 Hello You are amazing !! Your example work perfect, but I have to work with mine cfg, because when I use part of Your route into my config it doesn't work like it should. I think I have some problems with dialog module, because when I start Your script I get: Apr 28 09:47:31 kamailio /usr/local/sbin/kamailio[3060]: INFO: script: dialog started I don't see it using my config, so it looks like dialog module doesn't work in my config file in proper way. I will let You know when I find a bug in my script. Now when I have working example it will be easier. Greetings Andrzej Ciupek -- Date: Sun, 27 Apr 2014 21:29:34 -0500 Subject: Re: [SR-Users] cnxcc From: carlos.ruizd...@gmail.com To: andrzej.ciu...@hotmail.com CC: sr-users@lists.sip-router.org Kelvin, can you update your copy and try again? Maybe your problem was related to this, or maybe not. In either case, I will try to reproduce your issue later this week :). Regards, On Sun, Apr 27, 2014 at 9:27 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Hi Andrzej, I found a deadlock situation using the script you posted, thanks to an unusual way of using the functions that the module exports. About the script itself: I found a few inconsistencies that would have caused a problem with handing the calls even if there was no bug in the software. For example: - if you want to set the maximum amount of calls per user, use the function cnxcc_set_max_channel - the call-shutdown event route is only executed if the call runs out of credit, never for normal call clearing. For that, use dialog:end or dialog:failed instead. - you cannot access $var(client) from outside the process that created it. This means that when the call is killed, $var(client) will have a NULL value since this event is processed by a completely different process. If you want to have this information available everywhere, use a shared memory variable instead ($sht). I created a sample script [1] that applies your requirements in a slightly different way: - it authorizes the call by checking the balance - it kills the call when the credit is over - it doesn't allow more than one call per customer [1] https://gist.github.com/caruizdiaz/11359122 In this example I used a shared memory variable, to give you an idea of how to persist the customer's ID across processes. Regards, Carlos - On Sat, Apr 26, 2014 at 10:34 AM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: I did find a bug, using your config script, I will fix it this weekend. Try with this configuration file [1]. [1] https://gist.github.com/caruizdiaz/11323017 In summary, you can't use more than one check mechanisms. It has to be credit, time or channels, exclusively. Also, I need to test your config with Kam 4.1. I am using the trunk version. Regards, On Sat, Apr 26, 2014 at 10:23 AM, Andrzej Ciupek andrzej.ciu...@hotmail.com wrote: Yes. I want prepaid subscribers be able to create only one channel to prevent frauds for simultaneous calls. Greetings Andrzej Ciupek -- Od: Carlos Ruiz Díaz carlos.ruizd...@gmail.com Wysłano: 2014-04-26 16:42 Do: Andrzej Ciupek andrzej.ciu...@hotmail.com
Re: [SR-Users] CNXCC PrePaid module
What Kamailio version are you using? On Sat, May 10, 2014 at 9:33 PM, Rene Montilva renemonti...@gmail.comwrote: Hi Carlos kamailio config: log(L_INFO, saldo:$var(credit) y seg:$var(cost_per_sec) ); if($var(cost_per_sec) $var(credit)) { sl_send_reply(402,payment required); exit; } if (!cnxcc_set_max_credit($var(client), $var(credit), $var(cost_per_sec), $var(i_pulse), $var(f_pulse))) { sl_send_reply(503, something's wrong in the server); exit; } i got this by syslog $var(credit) = 0.0005; $var(cost_per_sec) = 0.0006; #$var(credit) = $dbr(ra=[0,0]); # 30$ of credit #$var(cost_per_sec) = $dbr(ra=[0,1]); # 1$ per sec $var(i_pulse) = 1; # 1$ to establish the call $var(f_pulse) = 1; # 1$ per second if (!cnxcc_set_max_credit($var(client), $var(credit), $var(cost_per_sec), $var(i_pulse), $var(f_pulse))) { sl_send_reply(402, Sin saldo PAPA); xlog(Error setting up credit control); exit; } /usr/sbin/kamailio[13336]: INFO: script: Setting up money based credit control /usr/sbin/kamailio[13336]: INFO: script: saldo:0.0005 y seg:0.0006 /usr/sbin/kamailio[13336]: WARNING: core [rvalue.c:1016]: rval_get_int(): automatic string to int conversion for 0.0005 failed /usr/sbin/kamailio[13336]: WARNING: core [rvalue.c:1920]: rval_expr_eval_int(): rval expression conversion to int failed (707,17-707,17) /usr/sbin/kamailio[13336]: WARNING: core [rvalue.c:1016]: rval_get_int(): automatic string to int conversion for 0.0006 failed /usr/sbin/kamailio[13336]: WARNING: core [rvalue.c:1920]: rval_expr_eval_int(): rval expression conversion to int failed (707,19-707,36) it still established the call with the function, kamailio doesn't evaluate the variable if($var(cost_per_sec) $var(credit)) { sl_send_reply(402,payment required); exit; } On Fri, May 9, 2014 at 4:41 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: On Fri, May 9, 2014 at 3:52 PM, Rene Montilva renemonti...@gmail.comwrote: these are the values before the function call: /usr/sbin/kamailio[24933]: INFO: script: saldo:0.000500 y seg:0.000667 You are printing then before the assigment. *xlog(L_INFO, saldo:$dbr(ra=[0,0]) y seg:$dbr(ra=[0,1]) );* use *xlog(L_INFO, saldo:$var(credit) y seg:$var(cost_per_second) );* I just run a test with your values, and they did work. $var(credit) = 0.0005; $var(cost_per_second) = 0.0006; *if (!cnxcc_set_max_credit($var(client),* this function doesn't work, maybe are the long value: *if ($var(credit) $var(cost_per_second)) {* *sl_send_reply(402, payment required);* *exit;* *}* Did not get that, what does not work? On Fri, May 9, 2014 at 3:48 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Oops, correction: *if ($var(credit) $var(cost_per_second)) {* *sl_send_reply(402, payment required);* *exit;* *}* By the way, please inform of your results after doing your tests. Thanks, Carlos On Fri, May 9, 2014 at 3:17 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Hello, i_pulse and f_pulse are direct translations of the Spanish (I noticed you speak it) phrases pulso inicial and pulso final, which I don't think have the same meaning in English. Updating the docs and using the proper terminology are pending matters on this module. Both values represent the initial and interim costs of the call, in your case, it is being billed second by second (1:1), subtracting 0.000667 every second from a pool of credit that is equal to 0.000650. The message that's being shown, looks like a precision loss error, which is unlikely because I used numbers even smaller than yours. Please print the values of $var(credit) and $var(cost_per_sec) before calling the cnxcc function. Furthermore, you should also consider checking your values before passing them to the function. For example: *1. check if the credit is greater than the cost per second, *before*.* *if ($var(credit) $var(cost_per_second)) {* *sl_send_reply(402, payment required);* *exit;* *}* There's no reason to call the function when the conditions are not met. Cnxcc will authorize the call and hang it immediately (1 second later). I may need to add this check myself inside the module. *2. make sure you are rejecting the call in case of module's error. * *if (!cnxcc_set_max_credit($var(client), $var(credit), $var(cost_per_sec), $var(i_pulse),* *$var(f_pulse)) { * *sl_send_reply(503, something's wrong in the server); * *exit; * *}* Regards, Carlos On Fri, May 9, 2014 at 2:45 PM, Rene Montilva renemonti...@gmail.comwrote: Hi Carlos This my kamailio config: #!ifdef CNXCC_MONEY sql_query(ca, select * from billing.sel_customer_credit
Re: [SR-Users] CNXCC PrePaid module
Yep, assignment failed because the variables contain floating point values and Kamailio does not handle well this kind of precision. I patched the module to add the check before initiating the call, it is in master. As a way of testing your code, replace those values with integer ones, like 5 and 6, and check if the call is actually terminated or even initiated. This will give you a quick diagnosis of your routing script. Regards, Carlos On Sun, May 11, 2014 at 9:04 PM, Rene Montilva renemonti...@gmail.comwrote: Hi Carlos kamailio version 4.1 El 11/05/2014 21:32, Carlos Ruiz Díaz carlos.ruizd...@gmail.com escribió: What Kamailio version are you using? On Sat, May 10, 2014 at 9:33 PM, Rene Montilva renemonti...@gmail.comwrote: Hi Carlos kamailio config: log(L_INFO, saldo:$var(credit) y seg:$var(cost_per_sec) ); if($var(cost_per_sec) $var(credit)) { sl_send_reply(402,payment required); exit; } if (!cnxcc_set_max_credit($var(client), $var(credit), $var(cost_per_sec), $var(i_pulse), $var(f_pulse))) { sl_send_reply(503, something's wrong in the server); exit; } i got this by syslog $var(credit) = 0.0005; $var(cost_per_sec) = 0.0006; #$var(credit) = $dbr(ra=[0,0]); # 30$ of credit #$var(cost_per_sec) = $dbr(ra=[0,1]); # 1$ per sec $var(i_pulse) = 1; # 1$ to establish the call $var(f_pulse) = 1; # 1$ per second if (!cnxcc_set_max_credit($var(client), $var(credit), $var(cost_per_sec), $var(i_pulse), $var(f_pulse))) { sl_send_reply(402, Sin saldo PAPA); xlog(Error setting up credit control); exit; } /usr/sbin/kamailio[13336]: INFO: script: Setting up money based credit control /usr/sbin/kamailio[13336]: INFO: script: saldo:0.0005 y seg:0.0006 /usr/sbin/kamailio[13336]: WARNING: core [rvalue.c:1016]: rval_get_int(): automatic string to int conversion for 0.0005 failed /usr/sbin/kamailio[13336]: WARNING: core [rvalue.c:1920]: rval_expr_eval_int(): rval expression conversion to int failed (707,17-707,17) /usr/sbin/kamailio[13336]: WARNING: core [rvalue.c:1016]: rval_get_int(): automatic string to int conversion for 0.0006 failed /usr/sbin/kamailio[13336]: WARNING: core [rvalue.c:1920]: rval_expr_eval_int(): rval expression conversion to int failed (707,19-707,36) it still established the call with the function, kamailio doesn't evaluate the variable if($var(cost_per_sec) $var(credit)) { sl_send_reply(402,payment required); exit; } On Fri, May 9, 2014 at 4:41 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: On Fri, May 9, 2014 at 3:52 PM, Rene Montilva renemonti...@gmail.comwrote: these are the values before the function call: /usr/sbin/kamailio[24933]: INFO: script: saldo:0.000500 y seg:0.000667 You are printing then before the assigment. *xlog(L_INFO, saldo:$dbr(ra=[0,0]) y seg:$dbr(ra=[0,1]) );* use *xlog(L_INFO, saldo:$var(credit) y seg:$var(cost_per_second) );* I just run a test with your values, and they did work. $var(credit) = 0.0005; $var(cost_per_second) = 0.0006; *if (!cnxcc_set_max_credit($var(client),* this function doesn't work, maybe are the long value: *if ($var(credit) $var(cost_per_second)) {* *sl_send_reply(402, payment required);* *exit;* *}* Did not get that, what does not work? On Fri, May 9, 2014 at 3:48 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Oops, correction: *if ($var(credit) $var(cost_per_second)) {* *sl_send_reply(402, payment required);* *exit;* *}* By the way, please inform of your results after doing your tests. Thanks, Carlos On Fri, May 9, 2014 at 3:17 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Hello, i_pulse and f_pulse are direct translations of the Spanish (I noticed you speak it) phrases pulso inicial and pulso final, which I don't think have the same meaning in English. Updating the docs and using the proper terminology are pending matters on this module. Both values represent the initial and interim costs of the call, in your case, it is being billed second by second (1:1), subtracting 0.000667 every second from a pool of credit that is equal to 0.000650. The message that's being shown, looks like a precision loss error, which is unlikely because I used numbers even smaller than yours. Please print the values of $var(credit) and $var(cost_per_sec) before calling the cnxcc function. Furthermore, you should also consider checking your values before passing them to the function. For example: *1. check if the credit is greater than the cost per second, *before*.* *if ($var(credit) $var(cost_per_second)) {* *sl_send_reply(402, payment required);* *exit;* *}* There's no reason to call the function when the conditions are not met
Re: [SR-Users] CNXCC PrePaid module
Hi, Can you paste the code you are using, with the values that each variable contain at the moment of initiating the call? Regards, On Fri, May 9, 2014 at 2:35 PM, Rene Montilva renemonti...@gmail.comwrote: Hi list I don't understand prepaid logic calculation, because when my credit is 0 or lees than cost per second, the call is established equal $var(i_pulse) and $var(f_pulse) how this works ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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] CNXCC PrePaid module
Hello, i_pulse and f_pulse are direct translations of the Spanish (I noticed you speak it) phrases pulso inicial and pulso final, which I don't think have the same meaning in English. Updating the docs and using the proper terminology are pending matters on this module. Both values represent the initial and interim costs of the call, in your case, it is being billed second by second (1:1), subtracting 0.000667 every second from a pool of credit that is equal to 0.000650. The message that's being shown, looks like a precision loss error, which is unlikely because I used numbers even smaller than yours. Please print the values of $var(credit) and $var(cost_per_sec) before calling the cnxcc function. Furthermore, you should also consider checking your values before passing them to the function. For example: *1. check if the credit is greater than the cost per second, *before*.* *if ($var(credit) $var(cost_per_second)) {* *sl_send_reply(402, payment required);* *exit;* *}* There's no reason to call the function when the conditions are not met. Cnxcc will authorize the call and hang it immediately (1 second later). I may need to add this check myself inside the module. *2. make sure you are rejecting the call in case of module's error. * *if (!cnxcc_set_max_credit($var(client),$var(credit), $var(cost_per_sec),$var(i_pulse),* *$var(f_pulse)) {* *sl_send_reply(503, something's wrong in the server);* *exit;* *}* Regards, Carlos On Fri, May 9, 2014 at 2:45 PM, Rene Montilva renemonti...@gmail.comwrote: Hi Carlos This my kamailio config: #!ifdef CNXCC_MONEY sql_query(ca, select * from billing.sel_customer_credit('pepe','xxx,ra); xlog(L_INFO, Setting up money based credit control); if($dbr(ra=rows) 0){ xlog(L_INFO, saldo:$dbr(ra=[0,0]) y seg:$dbr(ra=[0,1]) ); $var(credit) = $dbr(ra=[0,0]); # 30$ of credit $var(cost_per_sec) = $dbr(ra=[0,1]); # 1$ per sec $var(i_pulse) = 1; # 1$ to establish the call $var(f_pulse) = 1; # 1$ per second } sql_result_free (ra); # if only one call is established, that call should last 9 seconds. if (!cnxcc_set_max_credit($var(client), $var(credit), $var(cost_per_sec), $var(i_pulse), And this are the values by syslog info INFO: script: saldo:0.000650 y seg:0.000667 ERROR: cnxcc [cnxcc_mod.c:1425]: set_max_credit(): credit value must be 0: 0.00 On Fri, May 9, 2014 at 3:08 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Hi, Can you paste the code you are using, with the values that each variable contain at the moment of initiating the call? Regards, On Fri, May 9, 2014 at 2:35 PM, Rene Montilva renemonti...@gmail.comwrote: Hi list I don't understand prepaid logic calculation, because when my credit is 0 or lees than cost per second, the call is established equal $var(i_pulse) and $var(f_pulse) how this works ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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] CNXCC PrePaid module
Oops, correction: *if ($var(credit) $var(cost_per_second)) {* *sl_send_reply(402, payment required);* *exit;* *}* By the way, please inform of your results after doing your tests. Thanks, Carlos On Fri, May 9, 2014 at 3:17 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.comwrote: Hello, i_pulse and f_pulse are direct translations of the Spanish (I noticed you speak it) phrases pulso inicial and pulso final, which I don't think have the same meaning in English. Updating the docs and using the proper terminology are pending matters on this module. Both values represent the initial and interim costs of the call, in your case, it is being billed second by second (1:1), subtracting 0.000667 every second from a pool of credit that is equal to 0.000650. The message that's being shown, looks like a precision loss error, which is unlikely because I used numbers even smaller than yours. Please print the values of $var(credit) and $var(cost_per_sec) before calling the cnxcc function. Furthermore, you should also consider checking your values before passing them to the function. For example: *1. check if the credit is greater than the cost per second, *before*.* *if ($var(credit) $var(cost_per_second)) {* *sl_send_reply(402, payment required);* *exit;* *}* There's no reason to call the function when the conditions are not met. Cnxcc will authorize the call and hang it immediately (1 second later). I may need to add this check myself inside the module. *2. make sure you are rejecting the call in case of module's error. * *if (!cnxcc_set_max_credit($var(client), $var(credit), $var(cost_per_sec), $var(i_pulse),* *$var(f_pulse)) { * *sl_send_reply(503, something's wrong in the server); * *exit; * *}* Regards, Carlos On Fri, May 9, 2014 at 2:45 PM, Rene Montilva renemonti...@gmail.comwrote: Hi Carlos This my kamailio config: #!ifdef CNXCC_MONEY sql_query(ca, select * from billing.sel_customer_credit('pepe','xxx,ra); xlog(L_INFO, Setting up money based credit control); if($dbr(ra=rows) 0){ xlog(L_INFO, saldo:$dbr(ra=[0,0]) y seg:$dbr(ra=[0,1]) ); $var(credit) = $dbr(ra=[0,0]); # 30$ of credit $var(cost_per_sec) = $dbr(ra=[0,1]); # 1$ per sec $var(i_pulse) = 1; # 1$ to establish the call $var(f_pulse) = 1; # 1$ per second } sql_result_free (ra); # if only one call is established, that call should last 9 seconds. if (!cnxcc_set_max_credit($var(client), $var(credit), $var(cost_per_sec), $var(i_pulse), And this are the values by syslog info INFO: script: saldo:0.000650 y seg:0.000667 ERROR: cnxcc [cnxcc_mod.c:1425]: set_max_credit(): credit value must be 0: 0.00 On Fri, May 9, 2014 at 3:08 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Hi, Can you paste the code you are using, with the values that each variable contain at the moment of initiating the call? Regards, On Fri, May 9, 2014 at 2:35 PM, Rene Montilva renemonti...@gmail.comwrote: Hi list I don't understand prepaid logic calculation, because when my credit is 0 or lees than cost per second, the call is established equal $var(i_pulse) and $var(f_pulse) how this works ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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] CNXCC PrePaid module
On Fri, May 9, 2014 at 3:52 PM, Rene Montilva renemonti...@gmail.comwrote: these are the values before the function call: /usr/sbin/kamailio[24933]: INFO: script: saldo:0.000500 y seg:0.000667 You are printing then before the assigment. *xlog(L_INFO, saldo:$dbr(ra=[0,0]) y seg:$dbr(ra=[0,1]) );* use *xlog(L_INFO, saldo:$var(credit) y seg:$var(cost_per_second) );* I just run a test with your values, and they did work. $var(credit) = 0.0005; $var(cost_per_second) = 0.0006; *if (!cnxcc_set_max_credit($var(client),* this function doesn't work, maybe are the long value: *if ($var(credit) $var(cost_per_second)) {* *sl_send_reply(402, payment required);* *exit;* *}* Did not get that, what does not work? On Fri, May 9, 2014 at 3:48 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Oops, correction: *if ($var(credit) $var(cost_per_second)) {* *sl_send_reply(402, payment required);* *exit;* *}* By the way, please inform of your results after doing your tests. Thanks, Carlos On Fri, May 9, 2014 at 3:17 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Hello, i_pulse and f_pulse are direct translations of the Spanish (I noticed you speak it) phrases pulso inicial and pulso final, which I don't think have the same meaning in English. Updating the docs and using the proper terminology are pending matters on this module. Both values represent the initial and interim costs of the call, in your case, it is being billed second by second (1:1), subtracting 0.000667 every second from a pool of credit that is equal to 0.000650. The message that's being shown, looks like a precision loss error, which is unlikely because I used numbers even smaller than yours. Please print the values of $var(credit) and $var(cost_per_sec) before calling the cnxcc function. Furthermore, you should also consider checking your values before passing them to the function. For example: *1. check if the credit is greater than the cost per second, *before*.* *if ($var(credit) $var(cost_per_second)) {* *sl_send_reply(402, payment required);* *exit;* *}* There's no reason to call the function when the conditions are not met. Cnxcc will authorize the call and hang it immediately (1 second later). I may need to add this check myself inside the module. *2. make sure you are rejecting the call in case of module's error. * *if (!cnxcc_set_max_credit($var(client), $var(credit), $var(cost_per_sec), $var(i_pulse),* *$var(f_pulse)) { * *sl_send_reply(503, something's wrong in the server); * *exit; * *}* Regards, Carlos On Fri, May 9, 2014 at 2:45 PM, Rene Montilva renemonti...@gmail.comwrote: Hi Carlos This my kamailio config: #!ifdef CNXCC_MONEY sql_query(ca, select * from billing.sel_customer_credit('pepe','xxx,ra); xlog(L_INFO, Setting up money based credit control); if($dbr(ra=rows) 0){ xlog(L_INFO, saldo:$dbr(ra=[0,0]) y seg:$dbr(ra=[0,1]) ); $var(credit) = $dbr(ra=[0,0]); # 30$ of credit $var(cost_per_sec) = $dbr(ra=[0,1]); # 1$ per sec $var(i_pulse) = 1; # 1$ to establish the call $var(f_pulse) = 1; # 1$ per second } sql_result_free (ra); # if only one call is established, that call should last 9 seconds. if (!cnxcc_set_max_credit($var(client), $var(credit), $var(cost_per_sec), $var(i_pulse), And this are the values by syslog info INFO: script: saldo:0.000650 y seg:0.000667 ERROR: cnxcc [cnxcc_mod.c:1425]: set_max_credit(): credit value must be 0: 0.00 On Fri, May 9, 2014 at 3:08 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Hi, Can you paste the code you are using, with the values that each variable contain at the moment of initiating the call? Regards, On Fri, May 9, 2014 at 2:35 PM, Rene Montilva renemonti...@gmail.comwrote: Hi list I don't understand prepaid logic calculation, because when my credit is 0 or lees than cost per second, the call is established equal $var(i_pulse) and $var(f_pulse) how this works ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 -- Carlos http
Re: [SR-Users] cnxcc
I'm glad that it worked. Please don't forget to git pull to update your cnxcc copy. Regards, Carlos On Mon, Apr 28, 2014 at 3:17 AM, Andrzej Ciupek andrzej.ciu...@hotmail.comwrote: Hello again It works perfect, I was missing setflag(DLG_FLAG); in my main route. Thank You very much for help. Greetings Andrzej Ciupek -- From: andrzej.ciu...@hotmail.com To: carlos.ruizd...@gmail.com CC: sr-users@lists.sip-router.org Subject: RE: [SR-Users] cnxcc Date: Mon, 28 Apr 2014 09:54:30 +0200 Hello You are amazing !! Your example work perfect, but I have to work with mine cfg, because when I use part of Your route into my config it doesn't work like it should. I think I have some problems with dialog module, because when I start Your script I get: Apr 28 09:47:31 kamailio /usr/local/sbin/kamailio[3060]: INFO: script: dialog started I don't see it using my config, so it looks like dialog module doesn't work in my config file in proper way. I will let You know when I find a bug in my script. Now when I have working example it will be easier. Greetings Andrzej Ciupek -- Date: Sun, 27 Apr 2014 21:29:34 -0500 Subject: Re: [SR-Users] cnxcc From: carlos.ruizd...@gmail.com To: andrzej.ciu...@hotmail.com CC: sr-users@lists.sip-router.org Kelvin, can you update your copy and try again? Maybe your problem was related to this, or maybe not. In either case, I will try to reproduce your issue later this week :). Regards, On Sun, Apr 27, 2014 at 9:27 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Hi Andrzej, I found a deadlock situation using the script you posted, thanks to an unusual way of using the functions that the module exports. About the script itself: I found a few inconsistencies that would have caused a problem with handing the calls even if there was no bug in the software. For example: - if you want to set the maximum amount of calls per user, use the function cnxcc_set_max_channel - the call-shutdown event route is only executed if the call runs out of credit, never for normal call clearing. For that, use dialog:end or dialog:failed instead. - you cannot access $var(client) from outside the process that created it. This means that when the call is killed, $var(client) will have a NULL value since this event is processed by a completely different process. If you want to have this information available everywhere, use a shared memory variable instead ($sht). I created a sample script [1] that applies your requirements in a slightly different way: - it authorizes the call by checking the balance - it kills the call when the credit is over - it doesn't allow more than one call per customer [1] https://gist.github.com/caruizdiaz/11359122 In this example I used a shared memory variable, to give you an idea of how to persist the customer's ID across processes. Regards, Carlos - On Sat, Apr 26, 2014 at 10:34 AM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: I did find a bug, using your config script, I will fix it this weekend. Try with this configuration file [1]. [1] https://gist.github.com/caruizdiaz/11323017 In summary, you can't use more than one check mechanisms. It has to be credit, time or channels, exclusively. Also, I need to test your config with Kam 4.1. I am using the trunk version. Regards, On Sat, Apr 26, 2014 at 10:23 AM, Andrzej Ciupek andrzej.ciu...@hotmail.com wrote: Yes. I want prepaid subscribers be able to create only one channel to prevent frauds for simultaneous calls. Greetings Andrzej Ciupek -- Od: Carlos Ruiz Díaz carlos.ruizd...@gmail.com Wysłano: 2014-04-26 16:42 Do: Andrzej Ciupek andrzej.ciu...@hotmail.com DW: Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Temat: Re: [SR-Users] cnxcc Hi Andrzej, are you trying to setup cnxcc to check both credit and maximum simultaneous calls? Regards, On Sat, Apr 26, 2014 at 9:26 AM, Andrzej Ciupek andrzej.ciu...@hotmail.com wrote: Hello I’am using default config with options from an example. It looks like event route isn’t execuded after hangup. Apr 26 16:26:14 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:15 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:16 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:17 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:18 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:19 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4604]: INFO: script: Setting up money based credit
Re: [SR-Users] cnxcc
Hi Andrzej, I found a deadlock situation using the script you posted, thanks to an unusual way of using the functions that the module exports. About the script itself: I found a few inconsistencies that would have caused a problem with handing the calls even if there was no bug in the software. For example: - if you want to set the maximum amount of calls per user, use the function cnxcc_set_max_channel - the call-shutdown event route is only executed if the call runs out of credit, never for normal call clearing. For that, use dialog:end or dialog:failed instead. - you cannot access $var(client) from outside the process that created it. This means that when the call is killed, $var(client) will have a NULL value since this event is processed by a completely different process. If you want to have this information available everywhere, use a shared memory variable instead ($sht). I created a sample script [1] that applies your requirements in a slightly different way: - it authorizes the call by checking the balance - it kills the call when the credit is over - it doesn't allow more than one call per customer [1] https://gist.github.com/caruizdiaz/11359122 In this example I used a shared memory variable, to give you an idea of how to persist the customer's ID across processes. Regards, Carlos - On Sat, Apr 26, 2014 at 10:34 AM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: I did find a bug, using your config script, I will fix it this weekend. Try with this configuration file [1]. [1] https://gist.github.com/caruizdiaz/11323017 In summary, you can't use more than one check mechanisms. It has to be credit, time or channels, exclusively. Also, I need to test your config with Kam 4.1. I am using the trunk version. Regards, On Sat, Apr 26, 2014 at 10:23 AM, Andrzej Ciupek andrzej.ciu...@hotmail.com wrote: Yes. I want prepaid subscribers be able to create only one channel to prevent frauds for simultaneous calls. Greetings Andrzej Ciupek -- Od: Carlos Ruiz Díaz carlos.ruizd...@gmail.com Wysłano: 2014-04-26 16:42 Do: Andrzej Ciupek andrzej.ciu...@hotmail.com DW: Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Temat: Re: [SR-Users] cnxcc Hi Andrzej, are you trying to setup cnxcc to check both credit and maximum simultaneous calls? Regards, On Sat, Apr 26, 2014 at 9:26 AM, Andrzej Ciupek andrzej.ciu...@hotmail.com wrote: Hello I’am using default config with options from an example. It looks like event route isn’t execuded after hangup. Apr 26 16:26:14 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:15 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:16 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:17 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:18 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:19 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4604]: INFO: script: Setting up money based credit control Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4604]: INFO: script: Setting up channel based credit control Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4604]: INFO: script: CNXCC ROUTE: 1000 has 2 call(s) kamailio.cfg … … # - prepaid call controll - #!define DLG_FLAG 28 #!define CC_FLAG 29 loadmodule dialog.so modparam(dialog, hash_size, 2048) modparam(dialog, default_timeout, 3600) modparam(dialog, db_mode, 0) modparam(dialog, dlg_flag, DLG_FLAG) modparam(rtimer, timer, name=ta;interval=1;mode=1;) modparam(rtimer, exec, timer=ta;route=SHOW_CHANNEL_COUNT) loadmodule cnxcc.so modparam(cnxcc, dlg_flag, CC_FLAG) modparam(cnxcc, credit_check_period, 1) #check every 1 second … … … route { … … if (!allow_source_address(2) and !allow_source_address(1)){ route(CNXCC); route(PSTN); } … } route[CNXCC] { $var(client)= 1000; xlog(L_INFO, Setting up money based credit control); $var(credit)= 10; # 10$ of credit $var(cost_per_sec) = 1; # 1$ per sec $var(i_pulse) = 1; # 1$ to establish the call $var(f_pulse) = 1; # 1$ per second # if only one call is established, that call should last 9 seconds. if (!cnxcc_set_max_credit($var(client), $var(credit), $var(cost_per_sec), $var(i_pulse), $var(f_pulse))) { xlog(Error setting up credit control
Re: [SR-Users] cnxcc
Kelvin, can you update your copy and try again? Maybe your problem was related to this, or maybe not. In either case, I will try to reproduce your issue later this week :). Regards, On Sun, Apr 27, 2014 at 9:27 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Hi Andrzej, I found a deadlock situation using the script you posted, thanks to an unusual way of using the functions that the module exports. About the script itself: I found a few inconsistencies that would have caused a problem with handing the calls even if there was no bug in the software. For example: - if you want to set the maximum amount of calls per user, use the function cnxcc_set_max_channel - the call-shutdown event route is only executed if the call runs out of credit, never for normal call clearing. For that, use dialog:end or dialog:failed instead. - you cannot access $var(client) from outside the process that created it. This means that when the call is killed, $var(client) will have a NULL value since this event is processed by a completely different process. If you want to have this information available everywhere, use a shared memory variable instead ($sht). I created a sample script [1] that applies your requirements in a slightly different way: - it authorizes the call by checking the balance - it kills the call when the credit is over - it doesn't allow more than one call per customer [1] https://gist.github.com/caruizdiaz/11359122 In this example I used a shared memory variable, to give you an idea of how to persist the customer's ID across processes. Regards, Carlos - On Sat, Apr 26, 2014 at 10:34 AM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: I did find a bug, using your config script, I will fix it this weekend. Try with this configuration file [1]. [1] https://gist.github.com/caruizdiaz/11323017 In summary, you can't use more than one check mechanisms. It has to be credit, time or channels, exclusively. Also, I need to test your config with Kam 4.1. I am using the trunk version. Regards, On Sat, Apr 26, 2014 at 10:23 AM, Andrzej Ciupek andrzej.ciu...@hotmail.com wrote: Yes. I want prepaid subscribers be able to create only one channel to prevent frauds for simultaneous calls. Greetings Andrzej Ciupek -- Od: Carlos Ruiz Díaz carlos.ruizd...@gmail.com Wysłano: 2014-04-26 16:42 Do: Andrzej Ciupek andrzej.ciu...@hotmail.com DW: Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Temat: Re: [SR-Users] cnxcc Hi Andrzej, are you trying to setup cnxcc to check both credit and maximum simultaneous calls? Regards, On Sat, Apr 26, 2014 at 9:26 AM, Andrzej Ciupek andrzej.ciu...@hotmail.com wrote: Hello I’am using default config with options from an example. It looks like event route isn’t execuded after hangup. Apr 26 16:26:14 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:15 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:16 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:17 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:18 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:19 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4604]: INFO: script: Setting up money based credit control Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4604]: INFO: script: Setting up channel based credit control Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4604]: INFO: script: CNXCC ROUTE: 1000 has 2 call(s) kamailio.cfg … … # - prepaid call controll - #!define DLG_FLAG 28 #!define CC_FLAG 29 loadmodule dialog.so modparam(dialog, hash_size, 2048) modparam(dialog, default_timeout, 3600) modparam(dialog, db_mode, 0) modparam(dialog, dlg_flag, DLG_FLAG) modparam(rtimer, timer, name=ta;interval=1;mode=1;) modparam(rtimer, exec, timer=ta;route=SHOW_CHANNEL_COUNT) loadmodule cnxcc.so modparam(cnxcc, dlg_flag, CC_FLAG) modparam(cnxcc, credit_check_period, 1) #check every 1 second … … … route { … … if (!allow_source_address(2) and !allow_source_address(1)){ route(CNXCC); route(PSTN); } … } route[CNXCC] { $var(client)= 1000; xlog(L_INFO, Setting up money based credit control); $var(credit)= 10; # 10$ of credit $var(cost_per_sec) = 1; # 1$ per sec $var(i_pulse) = 1; # 1$ to establish the call $var(f_pulse) = 1; # 1$ per second # if only one call is established, that call should last 9 seconds
Re: [SR-Users] cnxcc
Hi, sorry guys, I forgot about this. I will make my own tests and post the results. Andrzej, can you post the configuration file you are using? Regards, Carlos On Sat, Apr 26, 2014 at 4:15 AM, Kelvin Chua kel...@gmail.com wrote: No, I have not yet found the solution for this issue on my setup. Maybe Carlos can help us out On Apr 26, 2014 5:10 PM, Andrzej Ciupek andrzej.ciu...@hotmail.com wrote: Hello Have You solved this issue ? I’am using Kamailio 4.1.3 and I’am getting the same results. Greetings Andrzej Ciupek ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +52 55 3048 3303 ___ 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] cnxcc
Hi Andrzej, are you trying to setup cnxcc to check both credit and maximum simultaneous calls? Regards, On Sat, Apr 26, 2014 at 9:26 AM, Andrzej Ciupek andrzej.ciu...@hotmail.comwrote: Hello I’am using default config with options from an example. It looks like event route isn’t execuded after hangup. Apr 26 16:26:14 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:15 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:16 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:17 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:18 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:19 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4604]: INFO: script: Setting up money based credit control Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4604]: INFO: script: Setting up channel based credit control Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4604]: INFO: script: CNXCC ROUTE: 1000 has 2 call(s) kamailio.cfg … … # - prepaid call controll - #!define DLG_FLAG 28 #!define CC_FLAG 29 loadmodule dialog.so modparam(dialog, hash_size, 2048) modparam(dialog, default_timeout, 3600) modparam(dialog, db_mode, 0) modparam(dialog, dlg_flag, DLG_FLAG) modparam(rtimer, timer, name=ta;interval=1;mode=1;) modparam(rtimer, exec, timer=ta;route=SHOW_CHANNEL_COUNT) loadmodule cnxcc.so modparam(cnxcc, dlg_flag, CC_FLAG) modparam(cnxcc, credit_check_period, 1) #check every 1 second … … … route { … … if (!allow_source_address(2) and !allow_source_address(1)){ route(CNXCC); route(PSTN); } … } route[CNXCC] { $var(client)= 1000; xlog(L_INFO, Setting up money based credit control); $var(credit)= 10; # 10$ of credit $var(cost_per_sec) = 1; # 1$ per sec $var(i_pulse) = 1; # 1$ to establish the call $var(f_pulse) = 1; # 1$ per second # if only one call is established, that call should last 9 seconds. if (!cnxcc_set_max_credit($var(client), $var(credit), $var(cost_per_sec), $var(i_pulse), $var(f_pulse))) { xlog(Error setting up credit control); return; } $var(count) = -1; if (!cnxcc_get_channel_count($var(client), $var(count))) { xlog(Error getting customer's channel count); } xlog(L_INFO, CNXCC ROUTE: $var(client) has $var(count) call(s)); if ($var(retcode) -1) { xlog(Too many channels for customer); sl_send_reply(403, Forbidden); if (!cnxcc_terminate_all($var(client))) { xlog(Error terminating customer's calls); } else { xlog(Terminating customer's call); } exit; } } route[SHOW_CHANNEL_COUNT] { $var(count) = @cnxcc.channels[1000].count; xlog(L_INFO, 1000 has $var(count) call(s)); } event_route[dialog:failed] { xlog(dialog failed); } event_route[cnxcc:call-shutdown] { xlog(L_INFO, Shutting down channel by callcontroll); xlog(L_INFO, [$ci]: call killed); $var(count) = $var(count)-1; if (!cnxcc_get_channel_count($var(client), $var(count))) { xlog(Error getting customer's channel count); } xlog(L_INFO, CNXCC ROUTE: $var(client) has $var(count) call(s)); # perform some kind of notification, database update, email sending, etc } Greetings Andrzej Ciupek *Od:* Carlos Ruiz Díaz carlos.ruizd...@gmail.com *Wysłano:* sobota, 26 kwietnia 2014 15:19 *Do:* Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org, Andrzej Ciupek andrzej.ciu...@hotmail.com Hi, sorry guys, I forgot about this. I will make my own tests and post the results. Andrzej, can you post the configuration file you are using? Regards, Carlos On Sat, Apr 26, 2014 at 4:15 AM, Kelvin Chua kel...@gmail.com wrote: No, I have not yet found the solution for this issue on my setup. Maybe Carlos can help us out On Apr 26, 2014 5:10 PM, Andrzej Ciupek andrzej.ciu...@hotmail.com wrote: Hello Have You solved this issue ? I’am using Kamailio 4.1.3 and I’am getting the same results. Greetings Andrzej Ciupek ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr
Re: [SR-Users] cnxcc
I did find a bug, using your config script, I will fix it this weekend. Try with this configuration file [1]. [1] https://gist.github.com/caruizdiaz/11323017 In summary, you can't use more than one check mechanisms. It has to be credit, time or channels, exclusively. Also, I need to test your config with Kam 4.1. I am using the trunk version. Regards, On Sat, Apr 26, 2014 at 10:23 AM, Andrzej Ciupek andrzej.ciu...@hotmail.com wrote: Yes. I want prepaid subscribers be able to create only one channel to prevent frauds for simultaneous calls. Greetings Andrzej Ciupek -- Od: Carlos Ruiz Díaz carlos.ruizd...@gmail.com Wysłano: 2014-04-26 16:42 Do: Andrzej Ciupek andrzej.ciu...@hotmail.com DW: Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Temat: Re: [SR-Users] cnxcc Hi Andrzej, are you trying to setup cnxcc to check both credit and maximum simultaneous calls? Regards, On Sat, Apr 26, 2014 at 9:26 AM, Andrzej Ciupek andrzej.ciu...@hotmail.com wrote: Hello I’am using default config with options from an example. It looks like event route isn’t execuded after hangup. Apr 26 16:26:14 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:15 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:16 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:17 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:18 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:19 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4611]: INFO: script: 1000 has 1 call(s) Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4604]: INFO: script: Setting up money based credit control Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4604]: INFO: script: Setting up channel based credit control Apr 26 16:26:20 kamailio /usr/local/sbin/kamailio[4604]: INFO: script: CNXCC ROUTE: 1000 has 2 call(s) kamailio.cfg … … # - prepaid call controll - #!define DLG_FLAG 28 #!define CC_FLAG 29 loadmodule dialog.so modparam(dialog, hash_size, 2048) modparam(dialog, default_timeout, 3600) modparam(dialog, db_mode, 0) modparam(dialog, dlg_flag, DLG_FLAG) modparam(rtimer, timer, name=ta;interval=1;mode=1;) modparam(rtimer, exec, timer=ta;route=SHOW_CHANNEL_COUNT) loadmodule cnxcc.so modparam(cnxcc, dlg_flag, CC_FLAG) modparam(cnxcc, credit_check_period, 1) #check every 1 second … … … route { … … if (!allow_source_address(2) and !allow_source_address(1)){ route(CNXCC); route(PSTN); } … } route[CNXCC] { $var(client)= 1000; xlog(L_INFO, Setting up money based credit control); $var(credit)= 10; # 10$ of credit $var(cost_per_sec) = 1; # 1$ per sec $var(i_pulse) = 1; # 1$ to establish the call $var(f_pulse) = 1; # 1$ per second # if only one call is established, that call should last 9 seconds. if (!cnxcc_set_max_credit($var(client), $var(credit), $var(cost_per_sec), $var(i_pulse), $var(f_pulse))) { xlog(Error setting up credit control); return; } $var(count) = -1; if (!cnxcc_get_channel_count($var(client), $var(count))) { xlog(Error getting customer's channel count); } xlog(L_INFO, CNXCC ROUTE: $var(client) has $var(count) call(s)); if ($var(retcode) -1) { xlog(Too many channels for customer); sl_send_reply(403, Forbidden); if (!cnxcc_terminate_all($var(client))) { xlog(Error terminating customer's calls); } else { xlog(Terminating customer's call); } exit; } } route[SHOW_CHANNEL_COUNT] { $var(count) = @cnxcc.channels[1000].count; xlog(L_INFO, 1000 has $var(count) call(s)); } event_route[dialog:failed] { xlog(dialog failed); } event_route[cnxcc:call-shutdown] { xlog(L_INFO, Shutting down channel by callcontroll); xlog(L_INFO, [$ci]: call killed); $var(count) = $var(count)-1; if (!cnxcc_get_channel_count($var(client), $var(count))) { xlog(Error getting customer's channel count); } xlog(L_INFO, CNXCC ROUTE: $var(client) has $var(count) call(s)); # perform some kind of notification, database update, email sending, etc } Greetings Andrzej Ciupek *Od:* Carlos
Re: [SR-Users] cnxcc
Hi Kelvin, this looks a lot like the classic dialog matching problem. Have you tried to use the example conf file that is provided with the module? Please try that as is, and copy the params of both dialog and cnxcc modparams to your script. I will try to reply when i'm not touring around ;-). Regards, Carlos On Apr 8, 2014 9:18 PM, Kelvin Chua kel...@gmail.com wrote: Wow rome! great choice carlos! enjoy your honeymoon! :) here is what i did: #!define FLD_CNXCC 5 modparam(cnxcc, dlg_flag, FLD_CNXCC) cnxcc_set_max_credit(1 , 196.9485 , 0.011000 , 6 , 6); number_of_calls increments for every call and i never see max_amount going non-zero client_id:6,number_of_calls:2,concurrent_calls:0,type:1,max_amount:0.00,consumed_amount:0.00; Kelvin Chua On Tue, Apr 8, 2014 at 5:19 AM, Daniel Grotti dgro...@sipwise.com wrote: Rome! Great choice! :) Daniel On 04/08/2014 10:31 AM, Carlos Ruiz Díaz wrote: Hi Carsten, that's right, I'm replying to this while I wait for a tour to the Vatican City :-D ;-) Cheers, On Tue, Apr 8, 2014 at 3:27 AM, Carsten Bock cars...@ng-voice.com mailto:cars...@ng-voice.com wrote: Hi Carlos, please remember: You're on your Honeymoon! :-) Enjoy Rome, Carsten 2014-04-08 10:26 GMT+02:00 Carlos Ruiz Díaz carlos.ruizd...@gmail.com mailto:carlos.ruizd...@gmail.com: Hi Kelvin, probably the dialog matching parameter is wrong, or something in the parameter configuration of cnxcc. The value of max_amount is 0, because the call wasn't established or was established and cnxcc couldn't detect it (probably because of the dlg matching, as I mentioned). It will retain this value for as long as the call is in the early state. Check this example [1], it may help you. [1] http://caruizdiaz.com/2014/04/04/cnxcc-prepaid-module-workshop-kamailio-world/ Regards, On Tue, Apr 8, 2014 at 3:04 AM, Kelvin Chua kel...@gmail.com mailto:kel...@gmail.com wrote: i am trying to use cnxcc for the first time. kamctl kamcmd cnxcc.active_clients client_id:6,number_of_calls:1,concurrent_calls:0,type:1,max_amount:0.00,consumed_amount:0.00; i don't think this is correct, seems like the dialog is not disengaging after i hang up. i created dialogs alongside cnxcc just to compare, all dialogs were disengaged. is this an expected behavior? It's also weird that the max_amount is 0 while i checked that there is a value for credit being passed as an argument. Kelvin Chua ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto: sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Carlos http://caruizdiaz.com http://ngvoice.com +595981146623 tel:%2B595981146623 ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto: sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Carsten Bock CEO (Geschäftsführer) ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany http://www.ng-voice.com mailto:cars...@ng-voice.com mailto:cars...@ng-voice.com Office +49 40 34927219 tel:%2B49%2040%2034927219 Fax +49 40 34927220 tel:%2B49%2040%2034927220 Sitz der Gesellschaft: Hamburg Registergericht: Amtsgericht Hamburg, HRB 120189 Geschäftsführer: Carsten Bock Ust-ID: DE279344284 Hier finden Sie unsere handelsrechtlichen Pflichtangaben: http://www.ng-voice.com/imprint/ ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Carlos http://caruizdiaz.com http://ngvoice.com +595981146623 ___ 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] cnxcc
Hi Kelvin, probably the dialog matching parameter is wrong, or something in the parameter configuration of cnxcc. The value of max_amount is 0, because the call wasn't established or was established and cnxcc couldn't detect it (probably because of the dlg matching, as I mentioned). It will retain this value for as long as the call is in the early state. Check this example [1], it may help you. [1] http://caruizdiaz.com/2014/04/04/cnxcc-prepaid-module-workshop-kamailio-world/ Regards, On Tue, Apr 8, 2014 at 3:04 AM, Kelvin Chua kel...@gmail.com wrote: i am trying to use cnxcc for the first time. kamctl kamcmd cnxcc.active_clients client_id:6,number_of_calls:1,concurrent_calls:0,type:1,max_amount:0.00,consumed_amount:0.00; i don't think this is correct, seems like the dialog is not disengaging after i hang up. i created dialogs alongside cnxcc just to compare, all dialogs were disengaged. is this an expected behavior? It's also weird that the max_amount is 0 while i checked that there is a value for credit being passed as an argument. Kelvin Chua ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +595981146623 ___ 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] cnxcc
Hi Carsten, that's right, I'm replying to this while I wait for a tour to the Vatican City :-D ;-) Cheers, On Tue, Apr 8, 2014 at 3:27 AM, Carsten Bock cars...@ng-voice.com wrote: Hi Carlos, please remember: You're on your Honeymoon! :-) Enjoy Rome, Carsten 2014-04-08 10:26 GMT+02:00 Carlos Ruiz Díaz carlos.ruizd...@gmail.com: Hi Kelvin, probably the dialog matching parameter is wrong, or something in the parameter configuration of cnxcc. The value of max_amount is 0, because the call wasn't established or was established and cnxcc couldn't detect it (probably because of the dlg matching, as I mentioned). It will retain this value for as long as the call is in the early state. Check this example [1], it may help you. [1] http://caruizdiaz.com/2014/04/04/cnxcc-prepaid-module-workshop-kamailio-world/ Regards, On Tue, Apr 8, 2014 at 3:04 AM, Kelvin Chua kel...@gmail.com wrote: i am trying to use cnxcc for the first time. kamctl kamcmd cnxcc.active_clients client_id:6,number_of_calls:1,concurrent_calls:0,type:1,max_amount:0.00,consumed_amount:0.00; i don't think this is correct, seems like the dialog is not disengaging after i hang up. i created dialogs alongside cnxcc just to compare, all dialogs were disengaged. is this an expected behavior? It's also weird that the max_amount is 0 while i checked that there is a value for credit being passed as an argument. Kelvin Chua ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +595981146623 ___ 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 -- Carsten Bock CEO (Geschäftsführer) ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany http://www.ng-voice.com mailto:cars...@ng-voice.com Office +49 40 34927219 Fax +49 40 34927220 Sitz der Gesellschaft: Hamburg Registergericht: Amtsgericht Hamburg, HRB 120189 Geschäftsführer: Carsten Bock Ust-ID: DE279344284 Hier finden Sie unsere handelsrechtlichen Pflichtangaben: http://www.ng-voice.com/imprint/ ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +595981146623 ___ 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] trixbox or asterisk as a media server for kamailio
Hi, have you looked this [1] already? I would recommend dropping trixbox is favor of a plain Asterisk installation. It makes things easier to configure. [1] http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb Regards, On Wed, Mar 12, 2014 at 9:47 AM, malik sherif asheri...@hotmail.com wrote: I am looking documentation as to how to integrate kamailio and Asterisk, I am not sure if I use the correct term media server but I would like to configure 3-way call, call waiting, call transfer , and call forwarding. Your help is greatly appreciated. Thanks Abdul ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +595981146623 ___ 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] dialog module with DB Backend
Hi Jay, I tried the module as is for the location service, and it worked fine. Considering this, why was this part working if usrloc uses the same DB API that was binding a buggy implementation?. It makes me suspicious. Did you make sure the records were actually inserted on the cluster? Regards, Carlos On Wed, Mar 5, 2014 at 8:42 AM, Daniel-Constantin Mierla mico...@gmail.comwrote: Hello, can you make the patch for master branch? I just backported two patches that were in master branch but not yet in 4.1. With this occasion, can you review if the other 'return 1' expose the same issue? I noticed another one in db_cassa_delete and in db_cassa_query. Thanks, Daniel On 05/03/14 03:57, jay binks wrote: Just noticed the same thing in db_cassa_delete.. patch updated to fix both Jay On 5 March 2014 12:52, jay binks jaybi...@gmail.com wrote: Hi All, so Ive done what Carlos suggested and swapped out my dialog db to Mysql rather than cassandra. All worked 100% as you would expect. Right so the issue is db_cassandra . I started testing and going through the code. I found I had these lines, which was interesting concerning. update_dialog_dbinfo_unsafe(): could not add another dialog to db I had been ignoring them, because the dialog was in the DB and I figured I would come back and figure that out later. but this seems to have been key to this whole thing. ends up that in dlg_db_handler.c dialog_dbf.insert was getting a 1 back from kamailio on the insert and a 0 back from mysql... WTF.. ok. so I trace into db_cassa_insert which calls db_cassa_modify .. around line 1210 I can see this .. CON_CASSA(_h)-con-batch_mutate(CFMap, oac::ConsistencyLevel::ONE); return 1; wrapped in a try / catch block.. seems db_cassandra wants to return 1 for success but kamailio ( or dialog module at least ) expects 0 for success . so I change that to be return 0, and re-test. everything works as expected,could not add another dialog to db stops coming up on my console, and dialogs are removed when calls hangup. seems this 1 thing is enough to screw dialogs in cassandra ( and who knows what else ). This is the reason for my email though, if we simply change that to 0, what else may break !?? however http://www.asipto.com/pub/kamailio-devel-guide/#c09f_insertclearly states that 0 if everything is OK so this is clearly a bug that needs fixing. Can I get someone with more experience to test this for me and possibly apply the attached patch !? Jay On 25 February 2014 05:58, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, I pushed some patches to the master branch in order to remove the dialog from its associated profiles when it gets in terminated state. I encountered such issue (not that) recently, but I haven't gotten the time to get to it before. Then, the second patch is to not add dialogs in profiles when loading from database and the state is terminated (5). Here are the links to the patches: - http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=edf61acb57ed5e8ee0ca9ec1f796e43ce993be48 - http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9b88eb7ee2d243882383a44f601baa21fd679cd5 Should be straightforward to cherry pick to 4.1 (even 4.0 I expect). If you test and all goes fine, I will backport -- here I had no time for real testing. I plan also to not add the dialogs in memory for state terminated, but destroy them at db load time. But this needs a bit of a review, to be sure that all necessary callbacks are executed. On the other hand, if the dialogs are not removed from db, might be an issue with the database driver (cassandra in this case, which is rather new module). Do you get any syslog errors from kamailio or database server? I expect that people would have reported such issue for other database engines so far. Still it might be an issue, just that was not noticed... Cheers, Daniel On 24/02/14 11:19, jay binks wrote: So poking round the code for the dialog module Im not sure what im missing here. get_profile_size dosnt care bout the state of a dialog... so you get ALL dialogs that are in the hash table. ( which is interesting if you want to use dialog module to enforce channel limits etc ) So you go... OK... kamailio only expects to have ACTIVE dialogs in the hash table... kewl.. lets assume that to be the case. but then in dlg_db_handler.c , load_dialog_info_from_db loads all dialogs from the DB, regardless of state. so all dialogs in the DB ( ones that didnt get deleted yet... but were in state 5 ) get re-created in kamailio upon startup. what this means is... ( assume starting with empty DB ) I start kamailio, make some calls... they get synced to the DB. I end the calls, kamailio removes from dialogs module internal hash, but the sync to DB hasnt happened yet. I kill kamailio (
Re: [SR-Users] Incorrect Contact address
Why is erroneous to have the contact header with the backend IP? With the record-route on the 200 Ok, the ACK should be directed to the backend IP, but containing a route header pointing to the Kamailio IP. Kamailio will loose_route() this request and send it to the backend server as expected. Regards, On Wed, Mar 5, 2014 at 3:53 PM, Marc Soda ms...@coredial.com wrote: Thanks Olle. I am calling record_record() on the initial INVITE. In fact, the OK has a Record-Route header: 1.1.1.1 is the endpoint 2.2.2.2 is the kamailio proxy 3.3.3.3 is the backend server SIP/2.0 200 OK Via: SIP/2.0/UDP 1.1.1.1:60077 ;rport=46110;branch=z9hG4bK-d8754z-eb9768c7e3a2d1e7-1---d8754z- Record-Route: sip:2.2.2.2;lr=on;ftag=db634167;nat=yes From: sip:sip7878_s...@edge.domain.com;transport=UDP;tag=db634167 To: sip:215...@edge.coredial.com;transport=UDP;tag=as3f9cf263 Call-ID: MzI5YTA3YmRkNzFiZjhhZTRkNTc2OGE1ZTc5ZjdjMmM. CSeq: 2 INVITE User-Agent: CoreDialPBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces Contact: sip:215@3.3.3.3 Content-Type: application/sdp Content-Length: 266 v=0 o=root 13486 13487 IN IP4 3.3.3.3 s=session c=IN IP4 3.3.3.3 t=0 0 m=audio 29990 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - a=ptime:20 a=sendrecv I don't think 3.3.3.3 should show up anywhere, it should be rewritten to 2.2.2.2. On Wed, Mar 5, 2014 at 1:34 PM, Olle E. Johansson o...@edvina.net wrote: On 05 Mar 2014, at 18:30, Marc Soda ms...@coredial.com wrote: I have Kamailio setup as a proxy in front of a backend server (Asterisk). When I make a call through the proxy, the Contact header in the 200 OK that is returned to the client has the IP of the backend server in it. Thus, the client is sending it's ACK directly to the backend server. Is there a special method to rewrite the Contact header to be Kamailio's IP? Check record_route() in the default configuration script. You need to add a route set by using record_route() in the initial transaction. Cheers, /O Where is a good place in the config to do this? (my config is loosely based on this: http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb ) Thanks! Marc ___ 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 ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +595981146623 ___ 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] dialog module with DB Backend
I would suggest that you change the DBMS to something a little less complicated than Cassandra, MySQL for example, make your tests again and see if you can reproduce this. In case you can't, and you get to work everything with the DBMS you chose, it would mean that you have found a bug in the cassandra module. I personally have been experimenting with db_cassandra, and it works quite well for some scenarios, and it does not at all for others. Also, take into account that you can't really maintain the Kamailio tables using the built-in scripts (kamctl) when using Cassandra as a backend. It does not work because Cassandra uses CQL that resembles SQL, but has a very limited functionality and they look alike only syntactically. Regards, On Mon, Feb 24, 2014 at 7:19 AM, jay binks jaybi...@gmail.com wrote: So poking round the code for the dialog module Im not sure what im missing here. get_profile_size dosnt care bout the state of a dialog... so you get ALL dialogs that are in the hash table. ( which is interesting if you want to use dialog module to enforce channel limits etc ) So you go... OK... kamailio only expects to have ACTIVE dialogs in the hash table... kewl.. lets assume that to be the case. but then in dlg_db_handler.c , load_dialog_info_from_db loads all dialogs from the DB, regardless of state. so all dialogs in the DB ( ones that didnt get deleted yet... but were in state 5 ) get re-created in kamailio upon startup. what this means is... ( assume starting with empty DB ) I start kamailio, make some calls... they get synced to the DB. I end the calls, kamailio removes from dialogs module internal hash, but the sync to DB hasnt happened yet. I kill kamailio ( or crash .. whatever ) restart kamailio and it re-loads all those dialogs and thinks they are still active calls. Im SURE Im missing something here, because it seems to be VERY common to use dialogs for channel limiting.. maybe not so much using cassandra db behind the scenes, but as of yet ... Im still yet to find anything that makes me thing this is db_cassandra mis-behaving. if im wrong, please point me in the right direction. Jay On 24 February 2014 17:54, jay binks jaybi...@gmail.com wrote: Am I REALLY the only person who has ever run into this !? On 19 February 2014 14:08, jay binks jaybi...@gmail.com wrote: Hi all, im using the dialog module with db_cassandra backend.. I dont believe this issue is related to cassandra, but its worth mentioning anyways. so... I run kamailio, make calls, see dialogs in the DB.. and I Can use kamctl mi dlg_list and see that dialogs go away when I hangup a call.. When I query the DB Backend, I still see the queries, but they have a state of 5. I Initially thought this was a bug, but it seems dialogs in state 5 get cleaned up after a period. so I moved on. now , lets restart kamailio.. kamailio loads all dialogs on startup, after kamailio starts I call kamctl mi dlg_list again, and it shows all my dialogs from the DB. they DO show as State 5 but for some reason, these dialogs appear to stick around for a long time, and the bigger issue it causes me is that my channel limiting ( using get_profile_size ) seems to consider these dialogs ( in state 5 ) as being active calls. Please someone point me in the right direction... :) what am I doing wrong ? ( or is this a bug somewhere ) Sincerely Jay -- Sincerely Jay -- Sincerely Jay ___ sr-dev mailing list sr-...@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev -- Carlos http://caruizdiaz.com +595981146623 ___ 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 with mediaproxy-ng, 488 Not Acceptable Here
Just in case someone is interested, I created a sample script that could help new comers having the same problem. I will write a blog entry explaining how this works, but in a nutshell: - this script is configured to run behind NAT, port TCP 10080 and TCP/UDP 5090 are exposed to the Internet - you have to create valid users using, preferably, kamctl add ... - RTP ports should be open in range 30k-35k, inclusive - I used jssip as WEBRTC SIP UA: http://tryit.jssip.net/ - Always disable video before placing a call from jssip UA - I tested calls between: - jssip to csipsimple - csipsimple to jssip - csipsimple to csipsimple Link to the scripts: https://github.com/caruizdiaz/kamailio-ws Regards, On Sat, Feb 22, 2014 at 9:31 AM, Richard Fuchs rfu...@sipwise.com wrote: On 02/22/14 07:07, Mihai Marin wrote: Hello Sirs, Sir Richard, Thank you for your detailed explication. I'm still thinking on that but I would say to act as the caller and keep caller decision. If caller makes an offer with rtcp-mux , include separate ICE candidates for RTCP for media proxy too and forward as it is to alice. If callee accept it (or not) you will receive the OK with alice sdp, modify it (depending on her choices) and forward to bob. In this way, we cover all the cases. Eventually we can add another parameter to always ignore rtcp-mux offers. What are the disadvantages on doing that? Is there any possibility that some SIP clients not to respond properly to an SDP with rtcp-mux and that's why you are removing it - or for '+' case where delay will be added? Compatibility is exactly the reason. I don't have any exact numbers, but I'm sure that there's a large number of SIP/RTP clients out there (I'd say the vast majority) which don't support rtcp-mux at all. Some of them might start misbehaving if they receive an rtcp-mux offer (even though as per RFC, they shouldn't, but experience shows that RFC compliance is often just wishful thinking). Since from our point of view (always either '+' or '-') there's no disadvantage in always demuxing RTCP, this was what was implemented. In any case, I'll see if I can get a solution implemented in the near future. cheers ___ 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 -- Carlos http://caruizdiaz.com http://ngvoice.com +595981146623 ___ 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] Performance impact with AVP and VAR's
Maybe you should replace AVPs with VARs where needed. Vars are more lightweight and with a per-process scope only. Regards, On Thu, Feb 20, 2014 at 9:38 PM, Ovidiu Sas o...@voipembedded.com wrote: AVPs are in shared men and protected by locks. VARs are not. There shouldn't be a big impact on using lots of them. Are you experiencing any issues? Regards Ovidiu Sas On Feb 20, 2014 7:32 PM, Jijo realj...@gmail.com wrote: We have defined dedicated AVP variables for each feature. For example, SIP Trunks or Subscribers or Media Handling or Header Manipulation etc, So the no of variables (AVP) has been increased in the initialization. At an instance the no of AVP's used/active might be quite low as each avp's are dedicated for the feature. Does avp read or write cause any Lock? The VAR's has been used locally through out the route for header manipulation and other functions. On Thu, Feb 20, 2014 at 5:37 PM, Alex Balashov abalas...@evaristesys.com wrote: Can you give some example of your use cases for them? I cannot say for sure, but my intuition is that if you have three hundred variables in any program, you're doing something wrong. At that point you're in territory that clearly calls for some sort of non- scalar data structure, such as an associative array. Jijo realj...@gmail.com wrote: Hi All, I have around 300 AVP's and quite amount of VAR's are used in the config file? Does that impact performance?, If so how can i improve it? Thanks Jijo -- 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 -- Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard. Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0671 Web: http://www.evaristesys.com/, http://www.alexbalashov.com ___ 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 ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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] call limit by trunk/user
Hi Oliver, maybe you can use the cnxcc prepaid module [1]. Hopefully, it is what you are looking for. [1] http://kamailio.org/docs/modules/devel/modules/cnxcc.html#idp130984 Regards, On Wed, Dec 18, 2013 at 9:42 AM, Oliver Roth oliver.r...@triotel.ch wrote: Hi all I need a solution to limit the amount of concurrent calls by trunk or user/subscriber. We have the following situation: Kamailio loadbalancer è 3 kamailio gateway with routing/business logic Kamailio is version 3.3 for all 4 systems. Loadbalancer has only the absolute minimum config to act as loadbalancert, the whole business logic is on gateway side (db connections, carrierroute, …) Do you have a suggestion how to limit calls/connections? Has this to be done on the loadbalancer? Or is there a solution to do this on the gateways – so every gateway knows the currently opened connections? Thanks for helping Oli ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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] call limit by trunk/user
Yes. I originally developed the module for the 3.2 version, so, if you take the source code and compile it on the 3.x branch, it should work. On Wed, Dec 18, 2013 at 1:01 PM, Oliver Roth oliver.r...@triotel.ch wrote: Is it possible to run this module with Kamailio version 3.3? As we are not able to run Kamailio 4.x with carrierroute and Ubuntu 12.04 – we have to stay with Kamailio 3.3 *Von:* sr-users-boun...@lists.sip-router.org [mailto: sr-users-boun...@lists.sip-router.org] *Im Auftrag von *Carlos Ruiz Díaz *Gesendet:* Mittwoch, 18. Dezember 2013 13:54 *An:* Kamailio (SER) - Users Mailing List *Betreff:* Re: [SR-Users] call limit by trunk/user Hi Oliver, maybe you can use the cnxcc prepaid module [1]. Hopefully, it is what you are looking for. [1] http://kamailio.org/docs/modules/devel/modules/cnxcc.html#idp130984 Regards, On Wed, Dec 18, 2013 at 9:42 AM, Oliver Roth oliver.r...@triotel.ch wrote: Hi all I need a solution to limit the amount of concurrent calls by trunk or user/subscriber. We have the following situation: Kamailio loadbalancer è 3 kamailio gateway with routing/business logic Kamailio is version 3.3 for all 4 systems. Loadbalancer has only the absolute minimum config to act as loadbalancert, the whole business logic is on gateway side (db connections, carrierroute, …) Do you have a suggestion how to limit calls/connections? Has this to be done on the loadbalancer? Or is there a solution to do this on the gateways – so every gateway knows the currently opened connections? Thanks for helping Oli ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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] Timezone in acc table
Hi, as a workaround you could create a trigger for the before-insert event to modify the new row with the correct values by adding or subtracting hours depending on your timezone. Regards, Carlos On Thu, Nov 14, 2013 at 11:37 AM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, upcoming release 4.1 has more options to control the time value in acc table. See time_mode parameter and the next after it: http://kamailio.org/docs/modules/devel/modules/acc.html#acc.p.time_mode Otherwise, you can set the timezone to gmt. Cheers, Daniel On 11/14/13 2:55 PM, Igor Potjevlesch wrote: Hi, I’m wondering how can I change the timezone when INVITE, ACK, BYE and CANCEL are inserted into acc table? Indeed, today, each entrie has the same datetime than the server. I would prefer to have UTC time in “time” column instead. I know that it was the behaviour with old SER releases. Thank for your help. Regards, Igor. -- http://www.avast.com/ Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection Antivirus avast! http://www.avast.com/ est active. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Trainings - Berlin, Nov 25-28 - more details about Kamailio trainings at http://www.asipto.com - ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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] Google search
Hi guys, this happens to me all the time: when I search for documentation about a specific Kamailio module on Google, I always land on outdated entries usually from Kamailio 1.6.x. Although this seems trivial and I could simply update the URL to the current version of Kamailio, this may be not so obvious for new users and they may end up reading expired documentation and/or implementing non-optimal solutions to their problems. is there a way to only allow indexation of the last documentation? Something like removing the version or adding an HTTP 301 to old entries? Regards, -- Carlos http://caruizdiaz.com +595981146623 ___ 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] hanging active dialog...
I don't know what exactly happened in your case but if you don't have time to investigate you can try cnxcc module [1] channel control to achieve the same goal. Take a look at the sample configuration file located in [2] xlog(L_INFO, Setting up channel based credit control); $var(max_chan) = 2; $var(retcode) = cnxcc_set_max_channels($var(client), $var(max_chan)); if ($var(retcode) == -1) { xlog(Error setting up credit control); return; } $var(count) = -1; if (!cnxcc_get_channel_count($var(client), $var(count))) { xlog(Error getting customer's channel count); } xlog(L_INFO, CNXCC ROUTE: $var(client) has $var(count) call(s)); if ($var(retcode) -1) { xlog(Too many channels for customer); sl_send_reply(403, Forbidden); if (!cnxcc_terminate_all($var(client))) { xlog(Error terminating customer's calls); } exit; } [1] http://kamailio.org/docs/modules/devel/modules/cnxcc.html [2] https://github.com/caruizdiaz/cnxcc/blob/master/example/kamailio-cnxcc.cfg Regards, Carlos On Fri, Aug 23, 2013 at 5:16 AM, Gertjan Wolzak g.wol...@foize.com wrote: ** ** Goodmorning All, ** ** I use the following route to check for concurrent calls by the same user, if a concurrent call is tried it is not allowed. ** ** route[CONCURRENT] { xlog(SCRIPT: Conccurrent call check); ** ** if(!get_profile_size(caller,$fu,$avp(nrcalls))) { sl_send_reply(403, Call not matching profile); exit; } xlog(SCRIPT: caller value for $fu is $avp(nrcalls)); if($avp(nrcalls)= 1) { sl_send_reply(403, Active calls limit exceeded); exit; } dlg_manage(); if(!set_dlg_profile(caller,$fu)) { sl_send_reply(500, No new channels in this profile);** ** exit; } ** ** xlog(SCRIPT: caller value for $fu is now $avp(nrcalls)); ** ** } ** ** Now I had a situation where a user could not call because the get_profile_size for this user gave the value 1. So another call was not allowed. But the user did not have a call active. As no dialogs were active, checked that. ** ** I assume there can be a lot of reasons why this happens, also I want to use the “I don’t want to know the cause” method to solve this. ** ** So I looked at the dialog module documentation, to see if I can just clear the profile size for this specific user. ** ** I wanted to use the profile_list_dlgs(8.6) to get the dialog details, then the dlg_terminate_dlg(8.4) to, you guessed it, terminate that dialog. ** ** But it’s not clear to me how I can give those commands…. ** ** Is there a way to give those commands on the cli, if so can someone please write down some examples… ** ** Would be really appreciated. ** ** Rgds, ** ** Gertjan ** ** ** ** ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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] Writing a module
There's also a Perl module that can be used to execute a Perl script containing your business logic. Sounds like you are doing lots of database queries and doing that from a C module will always be more difficult than using a DB abstraction layer that the one Perl provides. On Tue, Aug 20, 2013 at 7:41 AM, Grant Bagdasarian g...@cm.nl wrote: Alright, thanks guys! I'll have a closer look at the existing modules. -Original Message- From: sr-users-boun...@lists.sip-router.org [mailto: sr-users-boun...@lists.sip-router.org] On Behalf Of Daniel-Constantin Mierla Sent: Tuesday, August 20, 2013 1:37 PM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Writing a module Hello, devel guide is useful for writing own module: - http://www.asipto.com/pub/kamailio-devel-guide/ Also, it was a recent discussion on sr-dev with hits about modules to look at: - http://lists.sip-router.org/pipermail/sr-dev/2013-August/020977.html Cheers, Daniel On 8/20/13 1:33 PM, Grant Bagdasarian wrote: It's going to be a custom routing module, with our own business logic. It should load the routes from a database and keep refreshing the data every x interval. For SIP-to-PSTN calls (outgoing to carrier) we need to be able to route based on the callerprefix, customer id (which is added as a custom header), originating IP, and some other fields. I need a way to select the closest matching route, or fallback to the default route, using the fields described above. Implementing this logic in a stored procedure is quite hard. Another option would be to write a web service and perform http calls to determine the route. I'm just worried that http might delay the setup of calls. Our routes table contains custom fields, but also fields which are used by the dispatcher module. So once a route is selected, the dispatcher module will use the uri in the route set to rewrite the ruri and possibly do failover. -Original Message- From: sr-users-boun...@lists.sip-router.org [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Tuesday, August 20, 2013 12:43 PM To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] Writing a module On 08/20/2013 06:41 AM, Grant Bagdasarian wrote: Hello, Is this page still up-to-date: http://www.kamailio.org/dokuwiki/doku.php/development:write-module ? I'm researching what it takes to create our own custom Kamailio module. 1. Skilled C programming. 2. What do you want to accomplish? Are you sure no combination of existing modules and script constructs fit the bill? Sometimes you really do need a custom module. But I find those cases to be relatively few, at least for applications of Kamailio that are not truly exotic. -- Alex -- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/ ___ 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 -- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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] Writing a module
Sure it's a great option but sometimes your business complexity demands not only database queries but remote sockets connection, complex iteration over result sets, doing some regex over the values, etc. Doing this kind of stuff with Perl feels a lot more comfortable. On Tue, Aug 20, 2013 at 7:53 AM, Alex Balashov abalas...@evaristesys.comwrote: On 08/20/2013 07:51 AM, Carlos Ruiz Díaz wrote: There's also a Perl module that can be used to execute a Perl script containing your business logic. Sounds like you are doing lots of database queries and doing that from a C module will always be more difficult than using a DB abstraction layer that the one Perl provides. ... or just good old 'sqlops'. The appearance of 'sqlops'[1] effectively obviated the need for writing most modules of this type. The case for modules remains only in cases where you need novel capabilities in script. Novel database interactions can be had via 'sqlops' because it is generic and flexible. -- Alex [1] And really, avp_db_query() before it, but sqlops is just more flexible. -- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/ __**_ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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] cnxcc module insufficient credit
Hi Jayesh, I just applied the changes and updated the documentation. Please give it a try. Regards, Carlos On Wed, Jul 17, 2013 at 11:01 PM, Jayesh Nambiar jayesh1...@gmail.comwrote: Thank you Carlos. --- Jayesh On Wed, Jul 17, 2013 at 11:19 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Ok. Right now I'm short in time but this weekend I'm gonna schedule myself this. I'll let you know. Carlos. On Wed, Jul 17, 2013 at 11:40 AM, Jayesh Nambiar jayesh1...@gmail.comwrote: Thanks for the reply Carlos. Checking before relaying the call is how I am doing it right now but it feels like it would have been more neater if done in the cnxcc module itself since it is anyways checking the credit after the call is active !! I would wait for that behavior though in the cnxcc module. Thanks again. --- Jayesh On Wed, Jul 17, 2013 at 8:32 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Hi Jayesh, yes, I think this behavior can be added. As a workaround you can check the credit data before relaying the INVITE so you can reject it immediately in case of lacking enough credit. Have you tried that? Regards, Carlos. On Wed, Jul 17, 2013 at 10:57 AM, Jayesh Nambiar jayesh1...@gmail.comwrote: Hi All, I was testing out the cnxcc module and it works well for prepaid credit handling. One problem that I saw with the module is that if the credit is insufficient it still allows the call to pass and then disconnect within a second. Is it possible that if the credit is insufficient for the call, the dialog can be terminated before the call is placed with a 4xx kind of response !! Just a thought. Thanks, --- Jayesh ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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] Get duration in cnxcc:call-shutdown event
The lack of values in some of the standard pseudo variables is a limitation of the dialog module which does not provide the necessary information in the event route block in cases when the call is forced to end. You can calculate the duration using: * $var(duration) = $TS - $dlg(start_ts);* * * Regards, Carlos On Sat, Jul 20, 2013 at 2:07 AM, Jayesh Nambiar jayesh1...@gmail.comwrote: Hello, Is there a straight forward way of getting the duration of the call in cnxcc-call-shutdown event. The $DLG_lifetime returns NULL as the dialog does not exist. I dont get the value of $DLG_lifetime even in dialog:end event when the call ends through cnxcc module. Even the cdr flag of acc module doesn't get the duration and it logs, invalid values !! Currently, I am storing the timestamp in htable when the call is answered and then subtract it from the current timestamp in the cnxcc:shutdown event route to get the duration. Something like this: onreply_route[MANAGE_REPLY] { xdbg(incoming reply\n); if(status==200) { $sht(ts=$ci) = $Ts; } } event_route[cnxcc:call-shutdown] { $var(duration) = $TS-$sht(ts=$ci); sht_rm_name_re(ts=$ci); xlog(L_INFO, Duration of call was $var(duration)); } Any more correct way of doing this would be very helpful. Thanks, --- Jayesh ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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] cnxcc module insufficient credit
Hi Jayesh, yes, I think this behavior can be added. As a workaround you can check the credit data before relaying the INVITE so you can reject it immediately in case of lacking enough credit. Have you tried that? Regards, Carlos. On Wed, Jul 17, 2013 at 10:57 AM, Jayesh Nambiar jayesh1...@gmail.comwrote: Hi All, I was testing out the cnxcc module and it works well for prepaid credit handling. One problem that I saw with the module is that if the credit is insufficient it still allows the call to pass and then disconnect within a second. Is it possible that if the credit is insufficient for the call, the dialog can be terminated before the call is placed with a 4xx kind of response !! Just a thought. Thanks, --- Jayesh ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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] cnxcc module insufficient credit
Ok. Right now I'm short in time but this weekend I'm gonna schedule myself this. I'll let you know. Carlos. On Wed, Jul 17, 2013 at 11:40 AM, Jayesh Nambiar jayesh1...@gmail.comwrote: Thanks for the reply Carlos. Checking before relaying the call is how I am doing it right now but it feels like it would have been more neater if done in the cnxcc module itself since it is anyways checking the credit after the call is active !! I would wait for that behavior though in the cnxcc module. Thanks again. --- Jayesh On Wed, Jul 17, 2013 at 8:32 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Hi Jayesh, yes, I think this behavior can be added. As a workaround you can check the credit data before relaying the INVITE so you can reject it immediately in case of lacking enough credit. Have you tried that? Regards, Carlos. On Wed, Jul 17, 2013 at 10:57 AM, Jayesh Nambiar jayesh1...@gmail.comwrote: Hi All, I was testing out the cnxcc module and it works well for prepaid credit handling. One problem that I saw with the module is that if the credit is insufficient it still allows the call to pass and then disconnect within a second. Is it possible that if the credit is insufficient for the call, the dialog can be terminated before the call is placed with a 4xx kind of response !! Just a thought. Thanks, --- Jayesh ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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 cleanup unconfirmed dialog in memory?
What if you set the default dialog timeout to a value much less than 12/14 hours, maybe 2 hours. It's very unlikely that a session last that long. On Tue, Jul 2, 2013 at 9:23 AM, Charles Chance charles.cha...@sipcentric.com wrote: Hi, I don't think this will help at all, as regardless of DB mode, unconfirmed dialogs are not stored in DB anyway. The important thing to remember is that if you are calling dialog_manage() in your config, to only do it once you are ready to forward the request. If you call it but then exit for some reason without actually forwarding, you will probably end up with a stuck dialog. Maybe someone else can suggest other possible causes? To my knowledge, there is no existing way to clear these without restarting. Regards, Charles On 2 July 2013 14:10, Gary Chen gchen3...@gmail.com wrote: Thanks for suggestion. I will give it try. Since every call will have to check database, will this effect the performance of Kamailio for high volume server? Gary On Tue, Jul 2, 2013 at 8:55 AM, I.Pavlov i...@izhnet.ru wrote: Hi, Gary. I had same problem. Try to use “db_mode” parameter of dialog module with 1 value. ** ** *1 - REALTIME* - any dialog information changes will be reflected into the database immediatly. ** ** Then you can kill the dead dialogs through database. ** ** *From:* sr-users-boun...@lists.sip-router.org [mailto: sr-users-boun...@lists.sip-router.org] *On Behalf Of *Gary Chen *Sent:* Tuesday, July 02, 2013 4:14 PM *To:* Kamailio (SER) - Users Mailing List *Subject:* [SR-Users] How to cleanup unconfirmed dialog in memory? ** ** ** ** Kamailio 3.3.3 I am using dialog module to do the concurrent call limit. Once a while I got a dead unconfirmed dialog hung in memory. The only way I know to cleanup this is to restart kamailio. So my questions are: 1) Does anybody know a better way to cleanup the dead dialog without having to restart the kamailio server? This is a production server. I really really hate to restart the server. 2) How easy to modify the source code to timeout the dead unconfirmed dialog in memory? Gary ___ 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 www.sipcentric.com Follow us on twitter @sipcentric http://twitter.com/sipcentric Sipcentric Ltd. Company registered in England Wales no. 7365592. Registered office: Unit 10 iBIC, Birmingham Science Park, Holt Court South, Birmingham B7 4EJ. ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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 cleanup unconfirmed dialog in memory?
Now that you mention it, it makes perfect sense since this function sends BYE to both legs which only makes sense with confirmed dialogs. I run out of alternatives. Maybe patching the module is the only solution. Regards, Carlos On Tue, Jul 2, 2013 at 10:16 AM, Charles Chance charles.cha...@sipcentric.com wrote: That doesn't work I'm afraid. Also from http://www.kamailio.org/docs/modules/3.1.x/modules_k/dialog.html#id2524783 : *Note: Works only for confirmed dialogs.* It's something I've been meaning to look further into for a while, but haven't yet had chance. I suspect a small patch will be required though. Regards, Charles On 2 July 2013 15:11, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Ok, I haven't noticed that, although I can't tell for sure whether it will work or not. If you can dump the dialogs using xmlrpc or rpc interface, maybe you could parse the info and tear down those unconfirmed dialogs using dlg_end_dlg: http://www.kamailio.org/docs/modules/3.1.x/modules_k/dialog.html#id2524783 On Tue, Jul 2, 2013 at 10:02 AM, Charles Chance charles.cha...@sipcentric.com wrote: The parameter does not work for us. We have modparam(dialog, default_timeout,7200), but it only has an effect on confirmed dialogs. As you can see from my previous example, there is not even a timestart value on the unconfirmed dialog, so how can Kamailio know when timeout is reached? On 2 July 2013 14:51, Carlos Ruiz Díaz carlos.ruizd...@gmail.comwrote: There is, but for all dialogs, not only the unconfirmed ones. http://www.kamailio.org/docs/modules/3.3.x/modules_k/dialog.html#default-timeout-id On Tue, Jul 2, 2013 at 9:49 AM, Charles Chance charles.cha...@sipcentric.com wrote: Hmm, I don't think there is even a timeout value set on unconfirmed dialogs in memory. Example (Kamailio 3.3.3): dialog:: hash=1791:10106 state:: 1 ref_count:: 1 timestart:: 0 timeout:: 0 ... Whereas: dialog:: hash=2963:2808 state:: 4 ref_count:: 2 timestart:: 1372772302 timeout:: 114829207 ... Therefore, the unconfirmed dialogs never get cleared automatically, in my experience at least. I hope I'm wrong though :) Cheers, Charles On 2 July 2013 14:31, Henning Westerholt h...@kamailio.org wrote: Am Dienstag, 2. Juli 2013, 14:23:25 schrieb Charles Chance: I don't think this will help at all, as regardless of DB mode, unconfirmed dialogs are not stored in DB anyway. The important thing to remember is that if you are calling dialog_manage() in your config, to only do it once you are ready to forward the request. If you call it but then exit for some reason without actually forwarding, you will probably end up with a stuck dialog. Maybe someone else can suggest other possible causes? To my knowledge, there is no existing way to clear these without restarting. Hello, AFAIK these stale dialogs are cleaned up after the dialog timeout. There are module parameter and also dialog specific parameter to control this variable. This stale dialogs needs a bit of memory, but are otherwise harmless. Best regards, Henning www.sipcentric.com Follow us on twitter @sipcentric http://twitter.com/sipcentric Sipcentric Ltd. Company registered in England Wales no. 7365592. Registered office: Unit 10 iBIC, Birmingham Science Park, Holt Court South, Birmingham B7 4EJ. ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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 -- *Charles Chance* Managing Director t. 0121 285 4400m. 07932 063 891 www.sipcentric.com Follow us on twitter @sipcentric http://twitter.com/sipcentric Sipcentric Ltd. Company registered in England Wales no. 7365592. Registered office: Unit 10 iBIC, Birmingham Science Park, Holt Court South, Birmingham B7 4EJ. ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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 www.sipcentric.com Follow us on twitter @sipcentric http://twitter.com/sipcentric Sipcentric Ltd. Company registered in England Wales no. 7365592. Registered office: Unit 10 iBIC, Birmingham Science Park, Holt Court South, Birmingham B7 4EJ
Re: [SR-Users] Issue with RTP proxy....
Not true. I'm running RTP proxy behind NAT without problems. On Tue, Jul 2, 2013 at 3:22 PM, Sergey Okhapkin s...@sokhapkin.dyndns.orgwrote: That might not work. Substituting of advertise IP address is not enough. NAT router could mangle IP port too. Once again - RTP proxy must run on a public IP address. There are no workarounds. On Tuesday 02 July 2013 12:16:40 arun Jayaprakash wrote: ...also listen=udp:10.164.62.166:5060 advertise 54.235.xx.xx:5060 From: Daniel-Constantin Mierla mico...@gmail.com To: arun Jayaprakash jayaprakasha...@yahoo.com; Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Sent: Tuesday, July 2, 2013 12:41 PM Subject: Re: [SR-Users] Issue with RTP proxy On 7/2/13 7:01 PM, arun Jayaprakash wrote: Can you please give me some pointers as to how to apply this patch, I have never done one in the past. Thank you. I guess you can find good tutorials online on how to use patch tool or understand patching mechanisms. Or if it is ok, just take the whole rtpproxy sources from the githug repository and compile/install it. Cheers, Daniel Regards, Arun From: Sergey Okhapkin s...@sokhapkin.dyndns.org To: arun Jayaprakash jayaprakasha...@yahoo.com; Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Sent: Tuesday, July 2, 2013 11:49 AM Subject: Re: [SR-Users] Issue with RTP proxy How else? On Tuesday 02 July 2013 09:44:48 arun Jayaprakash wrote: Daniel, so you are saying that the machine running RTP proxy should not be a natted one but should have its own public IP? Thanks, Arun From: Daniel-Constantin Mierla mico...@gmail.com To: Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org Sent: Tuesday, July 2, 2013 10:53 AM Subject: Re: [SR-Users] Issue with RTP proxy On 7/2/13 5:11 PM, David | StyleFlare wrote: Daniel, I am confused, I thought that patch is not really needed? Indeed, the patch is not really needed when you have a single instance of rtpproxy and know its public ip. But when you deal with many rtpproxies, then you cannot deal from config. Also, for bridging networks is not possible from config. With the patch, the config of kamailio stays as usual all the time. Cheers, Daniel On Ec2 you should be able to bind to the Local IP and then pass the External IP to rtp-manage. Am I missing something here? Should effectively be the same thing. On 7/2/13 10:50 AM, Fred Posner wrote: This is awesome... did it say which version of RTP Proxy or did I just not RTFM well enough? Fred Posner | Team Forrest / LOD direct: 503-914-0999 | fax: 954-472-2896 On 07/02/2013 10:17 AM, Daniel-Constantin Mierla wrote: Hello, have you re-installed rtpproxy from sources after applying the patch I provided the link to? Cheers, Daniel On 7/2/13 3:33 PM, arun Jayaprakash wrote: Hi Daniel, I get this error: rtpproxy -F -l 10.164.62.166 -A 54.x.x.x -s udp:127.0.0.1:7722 rtpproxy: invalid option -- 'A' usage: rtpproxy [-2fvFiPa] [-l addr1[/addr2]] [-6 addr1[/addr2]] [-s path] [-t tos] [-r rdir [-S sdir]] [-T ttl] [-L nfiles] [-m port_min] [-M port_max] [-u uname[:gname]] [-n timeout_socket] [-d log_level[:log_facility]] --- - *From:* Daniel-Constantin Mierla mico...@gmail.com *To:* arun Jayaprakash jayaprakasha...@yahoo.com; Kamailio (SER) - Users Mailing List sr-users@lists.sip-router.org *Sent:* Tuesday, July 2, 2013 2:39 AM *Subject:* Re: [SR-Users] Issue with RTP proxy Hello, On 7/1/13 5:48 PM, arun Jayaprakash wrote: Hello, I have enabled RTP proxy on my machine (ec2 instance) by running the following script: rtpproxy -F -l mypublicip -s udp:localhost:7722 but I keep getting this error. The phones ring but there is no audio: 3(4144) ERROR: rtpproxy [rtpproxy.c:2647]: force_rtp_proxy(): incorrect port 0 in reply from rtp proxy can someone let me know what this error means? you cannot get rtpproxy listening on the ec2 public ip, which does not
Re: [SR-Users] $DLG_lifetime
Maybe cnxcc module can help you [1]. If you need to set a time limit you could use cnxcc_set_max_time() and when the call times out, an event route is called. [1] http://kamailio.org/docs/modules/devel/modules/cnxcc.html Regards, Carlos On Fri, Jun 21, 2013 at 8:30 AM, Federico Cabiddu federico.cabi...@gmail.com wrote: Hi Daniel, thank you for your answer. I tried to catch the BYE with event_route[dialog:end] but I'm facing another problem. When the timeout for the dialog is reached Kamailio correctly sends a BYE to the caller and to the callee but in the logs I see this: DEBUG: dialog [dlg_timer.c:240]: start with tl=0x7f10937f0138 tl-prev=0x7f10937b4f20 tl-next=0x7f10937b4f20 (42641998) at 42641998 and end with end=0x7f10937b4f20 end-prev=0x7f10937f0138 end-next=0x7f10937f0138 DEBUG: dialog [dlg_timer.c:243]: getting tl=0x7f10937f0138 tl-prev=0x7f10937b4f20 tl-next=0x7f10937b4f20 with 42641998 DEBUG: dialog [dlg_timer.c:249]: end with tl=0x7f10937b4f20 tl-prev=0x7f10937f0138 tl-next=0x7f10937f0138 and d_timer-first.next-prev=(nil) DEBUG: dialog [dlg_timer.c:282]: tl=0x7f10937f0138 next=(nil) DEBUG: dialog [dlg_req_within.c:302]: sending BYE to caller DEBUG: tm [uac.c:243]: DEBUG:tm:t_uac: next_hop=sip:x...@yyy.yyy.yyy.yyy :;transport=udp DEBUG: tm [uac.c:182]: DEBUG: dlg2hash: 343 DEBUG: dialog [dlg_req_within.c:323]: BYE sent to caller DEBUG: dialog [dlg_req_within.c:302]: sending BYE to callee DEBUG: tm [uac.c:243]: DEBUG:tm:t_uac: next_hop=sip:x...@yyy.yyy.yyy.yyy :;transport=udp DEBUG: tm [uac.c:182]: DEBUG: dlg2hash: 343 DEBUG: dialog [dlg_req_within.c:323]: BYE sent to callee DEBUG: dialog [dlg_hash.c:735]: ref dlg 0x7f10937f00e0 with 1 - 3 DEBUG: dialog [dlg_handlers.c:1474]: executing event_route 1 on state 5 DEBUG: dialog [dlg_hash.c:588]: ref dlg 0x7f10937f00e0 with 1 - 4 DEBUG: dialog [dlg_hash.c:590]: dialog id=11591 found on entry 3289 DEBUG: dialog [dlg_hash.c:753]: unref dlg 0x7f10937f00e0 with 1 - 3 DEBUG: dialog [dlg_hash.c:588]: ref dlg 0x7f10937f00e0 with 1 - 4 DEBUG: dialog [dlg_hash.c:590]: dialog id=11591 found on entry 3289 DEBUG: dialog [dlg_hash.c:753]: unref dlg 0x7f10937f00e0 with 1 - 3 DEBUG: core [parser/parse_to.c:799]: end of header reached, state=10 DEBUG: core [parser/msg_parser.c:190]: DEBUG: get_hdr_field: To [20]; uri=[y...@kamailio.org] DEBUG: core [parser/msg_parser.c:192]: DEBUG: to body [y...@kamailio.org #015#012] DEBUG: core [parser/parse_to.c:176]: DEBUG: add_param: tag=123 DEBUG: core [parser/parse_to.c:799]: end of header reached, state=29 DEBUG: core [parser/parse_uri.c:1292]: parse_uri: bad uri, state 0 parsed: you@ (4) / y...@kamailio.org (16) ERROR: core [parser/parse_from.c:113]: failed to parse From uri ERROR: pv [pv_core.c:400]: cannot parse From URI DEBUG: core [parser/parse_uri.c:1292]: parse_uri: bad uri, state 0 parsed: you@ (4) / y...@kamailio.org (16) ERROR: core [parser/parse_to.c:879]: failed to parse To uri ERROR: pv [pv_core.c:394]: cannot parse To URI INFO: script: event_route[dialog:end]: call-id=123 from=null to=null : (method= OPTIONS) :: dlg flag: 18446744073709551615 :: DLG_lifetime: null The parser error problem seems to be related to the To and From headers of FAKED_SIP_MSG, defined in lib/kcore/faked_msg.c. If I change those URIs adding sip: the pv error disappears but once entered the event_route[dialog:end] INFO: script: event_route[dialog:end]: call-id=123 from=you to=you : (method= OPTIONS) :: dlg flag: 18446744073709551615 :: DLG_lifetime: null WARNING: dialog [dlg_req_within.c:177]: inconsitent dlg timer data on dlg 0x7fa07e0c6fe0 [2950:12062] with clid '1518225741' and tags '717826890' '1348505040' As you can see, the $DLG_lifetime is null and we also have the message on the inconsistent dlg timer. Probably there is something that I'm not understanding but why the event_route in this case is processing a fake OPTIONS message? Another thing I noticed is that event_route[dialog:end] is not executed when a dialog is terminated by dlg_end_dlg or dlg_terminate_dlg fifo commands. We really need to access the DLG_lifetime value in both cases (internal timeout or external command), any hint on how to do it? Thank you in advance. Regards, Federico On Fri, Jun 21, 2013 at 12:43 AM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, there is an event route for dialog timeout, I guess there is available. tm:local is executed by tm, so you may need to call the function that lookups the dialog. Cheers, Daniel On 6/20/13 1:47 PM, Dragos Oancea wrote: Hello , Is the $DLG_lifetime supposed to be accessed in theevent_route[tm:local-request] ? We are trying to access it and it always reports null with kamailio 4.0.0 . We found a reference about this here: http://www.kamailio.org/pub/kamailio/3.3.3/ChangeLog . dialog(k): run event route after setting cfg dlg vars - in this way they (e.g.,
Re: [SR-Users] $DLG_lifetime
Just for the sake of completeness, you can get the dialog duration (equivalent of $DLG_lifetime) using the following construction: event_route[cnxcc:call-shutdown] { $var(duration) = $TS - $dlg(start_ts); xlog(L_INFO, Call killed after [$var(duration)] sec(s)); unforce_rtp_proxy(); } On Fri, Jun 21, 2013 at 8:45 AM, Federico Cabiddu federico.cabi...@gmail.com wrote: Thanks! I'll have a look on this too. Regards, Federico On Fri, Jun 21, 2013 at 2:43 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Maybe cnxcc module can help you [1]. If you need to set a time limit you could use cnxcc_set_max_time() and when the call times out, an event route is called. [1] http://kamailio.org/docs/modules/devel/modules/cnxcc.html Regards, Carlos On Fri, Jun 21, 2013 at 8:30 AM, Federico Cabiddu federico.cabi...@gmail.com wrote: Hi Daniel, thank you for your answer. I tried to catch the BYE with event_route[dialog:end] but I'm facing another problem. When the timeout for the dialog is reached Kamailio correctly sends a BYE to the caller and to the callee but in the logs I see this: DEBUG: dialog [dlg_timer.c:240]: start with tl=0x7f10937f0138 tl-prev=0x7f10937b4f20 tl-next=0x7f10937b4f20 (42641998) at 42641998 and end with end=0x7f10937b4f20 end-prev=0x7f10937f0138 end-next=0x7f10937f0138 DEBUG: dialog [dlg_timer.c:243]: getting tl=0x7f10937f0138 tl-prev=0x7f10937b4f20 tl-next=0x7f10937b4f20 with 42641998 DEBUG: dialog [dlg_timer.c:249]: end with tl=0x7f10937b4f20 tl-prev=0x7f10937f0138 tl-next=0x7f10937f0138 and d_timer-first.next-prev=(nil) DEBUG: dialog [dlg_timer.c:282]: tl=0x7f10937f0138 next=(nil) DEBUG: dialog [dlg_req_within.c:302]: sending BYE to caller DEBUG: tm [uac.c:243]: DEBUG:tm:t_uac: next_hop=sip:x...@yyy.yyy.yyy.yyy :;transport=udp DEBUG: tm [uac.c:182]: DEBUG: dlg2hash: 343 DEBUG: dialog [dlg_req_within.c:323]: BYE sent to caller DEBUG: dialog [dlg_req_within.c:302]: sending BYE to callee DEBUG: tm [uac.c:243]: DEBUG:tm:t_uac: next_hop=sip:x...@yyy.yyy.yyy.yyy :;transport=udp DEBUG: tm [uac.c:182]: DEBUG: dlg2hash: 343 DEBUG: dialog [dlg_req_within.c:323]: BYE sent to callee DEBUG: dialog [dlg_hash.c:735]: ref dlg 0x7f10937f00e0 with 1 - 3 DEBUG: dialog [dlg_handlers.c:1474]: executing event_route 1 on state 5 DEBUG: dialog [dlg_hash.c:588]: ref dlg 0x7f10937f00e0 with 1 - 4 DEBUG: dialog [dlg_hash.c:590]: dialog id=11591 found on entry 3289 DEBUG: dialog [dlg_hash.c:753]: unref dlg 0x7f10937f00e0 with 1 - 3 DEBUG: dialog [dlg_hash.c:588]: ref dlg 0x7f10937f00e0 with 1 - 4 DEBUG: dialog [dlg_hash.c:590]: dialog id=11591 found on entry 3289 DEBUG: dialog [dlg_hash.c:753]: unref dlg 0x7f10937f00e0 with 1 - 3 DEBUG: core [parser/parse_to.c:799]: end of header reached, state=10 DEBUG: core [parser/msg_parser.c:190]: DEBUG: get_hdr_field: To [20]; uri=[y...@kamailio.org] DEBUG: core [parser/msg_parser.c:192]: DEBUG: to body [ y...@kamailio.org#015#012] DEBUG: core [parser/parse_to.c:176]: DEBUG: add_param: tag=123 DEBUG: core [parser/parse_to.c:799]: end of header reached, state=29 DEBUG: core [parser/parse_uri.c:1292]: parse_uri: bad uri, state 0 parsed: you@ (4) / y...@kamailio.org (16) ERROR: core [parser/parse_from.c:113]: failed to parse From uri ERROR: pv [pv_core.c:400]: cannot parse From URI DEBUG: core [parser/parse_uri.c:1292]: parse_uri: bad uri, state 0 parsed: you@ (4) / y...@kamailio.org (16) ERROR: core [parser/parse_to.c:879]: failed to parse To uri ERROR: pv [pv_core.c:394]: cannot parse To URI INFO: script: event_route[dialog:end]: call-id=123 from=null to=null : (method= OPTIONS) :: dlg flag: 18446744073709551615 :: DLG_lifetime: null The parser error problem seems to be related to the To and From headers of FAKED_SIP_MSG, defined in lib/kcore/faked_msg.c. If I change those URIs adding sip: the pv error disappears but once entered the event_route[dialog:end] INFO: script: event_route[dialog:end]: call-id=123 from=you to=you : (method= OPTIONS) :: dlg flag: 18446744073709551615 :: DLG_lifetime: null WARNING: dialog [dlg_req_within.c:177]: inconsitent dlg timer data on dlg 0x7fa07e0c6fe0 [2950:12062] with clid '1518225741' and tags '717826890' '1348505040' As you can see, the $DLG_lifetime is null and we also have the message on the inconsistent dlg timer. Probably there is something that I'm not understanding but why the event_route in this case is processing a fake OPTIONS message? Another thing I noticed is that event_route[dialog:end] is not executed when a dialog is terminated by dlg_end_dlg or dlg_terminate_dlg fifo commands. We really need to access the DLG_lifetime value in both cases (internal timeout or external command), any hint on how to do it? Thank you in advance. Regards, Federico On Fri, Jun 21, 2013 at 12:43 AM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, there is an event route for dialog
Re: [SR-Users] Missed calls notification supporting
Whenever I get a missed call I store it in a database table of my own logic (maybe you could use the built-in table for that), later, when the user appears online again after a registration, I read the records belonging to him and I send him a SIP MESSAGE containing his missed calls. Needless to say, the UA must support displaying IMs for this to make sense. route[SEND_SIP_MESSAGE] { xlog(L_INFO, MESSAGE to [$avp(s:sms_to_subscriber)]: $avp(s:sms_content)); $uac_req(method)= MESSAGE; $uac_req(ruri) = $avp(s:subs_uri); $uac_req(furi) = $avp(s:subs_from); $uac_req(turi) = $avp(s:subs_to); $uac_req(hdrs) = Content-Type: text/plain\r\n; $uac_req(body) = $avp(s:sms_content); return uac_req_send(); } On Tue, Jun 11, 2013 at 11:39 AM, Daniel Tryba dan...@pocos.nl wrote: On Tuesday 11 June 2013 11:51:23 sipa...@in.gr wrote: I have added the below configuration lines and I got a parsing error. if(!lookup(location)) if(is_method(INVITE)) {$uac_req(method)=INVITE; $uac_req(ruri) = sip:$r...@sip.test.com:5062; $uac_req(furi) = sip:$f...@sip.test.com; $uac_req(turi) = sip:$t...@sip.test.com; $uac_req(hdrs) = Content-Type: text/plain\r\n; uac_send_req();} cfg. parser: failed to find command uac_send_req My guess is you are looking at old documentation http://kamailio.org/docs/modules/stable/modules/uac.html#idp1686632 it's uac_req_send() nowadays. But I don't get your reminder logic. If $rU isn't logged in and it is INVITE- ed, your are going to send INVITES to it? -- POCOS B.V. - Croy 9c - 5653 LC Eindhoven Telefoon: 040 293 8661 - Fax: 040 293 8658 http://www.pocos.nl/ - http://www.sipo.nl/ K.v.K. Eindhoven 17097024 ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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] cnxcc developer module pulse concept
Hi Eduardo, please take into account that there might be telephony concepts mistranslated from Spanish to English. In case you find something else that seems confusing, please let me know. Regards, Carlos On Thu, Jun 6, 2013 at 7:56 AM, Eduardo Lejarreta lejarret...@sarenet.eswrote: Good evening Carlos. ** ** I’ve found an example on git repository where you have additional information. ** ** For a credit of 50, a discount per second of 0,5, a initial_pulse of 30 and final_pulse of 6 …. ** ** # if only one call is established, that call should last 1m, 36s ** ** Now It makes sense to me. ** ** Thanks and regards. -- Eduardo Lejarreta. ** ** *De:* Eduardo Lejarreta [mailto:lejarret...@sarenet.es] *Enviado el:* jueves, 06 de junio de 2013 11:40 *Para:* 'sr-users@lists.sip-router.org' *Asunto:* cnxcc developer module pulse concept ** ** Good morning Carlos. ** ** On cnxcc_set_max_credit() function I don’t understand the concept “pulse” (sure it’s something easy but I’m a not aware about this matter) ** ** Could you please explain it in an example? ** ** Thanks and best regards. -- Eduardo Lejarreta. ** ** ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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 dialog termination
Hi, did you wait the default 12 hours (default_timeout) for the dialog to be released? If after that time, the dialog is still there, it is probably because of a bug. You should also take into account the matching mode currently configured: http://www.kamailio.org/docs/modules/3.3.x/modules_k/dialog.html#idp129680. The default behavior is to add a dialog-id cookie in the route header but if your user agent fails to add the parameter when it sends the subsequent requests, the dialog will not be properly tracked and you could end with a bunch of active unfinished dialogs in memory. Regards, On Thu, Apr 25, 2013 at 8:13 AM, Grant Bagdasarian g...@cm.nl wrote: Hello, ** ** Another dialog got stuck in kamailio, so I checked a few kamctl commands. This is what I found. ** ** When viewing the profile size the count is 0 (using kamctl fifo profile_get_size [NAME]) When using the kamctl fifo get_statistics all command, the dialog:active_dialogs shows 1. There are no other calls active at this point, so this must be the one that got stuck. ** ** The call is still in state 4. I don’t know what this means, but I’m guessing active. ** ** Why did the dialog module fail to release this dialog? The profile was configured to allow 2 concurrent calls. We called the number using two phones and only one made it through. ** ** Is this a bug? ** ** Regards, ** ** Grant ** ** *From:* sr-users-boun...@lists.sip-router.org [mailto: sr-users-boun...@lists.sip-router.org] *On Behalf Of *Grant Bagdasarian *Sent:* Monday, April 22, 2013 10:55 AM *To:* sr-users@lists.sip-router.org *Subject:* [SR-Users] Kamailio dialog termination ** ** Hello, ** ** Using the dialog module. According to the documentation a dialog is automatically destroyed when a BYE is received. In case of no BYE, the dialog lifetime is controlled via the default timeout. ** ** I’m assuming the dialog module only creates a dialog when a 200 OK is received on the INVITE. So if a CANCEL request is sent for this INVITE or the server answers with anything but a 200 OK, no dialog is created and maintained by the dialog module? ** ** Also, when the dialog is terminated, is it guaranteed the dialog entry is removed from memory at all times, but there might be a chance the dialog remains stored in the database table because of some error? I’m using the dialog module to control the number of calls allowed to a certain destination, but it sometimes does occur that an entry in the database is not removed, but I’m not sure if the dialog is also removed from memory when this happens. ** ** I hope someone could clear this out for me. ** ** Thanks, ** ** Grant ** ** ** ** ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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] var vs avp...
Use $var when you want to manipulate values inside a route block, for example, when you want to store a value that will live only in the scope of that route block. When the route block exits, it will be automatically deallocated. Use $avp when you want to store a value that you want to read anywhere. It will live as long as the SIP transaction lives. - $var is stored in private memory, it is per process. This means that only the process that created it can read it. - $avp is stored in shared memory. It can be accessed from any process in kamailio's process list (childs) - $var has local route block scope. - $avp has SIP transaction scope. - Both $avp and $var are automatically freed. On Fri, Apr 19, 2013 at 10:50 AM, Victor V. Kustov coy...@bks.tv wrote: В Fri, 19 Apr 2013 10:56:26 +0200 Olle E. Johansson o...@edvina.net пишет: - $avp is stored in transactions (in shared memory), so if you set them while processing a request you have them when processing responses and failures. is memory freeing automatically or i need to do it myself? -- SY, Victor JID: coy...@bks.tv JID: coy...@bryansktel.ru I use FREE operation system: 3.8.4-calculate GNU/Linux ___ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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] Send Bye to all calls in one profile
Hello Alex, Camila, list, I'm replying this old thread to follow the sequence of the conversation. With two months of delay, I would like to share the credit control module we talked about with the hope of helping somehow to the community with this contribution. The project has three parts: - The module itself: https://github.com/caruizdiaz/cnxcc - The web interface: https://github.com/caruizdiaz/cnxcc-web - A helper script: https://github.com/caruizdiaz/cnxcc-db-sync Mixed together, we have a ready-to-use credit control monitoring tool. Regards, -- Carlos http://caruizdiaz.com +595981146623 On Mon, Nov 19, 2012 at 5:10 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Thanks! I'll start a new thread and I'll put the code on github. If it turns to be actually useful to the community, it would be great, but if not, it will be a good learning material for the developers coming, because it covers important topics on Kamalio's Core Development :D. Best regards. On Mon, Nov 19, 2012 at 5:01 PM, Alex Balashov abalas...@evaristesys.comwrote: That is indeed a rather sophisticated superset of what I've been working on! I look forward to this contribution. On 11/19/2012 03:00 PM, Carlos Ruiz Díaz wrote: Hello Camila, Alex. I wrote a module that you may find useful for this purpose and which I'm planning to release in the next few days. Please allow me to introduce its features: - It relies on the dialog module to track the calls it handles - You can group calls by an ID, which can be the client ID, profile ID or whatever value you want as long as it uniquely identify a group of calls. - You can have several calls consuming the same pool of credit at the same time. Every call belongs to a call-group. A call-group can have one or more calls. - When the credit (time) is exhausted, all calls of the same call-group are automatically finalized. - An event_route is fired for every call forced to finalize. It contains a faked SIP message but with the right call-id and tags of the call forced to end. This may be useful for back-office operations such as billing, logging, rtpproxy tear down, etc. - It exposes 3 xmlrpc commands: 1. to monitor the calls grouped by call-group. 2. to monitor the calls of a certain call-group. 3. to finalize a call. - It has a (very ugly, but improvable) web interface for real time monitoring using the 3 xmlrpc commands. You can see on line what's happening in the module and you can terminate calls through it. - It was designed to be maintained in RAM. - I'm adding other ways to make the credit control, not only with timeout in seconds, but with credit amount, cost per second, cadence, rate, etc. We at conexiongroup http://www.conexiongroup.com/** are making the final arrangements to release the source code and hopefully, it will be helpful to you or to other people that might have faced the same problems we had and which took us to the decision of writing this code. Regards. Carlos. On Mon, Nov 19, 2012 at 11:50 AM, Alex Balashov abalas...@evaristesys.com mailto:abalashov@evaristesys.**comabalas...@evaristesys.com wrote: Not presently, but I am actually working on an enhancement to the dialog module (for contribution back into the open-source project) that will do just that, as I have this need also. On 11/19/2012 09:29 AM, Camila Troncoso wrote: Hi, I have a kamailio proxy server that´s controlling the limit of calls that clients can make with profile grouping. In other side I also limit clients call duration base on users credit ( DATABASE) and /timeout /feature . Before the calls get answer I calculate how much time the client has left for this call and set the timeout variable. When the time is reached the proxy sends BYEs two both sides of this call. I want when the call timeout, as before explain, all other calls in the same profile end too, because the client has expired his credit. Is there a way to achieve this? Regards, Camila *Camila Troncoso **|* Ingeniero de Desarrollo RedVoiss *|*ctronc...@redvoiss.net mailto:ctronc...@redvoiss.net** mailto:ctronc...@redvoiss.net mailto:ctronc...@redvoiss.net**__ Santiago- Chile *|*+56 2 2408535 tel:%2B56%202%202408535 www.redvoiss.net http://www.redvoiss.net http://www.redvoiss.net __**___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-us...@lists.sip-** router.org 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 http
Re: [SR-Users] Kamailio-Java Integration
I don't think Java would be a performance limitation at all, as long as it runs on a separate machine with its own processor, memory and pool of disks. If you don't like writing complex modules in C, you can always implement your business logic in your preferred high level languages (Java, C#, PHP?) and use JSON/XML based bidirectional communication over TCP to query your business node, and to parse the response you can write a Perl script which will be called from inside the Kamailio's script. Regards. On Sat, Nov 24, 2012 at 8:29 PM, Alex Balashov abalas...@evaristesys.comwrote: On 11/24/2012 06:26 PM, ron.kamai...@mcleodnet.com wrote: I am the OP. I actually have a solution running now, using JSON-RPC as the connector between Kamailio and the Java EE business logic. That's a rather novel approach. I hadn't thought of that; I suppose I forgot the jsonrpc-c module is there. :-) I am looking for an alternate solution to resolve the limitations with the RPC mechanism. What sort of limitations? -- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/ __**_ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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] Send Bye to all calls in one profile
Hello Camila, Alex. I wrote a module that you may find useful for this purpose and which I'm planning to release in the next few days. Please allow me to introduce its features: - It relies on the dialog module to track the calls it handles - You can group calls by an ID, which can be the client ID, profile ID or whatever value you want as long as it uniquely identify a group of calls. - You can have several calls consuming the same pool of credit at the same time. Every call belongs to a call-group. A call-group can have one or more calls. - When the credit (time) is exhausted, all calls of the same call-group are automatically finalized. - An event_route is fired for every call forced to finalize. It contains a faked SIP message but with the right call-id and tags of the call forced to end. This may be useful for back-office operations such as billing, logging, rtpproxy tear down, etc. - It exposes 3 xmlrpc commands: 1. to monitor the calls grouped by call-group. 2. to monitor the calls of a certain call-group. 3. to finalize a call. - It has a (very ugly, but improvable) web interface for real time monitoring using the 3 xmlrpc commands. You can see on line what's happening in the module and you can terminate calls through it. - It was designed to be maintained in RAM. - I'm adding other ways to make the credit control, not only with timeout in seconds, but with credit amount, cost per second, cadence, rate, etc. We at conexiongroup http://www.conexiongroup.com/ are making the final arrangements to release the source code and hopefully, it will be helpful to you or to other people that might have faced the same problems we had and which took us to the decision of writing this code. Regards. Carlos. On Mon, Nov 19, 2012 at 11:50 AM, Alex Balashov abalas...@evaristesys.comwrote: Not presently, but I am actually working on an enhancement to the dialog module (for contribution back into the open-source project) that will do just that, as I have this need also. On 11/19/2012 09:29 AM, Camila Troncoso wrote: Hi, I have a kamailio proxy server that´s controlling the limit of calls that clients can make with profile grouping. In other side I also limit clients call duration base on users credit ( DATABASE) and /timeout /feature . Before the calls get answer I calculate how much time the client has left for this call and set the timeout variable. When the time is reached the proxy sends BYEs two both sides of this call. I want when the call timeout, as before explain, all other calls in the same profile end too, because the client has expired his credit. Is there a way to achieve this? Regards, Camila *Camila Troncoso **|* Ingeniero de Desarrollo RedVoiss *|*ctronc...@redvoiss.net mailto:ctronc...@redvoiss.net** Santiago- Chile *|*+56 2 2408535 www.redvoiss.net http://www.redvoiss.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-**usershttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/ __**_ 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 -- Carlos http://caruizdiaz.com +595981146623 ___ 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] Send Bye to all calls in one profile
Thanks! I'll start a new thread and I'll put the code on github. If it turns to be actually useful to the community, it would be great, but if not, it will be a good learning material for the developers coming, because it covers important topics on Kamalio's Core Development :D. Best regards. On Mon, Nov 19, 2012 at 5:01 PM, Alex Balashov abalas...@evaristesys.comwrote: That is indeed a rather sophisticated superset of what I've been working on! I look forward to this contribution. On 11/19/2012 03:00 PM, Carlos Ruiz Díaz wrote: Hello Camila, Alex. I wrote a module that you may find useful for this purpose and which I'm planning to release in the next few days. Please allow me to introduce its features: - It relies on the dialog module to track the calls it handles - You can group calls by an ID, which can be the client ID, profile ID or whatever value you want as long as it uniquely identify a group of calls. - You can have several calls consuming the same pool of credit at the same time. Every call belongs to a call-group. A call-group can have one or more calls. - When the credit (time) is exhausted, all calls of the same call-group are automatically finalized. - An event_route is fired for every call forced to finalize. It contains a faked SIP message but with the right call-id and tags of the call forced to end. This may be useful for back-office operations such as billing, logging, rtpproxy tear down, etc. - It exposes 3 xmlrpc commands: 1. to monitor the calls grouped by call-group. 2. to monitor the calls of a certain call-group. 3. to finalize a call. - It has a (very ugly, but improvable) web interface for real time monitoring using the 3 xmlrpc commands. You can see on line what's happening in the module and you can terminate calls through it. - It was designed to be maintained in RAM. - I'm adding other ways to make the credit control, not only with timeout in seconds, but with credit amount, cost per second, cadence, rate, etc. We at conexiongroup http://www.conexiongroup.com/** are making the final arrangements to release the source code and hopefully, it will be helpful to you or to other people that might have faced the same problems we had and which took us to the decision of writing this code. Regards. Carlos. On Mon, Nov 19, 2012 at 11:50 AM, Alex Balashov abalas...@evaristesys.com mailto:abalashov@evaristesys.**comabalas...@evaristesys.com wrote: Not presently, but I am actually working on an enhancement to the dialog module (for contribution back into the open-source project) that will do just that, as I have this need also. On 11/19/2012 09:29 AM, Camila Troncoso wrote: Hi, I have a kamailio proxy server that´s controlling the limit of calls that clients can make with profile grouping. In other side I also limit clients call duration base on users credit ( DATABASE) and /timeout /feature . Before the calls get answer I calculate how much time the client has left for this call and set the timeout variable. When the time is reached the proxy sends BYEs two both sides of this call. I want when the call timeout, as before explain, all other calls in the same profile end too, because the client has expired his credit. Is there a way to achieve this? Regards, Camila *Camila Troncoso **|* Ingeniero de Desarrollo RedVoiss *|*ctronc...@redvoiss.net mailto:ctronc...@redvoiss.net** mailto:ctronc...@redvoiss.net mailto:ctronc...@redvoiss.net**__ Santiago- Chile *|*+56 2 2408535 tel:%2B56%202%202408535 www.redvoiss.net http://www.redvoiss.net http://www.redvoiss.net __**___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-us...@lists.sip-** router.org sr-users@lists.sip-router.org http://lists.sip-router.org/__**cgi-bin/mailman/listinfo/sr-__** users http://lists.sip-router.org/__cgi-bin/mailman/listinfo/sr-__users http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**usershttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 Tel: +1-678-954-0670 tel:%2B1-678-954-0670 Fax: +1-404-961-1892 tel:%2B1-404-961-1892 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/ __**___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org mailto:sr-us...@lists.sip-**router.orgsr-users@lists.sip-router.org http://lists.sip
Re: [SR-Users] RPC, XMLRPC or other
If you write your own parser you will be writing your own implementation of the xmlrpc decoder which I believe could be very complicated not even mentioning that it's close to reinventing the wheel. I think Carsten's solution is the best right now. I'll try his approach myself. Best Regards. -- Carlos http://caruizdiaz.com +595981146623 On Tue, Nov 13, 2012 at 8:24 AM, Kristofer Signer kristofer.sig...@gmail.com wrote: Hello, On Tue, Nov 13, 2012 at 5:03 AM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Hello, I've been through this problem a few weeks ago with my module that exports nested structures through xmlrpc. Apparently, there's a limitation in the technology itself that makes the nested structures to be overwritten everytime the response XML is parsed, if you look closely, you will notice that this makes sense since the structures are indexed by the name of the field, which is the same for every record. That's the reason of only one row being displayed even though the whole recordset was sent out. Yes, I have noticed this. And the problem is that a struct is just a key-value-pair datatype which in normal situation does not support multiple key with the same name. A more correct implementation would be to represent the AoRs in an array. I think I will also write a work around for this. just parsing the return xml. I tried with three different php libraries, even with xmlrpc_decode() that is the official function for decoding xmlrpc responses in php. I didn't find a solution but I ended up using a workaround sending the values using CSV format which was later parsed by the PHP in charge of displaying the data. Regards. Carlos. On Mon, Nov 12, 2012 at 11:43 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, I am not a python parameter, but seems a limitation of the xmlrpc_test2.py tool, the tcp dump shows that the records are sent back in the xmlrpc response. You will have to look inside/troubleshoot the xmlrpc_test2.py and see why it fails. Cheers, Daniel On 11/12/12 9:58 AM, Kristofer Signer wrote: Hello, running kamailio 3.3.2. On Mon, Nov 12, 2012 at 1:48 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, On 11/12/12 10:02 AM, Kristofer Signer wrote: Hello, I'm trying to dig in to the kamailio XMLRPC interfaces and the limitations I read in http://www.kamailio.org/docs/modules/stable/modules/xmlrpc.html#xmlrpc.implementation.limitations is really a no go for us. which one is a 'no go'? Nested structures are supported in the last version, iirc, the readme does not seem to be updated for this case. the 'no go' is the structure {AoR, HashID, Contact, AoR, HashID, Contacts, ...} For example, when to retrieve user locations and list of dialogs we get a xml document which is not so well formatted and we can not successfully parse it in an xmlrpc-parser. Is there other options for xmlrpc module? If the body is not successfully parsed, it is a bug. The limitation is about not supporting all the data types, but when a reply is xmlrpc sent, it should be valid. Can you test it with 1-2 location records that fail and post the xmrpc here as well as the log error messages from the xml parser? Actually, I don't get any errors. I'm using the python example provided in kamailio src and that example will only parse out one record. [krsi@vera examples]$ python xmlrpc_test2.py ul.dump foo {'Domain': 'location', 'Stats': {'Records': 2, 'Max-Slots': 1}, 'AoRs': {'HashID': 1731621673, 'AoR': 'jkp-01', 'Contacts': {'Contact': {'Ruid': 'uloc-50a0ea3c-124bf-1', 'Received': '[not set]', 'Path': '[not set]', 'Reg-Id': 0, 'Expires': 99, 'Flags': 0, 'User-Agent': 'Jitsi1.0-Linux', 'Q': 0.0, 'Instance': '[not set]', 'State': 'CS_SYNC', 'CSeq': 11, 'Methods': 18446744073709551615L, 'CFlags': 0, 'Address': 'sip:jkp-01@192.168.0.214:25060 ;transport=udp;registering_acc=foo_bar_com', 'Call-ID': '61ac73a44826f3887a5db2371b044275@0:0:0:0:0:0:0:0', 'Socket': 'udp:192.168.0.82:5060'}}}, 'Size': 512} As you can see,. there should be two records but only one is parsed. Here is the response body from tcpdump ?xml version=1.0? methodResponse params param valuestruct membernameDomain/namevaluestringlocation/string/value/member membernameSize/namevalueint512/int/value/member member nameAoRs/name valuestruct membernameAoR/namevaluestringjkp-02/string/value/member membernameHashID/namevalueint1731621670/int/value/member member nameContacts/name valuestruct member nameContact/name valuestruct membernameAddress/namevaluestring sip:jkp-02@192.168.0.214:35060/string/value/member membernameExpires/namevalueint768/int/value/member membernameQ
Re: [SR-Users] RPC, XMLRPC or other
Hello, I've been through this problem a few weeks ago with my module that exports nested structures through xmlrpc. Apparently, there's a limitation in the technology itself that makes the nested structures to be overwritten everytime the response XML is parsed, if you look closely, you will notice that this makes sense since the structures are indexed by the name of the field, which is the same for every record. That's the reason of only one row being displayed even though the whole recordset was sent out. I tried with three different php libraries, even with xmlrpc_decode() that is the official function for decoding xmlrpc responses in php. I didn't find a solution but I ended up using a workaround sending the values using CSV format which was later parsed by the PHP in charge of displaying the data. Regards. Carlos. On Mon, Nov 12, 2012 at 11:43 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, I am not a python parameter, but seems a limitation of the xmlrpc_test2.py tool, the tcp dump shows that the records are sent back in the xmlrpc response. You will have to look inside/troubleshoot the xmlrpc_test2.py and see why it fails. Cheers, Daniel On 11/12/12 9:58 AM, Kristofer Signer wrote: Hello, running kamailio 3.3.2. On Mon, Nov 12, 2012 at 1:48 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, On 11/12/12 10:02 AM, Kristofer Signer wrote: Hello, I'm trying to dig in to the kamailio XMLRPC interfaces and the limitations I read in http://www.kamailio.org/docs/modules/stable/modules/xmlrpc.html#xmlrpc.implementation.limitations is really a no go for us. which one is a 'no go'? Nested structures are supported in the last version, iirc, the readme does not seem to be updated for this case. the 'no go' is the structure {AoR, HashID, Contact, AoR, HashID, Contacts, ...} For example, when to retrieve user locations and list of dialogs we get a xml document which is not so well formatted and we can not successfully parse it in an xmlrpc-parser. Is there other options for xmlrpc module? If the body is not successfully parsed, it is a bug. The limitation is about not supporting all the data types, but when a reply is xmlrpc sent, it should be valid. Can you test it with 1-2 location records that fail and post the xmrpc here as well as the log error messages from the xml parser? Actually, I don't get any errors. I'm using the python example provided in kamailio src and that example will only parse out one record. [krsi@vera examples]$ python xmlrpc_test2.py ul.dump foo {'Domain': 'location', 'Stats': {'Records': 2, 'Max-Slots': 1}, 'AoRs': {'HashID': 1731621673, 'AoR': 'jkp-01', 'Contacts': {'Contact': {'Ruid': 'uloc-50a0ea3c-124bf-1', 'Received': '[not set]', 'Path': '[not set]', 'Reg-Id': 0, 'Expires': 99, 'Flags': 0, 'User-Agent': 'Jitsi1.0-Linux', 'Q': 0.0, 'Instance': '[not set]', 'State': 'CS_SYNC', 'CSeq': 11, 'Methods': 18446744073709551615L, 'CFlags': 0, 'Address': ' sip:jkp-01@192.168.0.214:25060;transport=udp;registering_acc=foo_bar_com', 'Call-ID': '61ac73a44826f3887a5db2371b044275@0:0:0:0:0:0:0:0', 'Socket': 'udp:192.168.0.82:5060'}}}, 'Size': 512} As you can see,. there should be two records but only one is parsed. Here is the response body from tcpdump ?xml version=1.0? methodResponse params param valuestruct membernameDomain/namevaluestringlocation/string/value/member membernameSize/namevalueint512/int/value/member member nameAoRs/name valuestruct membernameAoR/namevaluestringjkp-02/string/value/member membernameHashID/namevalueint1731621670/int/value/member member nameContacts/name valuestruct member nameContact/name valuestruct membernameAddress/namevaluestring sip:jkp-02@192.168.0.214:35060/string/value/member membernameExpires/namevalueint768/int/value/member membernameQ/namevaluedouble0.00/double/value/member membernameCall-ID/namevaluestring rcilzqsjfpnu...@vera.foo.com/string/value/member membernameCSeq/namevalueint383/int/value/member membernameUser-Agent/namevaluestringTwinkle/1.4.2/string/value/member membernameReceived/namevaluestring[not set]/string/value/member membernamePath/namevaluestring[not set]/string/value/member membernameState/namevaluestringCS_SYNC/string/value/member membernameFlags/namevalueint0/int/value/member membernameCFlags/namevalueint0/int/value/member membernameSocket/namevaluestringudp: 192.168.0.82:5060/string/value/member membernameMethods/namevalueint6111/int/value/member membernameRuid/namevaluestringuloc-50a0ea3c-124c0-1/string/value/member membernameInstance/namevaluestring[not set]/string/value/member membernameReg-Id/namevalueint0/int/value/member /struct/value /member /struct/value /member
Re: [SR-Users] unsubscribe
To unsubscribe, go to: http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users, search for the button unsubscribe or edit options. 2012/10/16 Pablo R. Digonzelli pdigonze...@softsargentina.com -- *Ing. Pablo Digonzelli* Sofware Solutions IP Soluciones SRL 25 de Mayo 521. Entrepiso A email: pdigonze...@softsargentina.com email: pdigonze...@gmail.com twitter: @pdigonzelli Tel: 0381 4227378 Cel: 0381 155982714 -- *De: *Pablo R. Digonzelli pdigonze...@softsargentina.com *Para: *SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List sr-users@lists.sip-router.org *Enviados: *Martes, 16 de Octubre 2012 9:59:23 *Asunto: *[SR-Users] unsubscribe -- *Ing. Pablo Digonzelli* Sofware Solutions IP Soluciones SRL 25 de Mayo 521. Entrepiso A email: pdigonze...@softsargentina.com email: pdigonze...@gmail.com twitter: @pdigonzelli Tel: 0381 4227378 Cel: 0381 155982714 ___ 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 ___ 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] Wrong onreply_route is called after serial forking
I can confirm this behavior. I had a similar scenario when 2 or more branches were setup. First branch timed out, while second branch was being processed a reply from first branch arrived and handled improperly by a routing logic which was configured for the second branch. I isolated each response from the different branches by parsing the branch ID that Kamailio adds to the via header after processing the request. Through this mean, I managed to handle correctly each reply from different branches no matter when the response was received. Regards. Carlos. On Thu, Oct 11, 2012 at 10:35 AM, Alex Hermann a...@speakup.nl wrote: On Thursday 11 October 2012, Juha Heinanen wrote: Alex Hermann writes: 1) set onreply_route to A 2) relay 1st branch 3) 1st branch times out, internal 408 is created 4) tm send CANCEL to 1st branch 5) in failure route, onreply_route is set to B 6) relay 2nd branch 7) 1st branch responds with 487, and goes into reply_route B instead of A I think each branch should take the reply_route which was set before it got relayed and not pick up later changes meant for other branches. if first branch already timed out, shouldn't reply in step(7) go to garbage pin instead? No, let me explain it a bit more. At step 2a) a provisional response is received. The proxy is configured with a maximum ringtime (fr_inv_timeout). If that expires, an internal 408 is generated and failure_route is entered (which will launch branch 2. At (almost) the same time the proxy sends a CANCEL to abort branch 1. The uas at the receiving end of branch 1 will however still respond to the INVITE (as it should), hence the 487 from step 7. I need to do specific processing when branch 1 receives a reply, and do that in onreply_route A. Unfortunately, the reply never reaches that code. (In reality, branch 1 is not just 1 branch, but consists of multiple parallel branches, all receiving a reply on the cancelled INVITE. Most of them arrive before the 2nd branch is relayed, those are handled correctly by onreply_route A, but replies that come in later are incorrectly handled by onreply_route B) -- Greetings, Alex Hermann ___ 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] Wrong onreply_route is called after serial forking
I think $T_branch_idx is only available on branch_route, and besides, it contains the current branch ID being processed so it wouldn't be useful from replies outside the current branch. Regards. Carlos. On Thu, Oct 11, 2012 at 11:48 AM, Alex Hermann a...@speakup.nl wrote: On Thursday 11 October 2012, Carlos Ruiz Díaz wrote: I can confirm this behavior. I had a similar scenario when 2 or more branches were setup. First branch timed out, while second branch was being processed a reply from first branch arrived and handled improperly by a routing logic which was configured for the second branch. I isolated each response from the different branches by parsing the branch ID that Kamailio adds to the via header after processing the request. Through this mean, I managed to handle correctly each reply from different branches no matter when the response was received. I thougth of something similar. Using a common onreply_route and $T_branch_idx (but watch out for the bug i reported in another email) or setting branch flags depending on the needed handling. But this kind of defeats the purpose of having the possibility to set different onreply_routes (and makes for very messy onreply_routes). -- Greetings, Alex Hermann ___ 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] [sr-dev] moving all to kamailio namespace
HI Daniel, I consider myself a new comer and having both kamailio and ser interacting with each other is indeed confusing. For me, the change is welcome and I'm in favor of doing all the effort at once. Regards. Carlos On Mon, Oct 8, 2012 at 11:33 AM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, some bits were left with the old project name OpenSER, not to disturb too much at that time and see where everything goes. Other voices expressed same idea in the past, now everything is stable and development goes smooth, so it is good to make a decision because openser is too way back and new comers could be confused. In my list is renaming from openser to kamailio next attributes: - default database name (exiting configs should not be impacted that much as most of them have database provided by module parameter) - default database access usernames and passwords, respectively openser, openserro and openserrw should become kamailio, kamailioro and kamailiorw - perl module API is packed as OpenSER - this could affect some people using it, but a search and replace should do it - snmpstats mibs - probably it is going to have some impact as well Eventually we can start doing it gradually, one or two per release, but is probably better to do all at once, so people will do one upgrade with next major release. Another thing is sercmd, it is in conflict for packaging as both ser and kamailio install it. It means that one cannot install both kamailio and ser at same time from packages. One option is to install it as kamcmd. Because these changes affect users and devels, I sent the message to both mailing lists. Opinions? Cheers, Daniel -- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/**micondahttp://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu __**_ sr-dev mailing list sr-...@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**devhttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev ___ 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] avp usage limit
I believe it is directly related to the amount of physical memory available for the process. Anyways, you can always delete the AVP after using it although this is automatically done after the transaction finishes. Maybe increasing the maximum memory limit could help: http://www.kamailio.org/dokuwiki/doku.php/troubleshooting:private-memory-size Regards. Carlos. On Sun, Aug 19, 2012 at 7:25 AM, Uri Shacked ushac...@gmail.com wrote: Hi, I wonder, is there a limit for the amount of AVP's i can use? Let's say i store 6-9 characters (string) each time i set an AVP. Thanks, Uri ___ 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] append_branch with pseudo variables
I'll try that :). Thanks for your help. Carlos. On Fri, Aug 17, 2012 at 5:30 AM, Daniel-Constantin Mierla mico...@gmail.com wrote: On 8/16/12 10:50 PM, Carlos Ruiz Díaz wrote: On Thu, Aug 16, 2012 at 4:30 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: On 8/16/12 9:15 PM, Carlos Ruiz Díaz wrote: Looks like km_append_branch() doesn't have all of the signatures that the original append_branch() has. I can't add q values for serial/parallel forking with km_append_branch(). What signature are you looking for? The latter is the one I'm looking for, but with the possibility of using pseudovars. append_branch() overloads: - append_branch(); - append_branch(sip:a...@abc.com); - append_branch(sip:a...@abc.com, 0.1); I am considering adding the second parameter to km_append_branch() for backward compatibility reasons. Alternative is to use $branch(...) variable to set the q after you called append branch: http://www.kamailio.org/wiki/cookbooks/3.3.x/pseudovariables#branch_attributes Q has to be set via integer value, with range from 0 to 100 (0.1 would be 10). Also, apparently there's no way of setting the RURI by calling a function that does that. What do you mean here? I don't understand. I'm was talking about setting the request-uri from a PV. For example: seturi($var(my_uri)); But it works using assignation. $ru = $var(my_uri); The core functions were added before the existence of cfg variables, they take only static strings as parameters. The way to do it is via assignments. Cheers, Daniel Cheers, Daniel I guess I'll have to do it using assignation on $ru pseudovariable and writing a route to manage the serial forking I need. Thanks. Carlos. On Thu, Aug 16, 2012 at 2:17 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Great! I'll give it a try. Thanks! Carlos. On Thu, Aug 16, 2012 at 12:13 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, On 8/16/12 5:25 PM, Carlos Ruiz Díaz wrote: Hello guys, Why I can only append_branch() a SIP URI as a literal constant string? Why not from a pseudovariable? It's the same for most of the core functions. My intention is to do something like this: append_branch($cnx3a(route1)); t_relay(); where cnx3a is a variable containing the SIP URIs. The only fix I have found for this is by doing it as follows: $ru = $cnx3a(route1); append_branch(); t_relay(); Is there any other (and more elegant) way? you can use km_append_branch: http://kamailio.org/docs/modules/stable/modules_k/kex.html#id2551404 Cheers, Daniel -- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw -- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw -- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw ___ 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] append_branch with pseudo variables
I can't set any of the attributes values using the assignment syntax. Everytime I do: $(branch(q)[1]) = 0.1; I get ERROR: core [lvalue.c:354]: setting pvar failed. This is true for all attributes, nut just for q. Am I doing something wrong? I'm using Kamailio 3.2.3. Regards. Carlos. On Fri, Aug 17, 2012 at 11:38 AM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: I'll try that :). Thanks for your help. Carlos. On Fri, Aug 17, 2012 at 5:30 AM, Daniel-Constantin Mierla mico...@gmail.com wrote: On 8/16/12 10:50 PM, Carlos Ruiz Díaz wrote: On Thu, Aug 16, 2012 at 4:30 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: On 8/16/12 9:15 PM, Carlos Ruiz Díaz wrote: Looks like km_append_branch() doesn't have all of the signatures that the original append_branch() has. I can't add q values for serial/parallel forking with km_append_branch(). What signature are you looking for? The latter is the one I'm looking for, but with the possibility of using pseudovars. append_branch() overloads: - append_branch(); - append_branch(sip:a...@abc.com); - append_branch(sip:a...@abc.com, 0.1); I am considering adding the second parameter to km_append_branch() for backward compatibility reasons. Alternative is to use $branch(...) variable to set the q after you called append branch: http://www.kamailio.org/wiki/cookbooks/3.3.x/pseudovariables#branch_attributes Q has to be set via integer value, with range from 0 to 100 (0.1 would be 10). Also, apparently there's no way of setting the RURI by calling a function that does that. What do you mean here? I don't understand. I'm was talking about setting the request-uri from a PV. For example: seturi($var(my_uri)); But it works using assignation. $ru = $var(my_uri); The core functions were added before the existence of cfg variables, they take only static strings as parameters. The way to do it is via assignments. Cheers, Daniel Cheers, Daniel I guess I'll have to do it using assignation on $ru pseudovariable and writing a route to manage the serial forking I need. Thanks. Carlos. On Thu, Aug 16, 2012 at 2:17 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Great! I'll give it a try. Thanks! Carlos. On Thu, Aug 16, 2012 at 12:13 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, On 8/16/12 5:25 PM, Carlos Ruiz Díaz wrote: Hello guys, Why I can only append_branch() a SIP URI as a literal constant string? Why not from a pseudovariable? It's the same for most of the core functions. My intention is to do something like this: append_branch($cnx3a(route1)); t_relay(); where cnx3a is a variable containing the SIP URIs. The only fix I have found for this is by doing it as follows: $ru = $cnx3a(route1); append_branch(); t_relay(); Is there any other (and more elegant) way? you can use km_append_branch: http://kamailio.org/docs/modules/stable/modules_k/kex.html#id2551404 Cheers, Daniel -- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw -- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw -- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw ___ 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] append_branch with pseudo variables
I figured out what was happening. By doing $(branch(q)[1]) = 0.1; I was trying to write into an non existent branch since 1 is actually the second branch because the main branch ($ru) is not counted. $(branch(q)[0]) = 0.1 // is the 1st. $(branch(q)[1]) = 0.1 // is the 2nd. Regards. Carlos. On Fri, Aug 17, 2012 at 4:32 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: I can't set any of the attributes values using the assignment syntax. Everytime I do: $(branch(q)[1]) = 0.1; I get ERROR: core [lvalue.c:354]: setting pvar failed. This is true for all attributes, nut just for q. Am I doing something wrong? I'm using Kamailio 3.2.3. Regards. Carlos. On Fri, Aug 17, 2012 at 11:38 AM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: I'll try that :). Thanks for your help. Carlos. On Fri, Aug 17, 2012 at 5:30 AM, Daniel-Constantin Mierla mico...@gmail.com wrote: On 8/16/12 10:50 PM, Carlos Ruiz Díaz wrote: On Thu, Aug 16, 2012 at 4:30 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: On 8/16/12 9:15 PM, Carlos Ruiz Díaz wrote: Looks like km_append_branch() doesn't have all of the signatures that the original append_branch() has. I can't add q values for serial/parallel forking with km_append_branch(). What signature are you looking for? The latter is the one I'm looking for, but with the possibility of using pseudovars. append_branch() overloads: - append_branch(); - append_branch(sip:a...@abc.com); - append_branch(sip:a...@abc.com, 0.1); I am considering adding the second parameter to km_append_branch() for backward compatibility reasons. Alternative is to use $branch(...) variable to set the q after you called append branch: http://www.kamailio.org/wiki/cookbooks/3.3.x/pseudovariables#branch_attributes Q has to be set via integer value, with range from 0 to 100 (0.1 would be 10). Also, apparently there's no way of setting the RURI by calling a function that does that. What do you mean here? I don't understand. I'm was talking about setting the request-uri from a PV. For example: seturi($var(my_uri)); But it works using assignation. $ru = $var(my_uri); The core functions were added before the existence of cfg variables, they take only static strings as parameters. The way to do it is via assignments. Cheers, Daniel Cheers, Daniel I guess I'll have to do it using assignation on $ru pseudovariable and writing a route to manage the serial forking I need. Thanks. Carlos. On Thu, Aug 16, 2012 at 2:17 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Great! I'll give it a try. Thanks! Carlos. On Thu, Aug 16, 2012 at 12:13 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, On 8/16/12 5:25 PM, Carlos Ruiz Díaz wrote: Hello guys, Why I can only append_branch() a SIP URI as a literal constant string? Why not from a pseudovariable? It's the same for most of the core functions. My intention is to do something like this: append_branch($cnx3a(route1)); t_relay(); where cnx3a is a variable containing the SIP URIs. The only fix I have found for this is by doing it as follows: $ru = $cnx3a(route1); append_branch(); t_relay(); Is there any other (and more elegant) way? you can use km_append_branch: http://kamailio.org/docs/modules/stable/modules_k/kex.html#id2551404 Cheers, Daniel -- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw -- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw -- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw ___ 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] append_branch with pseudo variables
Hello guys, Why I can only append_branch() a SIP URI as a literal constant string? Why not from a pseudovariable? It's the same for most of the core functions. My intention is to do something like this: append_branch($cnx3a(route1)); t_relay(); where cnx3a is a variable containing the SIP URIs. The only fix I have found for this is by doing it as follows: $ru = $cnx3a(route1); append_branch(); t_relay(); Is there any other (and more elegant) way? Regards. Carlos. ___ 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] append_branch with pseudo variables
Great! I'll give it a try. Thanks! Carlos. On Thu, Aug 16, 2012 at 12:13 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, On 8/16/12 5:25 PM, Carlos Ruiz Díaz wrote: Hello guys, Why I can only append_branch() a SIP URI as a literal constant string? Why not from a pseudovariable? It's the same for most of the core functions. My intention is to do something like this: append_branch($cnx3a(route1)**); t_relay(); where cnx3a is a variable containing the SIP URIs. The only fix I have found for this is by doing it as follows: $ru = $cnx3a(route1); append_branch(); t_relay(); Is there any other (and more elegant) way? you can use km_append_branch: http://kamailio.org/docs/**modules/stable/modules_k/kex.**html#id2551404http://kamailio.org/docs/modules/stable/modules_k/kex.html#id2551404 Cheers, Daniel -- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/**micondahttp://www.linkedin.com/in/miconda Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw ___ 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] append_branch with pseudo variables
Looks like km_append_branch() doesn't have all of the signatures that the original append_branch() has. I can't add q values for serial/parallel forking with km_append_branch(). Also, apparently there's no way of setting the RURI by calling a function that does that. I guess I'll have to do it using assignation on $ru pseudovariable and writing a route to manage the serial forking I need. Thanks. Carlos. On Thu, Aug 16, 2012 at 2:17 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Great! I'll give it a try. Thanks! Carlos. On Thu, Aug 16, 2012 at 12:13 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, On 8/16/12 5:25 PM, Carlos Ruiz Díaz wrote: Hello guys, Why I can only append_branch() a SIP URI as a literal constant string? Why not from a pseudovariable? It's the same for most of the core functions. My intention is to do something like this: append_branch($cnx3a(route1)**); t_relay(); where cnx3a is a variable containing the SIP URIs. The only fix I have found for this is by doing it as follows: $ru = $cnx3a(route1); append_branch(); t_relay(); Is there any other (and more elegant) way? you can use km_append_branch: http://kamailio.org/docs/**modules/stable/modules_k/kex.**html#id2551404http://kamailio.org/docs/modules/stable/modules_k/kex.html#id2551404 Cheers, Daniel -- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/**micondahttp://www.linkedin.com/in/miconda Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw ___ 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] append_branch with pseudo variables
On Thu, Aug 16, 2012 at 4:30 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: On 8/16/12 9:15 PM, Carlos Ruiz Díaz wrote: Looks like km_append_branch() doesn't have all of the signatures that the original append_branch() has. I can't add q values for serial/parallel forking with km_append_branch(). What signature are you looking for? The latter is the one I'm looking for, but with the possibility of using pseudovars. append_branch() overloads: - append_branch(); - append_branch(sip:a...@abc.com); - append_branch(sip:a...@abc.com, 0.1); Also, apparently there's no way of setting the RURI by calling a function that does that. What do you mean here? I don't understand. I'm was talking about setting the request-uri from a PV. For example: seturi($var(my_uri)); But it works using assignation. $ru = $var(my_uri); Cheers, Daniel I guess I'll have to do it using assignation on $ru pseudovariable and writing a route to manage the serial forking I need. Thanks. Carlos. On Thu, Aug 16, 2012 at 2:17 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com wrote: Great! I'll give it a try. Thanks! Carlos. On Thu, Aug 16, 2012 at 12:13 PM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, On 8/16/12 5:25 PM, Carlos Ruiz Díaz wrote: Hello guys, Why I can only append_branch() a SIP URI as a literal constant string? Why not from a pseudovariable? It's the same for most of the core functions. My intention is to do something like this: append_branch($cnx3a(route1)); t_relay(); where cnx3a is a variable containing the SIP URIs. The only fix I have found for this is by doing it as follows: $ru = $cnx3a(route1); append_branch(); t_relay(); Is there any other (and more elegant) way? you can use km_append_branch: http://kamailio.org/docs/modules/stable/modules_k/kex.html#id2551404 Cheers, Daniel -- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw -- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw ___ 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