Re: [SR-Users] how to match exact string value in mtree (Uri Shacked)
Hello, On 2/16/12 2:51 PM, Javier Gallart wrote: Hello Uri I had similar needs and I found the ndb_redis module more suited for that type of task. Instead of a tree you have a hash like this: tname tprefix tvalue. If you do a hget nts $avp(DID) and you get a not null value you have found your exact match. It works very well for me and the time it takes for that query is barely noticeable. Of course redis does not address items like persistence, etc the same way a rdbms does. for hash tables in config, the alternative is using htable module. Then the selection is done on exact match, no prefix matching. mtree is suitable for storing keys that are composed from a limited set of characters (like numbers, 0-9 digits only), otherwise becomes too memory consuming. For keys that are composed from any character and need exact match, hash table structures are more suitable, no matter if it is via htable module or something else like redis. Cheers, Daniel Hope it helps. Regards Javi On Thu, Feb 16, 2012 at 12:00 PM, sr-users-requ...@lists.sip-router.org mailto:sr-users-requ...@lists.sip-router.org wrote: Send sr-users mailing list submissions to sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users or, via email, send a message with subject or body 'help' to sr-users-requ...@lists.sip-router.org mailto:sr-users-requ...@lists.sip-router.org You can reach the person managing the list at sr-users-ow...@lists.sip-router.org mailto:sr-users-ow...@lists.sip-router.org When replying, please edit your Subject line so it is more specific than Re: Contents of sr-users digest... Today's Topics: 1. how to match exact string value in mtree (Uri Shacked) -- Message: 1 Date: Thu, 16 Feb 2012 12:54:50 +0200 From: Uri Shacked ushac...@gmail.com mailto:ushac...@gmail.com Subject: [SR-Users] how to match exact string value in mtree To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List sr-users@lists.sip-router.org mailto:sr-users@lists.sip-router.org Message-ID: CAMMbDhTFNXAE-K88=aemjo7ana_qjv3ajj3ah-axemxn3ze...@mail.gmail.com mailto:aemjo7ana_qjv3ajj3ah-axemxn3ze...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 Hi, I am using Mtree to match prefix numbers, some of them starts with 0 or characters like D for example. so, the mtree param is like this: modparam(mtree, db_url, CFGDB) modparam(mtree, mtree, name=nts;dbtable=service_numbers_view;type=0;) modpmodparam(mtree, char_list, 0123456789*+#YMDabcdefgh) modparam(mtree, pv_value, $avp(mtval)) modparam(mtree, pv_values, $avp(mtvals)) The thing is, that i tried all: if(!mt_match(nts, $avp(DID),1)) if(!mt_match(nts, $avp(DID),2)) if(!mt_match(nts, $avp(DID),0)) and lets say i have the both prefix in the nts mtree: 09555 09555333 And the prefix i search for is $avp(DID)=09555444 I allwasy get the 09555 because it is the longest match. I need exact match. how do i do that? -- next part -- An HTML attachment was scrubbed... URL: http://lists.sip-router.org/pipermail/sr-users/attachments/20120216/9d2eb778/attachment.html -- ___ 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 End of sr-users Digest, Vol 81, Issue 40 ___ 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://linkedin.com/in/miconda -- http://twitter.com/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
[SR-Users] image missing in xmlrpc module doc
Hi, Was reading through the xmlrpc docs, could anybody with an access check why Figure RPC Example is missing from http://kamailio.org/docs/modules/devel/modules/xmlrpc.html#fig.rpc_example as well as 3.1 and 3.2 module docs? Thanks, Andrew ___ 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] ndb_redis module fails after a while
Hi Daniel, On 02/17/2012 10:47 AM, Daniel-Constantin Mierla wrote: I made a patch for server reconnect -- I had no access to a computer with redis lib installed for the moment, hopefully it compiles. If you can try and tell the result, it would be great, I can commit then. I may be able to test this patch as well. Currently compilations bails out on attempt to redeclare redisc_reconnect_server function parameter: CC (gcc) [M ndb_redis.so] ndb_redis_mod.o CC (gcc) [M ndb_redis.so] redis_client.o redis_client.c: In function ‘redisc_reconnect_server’: redis_client.c:206:19: error: ‘rsrv’ redeclared as different kind of symbol redis_client.c:202:46: note: previous definition of ‘rsrv’ was here make[1]: *** [redis_client.o] Error 1 make: *** [modules] Error 1 ___ 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 match exact string value in mtree (Uri Shacked)
Hi Daniel, no, in order to find the best match we do a manual trick using the s.prefixes transformation (I think you suggested that). We start with the full number and stop when we find a non-null value. This kamailio is serving many thousands of calls per hour, and the response time is pretty much the same as when we used the mtree module. For us , using redis has the advantage of being able to load the tree data faster than when we used postgres without the need to perform a mtree reload. Regards Javi On Fri, Feb 17, 2012 at 10:25 AM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello Javier, one question about redis, can it do longest prefix matching or all prefixes match? Cheers, Daniel On 2/16/12 2:51 PM, Javier Gallart wrote: Hello Uri I had similar needs and I found the ndb_redis module more suited for that type of task. Instead of a tree you have a hash like this: tname tprefix tvalue. If you do a hget nts $avp(DID) and you get a not null value you have found your exact match. It works very well for me and the time it takes for that query is barely noticeable. Of course redis does not address items like persistence, etc the same way a rdbms does. Hope it helps. Regards Javi On Thu, Feb 16, 2012 at 12:00 PM, sr-users-requ...@lists.sip-router.orgwrote: Send sr-users mailing list submissions to sr-users@lists.sip-router.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users or, via email, send a message with subject or body 'help' to sr-users-requ...@lists.sip-router.org You can reach the person managing the list at sr-users-ow...@lists.sip-router.org When replying, please edit your Subject line so it is more specific than Re: Contents of sr-users digest... Today's Topics: 1. how to match exact string value in mtree (Uri Shacked) -- Message: 1 Date: Thu, 16 Feb 2012 12:54:50 +0200 From: Uri Shacked ushac...@gmail.com Subject: [SR-Users] how to match exact string value in mtree To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List sr-users@lists.sip-router.org Message-ID: CAMMbDhTFNXAE-K88= aemjo7ana_qjv3ajj3ah-axemxn3ze...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 Hi, I am using Mtree to match prefix numbers, some of them starts with 0 or characters like D for example. so, the mtree param is like this: modparam(mtree, db_url, CFGDB) modparam(mtree, mtree, name=nts;dbtable=service_numbers_view;type=0;) modpmodparam(mtree, char_list, 0123456789*+#YMDabcdefgh) modparam(mtree, pv_value, $avp(mtval)) modparam(mtree, pv_values, $avp(mtvals)) The thing is, that i tried all: if(!mt_match(nts, $avp(DID),1)) if(!mt_match(nts, $avp(DID),2)) if(!mt_match(nts, $avp(DID),0)) and lets say i have the both prefix in the nts mtree: 09555 09555333 And the prefix i search for is $avp(DID)=09555444 I allwasy get the 09555 because it is the longest match. I need exact match. how do i do that? -- next part -- An HTML attachment was scrubbed... URL: http://lists.sip-router.org/pipermail/sr-users/attachments/20120216/9d2eb778/attachment.html -- ___ sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users End of sr-users Digest, Vol 81, Issue 40 ___ 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://linkedin.com/in/miconda -- http://twitter.com/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
Re: [SR-Users] Question on (sipcapture, raw_interface, )
I have anwered you already: use two instance of captagent or two instance of kamailio. (each for one interface) Wbr, Alexandr 16.02.2012 15:05, Nelson Pereira wrote: but im not talking about sniff, but the SIPCAPTURE raw_interface function... On Thu, Feb 16, 2012 at 8:57 AM, Klaus Darilion klaus.mailingli...@pernau.at mailto:klaus.mailingli...@pernau.at wrote: Using tcpdump/ngrep it is not possible to sniff on 2 interfaces, but it is possible to sniff an the any pseudo interface: tcpdump -i any . ngrep -d any . There may be other sniffing tools which support to sniff on multiple interfaces. regards Klaus On 16.02.2012 14:09, Nelson Pereira wrote: Is it possible to monitor 2 interfaces? I have 2 Asterisk servers and they are on 2 different switches so I need to capture ETH0 and ETH3 which is where the mirror ports are connected to from each switch. Thanks ___ 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 ___ 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] ndb_redis module fails after a while
Hi Daniel, Andrew I've just tested the patch and kamailio crashes when the redis server is stopped. This is what I could get: -From the logs: Feb 17 06:33:32 r-gate-test ./kamailio[23812]: ALERT: core [main.c:751]: child process 23819 exited by a signal 11 Feb 17 06:33:32 r-gate-test ./kamailio[23812]: ALERT: core [main.c:754]: core was generated Feb 17 06:33:32 r-gate-test ./kamailio[23812]: INFO: core [main.c:766]: INFO: terminating due to SIGCHLD -An the backtrace: (...) Core was generated by `./kamailio -f ../etc/kamailio/kamailio.cfg'. Program terminated with signal 11, Segmentation fault. #0 redisFree (c=0x0) at hiredis.c:817 817if (c-fd 0) (gdb) bt #0 redisFree (c=0x0) at hiredis.c:817 #1 0x7f726f035461 in redisc_reconnect_server (rsrv=0x7f7271c93ac0) at redis_client.c:229 #2 0x7f726f037240 in redisc_exec (srv=value optimized out, cmd=0x7fffe98c6090, argv1=value optimized out, argv2=value optimized out, argv3=value optimized out, res=value optimized out) at redis_client.c:298 #3 0x7f726f034f7d in w_redis_cmd3 (msg=0x7f7271d7b018, ssrv=value optimized out, scmd=value optimized out, sres=0x7f7271d74b58 h\341\313qr\177) at ndb_redis_mod.c:156 #4 0x00417025 in do_action (h=0x7fffe98c6570, a=0x7f7271cc5248, msg=value optimized out) at action.c:1134 #5 0x0041e58b in run_actions (h=value optimized out, a=value optimized out, msg=value optimized out) at action.c:1610 #6 0x0041e8d4 in run_actions_safe (h=0x7fffe98c7610, a=0x7f7271c93781, msg=0x7f7271c93780) at action.c:1662 #7 0x004b731d in rval_get_int (h=0x7fffe98c7610, msg=0x0, i=0x7fffe98c6bd8, rv=0x3, cache=0x4) at rvalue.c:920 #8 0x004bb87c in rval_expr_eval_int (h=0x7fffe98c7610, msg=0x7f7271d7b018, res=0x7fffe98c6bd8, rve=0x7f7271cc6768) at rvalue.c:1914 #9 0x00417c7c in do_action (h=0x7fffe98c7610, a=0x7f7271ccb9d0, msg=value optimized out) at action.c:1092 #10 0x0041e58b in run_actions (h=value optimized out, a=value optimized out, msg=value optimized out) at action.c:1610 #11 0x00417cd7 in do_action (h=0x7fffe98c7610, a=0x7f7271ccbb10, msg=value optimized out) at action.c: #12 0x0041e58b in run_actions (h=value optimized out, a=value optimized out, msg=value optimized out) at action.c:1610 #13 0x0041795e in do_action (h=0x7fffe98c7610, a=value optimized out, msg=value optimized out) at action.c:732 #14 0x0041e58b in run_actions (h=value optimized out, a=value optimized out, msg=value optimized out) at action.c:1610 #15 0x0041e862 in run_top_route (a=0x7f7271c94888, msg=0x7f7271d7b018, c=value optimized out) at action.c:1683 #16 0x00498f36 in receive_msg ( buf=0x8bb100 INVITE sip:34661574758@79.170.68.215:5060 SIP/2.0\r\nVia: SIP/2.0/UDP 79.170.68.214:5060;branch=z9hG4bK-9451-1-0\r\nFrom: 34661574758 sip:34661574758@79.170.68.214:5060;tag=9451SIPpTag001\r\nTo: sut sip:..., len=value optimized out, rcv_info=0x7fffe98c7910) at receive.c:207 #17 0x00525987 in udp_rcv_loop () at udp_server.c:544 #18 0x004635f4 in main_loop () at main.c:1585 #19 0x00465e62 in main (argc=3, argv=0x7fffe98c7c08) at main.c:2475 Regards Javi On Fri, Feb 17, 2012 at 11:39 AM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, thanks for testing, indeed it was an extra declaration left over. Can you try with the new patch attached? Cheers, Daniel On 2/17/12 11:10 AM, Andrew Pogrebennyk wrote: Hi Daniel, On 02/17/2012 10:47 AM, Daniel-Constantin Mierla wrote: I made a patch for server reconnect -- I had no access to a computer with redis lib installed for the moment, hopefully it compiles. If you can try and tell the result, it would be great, I can commit then. I may be able to test this patch as well. Currently compilations bails out on attempt to redeclare redisc_reconnect_server function parameter: CC (gcc) [M ndb_redis.so] ndb_redis_mod.o CC (gcc) [M ndb_redis.so] redis_client.o redis_client.c: In function ‘redisc_reconnect_server’: redis_client.c:206:19: error: ‘rsrv’ redeclared as different kind of symbol redis_client.c:202:46: note: previous definition of ‘rsrv’ was here make[1]: *** [redis_client.o] Error 1 make: *** [modules] Error 1 __**_ 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 -- Daniel-Constantin Mierla -- http://www.asipto.com http://linkedin.com/in/miconda -- http://twitter.com/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
Re: [SR-Users] Need example of Kamailio.cfg for a port mirror setup
The link has been not changed, you know it already: http://code.google.com/p/homer/wiki/HOWTO Homer Capture Agent (for all other unsupported system) if your SIP system (PBX, proxy) doesn't have a built-in capture agent with HEP or IPIP encapsulation support, you can use Homer Capture Agent (captagent). This is an external application (daemon) that collect SIP messages thru PCAPlib and send them to your capture server. The captagent support IPv4 and IPv6. preventing your next question: the captagent your can find in the git. http://code.google.com/p/homer/source/browse/ Wbr, Alexandr 17.02.2012 13:15, Nelson Pereira wrote: Can captagent be installed on a asterisk server? If so, is there a howto? Sent from my iPhone4 on IOS4 On Feb 17, 2012, at 7:07 AM, Alexandr Dubovikov v...@start4.info mailto:v...@start4.info wrote: Hi, start two captagents instance, each on own interface and duplicate all traffic to your kamailio node. (HEP protocol) Wbr, Alexandr 16.02.2012 17:51, Nelson Pereira wrote: I would like to know if someone can show me an example of there setup configuration in kamailio.cfg for capturing packets comming in from a mirror port. The reason I ask is that if I do a TCPDUMP on the server, I see all traffic to and from different sources on my Voice network. But when I use Homer SIPCAPTURE which uses Kamailio in the background, I only see traffic sent FROM my PBX but not seing the traffic comming back to it. I mean I only see one side of the call, yet TCPDUMP confirmed I see everything What am I missing ? Thanks NP ___ 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 mailto: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] Kamailio Exits With: Segmentation Fault Error 4 in usrloc.so
Hello, On 2/17/12 2:09 PM, Alexandr Dubovikov wrote: Hi, If i got it also correct: Simpson is getting SIP messages from a raw socket in the sipcapture module and try to save all REGISTER messages to the location table through the userloc module. (user registration audit) so sipcapture is executing the request route block from the config even for packages received on the raw sockets. In this case it does not set the socket and its string representation... Not sure yet the best place where it should be fixed: in usrloc (to test for sock and sock_str) or in sipcapture, to set this fields as most of the other config function. The second will be safer overall, but might not be an usable socket for sending (if someone will attempt to do lookup location and relay). Cheers, Daniel Wbr, Alexandr 17.02.2012 13:49, Daniel-Constantin Mierla wrote: Hello, On 2/17/12 1:11 PM, Alexandr Dubovikov wrote: Hi Daniel, he use raw_socket in the sipcapture module and save all REGISTER messages to location. (something like fraud controling for registration). I think in this case he have to ignore socket listener. not sure I understood -- it is on the server that saves to homer's database? It gets the traffic over a raw socket and then executes the config file as usual with functions from other modules? Cheers, Daniel Wbr, Alexandr 17.02.2012 09:19, Daniel-Constantin Mierla wrote: Hello, looks like an invalid listen socket structure, quite strange... what version of kamailio do you have? Also, in gdb, frame 0, can you send the output of: p *_c p *_c-sock You can replace sensitive data (like IP), if you wish. Cheers, Daniel On 2/16/12 10:52 PM, Simpson Chua wrote: Hi, Kamailio is exiting with a segmentation fault when trying to do a save(location). Here is some information I gathered. Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25721]: DEBUG: core [parser/msg_parser.c:103]: found end of header Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25721]: ERROR: core [db.c:435]: invalid parameter value Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25721]: ERROR: usrloc [udomain.c:564]: failed to use table location Feb 16 15:30:19 ubuntu kernel: [171540.056663] kamailio[25721]: segfault at 89 ip 7fa1f9a41452 sp 7fff971a3af0 error 4 in usrloc.so[7fa1f9a37000+1f000] Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25708]: ALERT: core [main.c:751]: child process 25720 exited by a signal 11 Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25708]: ALERT: core [main.c:754]: core was generated Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25708]: INFO: core [main.c:766]: INFO: terminating due to SIGCHLD Core was generated by `kamailio -w /home/core'. Program terminated with signal 11, Segmentation fault. #0 db_insert_ucontact (_c=0x7f5f8f737eb0) at ucontact.c:474 474 vals[11].val.str_val = _c-sock-sock_str; (gdb) bt #0 db_insert_ucontact (_c=0x7f5f8f737eb0) at ucontact.c:474 #1 0x7f5f916d9649 in insert_ucontact (_r=optimized out, _contact=optimized out, _ci=optimized out, _c=0x7fff52bbeb88) at urecord.c:473 #2 0x7f5f914b785f in insert_contacts (_m=0x7f5f93d7f458, _d=0x7f5f8f72f680, _a=0x7fff52bbec00) at save.c:428 #3 0x7f5f914b8d10 in add_contacts (_mode=1, _a=0x7fff52bbec00, _d=0x7f5f8f72f680, _m=0x7f5f93d7f458) at save.c:737 #4 save (_m=0x7f5f93d7f458, _d=0x7f5f8f72f680, _cflags=4) at save.c:790 #5 0x0041ba87 in do_action (h=0x7fff52bbf5d0, a=0x7f5f93d7f238, msg=0x7f5f93d7f458) at action.c:1128 #6 0x0041abe2 in run_actions (h=0x7fff52bbf5d0, a=0x7f5f93d7f238, msg=0x7f5f93d7f458) at action.c:1610 #7 0x0041c05b in do_action (h=0x7fff52bbf5d0, a=0x7f5f93d7fe08, msg=0x7f5f93d7f458) at action.c:1107 #8 0x0041abe2 in run_actions (h=0x7fff52bbf5d0, a=0x7f5f93d7fe08, msg=0x7f5f93d7f458) at action.c:1610 #9 0x00422fa2 in run_top_route (a=0x7f5f93d7fe08, msg=0x7f5f93d7f458, c=optimized out) at action.c:1683 #10 0x004b061e in receive_msg (buf=optimized out, len=optimized out, rcv_info=optimized out) at receive.c:207 #11 0x7f5f91b038b0 in raw_capture_rcv_loop (rsock=5, port1=5060, port2=8933, ipip=0) at sipcapture.c:1518 #12 0x7f5f91b03e1f in init_rawsock_children () at sipcapture.c:572 #13 0x7f5f91b04033 in child_init (rank=optimized out) at sipcapture.c:542 #14 0x00507a0f in init_mod_child (m=0x7f5f93d7b2b0, rank=0) at sr_module.c:886 #15 0x00507974 in init_mod_child (m=0x7f5f93d7b668, rank=0) at sr_module.c:883 #16 0x00507974 in init_mod_child (m=0x7f5f93d7c178, rank=0) at sr_module.c:883 #17 0x00507974 in init_mod_child (m=0x7f5f93d7c4b0, rank=0) at sr_module.c:883 #18 0x00476149 in main_loop () at main.c:1661 #19 0x0041a940 in main (argc=optimized out, argv=0x7fff52bbfd68) at main.c:2475 Any idea why this is happening? Is there something in the REGISTER message that is causing this? Thanks,
Re: [SR-Users] how to match exact string value in mtree (Uri Shacked)
Hi Maybe I didn't understand your scenario, but I don't see how to do it with the dialplan module. Let's say you have two entries in your dialplan table: 09555333 (this should go first) 09555* If your string is 09555444 you will still get the second entry Regards Javi On Fri, Feb 17, 2012 at 3:11 PM, Uri Shacked ushac...@gmail.com wrote: hi, what do you think about the Dialplan module? it can probably do the trick as well... cheers, On Fri, Feb 17, 2012 at 10:18 AM, Daniel-Constantin Mierla mico...@gmail.com wrote: Hello, On 2/16/12 2:51 PM, Javier Gallart wrote: Hello Uri I had similar needs and I found the ndb_redis module more suited for that type of task. Instead of a tree you have a hash like this: tname tprefix tvalue. If you do a hget nts $avp(DID) and you get a not null value you have found your exact match. It works very well for me and the time it takes for that query is barely noticeable. Of course redis does not address items like persistence, etc the same way a rdbms does. for hash tables in config, the alternative is using htable module. Then the selection is done on exact match, no prefix matching. mtree is suitable for storing keys that are composed from a limited set of characters (like numbers, 0-9 digits only), otherwise becomes too memory consuming. For keys that are composed from any character and need exact match, hash table structures are more suitable, no matter if it is via htable module or something else like redis. Cheers, Daniel Hope it helps. Regards Javi On Thu, Feb 16, 2012 at 12:00 PM, sr-users-requ...@lists.sip-router.orgwrote: Send sr-users mailing list submissions to sr-users@lists.sip-router.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users or, via email, send a message with subject or body 'help' to sr-users-requ...@lists.sip-router.org You can reach the person managing the list at sr-users-ow...@lists.sip-router.org When replying, please edit your Subject line so it is more specific than Re: Contents of sr-users digest... Today's Topics: 1. how to match exact string value in mtree (Uri Shacked) -- Message: 1 Date: Thu, 16 Feb 2012 12:54:50 +0200 From: Uri Shacked ushac...@gmail.com Subject: [SR-Users] how to match exact string value in mtree To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List sr-users@lists.sip-router.org Message-ID: CAMMbDhTFNXAE-K88= aemjo7ana_qjv3ajj3ah-axemxn3ze...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 Hi, I am using Mtree to match prefix numbers, some of them starts with 0 or characters like D for example. so, the mtree param is like this: modparam(mtree, db_url, CFGDB) modparam(mtree, mtree, name=nts;dbtable=service_numbers_view;type=0;) modpmodparam(mtree, char_list, 0123456789*+#YMDabcdefgh) modparam(mtree, pv_value, $avp(mtval)) modparam(mtree, pv_values, $avp(mtvals)) The thing is, that i tried all: if(!mt_match(nts, $avp(DID),1)) if(!mt_match(nts, $avp(DID),2)) if(!mt_match(nts, $avp(DID),0)) and lets say i have the both prefix in the nts mtree: 09555 09555333 And the prefix i search for is $avp(DID)=09555444 I allwasy get the 09555 because it is the longest match. I need exact match. how do i do that? -- next part -- An HTML attachment was scrubbed... URL: http://lists.sip-router.org/pipermail/sr-users/attachments/20120216/9d2eb778/attachment.html -- ___ sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users End of sr-users Digest, Vol 81, Issue 40 ___ 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://linkedin.com/in/miconda -- http://twitter.com/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
Re: [SR-Users] Topoh hiding prefixes
Hi Alex, thanks for the answer. My customer is on the SIP side. So my customer sees a prefix of my PSTN gateway in the contact header. Sequential requests are being sent to prefixnumber@gateway_ip. However I think when I remove the prefix from the contact, the gateway would have no problem in responding to this seq. request (Isn't the call defined by to_tag, from_tag, call_id?). So I want to hide the contact prefix from the UA. Efelin 2012/2/17 Alex Balashov abalas...@evaristesys.com: Efelin, There is probably some confusion here. The 200 OK message is from your gateway (in your call flow), and it can put whatever it wants in the Contact URI; you have no control over that on the Kamailio side. You might be able to influence it with configuration settings on the GW side, but most likely not. However, much more importantly: the contact URI in the replies from the gateway only serves to target your UA's sequential requests. It has nothing to do with the other side of your GW. If it's a SIP - TDM or analog GW, then SIP details are totally irrelevant. If it's a SIP-to-SIP media gateway, it's a back-to-back user agent, meaning it generates a whole new logical call leg on the other side and bridges it to the incoming one from the UA. The parameters in that new leg are completely independent of any attributes of the old one. Regardless, the contact URI is something sent back to the UA to tell it how to communicate with the GW. In the overall scheme of your call flow, no matter the media, it is a purely internal attribute. -- This message was painstakingly thumbed out on my mobile, so apologies for brevity and errors. Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/, http://www.alexbalashov.com On Feb 17, 2012, at 9:20 AM, Efelin Novak efelin.no...@gmail.com wrote: Hi folks, I have a topology like this: UA - kamailio - PSTN GW. When I'm placing calls to a PSTN I have to append prefixes so the PSTN GW knows how to route the call. So the request-uri is prefixnumber@gateway_ip e.g. 999123456@192.168.1.1. When the UA calls to the GW a 200 OK message contains a contact header with 999123456@192.168.1.1. This is a problem because I don't want my customers to see gateway prefixes. The Topoh module only hides IP addresses or the domain part. Is there any way to remove prefixes. This document (http://www.kamailio.org/events/2011-Cluecon/DCM-kamailio-security.pdf) stated encoding IP and prefixes can be set via parameters. Can I remove prefixes from the contact in any other way than some contact header substitutions? Thanks Efelin ___ 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] Need example of Kamailio.cfg for a port mirror setup
from the atttached kamailio.cfg file, what should be changed to get captagent receiver working in kamailio instead of port mirroring? Thanks On Fri, Feb 17, 2012 at 7:29 AM, Alexandr Dubovikov v...@start4.infowrote: The link has been not changed, you know it already: http://code.google.com/p/homer/wiki/HOWTO Homer Capture Agent (for all other unsupported system) if your SIP system (PBX, proxy) doesn't have a built-in capture agent with HEP or IPIP encapsulation support, you can use Homer Capture Agent (captagent). This is an external application (daemon) that collect SIP messages thru PCAPlib and send them to your capture server. The captagent support IPv4 and IPv6. preventing your next question: the captagent your can find in the git. http://code.google.com/p/homer/source/browse/ Wbr, Alexandr 17.02.2012 13:15, Nelson Pereira wrote: Can captagent be installed on a asterisk server? If so, is there a howto? Sent from my iPhone4 on IOS4 On Feb 17, 2012, at 7:07 AM, Alexandr Dubovikov v...@start4.info wrote: Hi, start two captagents instance, each on own interface and duplicate all traffic to your kamailio node. (HEP protocol) Wbr, Alexandr 16.02.2012 17:51, Nelson Pereira wrote: I would like to know if someone can show me an example of there setup configuration in kamailio.cfg for capturing packets comming in from a mirror port. The reason I ask is that if I do a TCPDUMP on the server, I see all traffic to and from different sources on my Voice network. But when I use Homer SIPCAPTURE which uses Kamailio in the background, I only see traffic sent FROM my PBX but not seing the traffic comming back to it. I mean I only see one side of the call, yet TCPDUMP confirmed I see everything What am I missing ? Thanks NP ___ 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 ___ 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 listsr-us...@lists.sip-router.orghttp://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 kamailio.cfg Description: Binary data ___ 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] Need example of Kamailio.cfg for a port mirror setup
ok, tried to do the make install, getting the bellow: aurast:/usr/local/src/captagent # /usr/local/bin/captagent /usr/local/bin/captagent: error while loading shared libraries: libpcap.so.0.8: cannot open shared object file: No such file or directory Do i need to compile this? Also just tried running the captagent: aurast:/usr/local/src/captagent # ./captagent ./captagent: error while loading shared libraries: libpcap.so.0.8: cannot open shared object file: No such file or directory What am I doing wrong? This is a SUSE SLES11 64bit server running asterisk 1.8.6 Thanks On Fri, Feb 17, 2012 at 10:24 AM, Nelson Pereira kitkat0...@gmail.comwrote: from the atttached kamailio.cfg file, what should be changed to get captagent receiver working in kamailio instead of port mirroring? Thanks On Fri, Feb 17, 2012 at 7:29 AM, Alexandr Dubovikov v...@start4.infowrote: The link has been not changed, you know it already: http://code.google.com/p/homer/wiki/HOWTO Homer Capture Agent (for all other unsupported system) if your SIP system (PBX, proxy) doesn't have a built-in capture agent with HEP or IPIP encapsulation support, you can use Homer Capture Agent (captagent). This is an external application (daemon) that collect SIP messages thru PCAPlib and send them to your capture server. The captagent support IPv4 and IPv6. preventing your next question: the captagent your can find in the git. http://code.google.com/p/homer/source/browse/ Wbr, Alexandr 17.02.2012 13:15, Nelson Pereira wrote: Can captagent be installed on a asterisk server? If so, is there a howto? Sent from my iPhone4 on IOS4 On Feb 17, 2012, at 7:07 AM, Alexandr Dubovikov v...@start4.info wrote: Hi, start two captagents instance, each on own interface and duplicate all traffic to your kamailio node. (HEP protocol) Wbr, Alexandr 16.02.2012 17:51, Nelson Pereira wrote: I would like to know if someone can show me an example of there setup configuration in kamailio.cfg for capturing packets comming in from a mirror port. The reason I ask is that if I do a TCPDUMP on the server, I see all traffic to and from different sources on my Voice network. But when I use Homer SIPCAPTURE which uses Kamailio in the background, I only see traffic sent FROM my PBX but not seing the traffic comming back to it. I mean I only see one side of the call, yet TCPDUMP confirmed I see everything What am I missing ? Thanks NP ___ 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 ___ 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 listsr-us...@lists.sip-router.orghttp://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] Topoh hiding prefixes
I have to apologize. The Topoh module hides the whole contact not just a domain part. So The problem is fixed. However don't you have any experinece with clients that have problems with seq. requests being sent to some random string expect of the propagated contact? UA ---invite --- kamailio(topoh) ---invite --- UA UA ---200ok--- kamailio(topoh) ---200ok--- UA (sent contact= 100@192.168.1.101) UA ---ACK--- kamailio(topoh) ---ACK--- UA (received ru= sip:topoh_ip;line=sr--random_string SIP/2.0 ) Also fix_nated_contact() destroys the contact so I suppose there should be no problem whit this. Thank anyway Efelin 2012/2/17 Efelin Novak efelin.no...@gmail.com: Hi Alex, thanks for the answer. My customer is on the SIP side. So my customer sees a prefix of my PSTN gateway in the contact header. Sequential requests are being sent to prefixnumber@gateway_ip. However I think when I remove the prefix from the contact, the gateway would have no problem in responding to this seq. request (Isn't the call defined by to_tag, from_tag, call_id?). So I want to hide the contact prefix from the UA. Efelin 2012/2/17 Alex Balashov abalas...@evaristesys.com: Efelin, There is probably some confusion here. The 200 OK message is from your gateway (in your call flow), and it can put whatever it wants in the Contact URI; you have no control over that on the Kamailio side. You might be able to influence it with configuration settings on the GW side, but most likely not. However, much more importantly: the contact URI in the replies from the gateway only serves to target your UA's sequential requests. It has nothing to do with the other side of your GW. If it's a SIP - TDM or analog GW, then SIP details are totally irrelevant. If it's a SIP-to-SIP media gateway, it's a back-to-back user agent, meaning it generates a whole new logical call leg on the other side and bridges it to the incoming one from the UA. The parameters in that new leg are completely independent of any attributes of the old one. Regardless, the contact URI is something sent back to the UA to tell it how to communicate with the GW. In the overall scheme of your call flow, no matter the media, it is a purely internal attribute. -- This message was painstakingly thumbed out on my mobile, so apologies for brevity and errors. Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/, http://www.alexbalashov.com On Feb 17, 2012, at 9:20 AM, Efelin Novak efelin.no...@gmail.com wrote: Hi folks, I have a topology like this: UA - kamailio - PSTN GW. When I'm placing calls to a PSTN I have to append prefixes so the PSTN GW knows how to route the call. So the request-uri is prefixnumber@gateway_ip e.g. 999123456@192.168.1.1. When the UA calls to the GW a 200 OK message contains a contact header with 999123456@192.168.1.1. This is a problem because I don't want my customers to see gateway prefixes. The Topoh module only hides IP addresses or the domain part. Is there any way to remove prefixes. This document (http://www.kamailio.org/events/2011-Cluecon/DCM-kamailio-security.pdf) stated encoding IP and prefixes can be set via parameters. Can I remove prefixes from the contact in any other way than some contact header substitutions? Thanks Efelin ___ 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] Topoh hiding prefixes
On 02/17/2012 10:33 AM, Efelin Novak wrote: However don't you have any experinece with clients that have problems with seq. requests being sent to some random string expect of the propagated contact? Not sure I follow. The initiating UA is obligated to use whatever contact is provided by the UAS for sequential requests. -- Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 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-users
[SR-Users] Require Certificate
Hi All, Does it possible on tls module require certificates only some hosts? My kamailio comunicate with several UA clients (Softphones and IP phones) and one SIP gateway. I want require certificate only gateway SIP, it's possible? The parameter *modparam(tls, require_certificate, 1)* require certificate of all clients... Best Regards ___ 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] Require Certificate
On 17/02/12 19:01, Bruno Bresciani wrote: Hi All, Does it possible on tls module require certificates only some hosts? Yes, you have at least two options: a) just set the require_certificate 0 option - make sure your client still sends it's cert even when it is not demanded - and in your kamailio.cfg, your route logic will need to check whether a certificate was used by the client b) looking in tls.cfg, it appears you can set up different ports with different TLS policies, so the clients that must send a cert could be connecting to a port with a stricter configuration ___ 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] Require Certificate
Thanks Daniel but I have some problems... a) my SIP gateway doesn't send the certificate when it isn't demanded... b) I was reading about TLS specific config file (tls.cfg), but my requirements doesn't allow to configure differents TLS ports. Do you have other idea? Best Regards 2012/2/17 Daniel Pocock dan...@pocock.com.au On 17/02/12 19:01, Bruno Bresciani wrote: Hi All, Does it possible on tls module require certificates only some hosts? Yes, you have at least two options: a) just set the require_certificate 0 option - make sure your client still sends it's cert even when it is not demanded - and in your kamailio.cfg, your route logic will need to check whether a certificate was used by the client b) looking in tls.cfg, it appears you can set up different ports with different TLS policies, so the clients that must send a cert could be connecting to a port with a stricter configuration ___ 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
[SR-Users] Registration replication
Hello, I'm currently working on a HA setup with geographically separated proxies. Each proxy is in a different data center with an MPLS link between them. The proxies access a locally connected PostgreSQL database that is replicated from a master in the primary data center. Note that the replicated dbs are read only. Everything works great for read only queries but registrations seem to pose a problem as they must use the primary db directly to deal with the writes. If I set userloc to db mode 2 the secondary proxies wipe out the entries in the database. If I use db mode 3 everything works great but all of the secondary proxies must use the primary database directly and a network link failure will cause a service disruption. Is there any way I can use separate read and write databases without p_userloc? Is there a better way to replicate registrations maintaining availability and scalability? And advice is appreciated. Thanks, Spencer Connected by DROID on Verizon Wireless ___ 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