Re: [SR-Users] Help with KEEP-ALIVE method
Thank you for clarification. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com 2017-03-01 20:05 GMT+02:00 Victor Seva : > 2017-03-01 15:48 GMT+01:00 Sergey Basov : >> 2017-03-01 15:57 GMT+02:00 Daniel-Constantin Mierla : >>> If yes, this is not a valid SIP message, because it lacks mandatory >>> headers such as call-id, cseq, from/to. >>> >> Yes it is without any headers... > > So is not a valid SIP message > > ___ > SIP Express Router (SER) 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] Help with KEEP-ALIVE method
Hi, Daniel Yes it is without any headers... I have attached screenshot from wireshark, I can not save it because this is sip tls... Thank you -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com 2017-03-01 15:57 GMT+02:00 Daniel-Constantin Mierla : > Hello, > > > On 28/02/2017 17:05, Sergey Basov wrote: >> Hi All. >> >> Today I have problem with connection from 1 of the clients. >> Their PBX sends KEEP-ALIVE after some time after REGISTER. >> >> I have next error in kamailio log >> >> Feb 28 14:26:19 sbc2 /usr/sbin/kamailio[3657]: ERROR: >> [tcp_read.c:1354]: tcp_read_req(): bad request, state=7, error=4 >> buf:#012KEEP-ALIVE sip:1.2.3.4 SIP/2.0#015#012#015#012#012parsed >> :#012KEEP-ALIVE sip:1.2.3.4 SIP/2.0 >> >> After which my kamailio closes TCP session >> >> This connection is done with sip TLS. >> > Is that message a single line like next? > > KEEP-ALIVE sip:1.2.3.4 SIP/2.0 > > If yes, this is not a valid SIP message, because it lacks mandatory > headers such as call-id, cseq, from/to. > > Cheers, > Daniel > > -- > Daniel-Constantin Mierla > www.twitter.com/miconda -- www.linkedin.com/in/miconda > Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - > www.asipto.com > Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.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
[SR-Users] Help with KEEP-ALIVE method
Hi All. Today I have problem with connection from 1 of the clients. Their PBX sends KEEP-ALIVE after some time after REGISTER. I have next error in kamailio log Feb 28 14:26:19 sbc2 /usr/sbin/kamailio[3657]: ERROR: [tcp_read.c:1354]: tcp_read_req(): bad request, state=7, error=4 buf:#012KEEP-ALIVE sip:1.2.3.4 SIP/2.0#015#012#015#012#012parsed :#012KEEP-ALIVE sip:1.2.3.4 SIP/2.0 After which my kamailio closes TCP session This connection is done with sip TLS. Thank you in advance. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.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] RTPEngine disable/enable crash kamailio
Hi, Richard. Seems with your latest patch rtpengine enable/disable commands work correctly without any issues. Tested on kamailio 4.4.5 on RHEL 7 x86_64 Thank you. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2017-02-06 17:50 GMT+02:00 Richard Fuchs : > On 02/06/2017 03:30 AM, Sergey Basov wrote: >> >> Hi, All. >> >> May be it helps. >> >> After patch >> >> https://github.com/kamailio/kamailio/commit/8ca410cba540e8c8b0f711fb26c85823375480a9 >> >> when running kamailio with debug level=3 >> when I do disable rtpengine I got in log: >> Feb 6 10:24:27 csbc-uat /usr/sbin/kamailio[10062]: DEBUG: mi_fifo >> [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val >> >> Feb 6 10:24:27 csbc-uat /usr/sbin/kamailio[10062]: DEBUG: mi_fifo >> [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <0> >> Feb 6 10:24:27 csbc-uat /usr/sbin/kamailio[10062]: DEBUG: mi_fifo >> [mi_parser.c:84]: mi_parse_node(): end of fifo input tree >> Feb 6 10:24:27 csbc-uat /usr/sbin/kamailio[10062]: DEBUG: mi_fifo >> [fifo_fnc.c:515]: mi_fifo_server(): done parsing the mi tree >> >> And it disables correctly. >> >> when I do enable of rtpengine I got: >> Feb 6 10:24:30 csbc-uat /usr/sbin/kamailio[10062]: DEBUG: mi_fifo >> [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val >> >> Feb 6 10:24:30 csbc-uat /usr/sbin/kamailio[10062]: DEBUG: mi_fifo >> [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <1> >> Feb 6 10:24:30 csbc-uat /usr/sbin/kamailio[10062]: DEBUG: mi_fifo >> [mi_parser.c:84]: mi_parse_node(): end of fifo input tree >> Feb 6 10:24:30 csbc-uat /usr/sbin/kamailio[10062]: DEBUG: mi_fifo >> [fifo_fnc.c:515]: mi_fifo_server(): done parsing the mi tree >> >> And command 'kamctl fifo nh_enable_rtpp udp:10.1.23.19:2223 1' >> freezing, no kamailio crash, but I cannot wxecute any command with >> kamctl... >> >> If you need some more information or test - let me know. > > Thanks for the detailed report. I've updated the commit, please try again > with > https://github.com/kamailio/kamailio/commit/e78e9cd31e1cec79b936452a719dfca1b441ca8d > > 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
Re: [SR-Users] RTPEngine disable/enable crash kamailio
Hi, All. May be it helps. After patch https://github.com/kamailio/kamailio/commit/8ca410cba540e8c8b0f711fb26c85823375480a9 when running kamailio with debug level=3 when I do disable rtpengine I got in log: Feb 6 10:24:27 csbc-uat /usr/sbin/kamailio[10062]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val Feb 6 10:24:27 csbc-uat /usr/sbin/kamailio[10062]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <0> Feb 6 10:24:27 csbc-uat /usr/sbin/kamailio[10062]: DEBUG: mi_fifo [mi_parser.c:84]: mi_parse_node(): end of fifo input tree Feb 6 10:24:27 csbc-uat /usr/sbin/kamailio[10062]: DEBUG: mi_fifo [fifo_fnc.c:515]: mi_fifo_server(): done parsing the mi tree And it disables correctly. when I do enable of rtpengine I got: Feb 6 10:24:30 csbc-uat /usr/sbin/kamailio[10062]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val Feb 6 10:24:30 csbc-uat /usr/sbin/kamailio[10062]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <1> Feb 6 10:24:30 csbc-uat /usr/sbin/kamailio[10062]: DEBUG: mi_fifo [mi_parser.c:84]: mi_parse_node(): end of fifo input tree Feb 6 10:24:30 csbc-uat /usr/sbin/kamailio[10062]: DEBUG: mi_fifo [fifo_fnc.c:515]: mi_fifo_server(): done parsing the mi tree And command 'kamctl fifo nh_enable_rtpp udp:10.1.23.19:2223 1' freezing, no kamailio crash, but I cannot wxecute any command with kamctl... If you need some more information or test - let me know. Thank you. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2017-02-03 23:07 GMT+02:00 Sergey Basov : > Hi, > with your patch rtpengine is disables with success, as it was before. > > But when I do enable it just stay as is, no coredump, and enable > process does not end... > > May be you have another idea? > > Thank you. > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2017-02-03 17:21 GMT+02:00 Richard Fuchs : >> On 02/02/2017 06:54 AM, Sergey Basov wrote: >>> >>> Hello Daniel, >>> >>> You can find backtrace in attaced file >> >> Hi, >> >> Can you please with the following patch >> https://github.com/kamailio/kamailio/commit/8ca410cba540e8c8b0f711fb26c85823375480a9 >> from branch >> https://github.com/kamailio/kamailio/tree/rfuchs/4.4-rtpengine-segfault-fix >> applied? >> >> Thanks >> >> >> ___ >> SIP Express Router (SER) 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] RTPEngine disable/enable crash kamailio
Hi, with your patch rtpengine is disables with success, as it was before. But when I do enable it just stay as is, no coredump, and enable process does not end... May be you have another idea? Thank you. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2017-02-03 17:21 GMT+02:00 Richard Fuchs : > On 02/02/2017 06:54 AM, Sergey Basov wrote: >> >> Hello Daniel, >> >> You can find backtrace in attaced file > > Hi, > > Can you please with the following patch > https://github.com/kamailio/kamailio/commit/8ca410cba540e8c8b0f711fb26c85823375480a9 > from branch > https://github.com/kamailio/kamailio/tree/rfuchs/4.4-rtpengine-segfault-fix > applied? > > Thanks > > > ___ > SIP Express Router (SER) 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] RTPEngine disable/enable crash kamailio
Hello, you can find this info in attached files. If you need anything else please let me know. Thank you. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com 2017-02-02 17:29 GMT+02:00 Richard Fuchs : > On 02/02/2017 06:54 AM, Sergey Basov wrote: >> >> Hello Daniel, >> >> You can find backtrace in attaced file > > Can you also share the output of "info locals" and "print *node" please > > Thanks > > > ___ > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > sr-users@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio.pid -m 256 -M 32 -u kamailio -g kamaili'. Program terminated with signal 11, Segmentation fault. #0 0x7f6f9a6a6a1f in send_rtpp_command (node=0x7f6f88a181a0, dict=0x7f6f9fc8fcb0, outlen=0x7ffd34947b2c) at rtpengine.c:2619 2619fds[0].fd = rtpp_socks[node->idx]; Missing separate debuginfos, use: debuginfo-install glibc-2.17-157.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.14.1-26.el7.x86_64 libcom_err-1.42.9-9.el7.x86_64 libgcc-4.8.5-11.el7.x86_64 libselinux-2.5-6.el7.x86_64 libxml2-2.9.1-6.el7_2.3.x86_64 openssl-libs-1.0.1e-60.el7.x86_64 pcre-8.32-15.el7_2.1.x86_64 xz-libs-5.2.2-1.el7.x86_64 zlib-1.2.7-17.el7.x86_64 (gdb) info locals addr = {sun_family = 50758, sun_path = "k\232\002\000\000\000w\375ȟo\177\000\000`z\224\064\375\177\000\000XWh\232o\177\000\000\200z\224\064\375\177\000\000RVh\232\a\000\000\000\020\375ȟo\177\000\000\000\000\000\000\000\000\000\000\240z\224\064\375\177\000\000jYh\232o\177\000\000\020\375ȟo\177\000\000\020\375ȟ\a\000\000\000V\363k\232o\177\000\000\260\374ȟo\177"} fd = 882146000 len = 0 i = -1614218064 vcnt = 6 cp = 0x7f6f9a8ce0a0 "" buf = '\000' fds = {{fd = -1704201386, events = 32623, revents = 0}} v = 0x7f6f9fc8fdde out = {s = 0x0, len = 0} __FUNCTION__ = "send_rtpp_command" (gdb) (gdb) print *node $1 = {idx = 1, rn_url = {s = 0x7f6f88a18230 "udp:10.1.23.19:2223", len = 19}, rn_umode = 1, rn_address = 0x7f6f88a18234 "10.1.23.19:2223", rn_disabled = 1, rn_weight = 1, rn_displayed = 1, rn_recheck_ticks = 4294967295, rn_rep_supported = 0, rn_ptl_supported = 0, rn_next = 0x0} (gdb) ___ SIP Express Router (SER) 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] RTPEngine disable/enable crash kamailio
Hello Daniel, You can find backtrace in attaced file Thank you. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2017-02-02 11:39 GMT+02:00 Daniel-Constantin Mierla : > Hello, > > did you get a coredump and can send the backtrace? It is very useful to > debug, as I don't have same scearios like you. > > Cheers, > Daniel > > > On 02/02/2017 08:11, Ján Füri wrote: >> Hi, >> I have the same experience with enabling end disabling rtpengines >> using commands like kamctl fifo nh_enable_rtpp udp:xyz. >> I tested in on kamailio 4.4.3 >> >> Currently I have my rtpengines' IPs in MySQL table. Here I can disable >> or enable them. After changing parameters in rtpengine's table, I just >> need to reload it using kamctl fifo nh_reload_rtpp >> >> so I use only : >> kamctl fifo nh_show_rtpp all - for showing active rtpengines >> kamctl fifo nh_reload_rtpp - for reloading my configuration >> >> this works reliably >> >> BR, >> Jan >>> Hi All. >>> >>> I ave just try to temporary disable 1 of 2 RTPEngines. >>> It was disabled successfully all media dialogs was finished. >>> But when I have try to enable it I have kamailio crashed with error: >>> CRITICAL: [pass_fd.c:277]: receive_fd(): EOF on 121 >>> >>> Does anyone have such issue? >>> >>> kamailio 4.4.5 on RHEL 7.2 x86_64 >>> rtpengine 4.4.0 on RHEL 7.2 x86_64 >>> >>> # kamctl fifo nh_show_rtpp all >>> which: no gdb in >>> (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/) >>> >>> udp:10.1.23.24:2223:: set=0 >>> index:: 0 >>> disabled:: 0 >>> weight:: 1 >>> recheck_ticks:: 0 >>> udp:10.1.23.25:2223:: set=0 >>> index:: 1 >>> disabled:: 0 >>> weight:: 1 >>> recheck_ticks:: 0 >>> >>> after >>> # kamctl fifo nh_enable_rtpp udp:10.1.23.25:2223 0 >>> it was successfully disabled with media going on >>> >>> after >>> # kamctl fifo nh_enable_rtpp udp:10.1.23.25:2223 1 >>> I got kamailio crash with error >>> CRITICAL: [pass_fd.c:277]: receive_fd(): EOF on 121 >>> >>> sorry I does not have coredump, it is production system. >>> >>> my config regarding rtpengine: >>> >>> modparam("rtpengine", "rtpengine_allow_op", 1) >>> modparam("rtpengine", "rtpengine_sock", "udp:10.1.23.24:2223 >>> udp:10.1.23.25:2223") >>> >>> Thank you. >>> >>> -- >>> Best regards, >>> Sergey Basov e-mail: sergey.v.ba...@gmail.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 > www.twitter.com/miconda -- www.linkedin.com/in/miconda > Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - > www.asipto.com > Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.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 Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio.pid -m 256 -M 32 -u kamailio -g kamaili'. Program terminated with signal 11, Segmentation fault. #0 0x7f6f9a6a6a1f in send_rtpp_command (node=0x7f6f88a181a0, dict=0x7f6f9fc8fcb0, outlen=0x7ffd34947b2c) at rtpengine.c:2619 2619fds[0].fd = rtpp_socks[node->idx]; Missing separate debuginfos, use: debuginfo-install glibc-2.17-157.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.14.1-26.el7.x86_64 libcom_err-1.42.9-9.el7.x86_64 libgcc-4.8.5-11.el7.x86_64 libselinux-2.5-6.el7.x86_64 libxml2-2.9.1-6.el7_2.3.x86_64 openssl-libs-1.0.1e-60.el7.x86_64 pcre-8.32-15.el7_2.1.x86_64 xz-libs-5.2.2-1.el7.x86_64 zlib-1.2.7-17.el7.x86_64 (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) backtrace #
Re: [SR-Users] Os on virtual machine
Hi I am using kamailio 4.2.x and now 4.4.x on RHEL 6 x86_64 and RHEL 7 x86_64. I does not have any issues regarding OS. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com 2017-02-02 0:05 GMT+02:00 Diego Nadares : > Hi guys, > > We are using vmware to run kamailio. The thing is that they give us support > only if we install Red Hat. > > Did you test kamailio on RH? Any issues or things to have in mind? > > What linux dist do you recommend? > > Thanks! > > Diego. > > ___ > SIP Express Router (SER) 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] RTPEngine disable/enable crash kamailio
Hi All. I ave just try to temporary disable 1 of 2 RTPEngines. It was disabled successfully all media dialogs was finished. But when I have try to enable it I have kamailio crashed with error: CRITICAL: [pass_fd.c:277]: receive_fd(): EOF on 121 Does anyone have such issue? kamailio 4.4.5 on RHEL 7.2 x86_64 rtpengine 4.4.0 on RHEL 7.2 x86_64 # kamctl fifo nh_show_rtpp all which: no gdb in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/) udp:10.1.23.24:2223:: set=0 index:: 0 disabled:: 0 weight:: 1 recheck_ticks:: 0 udp:10.1.23.25:2223:: set=0 index:: 1 disabled:: 0 weight:: 1 recheck_ticks:: 0 after # kamctl fifo nh_enable_rtpp udp:10.1.23.25:2223 0 it was successfully disabled with media going on after # kamctl fifo nh_enable_rtpp udp:10.1.23.25:2223 1 I got kamailio crash with error CRITICAL: [pass_fd.c:277]: receive_fd(): EOF on 121 sorry I does not have coredump, it is production system. my config regarding rtpengine: modparam("rtpengine", "rtpengine_allow_op", 1) modparam("rtpengine", "rtpengine_sock", "udp:10.1.23.24:2223 udp:10.1.23.25:2223") Thank you. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.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] Best way to log incoming/outgoing sip messages?
Hi. I using Homer into test and production environement and it is wery helpfull. For 10 days I have 200GB of data in mysql, but I have 400 concurrent calls at busines time with max 1500 concurent cals, and I do capture of rtcp statistic from rtpengine to Homer. I have a lot of sip tls connections and without Homer it was realy hard) Please look at siptrace module documentation to use it as it will be preffered to your case. 21 янв. 2017 г. 11:27 AM пользователь "Gholamreza Sabery" < gr.sab...@gmail.com> написал: > I think one of the best ways is to use Homer + Kamailio's sipcapture > module. For more information refer to: > > http://sipcapture.org/ > > On Sat, Jan 21, 2017 at 2:34 AM, Sergey Okhapkin > wrote: > >> Use xlog function. See $mb core variable documentation. >> >> On Friday, January 20, 2017 10:27:03 PM Pranathi Venkatayogi wrote: >> > Hi, >> > What is the best way to get a complete dump of incoming/outgoing SIP >> > messages of Kamailio server? >> I encountered “SIPTrace” module, but it >> > writes to database. Is there a way we can write to syslog instead? >> > Thanks >> > Pranathi >> > >> >> >> ___ >> SIP Express Router (SER) 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] Remove/Append headers in 200 canceling and 200 ok to BYE
Your are welcome. No, for local generated answer you shood do as Daniel suggested. But if kamailio generates CANCEL, than 200 ok is reply for it and 200 ok to another side is generated by kamailio itselfs... 13 янв. 2017 г. 8:00 PM пользователь "Diego Nadares" написал: > Thanks Sergey! It works like a charm for BYEs. > > Is it working for you on 200cancelling generated by Kamailio? > > I tried the same work around with no success. > > if (is_method("CANCEL")) { > if (t_check_trans()) { > if(!t_is_set("onreply_route")) > t_on_reply("MANAGE_REPLY_ON_ > CANCEL"); > route(RELAY); > } > exit; > } > > > Thanks again, > > Diego > > > > 2017-01-13 13:27 GMT-03:00 Sergey Basov : > >> Hi All. >> >> I have similar task. But i have to remove server and user-agent headers >> from all request an replyes. >> >> You can try: >> >> >> I have added route: >> # Fix user-agent and server >> route[RemoveHeader] { >> remove_hf("server"); >> remove_hf("user-agent"); >> return; >> } >> >> >> I use it form >> request_route { >> >> route(RemoveHeader); >> . >> } >> >> failure_route[--- all what i have ---] { >> >> route(RemoveHeader); >> . >> } >> >> branch_route[MANAGE_BRANCH]{ >> >> route(RemoveHeader); >> . >> } >> >> onreply_route[MANAGE_REPLY] { >> >> route(RemoveHeader); >> . >> } >> >> failure_route[MANAGE_FAILURE] { >> >> route(RemoveHeader); >> . >> } >> >> Seems all is fine It removes headers in all packets except 200 OK on >> BYE >> After debugging script I does not seen in which route this 200 Ok goes.. >> But if I adding next to >> route[RELAY] { >> >> if (is_method("BYE")) { >> xlog("L_INFO","route RELAY method BYE \n"); >> if(!t_is_set("onreply_route")) >> t_on_reply("MANAGE_REPLY_ON_BYE"); >> } >> ... >> } >> >> and adding route >> onreply_route[MANAGE_REPLY_ON_BYE] { >> route(RemoveHeader); >> xlog("L_INFO","route MANAGE_REPLY_ON_BYE entered \n"); >> } >> >> this 200 Ok successfully goes to MANAGE_REPLY_ON_BYE route and headers >> are removed. >> >> >> >> 13 янв. 2017 г. 4:59 PM пользователь "Diego Nadares" >> написал: >> >> If you need any additional data please let me know. >> >> Cheers, >> >> Diego >> >> 2017-01-12 15:04 GMT-03:00 Diego Nadares : >> >>> Hi Daniel! >>> >>> Thanks for your answer. The idea is to show only a few headers. In BYE >>> works great. I'm removing and adding the following hdrs: >>> >>> *User-Agent: Kamailio. <---I will try what you said* >>> *Supported:.* >>> *Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, NOTIFY, INFO.* >>> *Accept: application/sdp, application/gtd.* >>> >>> For example in following messages ( Kamailio is 172.16.213.38) >>> >>> # >>> U 2017/01/12 14:51:10.593782 172.16.200.159:57270 -> 172.16.213.38:5060 >>> BYE sip:127.0.0.8:5060;line=sr-9879879879798** SIP/2.0. >>> Via: SIP/2.0/UDP 172.16.200.159:5060;branch=z9hG4bK12B9605ED. >>> From: xx ;tag=95E7E4A4-23F2. >>> To: xxx ;tag=SDmmb7201-as0518eb07. >>> Date: Thu, 12 Jan 2017 17:51:05 GMT. >>> Call-ID: SDmmb7201-f5ded6cf4cd5d84736b088e39277e8db-c540dl1. >>> User-Agent: Cisco-SIPGateway/IOS-12.x. >>> Max-Forwards: 15. >>> Route: . >>> Timestamp: 1484243470. >>> CSeq: 101 BYE. >>> Reason: Q.850;cause=16. >>> Content-Disposition: signal;handling=optional. >>> Content-Type: application/gtd. >>> Content-Length: 26. >>> . >>> . >>> . >>> >>> # >>> U 2017/01/12 14:51:10.647164 172.16.213.38:5060 -> 172.16.50.41:5060 >>> BYE sip:xxx@172.16.50.41:5060;transport=udp SIP/2.0. >>> Via: SIP/2.0/UDP 172.16.213.38;branch=z9hG4bKdc >>> f6.f898feef02d601e36a22d26bf3ae5e4a.0. >>> Via: SIP/2.0/UDP 127.0.0.8;branch=z9hG4bKsr-asdfasdfF. >>> From: xx ;tag=95E7E4A4-23F2.
Re: [SR-Users] Remove/Append headers in 200 canceling and 200 ok to BYE
Hi All. I have similar task. But i have to remove server and user-agent headers from all request an replyes. You can try: I have added route: # Fix user-agent and server route[RemoveHeader] { remove_hf("server"); remove_hf("user-agent"); return; } I use it form request_route { route(RemoveHeader); . } failure_route[--- all what i have ---] { route(RemoveHeader); . } branch_route[MANAGE_BRANCH]{ route(RemoveHeader); . } onreply_route[MANAGE_REPLY] { route(RemoveHeader); . } failure_route[MANAGE_FAILURE] { route(RemoveHeader); . } Seems all is fine It removes headers in all packets except 200 OK on BYE After debugging script I does not seen in which route this 200 Ok goes.. But if I adding next to route[RELAY] { if (is_method("BYE")) { xlog("L_INFO","route RELAY method BYE \n"); if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY_ON_BYE"); } ... } and adding route onreply_route[MANAGE_REPLY_ON_BYE] { route(RemoveHeader); xlog("L_INFO","route MANAGE_REPLY_ON_BYE entered \n"); } this 200 Ok successfully goes to MANAGE_REPLY_ON_BYE route and headers are removed. 13 янв. 2017 г. 4:59 PM пользователь "Diego Nadares" написал: If you need any additional data please let me know. Cheers, Diego 2017-01-12 15:04 GMT-03:00 Diego Nadares : > Hi Daniel! > > Thanks for your answer. The idea is to show only a few headers. In BYE > works great. I'm removing and adding the following hdrs: > > *User-Agent: Kamailio. <---I will try what you said* > *Supported:.* > *Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, NOTIFY, INFO.* > *Accept: application/sdp, application/gtd.* > > For example in following messages ( Kamailio is 172.16.213.38) > > # > U 2017/01/12 14:51:10.593782 172.16.200.159:57270 -> 172.16.213.38:5060 > BYE sip:127.0.0.8:5060;line=sr-9879879879798** SIP/2.0. > Via: SIP/2.0/UDP 172.16.200.159:5060;branch=z9hG4bK12B9605ED. > From: xx ;tag=95E7E4A4-23F2. > To: xxx ;tag=SDmmb7201-as0518eb07. > Date: Thu, 12 Jan 2017 17:51:05 GMT. > Call-ID: SDmmb7201-f5ded6cf4cd5d84736b088e39277e8db-c540dl1. > User-Agent: Cisco-SIPGateway/IOS-12.x. > Max-Forwards: 15. > Route: . > Timestamp: 1484243470. > CSeq: 101 BYE. > Reason: Q.850;cause=16. > Content-Disposition: signal;handling=optional. > Content-Type: application/gtd. > Content-Length: 26. > . > . > . > > # > U 2017/01/12 14:51:10.647164 172.16.213.38:5060 -> 172.16.50.41:5060 > BYE sip:xxx@172.16.50.41:5060;transport=udp SIP/2.0. > Via: SIP/2.0/UDP 172.16.213.38;branch=z9hG4bKdc > f6.f898feef02d601e36a22d26bf3ae5e4a.0. > Via: SIP/2.0/UDP 127.0.0.8;branch=z9hG4bKsr-asdfasdfF. > From: xx ;tag=95E7E4A4-23F2. > To: xxx ;tag=SDmmb7201-as0518eb07. > Call-ID: SDmmb7201-f5ded6cf4cd5d84736b088e39277e8db-c540dl1. > Max-Forwards: 14. > CSeq: 101 BYE. > Content-Type: application/gtd. > Content-Length: 26. > *User-Agent: Kamailio.* > *Supported:.* > *Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, NOTIFY, INFO.* > *Accept: application/sdp, application/gtd.* > . > .. > > But in ok I can't > > # > U 2017/01/12 14:51:10.653701 172.16.50.41:5060 -> 172.16.213.38:5060 > SIP/2.0 200 OK. > Via: SIP/2.0/UDP 172.16.213.38;branch=z9hG4bKdc > f6.f898feef02d601e36a22d26bf3ae5e4a.0. > Via: SIP/2.0/UDP 127.0.0.8;branch=z9hG4bKsr-sadfasdf. > From: xx ;tag=95E7E4A4-23F2. > To: xxx ;tag=SDmmb7201-as0518eb07. > Call-ID: SDmmb7201-f5ded6cf4cd5d84736b088e39277e8db-c540dl1. > CSeq: 101 BYE. > Server: Asterisk PBX 11.17.0. > Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, > PUBLISH, MESSAGE. > Supported: replaces, timer. > Content-Length: 0. > . > FY, INFO. > Accept > # > U 2017/01/12 14:51:10.669460 172.16.213.38:5060 -> 172.16.200.159:5060 > SIP/2.0 200 OK. > Via: SIP/2.0/UDP 172.16.200.159:5060;branch=z9hG4bK12B9605ED. > From: xx ;tag=95E7E4A4-23F2. > To: xxx ;tag=SDmmb7201-as0518eb07. > Call-ID: SDmmb7201-f5ded6cf4cd5d84736b088e39277e8db-c540dl1. > CSeq: 101 BYE. > *Server: Asterisk PBX 11.17.0.* > *Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, > PUBLISH, MESSAGE.* > *Supported: replaces, timer.* > Content-Length: 0. > . > > > > 2017-01-12 13:23 GMT-03:00 Daniel-Constantin Mierla : > >> Hello, >> >> if you are looking to remove the server header (server signature), that >> can be controlled via global parameters: >> >> - https://www.kamailio.org/wiki/cookbooks/4.4.x/core#server_header >> >> Note that there is another header, User-Agent, that may be added by >> Kamailio in local generate request. There is a global parameter to control >> it as well. >> If you want more than that, can you add a bit more details, because >> CANCEL and BYE are processed differently. With which one you get issues? >> >> Cheers, >> Daniel >> >> >> On 12/01/2017 17:00, Diego Nadares wrote: >> >> Hi List, >> >> I'm trying to add and remove some headers in 200 canceling and 200 ok to >> BYEs with no success.
Re: [SR-Users] set_body_multipart and append_body_part
Hi. As from textopsx module doc: "This function can be used from REQUEST_ROUTE or ONREPLY_ROUTE." And you have error in your log: "Dec 26 11:36:22 dwrfsd01 ./kamailio[8847]: ERROR: textopsx [textopsx.c:159]: msg_apply_changes_f(): invalid usage - not in request route" -- Sergey Basov 26 дек. 2016 г. 5:05 PM пользователь "Diego Nadares" написал: Sorry, I forgot to paste two log lines. . Dec 26 11:36:22 dwrfsd01 ./kamailio[8847]: ERROR: textopsx [textopsx.c:159]: msg_apply_changes_f(): invalid usage - not in request route Dec 26 11:36:22 dwrfsd01 ./kamailio[8847]: ERROR: textops [textops.c:1879]: append_multibody_helper(): Cannot get boundary. Is body multipart? Dec 26 11:36:22 dwrfsd01 ./kamailio[8847]: INFO:
Re: [SR-Users] help with string modification
Hi, All. One more question related to remove_hf... I have added route: # Fix user-agent and server route[RemoveHeader] { remove_hf("server"); remove_hf("user-agent"); return; } I use it form request_route { route(RemoveHeader); . } failure_route[--- all what i have ---] { route(RemoveHeader); . } branch_route[MANAGE_BRANCH]{ route(RemoveHeader); . } onreply_route[MANAGE_REPLY] { route(RemoveHeader); . } failure_route[MANAGE_FAILURE] { route(RemoveHeader); . } Seems all is fine It removes headers in all packets except 200 OK on BYE After debugging script I does not seen in which route this 200 Ok goes.. But if I adding next to route[RELAY] { if (is_method("BYE")) { xlog("L_INFO","route RELAY method BYE \n"); if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY_ON_BYE"); } ... } and adding route onreply_route[MANAGE_REPLY_ON_BYE] { route(RemoveHeader); xlog("L_INFO","route MANAGE_REPLY_ON_BYE entered \n"); } this 200 Ok successfully goes to MANAGE_REPLY_ON_BYE route and headers are removed. Is this configuration correct? I can not find any info regarding parsing 200 OK on BYE in google. Sorry for long question... -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-11-28 11:32 GMT+02:00 Daniel Tryba : > On Fri, Nov 25, 2016 at 06:55:34PM +0200, Sergey Basov wrote: >> Is it safe to use remove_hf("User-Agent") without check if this header >> exist? >> or better use if(is_present_hf("User-Agent")) { remove_hf("User-Agent"); } ? > > Just remove_hf is enough. is_present_hf/remove_hf might be more readable > though. > > > > ___ > SIP Express Router (SER) 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] Local messages are malformed in Kamailio 4.4.X
Hello. I make test, currently on kamailio 4.4.0, but as I see in git - tm module does not changes from that time. I have normal line termination. See a dump in attach. in that dump 10.56.41.33 and 10.56.42.33 is the my mhomed kamailio. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-12-01 10:52 GMT+02:00 Daniel-Constantin Mierla : > Hello, > > have you set modparams for tm module related to reparsing the invite or on > dns failover? > > The build_local() should be used only in some specific cases and want to be > sure it doesn't get executed somehow when it shouldn't be. > > Cheers, > Daniel > > > On 30/11/2016 16:40, Helio Okuyama wrote: > > Local messages are malformed in Kamailio 4.4.X. For example after receiving > an error response (603) to an INVITE message, the ACK is generated with > header Max-Forwards concatenated to header CSeq and double CRLF, which is > wrong. > > Via: SIP/2.0/TLS > 173.16.10.61:5061;branch=z9hG4bKc782.5b960c7c48a4363a0126963daa797eb0.0;i=7 > From: "22861";tag=snl_OIPEOzJUNy > Call-ID: 61b500a71b510a1Pj61qq1k9dPW > To: ;tag=435012226 > CSeq: 2351 ACKMax-Forwards: 70 > > User-Agent:... > > > The fix for that seems to be just the order of append_str in function > build_local() from tm\t_msgbuilder.c. > > append_str( p, method, method_len ); > + append_str( p, CRLF, CRLF_LEN ); > append_str( p, MAXFWD_HEADER, MAXFWD_HEADER_LEN ); > - append_str( p, CRLF, CRLF_LEN ); > > > > ___ > SIP Express Router (SER) 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://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda > Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - 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 > 603-test.pcap Description: application/vnd.tcpdump.pcap ___ SIP Express Router (SER) 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] Offload SSL from backends with Kamailio
Hi, Vladislav I had very simmilar issue, try to use topoh module. It will mask contact in header and called side will not try to send reply to contact dyrectly or using its proto. It will send using via or record-route headers. But this will work when kamailio is in statefull proxy mode. 29 нояб. 2016 г. 12:37 AM пользователь "Vladyslav Zakhozhai" < v.zakhoz...@gmail.com> написал: > Ouch... It didn't work for me as expected. I forgot that I have configured > FreeSWITCH to work with TLS. > When I reverted sofia profile to work only over UDP originating call fails > again with message: > > [ERR] sofia_glue.c:943 TLS not supported by profile > > > > 2016-11-29 0:21 GMT+02:00 Vladyslav Zakhozhai : > >> Daniel, Alex, thank you for your answers. >> >> FreeSWITCH works with path as expected and it is my solution. add_path >> and add_path_received works fine in kamailio's config. >> >> >> >> 2016-11-28 19:02 GMT+02:00 Vladyslav Zakhozhai : >> >>> That is very interesting. >>> >>> I've added add_path_received in Kamailio config. And I can see that >>> FreeSWITCH received it and reflected in registration info. >>> >>> With SIP/UDP there is no problems. FreeSWITCH gets path and respnses and >>> INVITEs goes through Kamailio. >>> >>> But in case of TLS INVITES goes to Kamailio but FreeSWITCH tries to >>> originate call with TLS. >>> >>> Mybe this is FreeSWITCH issue. I'll check later. >>> >>> 2016-11-28 14:42 GMT+02:00 Daniel Tryba : >>> On Mon, Nov 28, 2016 at 01:15:03PM +0100, Daniel Tryba wrote: > > UAC == SIP/TLS ==> Kamailio == SIP/UDP ==> FreeSWITCH > > > solution is to use Path on the frontend/loadbalancer. According to this closed bug report it should work for Kamailio/Freeswitch: https://freeswitch.org/jira/si/jira.issueviews:issue-html/FS -4989/FS-4989.html ___ SIP Express Router (SER) 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] help with string modification
Thank you Daniel. Is it safe to use remove_hf("User-Agent") without check if this header exist? or better use if(is_present_hf("User-Agent")) { remove_hf("User-Agent"); } ? Thank you. 25 нояб. 2016 г. 2:56 PM пользователь "Daniel Tryba" написал: > On Fri, Nov 25, 2016 at 02:08:07PM +0200, Sergey Basov wrote: > > Hello All. > > > > I have some troubles with upstream sip switch. > > It ignores SIP packets which contains: > > > > User-Agent: FPBX-2.11.0(11.17.1) > > or > > Server: User-Agent: FPBX-2.11.0(11.17.1) > > > > If space is present before first "(" then sip switch works as expected > > > > So my question is: how corektly make analyze and modify this headers > > using kamailio? > > In which routes i must parse it? > > Since you need to remove the headers first before replacing it if you > wish, you'll need the textops remove_hf function: > http://kamailio.org/docs/modules/stable/modules/ > textops.html#textops.f.remove_hf > which can be used in REQUEST_ROUTE, ONREPLY_ROUTE, FAILURE_ROUTE and > BRANCH_ROUTE. > > If you really want to bother to change these headers you could do > something like > > $var(ua)=$hdr(User-Agent); > $var(ua)=$(var(ua){re.subst,/(.*)(\(.*\))(.*)/\1 \2\3/}); > remove_hf("User-Agent"); > append_hf("USer-Agent: $var(ua)\r\n"); > > Which blindly replaces the "(foo)" string by " (foo)" regardless of the > char before the first "(". > > But use the KISS approach: just delete the headers > > ___ > SIP Express Router (SER) 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] help with string modification
Hello All. I have some troubles with upstream sip switch. It ignores SIP packets which contains: User-Agent: FPBX-2.11.0(11.17.1) or Server: User-Agent: FPBX-2.11.0(11.17.1) If space is present before first "(" then sip switch works as expected So my question is: how corektly make analyze and modify this headers using kamailio? In which routes i must parse it? i need such modifications: User-Agent: FPBX-2.11.0(11.17.1) -> User-Agent: FPBX-2.11.0 (11.17.1) Server: User-Agent: FPBX-2.11.0(11.17.1) -> Server: User-Agent: FPBX-2.11.0 (11.17.1) Thank you. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.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] using set_body_multipart and append_body_part on on_reply routes
Hi, David I will try to collect trace for normal SIP-I session and e-mail it to you. 8 нояб. 2016 г. 5:55 PM пользователь "david" написал: > hello Sergey > > yes i was using them with a IAM ISUP part inside the SIP response, so they > were doing something, but it's not correct so it must be an ACM, ANM > depending on the response. > i made some more tests and i saw the issue is not with append_body_part > which seems it's doing ok. > > it's with set_body_multipart when in responses seems cannot detect the > body last boundary and close it by -- so the ISUP is malformed > > i could workaround this by parsing the body and adding it > > route[SIPISUP] { > msg_apply_changes(); > set_body_multipart(); > msg_apply_changes(); > $var(isup) = "\x06\x12\x25\x01\x39\x02\x12\x01\x00"; > append_body_part("$var(isup)","application/isup;version=itu- > t92+","signal;handling=optional"); > msg_apply_changes(); > $avp(s:) = $rb; > $var() = $(avp(s:){re.subst,/(.*)--unique-boundary-1(.*)/\1-- > unique-boundary-1--\2/sg}); > set_body("$var()","multipart/mixed;boundary=\" > unique-boundary-1\""); > } > > this way at least we have a base ISUP part for a 1XX response > > best regards > david > > > > > El lun, 07-11-2016 a las 23:08 +0200, Sergey Basov escribió: > > > Hi David, > > if you look at source code of the sipt > modulehttps://github.com/kamailio/kamailio/blob/master/modules/sipt/sipt.c > > functions sipt_destination & sipt_set_calling works only for ISUP_IAM. > > But as I know from my tests ISUP encapsulation must be only in invite, > and is optional for other messages. > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-11-07 19:19 GMT+02:00 david :> hello all>> i'm using > kam version 4.4.1 and i would like to generate an ISUP part on the> 1xx,2xx > responses to a remote carrier since the fsw i send the calls to> cannot > handle ISUP SDP.> despite seeing in the doc that those functions cannot be > used there and only> in REQUEST_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE, i tried > and it works> partially, because it seems it doesnt create the last > boundary and it> creates a next boundary with an empty "Encapsulated > multipart part: ">> this the the route i call from onreply_route>> > route[SIPISUP] {> set_body_multipart();> msg_apply_changes();> > $var(isup) => > "\x01\x12\x49\x01\x0a\x03\x02\x0a\x08\x84\x90\x33\x41\x72\x17\x01\x06\x0a\x08\x04\x13\x93\x70\x21\x73\x23\x10\x08\x01\x01\x00";>> > > append_body_part("$var(isup)","application/isup;version=itu-t92+","signal;handling=optional");> > msg_apply_changes();> sipt_destination($rU, 31, 4);> > sipt_set_calling($fU, 4, 0, 3);> msg_apply_changes();> }>> am i doing > something wrong? how can i set this to end the SDP with last> boundary?>> > thanks a lot and regards> david>>> > ___> SIP Express Router (SER) 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
Re: [SR-Users] using set_body_multipart and append_body_part on on_reply routes
Hi David, if you look at source code of the sipt module https://github.com/kamailio/kamailio/blob/master/modules/sipt/sipt.c functions sipt_destination & sipt_set_calling works only for ISUP_IAM. But as I know from my tests ISUP encapsulation must be only in invite, and is optional for other messages. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-11-07 19:19 GMT+02:00 david : > hello all > > i'm using kam version 4.4.1 and i would like to generate an ISUP part on the > 1xx,2xx responses to a remote carrier since the fsw i send the calls to > cannot handle ISUP SDP. > despite seeing in the doc that those functions cannot be used there and only > in REQUEST_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE, i tried and it works > partially, because it seems it doesnt create the last boundary and it > creates a next boundary with an empty "Encapsulated multipart part: " > > this the the route i call from onreply_route > > route[SIPISUP] { > set_body_multipart(); > msg_apply_changes(); > $var(isup) = > "\x01\x12\x49\x01\x0a\x03\x02\x0a\x08\x84\x90\x33\x41\x72\x17\x01\x06\x0a\x08\x04\x13\x93\x70\x21\x73\x23\x10\x08\x01\x01\x00"; > > append_body_part("$var(isup)","application/isup;version=itu-t92+","signal;handling=optional"); > msg_apply_changes(); > sipt_destination($rU, 31, 4); > sipt_set_calling($fU, 4, 0, 3); > msg_apply_changes(); > } > > am i doing something wrong? how can i set this to end the SDP with last > boundary? > > thanks a lot and regards > david > > > ___ > SIP Express Router (SER) 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 TLS client config selection
Hi Daniel, I have just create pull request for this change. https://github.com/kamailio/kamailio/pull/842 -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-11-01 12:09 GMT+02:00 Daniel-Constantin Mierla : > Hello, > > can you open a pull request on github with the patch you propose for the > fix? > > - https://github.com/kamailio/kamailio > > It is easier to review and travis-ci will take care to compile the patch > and be sure it doesn't break latest master version. > > Cheers, > Daniel > > > On 26/10/16 08:59, Sergey Basov wrote: >> Hi Daniel. >> >> After some try to configure kamailio 4.4.3 to act as SPI TLS client >> for Cisco SIP TLS gateways I have found one issue. >> >> If I do client configuration for tls >> >> [client:10.1.23.19:5061] >> verify_certificate = yes >> ca_list = /etc/kamailio/CAs/ca1.pem >> >> [client:10.1.23.29:5061] >> verify_certificate = yes >> ca_list = /etc/kamailio/CAs/ca2.pem >> >> [client:default] >> verify_certificate = no >> require_certificate = no >> >> Kamailo always do default profile selection (I do configuration >> without server_name or server_id, with it kamailio works fine but >> there are some troubles to make selection of this parameters from >> config script, I need additional checks and queries) >> >> after some research in tls module source code I have added some debug >> information in file tls_server.c: >> >> if (c->flags & F_CONN_PASSIVE) { >> state=S_TLS_ACCEPTING; >> dom = tls_lookup_cfg(cfg, TLS_DOMAIN_SRV, >> >> &c->rcv.dst_ip, c->rcv.dst_port, 0, 0); >> } else { >> state=S_TLS_CONNECTING; >> sname = tls_get_connect_server_name(); >> srvid = tls_get_connect_server_id(); >> // - >> DBG("Entered client config loockup (c->rcv.dst_port >> %d)\n", c->rcv.dst_port); >> DBG("Entered client config loockup (&c->rcv.dst_ip >> %s)\n", ip_addr2a(&c->rcv.dst_ip)); >> DBG("Entered client config loockup (c->rcv.src_port >> %d)\n", c->rcv.src_port); >> DBG("Entered client config loockup (&c->rcv.src_ip >> %s)\n", ip_addr2a(&c->rcv.src_ip)); >> // - >> dom = tls_lookup_cfg(cfg, TLS_DOMAIN_CLI, >> &c->rcv.dst_ip, >> c->rcv.dst_port, sname, srvid); >> >> } >> >> After making >> Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: >> [parser/msg_parser.c:597]: parse_msg(): method: >> Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: >> [parser/msg_parser.c:599]: parse_msg(): uri: >> >> Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: >> [parser/msg_parser.c:601]: parse_msg(): version: >> >> I see >> >> Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: >> [ip_addr.c:229]: print_ip(): tcpconn_new: new tcp connection: >> 10.1.23.19 >> Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: >> [tcp_main.c:985]: tcpconn_new(): on port 5061, type 3 >> Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: >> [tcp_main.c:1295]: tcpconn_add(): hashes: 1394:0:0, 1 >> Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: tls >> [tls_server.c:197]: tls_complete_init(): completing tls connection >> initialization >> Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: tls >> [tls_server.c:160]: tls_get_connect_server_name(): xavp with outbound >> server name not found >> Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: tls >> [tls_server.c:140]: tls_get_connect_server_id(): xavp with outbound >> server id not found >> Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: tls >> [tls_server.c:219]: tls_complete_init(): Entered client config loockup >> (c->rcv.dst_port 40123) >> Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: tls >> [tls_server.c:220]: tls_complete_init(): Entered client config loockup >> (&c->rcv.dst_ip 10.1.23.23) >> Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: tls >> [tls_server.c:221]: tls_complete_init(): Entered client config loockup >> (c->rcv.src_port 5061) >> Oct 26 09:23:56 sip1 /usr/sbin/kam
[SR-Users] Kamailio TLS client config selection
Hi Daniel. After some try to configure kamailio 4.4.3 to act as SPI TLS client for Cisco SIP TLS gateways I have found one issue. If I do client configuration for tls [client:10.1.23.19:5061] verify_certificate = yes ca_list = /etc/kamailio/CAs/ca1.pem [client:10.1.23.29:5061] verify_certificate = yes ca_list = /etc/kamailio/CAs/ca2.pem [client:default] verify_certificate = no require_certificate = no Kamailo always do default profile selection (I do configuration without server_name or server_id, with it kamailio works fine but there are some troubles to make selection of this parameters from config script, I need additional checks and queries) after some research in tls module source code I have added some debug information in file tls_server.c: if (c->flags & F_CONN_PASSIVE) { state=S_TLS_ACCEPTING; dom = tls_lookup_cfg(cfg, TLS_DOMAIN_SRV, &c->rcv.dst_ip, c->rcv.dst_port, 0, 0); } else { state=S_TLS_CONNECTING; sname = tls_get_connect_server_name(); srvid = tls_get_connect_server_id(); // - DBG("Entered client config loockup (c->rcv.dst_port %d)\n", c->rcv.dst_port); DBG("Entered client config loockup (&c->rcv.dst_ip %s)\n", ip_addr2a(&c->rcv.dst_ip)); DBG("Entered client config loockup (c->rcv.src_port %d)\n", c->rcv.src_port); DBG("Entered client config loockup (&c->rcv.src_ip %s)\n", ip_addr2a(&c->rcv.src_ip)); // - dom = tls_lookup_cfg(cfg, TLS_DOMAIN_CLI, &c->rcv.dst_ip, c->rcv.dst_port, sname, srvid); } After making Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: [parser/msg_parser.c:597]: parse_msg(): method: Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: [parser/msg_parser.c:599]: parse_msg(): uri: Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: [parser/msg_parser.c:601]: parse_msg(): version: I see Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: [ip_addr.c:229]: print_ip(): tcpconn_new: new tcp connection: 10.1.23.19 Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: [tcp_main.c:985]: tcpconn_new(): on port 5061, type 3 Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: [tcp_main.c:1295]: tcpconn_add(): hashes: 1394:0:0, 1 Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: tls [tls_server.c:197]: tls_complete_init(): completing tls connection initialization Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: tls [tls_server.c:160]: tls_get_connect_server_name(): xavp with outbound server name not found Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: tls [tls_server.c:140]: tls_get_connect_server_id(): xavp with outbound server id not found Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: tls [tls_server.c:219]: tls_complete_init(): Entered client config loockup (c->rcv.dst_port 40123) Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: tls [tls_server.c:220]: tls_complete_init(): Entered client config loockup (&c->rcv.dst_ip 10.1.23.23) Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: tls [tls_server.c:221]: tls_complete_init(): Entered client config loockup (c->rcv.src_port 5061) Oct 26 09:23:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: tls [tls_server.c:222]: tls_complete_init(): Entered client config loockup (&c->rcv.src_ip 10.1.23.19) Where: &c->rcv.dst_ip 10.1.23.23 - it is my local kamailio tls socket ip address to make tls connect from c->rcv.dst_port 40123 - it is my local kamailio tls socket port &c->rcv.src_ip 10.1.23.19 - ip of my TLS device to make tls connection to c->rcv.src_port 5061 - port of my TLS device to make tls connection to so if I change line dom = tls_lookup_cfg(cfg, TLS_DOMAIN_CLI, &c->rcv.dst_ip, c->rcv.dst_port, sname, srvid); to dom = tls_lookup_cfg(cfg, TLS_DOMAIN_CLI, &c->rcv.src_ip, c->rcv.src_port, sname, srvid); I got correct client domain selection Oct 26 09:33:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: tls [tls_server.c:233]: tls_complete_init(): Using initial TLS domain TLSc<10.1.23.19:5061> (dom 0x7fd2eefa3d68 ctx 0x7fd2ef7e70a8 sn []) Oct 26 09:33:56 sip1 /usr/sbin/kamailio[20712]: DEBUG: tls [tls_domain.c:703]: sr_ssl_ctx_info_callback(): SSL handshake started Can you look at this code? Thank you in advance. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 ___ SIP Express Router (SER) 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 SIP TLS issue
Sorry, Daniel Seems it my mistake in configuration. All works as expected. 25 окт. 2016 г. 9:51 AM пользователь "Sergey Basov" < sergey.v.ba...@gmail.com> написал: > Hi Daniel, > > In attachment part of the log with debug=3 after kamailio starts and > when it is accepting connection to 10.1.23.23 and 10.1.23.33 port 5061 > > If you need more info I will try to provide it > > kamailio v 4.4.3 on rhel 7 x86_64 > > Thank you. > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > > > 2016-10-25 9:29 GMT+03:00 Daniel-Constantin Mierla : > > Hello, > > > > can you run with debug=3 in kamailio.cfg and see if you can spot > > anything relevant at startup, when the tls module is initialized and > > loads the certificates? > > > > Cheers, > > Daniel > > > > > > On 25/10/16 03:29, Sergey Basov wrote: > >> Hi All > >> > >> I have some strange behavior of kamailio with TLS. > >> > >> I have configured second IP addres on server, added it to tls > >> listener, and tls.cfg file. > >> > >> But when I try to connect using > >> > >> openssl s_client -showcerts -connect 10.1.23.33:5061 -tls1 -state > >> and > >> openssl s_client -showcerts -connect 10.1.23.23:5061 -tls1 -state > >> > >> I see same certificates (sip2 my config samples are bellow) > >> > >> if I make changes in port number (for ip 10.1.23.33 set port 5091 in > >> both config parts) - I see correct certificates. > >> > >> Does anyone have this problem? > >> > >> Thanks in advance. > >> > >> - listen section > >> > >> listen=tls:10.1.23.23:5061 > >> listen=tls:10.1.23.33:5061 > >> > >> - tls.cfg -- > >> > >> [server:default] > >> method = TLSv1+ > >> verify_certificate = no > >> require_certificate = no > >> private_key = /etc/kamailio/keys/sip1.key > >> certificate = /etc/kamailio/keys/sip1.crt > >> > >> [server:10.1.23.33:5061] > >> method = TLSv1+ > >> verify_certificate = no > >> require_certificate = no > >> private_key = /etc/kamailio/keys/sip1.key > >> certificate = /etc/kamailio/keys/sip1.crt > >> > >> [server:10.1.23.23:5061] > >> method = TLSv1+ > >> verify_certificate = no > >> require_certificate = no > >> private_key = /etc/kamailio/keys/sip2.key > >> certificate = /etc/kamailio/keys/sip2.crt > >> > >> -- > >> Best regards, > >> Sergey Basov e-mail: sergey.v.ba...@gmail.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 > > > > -- > > Daniel-Constantin Mierla > > http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda > > Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - > 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 > ___ SIP Express Router (SER) 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 SIP TLS issue
Hi Daniel, In attachment part of the log with debug=3 after kamailio starts and when it is accepting connection to 10.1.23.23 and 10.1.23.33 port 5061 If you need more info I will try to provide it kamailio v 4.4.3 on rhel 7 x86_64 Thank you. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com 2016-10-25 9:29 GMT+03:00 Daniel-Constantin Mierla : > Hello, > > can you run with debug=3 in kamailio.cfg and see if you can spot > anything relevant at startup, when the tls module is initialized and > loads the certificates? > > Cheers, > Daniel > > > On 25/10/16 03:29, Sergey Basov wrote: >> Hi All >> >> I have some strange behavior of kamailio with TLS. >> >> I have configured second IP addres on server, added it to tls >> listener, and tls.cfg file. >> >> But when I try to connect using >> >> openssl s_client -showcerts -connect 10.1.23.33:5061 -tls1 -state >> and >> openssl s_client -showcerts -connect 10.1.23.23:5061 -tls1 -state >> >> I see same certificates (sip2 my config samples are bellow) >> >> if I make changes in port number (for ip 10.1.23.33 set port 5091 in >> both config parts) - I see correct certificates. >> >> Does anyone have this problem? >> >> Thanks in advance. >> >> - listen section >> >> listen=tls:10.1.23.23:5061 >> listen=tls:10.1.23.33:5061 >> >> - tls.cfg -- >> >> [server:default] >> method = TLSv1+ >> verify_certificate = no >> require_certificate = no >> private_key = /etc/kamailio/keys/sip1.key >> certificate = /etc/kamailio/keys/sip1.crt >> >> [server:10.1.23.33:5061] >> method = TLSv1+ >> verify_certificate = no >> require_certificate = no >> private_key = /etc/kamailio/keys/sip1.key >> certificate = /etc/kamailio/keys/sip1.crt >> >> [server:10.1.23.23:5061] >> method = TLSv1+ >> verify_certificate = no >> require_certificate = no >> private_key = /etc/kamailio/keys/sip2.key >> certificate = /etc/kamailio/keys/sip2.crt >> >> -- >> Best regards, >> Sergey Basov e-mail: sergey.v.ba...@gmail.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 > > -- > Daniel-Constantin Mierla > http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda > Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - 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 -- connect to 10.1.23.23:5061 Oct 25 09:40:06 sip1 /usr/sbin/kamailio[12666]: DEBUG: [tcp_main.c:3786]: send2child(): checking per-socket specific workers (12653/118..12660/122) [tls:10.1.23.23:5061] Oct 25 09:40:06 sip1 /usr/sbin/kamailio[12666]: DEBUG: [tcp_main.c:3821]: send2child(): selected tcp worker 20 118(12653) for activity on [tls:10.1.23.23:5061], 0x7f5cf929cdd0 Oct 25 09:40:06 sip1 /usr/sbin/kamailio[12653]: DEBUG: tls [tls_server.c:197]: tls_complete_init(): completing tls connection initialization Oct 25 09:40:06 sip1 /usr/sbin/kamailio[12653]: DEBUG: tls [tls_server.c:226]: tls_complete_init(): Using initial TLS domain TLSs<10.1.23.23:5061> (dom 0x7f5cf8964a88 ctx 0x7f5cf8dbbad0 sn []) Oct 25 09:40:06 sip1 /usr/sbin/kamailio[12653]: DEBUG: tls [tls_domain.c:703]: sr_ssl_ctx_info_callback(): SSL handshake started Oct 25 09:40:06 sip1 /usr/sbin/kamailio[12653]: DEBUG: tls [tls_domain.c:715]: sr_ssl_ctx_info_callback(): SSL handshake done Oct 25 09:40:06 sip1 /usr/sbin/kamailio[12653]: DEBUG: tls [tls_domain.c:718]: sr_ssl_ctx_info_callback(): SSL disable renegotiation Oct 25 09:40:06 sip1 /usr/sbin/kamailio[12653]: DEBUG: tls [tls_server.c:411]: tls_accept(): TLS accept successful Oct 25 09:40:06 sip1 /usr/sbin/kamailio[12653]: DEBUG: tls [tls_server.c:418]: tls_accept(): tls_accept: new connection from 192.168.32.136:53376 using TLSv1/SSLv3 AES256-SHA 256 Oct 25 09:40:06 sip1 /usr/sbin/kamailio[12653]: DEBUG: tls [tls_server.c:421]: tls_accept(): tls_accept: local socket: 10.1.23.23:5061 Oct 25 09:40:06 sip1 /usr/sbin/kamailio[12653]: DEBUG: tls [tls_server.c:432]: tls_accept(): tls_accept: client did not present a certificate Oct 25 09:40:27 sip1 /usr/sbin/kamailio[12666]: DEBUG: [tcp_main.c:3786]: send2child(): checking per-socket specific workers (12653/118..12660/122) [tls:10.1.23.23:5061] Oct 25 09:40:27 sip1 /usr/sbin/kamailio[12666]:
[SR-Users] Kamailio SIP TLS issue
Hi All I have some strange behavior of kamailio with TLS. I have configured second IP addres on server, added it to tls listener, and tls.cfg file. But when I try to connect using openssl s_client -showcerts -connect 10.1.23.33:5061 -tls1 -state and openssl s_client -showcerts -connect 10.1.23.23:5061 -tls1 -state I see same certificates (sip2 my config samples are bellow) if I make changes in port number (for ip 10.1.23.33 set port 5091 in both config parts) - I see correct certificates. Does anyone have this problem? Thanks in advance. - listen section listen=tls:10.1.23.23:5061 listen=tls:10.1.23.33:5061 - tls.cfg -- [server:default] method = TLSv1+ verify_certificate = no require_certificate = no private_key = /etc/kamailio/keys/sip1.key certificate = /etc/kamailio/keys/sip1.crt [server:10.1.23.33:5061] method = TLSv1+ verify_certificate = no require_certificate = no private_key = /etc/kamailio/keys/sip1.key certificate = /etc/kamailio/keys/sip1.crt [server:10.1.23.23:5061] method = TLSv1+ verify_certificate = no require_certificate = no private_key = /etc/kamailio/keys/sip2.key certificate = /etc/kamailio/keys/sip2.crt -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.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] segfault when using sipt modifications
And I think you are wrong about last \x00 Look at attached screenshot, I think you does not have field that is highlighted "End of optional parameter" this must be last \x00 in string to get correct part with ISUP. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-08-05 16:44 GMT+03:00 Sergey Basov : > And I think you are wrong about last \x00 > > Look at attached screenshot, I think you does not have field that is > highlighted "End of optional parameter" this must be last \x00 in > string to get correct part with ISUP. > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-08-05 16:32 GMT+03:00 Sergey Basov : >> sorry >> >> correct function is isup_update_destination >> -- >> Best regards, >> Sergey Basov e-mail: sergey.v.ba...@gmail.com >> >> tel: (+38067) 403-62-54 >> >> >> 2016-08-05 16:29 GMT+03:00 Sergey Basov : >>> You are welcome. >>> >>> >>> If you shure about last \x00 then you can try to edit >>> modules/sipt/ss7_parser.c >>> in function isup_update_bci_1 >>> after strings >>> // pointer to fixed part (2) >>> offset++; >>> >>> add next >>> // fixing Media requirements to speech 0x00 or 0x01 to 64k >>> tmp_buf[0] = 0x00; >>> tmp_buf[1] = 0x0A; >>> tmp_buf[2] = 0x00; >>> replace_body_segment(mangle, offset-4, 3, tmp_buf, 3); >>> >>> and recompile sipt module. This will change your "Forward Call >>> Indicators: 0x4800" (last 00) and "Transmission medium requirement: 0 >>> (speech)" >>> >>> -- >>> Best regards, >>> Sergey Basov e-mail: sergey.v.ba...@gmail.com >>> >>> tel: (+38067) 403-62-54 >>> >>> >>> 2016-08-05 15:59 GMT+03:00 david : >>>> yes, that's x00 it's actually the only one well interpreted by kamailio :) >>>> >>>> thanks for the help in this issue Sergey >>>> >>>> >>>> >>>> El vie, 05-08-2016 a las 15:01 +0300, Sergey Basov escribió: >>>> >>>> Hello. >>>> >>>> Most important, i think, is the las \x00 which is the flag end of ISUP >>>> message... >>>> Without it you cant generate correct ISUP part.. >>>> >>>> Look in wireshark. It will inform you about any error in ISUP. >>>> >>>> -- >>>> Best regards, >>>> Sergey Basov e-mail: sergey.v.ba...@gmail.com >>>> >>>> tel: (+38067) 403-62-54 >>>> >>>> >>>> 2016-08-05 11:07 GMT+03:00 david : >>>>> Hello >>>>> >>>>> that would be great, despite not needing it now, it would be great, there >>>>> are 3 x00 in the isup i wanted to set, but 2 are from FCI and optional >>>>> FCI, >>>>> and the third is for the called party, which can be changed with sipt >>>>> functions. >>>>> anycase, the FCI could be an issue in some scenarios, so an option to let >>>>> the kamailio get the x00 would be great >>>>> >>>>> besides, i have another issue with textops, setting body multipart >>>>> >>>>> Aug 3 11:11:03 /usr/local/kamailio/sbin/kamailio[4190]: INFO: >>>>> [msg_translator.c:1692]: get_boundary(): Content-Type hdr has no params >>>>> >>>>> Aug 3 11:11:03 /usr/local/kamailio/sbin/kamailio[4190]: WARNING: >>>>> [msg_translator.c:1958]: build_req_buf_from_sip_req(): check_boundaries >>>>> error >>>>> >>>>> but i think there is already another query with this so i will check there >>>>> >>>>> best regards >>>>> david >>>>> >>>>> >>>>> >>>>> >>>>> El mar, 02-08-2016 a las 09:22 +0200, Daniel-Constantin Mierla escribió: >>>>> >>>>> Hello, >>>>> >>>>> maybe the function append_body_part("...") can be extended with an extra >>>>> parameter where to specify the character to be replaced with 0x00 in the >>>>> first parameter. >>>>> >>>>> Cheers, >>>>> Daniel >>>>> >>>>> &g
Re: [SR-Users] segfault when using sipt modifications
sorry correct function is isup_update_destination -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-08-05 16:29 GMT+03:00 Sergey Basov : > You are welcome. > > > If you shure about last \x00 then you can try to edit > modules/sipt/ss7_parser.c > in function isup_update_bci_1 > after strings > // pointer to fixed part (2) > offset++; > > add next > // fixing Media requirements to speech 0x00 or 0x01 to 64k > tmp_buf[0] = 0x00; > tmp_buf[1] = 0x0A; > tmp_buf[2] = 0x00; > replace_body_segment(mangle, offset-4, 3, tmp_buf, 3); > > and recompile sipt module. This will change your "Forward Call > Indicators: 0x4800" (last 00) and "Transmission medium requirement: 0 > (speech)" > > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-08-05 15:59 GMT+03:00 david : >> yes, that's x00 it's actually the only one well interpreted by kamailio :) >> >> thanks for the help in this issue Sergey >> >> >> >> El vie, 05-08-2016 a las 15:01 +0300, Sergey Basov escribió: >> >> Hello. >> >> Most important, i think, is the las \x00 which is the flag end of ISUP >> message... >> Without it you cant generate correct ISUP part.. >> >> Look in wireshark. It will inform you about any error in ISUP. >> >> -- >> Best regards, >> Sergey Basov e-mail: sergey.v.ba...@gmail.com >> >> tel: (+38067) 403-62-54 >> >> >> 2016-08-05 11:07 GMT+03:00 david : >>> Hello >>> >>> that would be great, despite not needing it now, it would be great, there >>> are 3 x00 in the isup i wanted to set, but 2 are from FCI and optional >>> FCI, >>> and the third is for the called party, which can be changed with sipt >>> functions. >>> anycase, the FCI could be an issue in some scenarios, so an option to let >>> the kamailio get the x00 would be great >>> >>> besides, i have another issue with textops, setting body multipart >>> >>> Aug 3 11:11:03 /usr/local/kamailio/sbin/kamailio[4190]: INFO: >>> [msg_translator.c:1692]: get_boundary(): Content-Type hdr has no params >>> >>> Aug 3 11:11:03 /usr/local/kamailio/sbin/kamailio[4190]: WARNING: >>> [msg_translator.c:1958]: build_req_buf_from_sip_req(): check_boundaries >>> error >>> >>> but i think there is already another query with this so i will check there >>> >>> best regards >>> david >>> >>> >>> >>> >>> El mar, 02-08-2016 a las 09:22 +0200, Daniel-Constantin Mierla escribió: >>> >>> Hello, >>> >>> maybe the function append_body_part("...") can be extended with an extra >>> parameter where to specify the character to be replaced with 0x00 in the >>> first parameter. >>> >>> Cheers, >>> Daniel >>> >>> >>> >>> On 01/08/16 16:34, Sergey Basov wrote: >>> >>> Hello. >>> >>> Look more carefuly, its only first \x00 changes forward call indicator. >>> You >>> have a few more \x00... >>> >>> You does not get full ISUP into INVITE... >>> >>> As I have told earlier you can replace \x00 by \x01into kamailio script, >>> but >>> you must rewrite it with \x00 later into sip-t module, but this requires >>> some changes into source code of sip-t module... >>> >>> sip-t module itself designed for checking/modifying of the ISUP content >>> into >>> sip-t/sip-i, but not for generating it... >>> >>> >>> 1 авг. 2016 г. 5:08 PM пользователь "david" написал: >>> >>> Hello Sergey, Daniel >>> >>> thanks a lot for the guidance. >>> i changed the x00 by x01 and it works now, i was seeing the ISUP truncated >>> but i thought it was related to the tshark XD >>> >>> i will find out about the changes needed at sipt configuration, but just >>> in >>> case, the things chaged by this only are the forward call indicators, so i >>> hope that does give us many problems >>> >>> i will let you know anything >>> >>> thanks and best regards >>> david >>> >>> >>> El lun, 01-08-2016 a las 12:09 +0200, Daniel-Constantin Mierla escribió: >>> >>> Hello, >>> >>> I
Re: [SR-Users] segfault when using sipt modifications
You are welcome. If you shure about last \x00 then you can try to edit modules/sipt/ss7_parser.c in function isup_update_bci_1 after strings // pointer to fixed part (2) offset++; add next // fixing Media requirements to speech 0x00 or 0x01 to 64k tmp_buf[0] = 0x00; tmp_buf[1] = 0x0A; tmp_buf[2] = 0x00; replace_body_segment(mangle, offset-4, 3, tmp_buf, 3); and recompile sipt module. This will change your "Forward Call Indicators: 0x4800" (last 00) and "Transmission medium requirement: 0 (speech)" -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-08-05 15:59 GMT+03:00 david : > yes, that's x00 it's actually the only one well interpreted by kamailio :) > > thanks for the help in this issue Sergey > > > > El vie, 05-08-2016 a las 15:01 +0300, Sergey Basov escribió: > > Hello. > > Most important, i think, is the las \x00 which is the flag end of ISUP > message... > Without it you cant generate correct ISUP part.. > > Look in wireshark. It will inform you about any error in ISUP. > > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-08-05 11:07 GMT+03:00 david : >> Hello >> >> that would be great, despite not needing it now, it would be great, there >> are 3 x00 in the isup i wanted to set, but 2 are from FCI and optional >> FCI, >> and the third is for the called party, which can be changed with sipt >> functions. >> anycase, the FCI could be an issue in some scenarios, so an option to let >> the kamailio get the x00 would be great >> >> besides, i have another issue with textops, setting body multipart >> >> Aug 3 11:11:03 /usr/local/kamailio/sbin/kamailio[4190]: INFO: >> [msg_translator.c:1692]: get_boundary(): Content-Type hdr has no params >> >> Aug 3 11:11:03 /usr/local/kamailio/sbin/kamailio[4190]: WARNING: >> [msg_translator.c:1958]: build_req_buf_from_sip_req(): check_boundaries >> error >> >> but i think there is already another query with this so i will check there >> >> best regards >> david >> >> >> >> >> El mar, 02-08-2016 a las 09:22 +0200, Daniel-Constantin Mierla escribió: >> >> Hello, >> >> maybe the function append_body_part("...") can be extended with an extra >> parameter where to specify the character to be replaced with 0x00 in the >> first parameter. >> >> Cheers, >> Daniel >> >> >> >> On 01/08/16 16:34, Sergey Basov wrote: >> >> Hello. >> >> Look more carefuly, its only first \x00 changes forward call indicator. >> You >> have a few more \x00... >> >> You does not get full ISUP into INVITE... >> >> As I have told earlier you can replace \x00 by \x01into kamailio script, >> but >> you must rewrite it with \x00 later into sip-t module, but this requires >> some changes into source code of sip-t module... >> >> sip-t module itself designed for checking/modifying of the ISUP content >> into >> sip-t/sip-i, but not for generating it... >> >> >> 1 авг. 2016 г. 5:08 PM пользователь "david" написал: >> >> Hello Sergey, Daniel >> >> thanks a lot for the guidance. >> i changed the x00 by x01 and it works now, i was seeing the ISUP truncated >> but i thought it was related to the tshark XD >> >> i will find out about the changes needed at sipt configuration, but just >> in >> case, the things chaged by this only are the forward call indicators, so i >> hope that does give us many problems >> >> i will let you know anything >> >> thanks and best regards >> david >> >> >> El lun, 01-08-2016 a las 12:09 +0200, Daniel-Constantin Mierla escribió: >> >> Hello, >> >> I am not familiar with isup and no testbed around at this moment. That's >> why I asked for backtrace from the coredump file, based on the >> guidelines I did in my previous email. >> >> Cheers, >> Daniel >> >> >> On 01/08/16 09:07, Sergey Basov wrote: >>> Hello, >>> >>> try make dump packet after >>> >>> >>> append_body_part("\x01\x12\x49\x00\x0a\x03\x02\x0a\x08\x84\x90\x33\x41\x72\x17\x00\x06\x0a\x08\x04\x13\x93\x70\x21\x73\x23\x10\x08\x01\x00\x00","application/isup;version=itu-t92+","signal;handling=optional"); >>> before sipt_destination($rU, 31, 4); >>> >>> when i have done such conversion i found that kam
Re: [SR-Users] segfault when using sipt modifications
Hello. Most important, i think, is the las \x00 which is the flag end of ISUP message... Without it you cant generate correct ISUP part.. Look in wireshark. It will inform you about any error in ISUP. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-08-05 11:07 GMT+03:00 david : > Hello > > that would be great, despite not needing it now, it would be great, there > are 3 x00 in the isup i wanted to set, but 2 are from FCI and optional FCI, > and the third is for the called party, which can be changed with sipt > functions. > anycase, the FCI could be an issue in some scenarios, so an option to let > the kamailio get the x00 would be great > > besides, i have another issue with textops, setting body multipart > > Aug 3 11:11:03 /usr/local/kamailio/sbin/kamailio[4190]: INFO: > [msg_translator.c:1692]: get_boundary(): Content-Type hdr has no params > > Aug 3 11:11:03 /usr/local/kamailio/sbin/kamailio[4190]: WARNING: > [msg_translator.c:1958]: build_req_buf_from_sip_req(): check_boundaries > error > > but i think there is already another query with this so i will check there > > best regards > david > > > > > El mar, 02-08-2016 a las 09:22 +0200, Daniel-Constantin Mierla escribió: > > Hello, > > maybe the function append_body_part("...") can be extended with an extra > parameter where to specify the character to be replaced with 0x00 in the > first parameter. > > Cheers, > Daniel > > > > On 01/08/16 16:34, Sergey Basov wrote: > > Hello. > > Look more carefuly, its only first \x00 changes forward call indicator. You > have a few more \x00... > > You does not get full ISUP into INVITE... > > As I have told earlier you can replace \x00 by \x01into kamailio script, but > you must rewrite it with \x00 later into sip-t module, but this requires > some changes into source code of sip-t module... > > sip-t module itself designed for checking/modifying of the ISUP content into > sip-t/sip-i, but not for generating it... > > > 1 авг. 2016 г. 5:08 PM пользователь "david" написал: > > Hello Sergey, Daniel > > thanks a lot for the guidance. > i changed the x00 by x01 and it works now, i was seeing the ISUP truncated > but i thought it was related to the tshark XD > > i will find out about the changes needed at sipt configuration, but just in > case, the things chaged by this only are the forward call indicators, so i > hope that does give us many problems > > i will let you know anything > > thanks and best regards > david > > > El lun, 01-08-2016 a las 12:09 +0200, Daniel-Constantin Mierla escribió: > > Hello, > > I am not familiar with isup and no testbed around at this moment. That's > why I asked for backtrace from the coredump file, based on the > guidelines I did in my previous email. > > Cheers, > Daniel > > > On 01/08/16 09:07, Sergey Basov wrote: >> Hello, >> >> try make dump packet after >> >> append_body_part("\x01\x12\x49\x00\x0a\x03\x02\x0a\x08\x84\x90\x33\x41\x72\x17\x00\x06\x0a\x08\x04\x13\x93\x70\x21\x73\x23\x10\x08\x01\x00\x00","application/isup;version=itu-t92+","signal;handling=optional"); >> before sipt_destination($rU, 31, 4); >> >> when i have done such conversion i found that kamailio from script >> ignores all string content after symbol \x00 as this is end of line. >> >> To avoid this i have replaces \x00 with \x01 in my initial ISUP string >> and make changes into SIP-T module to replace it with \x00 while >> processing message. before number/presentation/screening >> modifications. >> >> you have first \x00 as forth symbol in your ISUP string and after it >> all have to be ignored. Look at dump using wireshark. I think you will >> see mailformed ISUP incapsulated message. >> >> -- >> Best regards, >> Sergey Basov e-mail: sergey.v.ba...@gmail.com >> >> tel: (+38067) 403-62-54 >> >> >> 2016-08-01 8:21 GMT+03:00 Daniel-Constantin Mierla : >>> Hello, >>> >>> would be good to get a core dump file and the backtrace from it in order >>> to >>> see where it crashes. >>> >>> For getting the coredump, try: >>> >>> - stop kamailio >>> >>> - do: ulimit -c unlimited >>> >>> - start kamailio as root >>> >>> - reproduce the issue >>> >>> A corefile should be generated in / or working directory. Use gdb to grab >>> the output of 'bt full' from the corefile and send
Re: [SR-Users] Textops and Multipart Body - adding ISUP segfaults Kamailio
Hi. As I remember this INFO because after conversion to multipart your header in SIP message now Content-Type: multipart/mixed;boundary="2123894789_1257887457" not Content-Type: application/sdp and next WARNING is normal too in this case. For me it works normal, I make conversion from pure sip SIP with Content-Type: application/sdp to SIP-I with Content-Type: multipart/mixed;boundary="2123894789_1257887457" and 2 parts inside it, first is Content-Type: application/sdp second is Content-Type: application/isup;version=itu-t92+ Content-Disposition: signal;handling=optional But for conversion between SIP and SIP-I I using 2 kamailio instances/ One main for pure SIP and managing rtpengines, and second for conversion between SIP and SIP-I. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-08-05 11:58 GMT+03:00 david : > Hello all > > i'm having the same error on kam 4.4 when doing > set_body_multipart(); > msg_apply_changes(); > > > i see in the logs > 5(17797) DEBUG: textops [textops.c:1577]: set_multibody_helper(): > delimiter<17>:[unique-boundary-1] > 5(17797) DEBUG: textops [textops.c:1486]: generate_boundary(): adding final > CRLF+CRLF > 5(17797) DEBUG: textops [textops.c:1714]: set_multibody_helper(): > content-type<44>:[multipart/mixed;boundary="unique-boundary-1"] > 5(17797) DEBUG: textops [textops.c:1768]: set_multibody_helper(): set flag > FL_BODY_MULTIPART > 5(17797) INFO: [msg_translator.c:1692]: get_boundary(): Content-Type > hdr has no params > 5(17797) WARNING: [msg_translator.c:1958]: > build_req_buf_from_sip_req(): check_boundaries error > 5(17797) DEBUG: [msg_translator.c:422]: clen_builder(): > content-length: 191 (191) > > > the original INVITE is like > > Content-Type: application/sdp. > Content-Disposition: session. > Content-Length: 104. > P-Asserted-Identity: "10707334" . > . > v=0. > o=user1 53655765 23536 IN IP4 79.170.68.171. > s=-. > c=IN IP4 2.2.2.2. > t=0 0. > m=audio 6001 RTP/AVP 8. > > > do you have any idea why these messages appear > > thanks a lot and regards > david > > ___ > SIP Express Router (SER) 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] segfault when using sipt modifications
Hello. Look more carefuly, its only first \x00 changes forward call indicator. You have a few more \x00... You does not get full ISUP into INVITE... As I have told earlier you can replace \x00 by \x01into kamailio script, but you must rewrite it with \x00 later into sip-t module, but this requires some changes into source code of sip-t module... sip-t module itself designed for checking/modifying of the ISUP content into sip-t/sip-i, but not for generating it... 1 авг. 2016 г. 5:08 PM пользователь "david" написал: > Hello Sergey, Daniel > > thanks a lot for the guidance. > i changed the x00 by x01 and it works now, i was seeing the ISUP truncated > but i thought it was related to the tshark XD > > i will find out about the changes needed at sipt configuration, but just > in case, the things chaged by this only are the forward call indicators, so > i hope that does give us many problems > > i will let you know anything > > thanks and best regards > david > > > El lun, 01-08-2016 a las 12:09 +0200, Daniel-Constantin Mierla escribió: > > > Hello, > > I am not familiar with isup and no testbed around at this moment. That's > why I asked for backtrace from the coredump file, based on the > guidelines I did in my previous email. > > Cheers, > Daniel > > > On 01/08/16 09:07, Sergey Basov wrote:> Hello,>> try make dump packet after> > append_body_part("\x01\x12\x49\x00\x0a\x03\x02\x0a\x08\x84\x90\x33\x41\x72\x17\x00\x06\x0a\x08\x04\x13\x93\x70\x21\x73\x23\x10\x08\x01\x00\x00","application/isup;version=itu-t92+","signal;handling=optional");> > before sipt_destination($rU, 31, 4);>> when i have done such conversion i > found that kamailio from script> ignores all string content after symbol \x00 > as this is end of line.>> To avoid this i have replaces \x00 with \x01 in my > initial ISUP string> and make changes into SIP-T module to replace it with > \x00 while> processing message. before number/presentation/screening> > modifications.>> you have first \x00 as forth symbol in your ISUP string and > after it> all have to be ignored. Look at dump using wireshark. I think you > will> see mailformed ISUP incapsulated message.>> --> Best regards,> Sergey > Basov e-mail: sergey.v.ba...@gmail.com>> tel: (+38067) > 403-62-54>>> 2016-08-01 8:21 GMT+03:00 Daniel-Constantin Mierla > :>> Hello,>>>> would be good to get a core dump file and > the backtrace from it in order to>> see where it crashes.>>>> For getting the > coredump, try:>>>> - stop kamailio>>>> - do: ulimit -c unlimited>>>> - > start kamailio as root>>>> - reproduce the issue>>>> A corefile should be > generated in / or working directory. Use gdb to grab>> the output of 'bt > full' from the corefile and send it here to the mailing>> list.>>>> Cheers,>> > Daniel>>>>>> On 29/07/16 18:21, david wrote:>>>> hello all>>>>>>>> i'm trying > to add a ISUP multipart in a regular call using the textops>> module, and > despite seeing one previous issue int he mail list, i'm finding>> some issue > here>>>> i'm using this commands>>>> msg_apply_changes();>> > set_body_multipart(,"2123894789_1257887457");>> msg_apply_changes();>>>> > append_body_part("\x01\x12\x49\x00\x0a\x03\x02\x0a\x08\x84\x90\x33\x41\x72\x17\x00\x06\x0a\x08\x04\x13\x93\x70\x21\x73\x23\x10\x08\x01\x00\x00","application/isup;version=itu-t92+","signal;handling=optional");>> > msg_apply_changes();>> sipt_destination($rU, 31, 4);>> > sipt_set_calling($fU, 4, 0, 3);>> msg_apply_changes();>>>> before the > record_route command, and when using sipt_destination($rU, 31,>> 4); i'm > getting asegfault>>>> here you have the logs>> could you please give me any > clue about something i'm missing or doing>> wrong?>>>> thanks alot and > regards>> david>>>> 5(24552) DEBUG: [parser/msg_parser.c:608]: > parse_msg(): SIP Request:>> 5(24552) DEBUG: [parser/msg_parser.c:610]: > parse_msg(): method:>> >> 5(24552) DEBUG: > [parser/msg_parser.c:612]: parse_msg(): uri:>> > >> 5(24552) DEBUG: > [parser/msg_parser.c:614]: parse_msg(): version:>> >> 5(24552) > DEBUG: [parser/parse_via.c:1254]: parse_via_param(): Found>> param > type 235, = ; state=6>> 5(24552
Re: [SR-Users] segfault when using sipt modifications
Hello, try make dump packet after append_body_part("\x01\x12\x49\x00\x0a\x03\x02\x0a\x08\x84\x90\x33\x41\x72\x17\x00\x06\x0a\x08\x04\x13\x93\x70\x21\x73\x23\x10\x08\x01\x00\x00","application/isup;version=itu-t92+","signal;handling=optional"); before sipt_destination($rU, 31, 4); when i have done such conversion i found that kamailio from script ignores all string content after symbol \x00 as this is end of line. To avoid this i have replaces \x00 with \x01 in my initial ISUP string and make changes into SIP-T module to replace it with \x00 while processing message. before number/presentation/screening modifications. you have first \x00 as forth symbol in your ISUP string and after it all have to be ignored. Look at dump using wireshark. I think you will see mailformed ISUP incapsulated message. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-08-01 8:21 GMT+03:00 Daniel-Constantin Mierla : > Hello, > > would be good to get a core dump file and the backtrace from it in order to > see where it crashes. > > For getting the coredump, try: > > - stop kamailio > > - do: ulimit -c unlimited > > - start kamailio as root > > - reproduce the issue > > A corefile should be generated in / or working directory. Use gdb to grab > the output of 'bt full' from the corefile and send it here to the mailing > list. > > Cheers, > Daniel > > > On 29/07/16 18:21, david wrote: > > hello all > > > > i'm trying to add a ISUP multipart in a regular call using the textops > module, and despite seeing one previous issue int he mail list, i'm finding > some issue here > > i'm using this commands > > msg_apply_changes(); > set_body_multipart(,"2123894789_1257887457"); > msg_apply_changes(); > > append_body_part("\x01\x12\x49\x00\x0a\x03\x02\x0a\x08\x84\x90\x33\x41\x72\x17\x00\x06\x0a\x08\x04\x13\x93\x70\x21\x73\x23\x10\x08\x01\x00\x00","application/isup;version=itu-t92+","signal;handling=optional"); > msg_apply_changes(); > sipt_destination($rU, 31, 4); > sipt_set_calling($fU, 4, 0, 3); > msg_apply_changes(); > > before the record_route command, and when using sipt_destination($rU, 31, > 4); i'm getting asegfault > > here you have the logs > could you please give me any clue about something i'm missing or doing > wrong? > > thanks alot and regards > david > > 5(24552) DEBUG: [parser/msg_parser.c:608]: parse_msg(): SIP Request: > 5(24552) DEBUG: [parser/msg_parser.c:610]: parse_msg(): method: > > 5(24552) DEBUG: [parser/msg_parser.c:612]: parse_msg(): uri: > > 5(24552) DEBUG: [parser/msg_parser.c:614]: parse_msg(): version: > > 5(24552) DEBUG: [parser/parse_via.c:1254]: parse_via_param(): Found > param type 235, = ; state=6 > 5(24552) DEBUG: [parser/parse_via.c:1254]: parse_via_param(): Found > param type 232, = ; state=16 > 5(24552) DEBUG: [parser/parse_via.c:2642]: parse_via(): end of header > reached, state=5 > 5(24552) DEBUG: [parser/msg_parser.c:496]: parse_headers(): > parse_headers: Via found, flags=2 > 5(24552) DEBUG: [parser/msg_parser.c:498]: parse_headers(): > parse_headers: this is the first via > 5(24552) DEBUG: [receive.c:178]: receive_msg(): After parse_msg... > 5(24552) DEBUG: [receive.c:221]: receive_msg(): preparing to run > routing scripts... > 5(24552) DEBUG: maxfwd [mf_funcs.c:85]: is_maxfwd_present(): value = 65 > 5(24552) DEBUG: [parser/parse_addr_spec.c:894]: parse_addr_spec(): > end of header reached, state=10 > 5(24552) DEBUG: [parser/msg_parser.c:173]: get_hdr_field(): DEBUG: > get_hdr_field: [49]; > uri=[sip:34666988297@79.170.71.132:5060;user=phone] > 5(24552) DEBUG: [parser/msg_parser.c:175]: get_hdr_field(): DEBUG: to > body [ > ] > 5(24552) DEBUG: [parser/msg_parser.c:153]: get_hdr_field(): > get_hdr_field: cseq : <94568362> > 5(24552) DEBUG: [parser/msg_parser.c:187]: get_hdr_field(): DEBUG: > get_hdr_body : content_length=104 > 5(24552) DEBUG: [parser/msg_parser.c:89]: get_hdr_field(): found end > of header > 5(24552) DEBUG: [parser/parse_addr_spec.c:172]: parse_to_param(): > DEBUG: add_param: tag=5jBBFae4D90rg > 5(24552) DEBUG: [parser/parse_addr_spec.c:894]: parse_addr_spec(): > end of header reached, state=29 > 5(24552) DEBUG: sanity [mod_sanity.c:248]: w_sanity_check(): sanity checks > result: 1 > 5(24552) DEBUG: siputils [checks.c:97]: has_totag(): no totag > 5(24552) DEBUG: [socket_info.c:564]: grep_sock_info(): checking if > host==us: 13==13 && [79.170.71.132] == [79.170.71.132] > 5(24552) DEBUG: [socket_info.c:567]: grep_sock_info(): checking if >
Re: [SR-Users] kamctl stats shmem error changing shared memory
Hi. I have 1024 MB of shared memory and it works fine. I have similar problem, after installing kamailio it does not create directory /var/run/kamailio check is it present when kamailio is stopped, and owner of this dir is kamailio user. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-05-20 16:35 GMT+03:00 Mr.Gab : > Hi, > > i have a problem with my kamailio installation. > Actually i set the shared memory to 128MB and it's all fine. When i increase > the shared memory to 256Mb and more i get the following error while checking > kamctl commands (like kamctl stats shmem) > > ERROR: Error opening Kamailio's FIFO /var/run/kamailio/kamailio_fifo > ERROR: Make sure you have the line 'modparam("mi_fifo", "fifo_name", > "/var/run/kamailio/kamailio_fifo")' in your config > ERROR: and also have loaded the mi_fifo module. > > If i revert to 128Mb kamailio is able to create the kamailio_fifo file and > all works fine. > > Can somebody help me to solve? > > Thanks > > ___ > SIP Express Router (SER) 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] making rtpengine gives error on centos
Hi. You can build rtpengine on another physical/virtual machine with libevent2-devel installed or try to build "relocated' libevent2 rpm with --prefix=/usr/local or build and install libevent2 by yourself with --prefix=/usr/local... devel packages you need only for building from source. You does not need it on production system. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-05-05 9:44 GMT+03:00 ycaner : > Hello; > libevent2 rpm was installed and it still gives error. i checked > libevent_pthreads.so , it is installed. > > libevent2-devel conflicts with libevent-devel > > Thanks > > ls /usr/lib64/libevent_p* > /usr/lib64/libevent_pthreads-2.0.so.5 > /usr/lib64/libevent_pthreads-2.0.so.5.1.9 > > > rpm -Uvh libevent2-2.0.21-11.1.x86_64.rpm > warning: libevent2-2.0.21-11.1.x86_64.rpm: Header V3 DSA/SHA1 Signature, key > ID c86c6f35: NOKEY > Preparing...### > [100%] >1:libevent2 ### > [100%] > > > rpm -Uvh libevent2-devel-2.0.21-11.1.x86_64.rpm > warning: libevent2-devel-2.0.21-11.1.x86_64.rpm: Header V3 DSA/SHA1 > Signature, key ID c86c6f35: NOKEY > Preparing...### > [100%] > file /usr/include/evdns.h from install of > libevent2-devel-2.0.21-11.1.x86_64 conflicts with file from package > libevent-headers-1.4.13-4.el6.noarch > file /usr/include/event.h from install of > libevent2-devel-2.0.21-11.1.x86_64 conflicts with file from package > libevent-headers-1.4.13-4.el6.noarch > file /usr/include/evhttp.h from install of > libevent2-devel-2.0.21-11.1.x86_64 conflicts with file from package > libevent-headers-1.4.13-4.el6.noarch > file /usr/include/evrpc.h from install of > libevent2-devel-2.0.21-11.1.x86_64 conflicts with file from package > libevent-headers-1.4.13-4.el6.noarch > file /usr/include/evutil.h from install of > libevent2-devel-2.0.21-11.1.x86_64 conflicts with file from package > libevent-headers-1.4.13-4.el6.noarch > file /usr/bin/event_rpcgen.py from install of > libevent2-devel-2.0.21-11.1.x86_64 conflicts with file from package > libevent-devel-1.4.13-4.el6.x86_64 > file /usr/lib64/libevent.so from install of > libevent2-devel-2.0.21-11.1.x86_64 conflicts with file from package > libevent-devel-1.4.13-4.el6.x86_64 > file /usr/lib64/libevent_core.so from install of > libevent2-devel-2.0.21-11.1.x86_64 conflicts with file from package > libevent-devel-1.4.13-4.el6.x86_64 > file /usr/lib64/libevent_extra.so from install of > libevent2-devel-2.0.21-11.1.x86_64 conflicts with file from package > libevent-devel-1.4.13-4.el6.x86_64 > [root@host-185-88-7-208 ~]# > > > > > -- > View this message in context: > http://sip-router.1086192.n5.nabble.com/making-rtpengine-gives-error-on-centos-tp148114p148139.html > Sent from the Users mailing list archive at Nabble.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
Re: [SR-Users] set_body_multipart and memory leak
Thank you, Daniel. 2 мая 2016 г. 10:31 пользователь "Daniel-Constantin Mierla" < mico...@gmail.com> написал: > Hi Sergey, > > yes, they will be backported -- on my short to-do list. > > Cheers, > Daniel > > On 29/04/16 13:08, Sergey Basov wrote: > > Hi Daniel. > > Thank you, for commit, and sorry for wrong format. > > Can you apply this patches for kamailio 4.4 branch ? > > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-04-28 9:16 GMT+03:00 Sergey Basov > : > > Hi Daniel. > > I have create pool request as you have proposed. > https://github.com/kamailio/kamailio/pull/587 > > After this patches problem with memory leak was solved for me. > > Thank you. > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-04-22 15:45 GMT+03:00 Sergey Basov > : > > I found root cause of the second issue. > > after converting body to multipart > in msg_translator.c function "check_boundaries" see that flag > FL_BODY_MULTIPART is set , executing "build_body" function which > returns buffer > but function "get_boundary" called at line 1752 of msg_translator.c ( > if(get_boundary(msg, &ob)!=0) return -1;) find that content type of > message not multipart/mixed but application/sdp and returns -1 > then exit from function "int check_boundaries(struct sip_msg *msg, > struct dest_info *send_info)" is performed without feeing buffer. > > I have changed line 1752 of msg_translator.c > from > if(get_boundary(msg, &ob)!=0) return -1; > > to > if(get_boundary(msg, &ob)!=0) { > if(tmp.s) pkg_free(tmp.s); > return -1; > } > > And 3-rd, last for my case, memory leak has gone away. > > I does not know why check "if(!(msg->msg_flags&FL_BODY_MULTIPART))" > returns false... > > But in this way it works for me without memory leak. > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-04-22 14:06 GMT+03:00 Daniel-Constantin Mierla > : > > Thanks for troubleshooting further. If it is convenient for you, make a pull > request with the patch fixing the problem -- it is easier to review online > and merge the patch if everything is ok. > > If not, I am going to check it later today if I get the time, or during the > next days -- right now being caught with some meetings. > > Cheers, > Daniel > > > On 22/04/16 10:18, Sergey Basov wrote: > > Looks like we nned to free memory for > > if(convert && nb.s!=NULL) pkg_free(nb.s); > if(convert && oc.s!=NULL) pkg_free(oc.s); > > before > > LM_DBG("set flag FL_BODY_MULTIPART\n"); > > In this case there no more leak in textops.c: > set_multibody_helper(1637) and textops.c:set_multibody_helper(1648) > > But there is one more trouble after set_body_multipart > > > Apr 22 10:48:39 sip1 /usr/sbin/kamailio-sipt[20349]: ERROR: > [msg_translator.c:1691]: get_boundary(): Content-Type hdr has no > params > Apr 22 10:48:39 sip1 /usr/sbin/kamailio-sipt[20349]: WARNING: > [msg_translator.c:1954]: build_req_buf_from_sip_req(): > check_boundaries error > > when doing msg_apply_changes > after 1 call > qm_sums: count= 1 size= 256 bytes from core: > msg_translator.c: build_body(2986) > after 2 calls > qm_sums: count= 2 size= 536 bytes from core: > msg_translator.c: build_body(2986) > > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-04-22 10:20 GMT+03:00 Sergey Basov > : > > Done. > > Please see in attached files. > > seems textops.c: set_multibody_helper(1637) and textops.c: > set_multibody_helper(1648) size are increasing.. > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-04-22 10:05 GMT+03:00 Daniel-Constantin Mierla > : > > Checked the code and noticed that the behaviour is controlled also by > mem_summary core parameter. > https://www.kamailio.org/wiki/cookbooks/4.4.x/core#mem_summary > > Can you redo the tests after setting mem_summary=12 ? > > Cheers, > > Daniel > > > On 22/04/16 08:52, Sergey Basov wrote: > > I have used corex.pkg_summary pid 19607 > where pid is the pid of "udp receiver" process > > I used it few times, and after a while I get that output. > -- > Best
Re: [SR-Users] set_body_multipart and memory leak
Hi Daniel. Thank you, for commit, and sorry for wrong format. Can you apply this patches for kamailio 4.4 branch ? -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-04-28 9:16 GMT+03:00 Sergey Basov : > Hi Daniel. > > I have create pool request as you have proposed. > > https://github.com/kamailio/kamailio/pull/587 > > After this patches problem with memory leak was solved for me. > > Thank you. > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-04-22 15:45 GMT+03:00 Sergey Basov : >> I found root cause of the second issue. >> >> after converting body to multipart >> in msg_translator.c function "check_boundaries" see that flag >> FL_BODY_MULTIPART is set , executing "build_body" function which >> returns buffer >> but function "get_boundary" called at line 1752 of msg_translator.c ( >> if(get_boundary(msg, &ob)!=0) return -1;) find that content type of >> message not multipart/mixed but application/sdp and returns -1 >> then exit from function "int check_boundaries(struct sip_msg *msg, >> struct dest_info *send_info)" is performed without feeing buffer. >> >> I have changed line 1752 of msg_translator.c >> from >> if(get_boundary(msg, &ob)!=0) return -1; >> >> to >> if(get_boundary(msg, &ob)!=0) { >> if(tmp.s) pkg_free(tmp.s); >> return -1; >> } >> >> And 3-rd, last for my case, memory leak has gone away. >> >> I does not know why check "if(!(msg->msg_flags&FL_BODY_MULTIPART))" >> returns false... >> >> But in this way it works for me without memory leak. >> -- >> Best regards, >> Sergey Basov e-mail: sergey.v.ba...@gmail.com >> >> tel: (+38067) 403-62-54 >> >> >> 2016-04-22 14:06 GMT+03:00 Daniel-Constantin Mierla : >>> Thanks for troubleshooting further. If it is convenient for you, make a pull >>> request with the patch fixing the problem -- it is easier to review online >>> and merge the patch if everything is ok. >>> >>> If not, I am going to check it later today if I get the time, or during the >>> next days -- right now being caught with some meetings. >>> >>> Cheers, >>> Daniel >>> >>> >>> On 22/04/16 10:18, Sergey Basov wrote: >>> >>> Looks like we nned to free memory for >>> >>> if(convert && nb.s!=NULL) pkg_free(nb.s); >>> if(convert && oc.s!=NULL) pkg_free(oc.s); >>> >>> before >>> >>> LM_DBG("set flag FL_BODY_MULTIPART\n"); >>> >>> In this case there no more leak in textops.c: >>> set_multibody_helper(1637) and textops.c:set_multibody_helper(1648) >>> >>> But there is one more trouble after set_body_multipart >>> >>> >>> Apr 22 10:48:39 sip1 /usr/sbin/kamailio-sipt[20349]: ERROR: >>> [msg_translator.c:1691]: get_boundary(): Content-Type hdr has no >>> params >>> Apr 22 10:48:39 sip1 /usr/sbin/kamailio-sipt[20349]: WARNING: >>> [msg_translator.c:1954]: build_req_buf_from_sip_req(): >>> check_boundaries error >>> >>> when doing msg_apply_changes >>> after 1 call >>> qm_sums: count= 1 size= 256 bytes from core: >>> msg_translator.c: build_body(2986) >>> after 2 calls >>> qm_sums: count= 2 size= 536 bytes from core: >>> msg_translator.c: build_body(2986) >>> >>> -- >>> Best regards, >>> Sergey Basov e-mail: sergey.v.ba...@gmail.com >>> >>> tel: (+38067) 403-62-54 >>> >>> >>> 2016-04-22 10:20 GMT+03:00 Sergey Basov : >>> >>> Done. >>> >>> Please see in attached files. >>> >>> seems textops.c: set_multibody_helper(1637) and textops.c: >>> set_multibody_helper(1648) size are increasing.. >>> -- >>> Best regards, >>> Sergey Basov e-mail: sergey.v.ba...@gmail.com >>> >>> tel: (+38067) 403-62-54 >>> >>> >>> 2016-04-22 10:05 GMT+03:00 Daniel-Constantin Mierla : >>> >>> Checked the code and noticed that the behaviour is controlled also by >>> mem_summary core parameter. >>> >>> https://www.kamailio.org/wiki/cookbooks/4.4.x/core#mem_summary >>> >>> Can you redo
Re: [SR-Users] set_body_multipart and memory leak
Hi Daniel. I have create pool request as you have proposed. https://github.com/kamailio/kamailio/pull/587 After this patches problem with memory leak was solved for me. Thank you. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-04-22 15:45 GMT+03:00 Sergey Basov : > I found root cause of the second issue. > > after converting body to multipart > in msg_translator.c function "check_boundaries" see that flag > FL_BODY_MULTIPART is set , executing "build_body" function which > returns buffer > but function "get_boundary" called at line 1752 of msg_translator.c ( > if(get_boundary(msg, &ob)!=0) return -1;) find that content type of > message not multipart/mixed but application/sdp and returns -1 > then exit from function "int check_boundaries(struct sip_msg *msg, > struct dest_info *send_info)" is performed without feeing buffer. > > I have changed line 1752 of msg_translator.c > from > if(get_boundary(msg, &ob)!=0) return -1; > > to > if(get_boundary(msg, &ob)!=0) { > if(tmp.s) pkg_free(tmp.s); > return -1; > } > > And 3-rd, last for my case, memory leak has gone away. > > I does not know why check "if(!(msg->msg_flags&FL_BODY_MULTIPART))" > returns false... > > But in this way it works for me without memory leak. > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-04-22 14:06 GMT+03:00 Daniel-Constantin Mierla : >> Thanks for troubleshooting further. If it is convenient for you, make a pull >> request with the patch fixing the problem -- it is easier to review online >> and merge the patch if everything is ok. >> >> If not, I am going to check it later today if I get the time, or during the >> next days -- right now being caught with some meetings. >> >> Cheers, >> Daniel >> >> >> On 22/04/16 10:18, Sergey Basov wrote: >> >> Looks like we nned to free memory for >> >> if(convert && nb.s!=NULL) pkg_free(nb.s); >> if(convert && oc.s!=NULL) pkg_free(oc.s); >> >> before >> >> LM_DBG("set flag FL_BODY_MULTIPART\n"); >> >> In this case there no more leak in textops.c: >> set_multibody_helper(1637) and textops.c:set_multibody_helper(1648) >> >> But there is one more trouble after set_body_multipart >> >> >> Apr 22 10:48:39 sip1 /usr/sbin/kamailio-sipt[20349]: ERROR: >> [msg_translator.c:1691]: get_boundary(): Content-Type hdr has no >> params >> Apr 22 10:48:39 sip1 /usr/sbin/kamailio-sipt[20349]: WARNING: >> [msg_translator.c:1954]: build_req_buf_from_sip_req(): >> check_boundaries error >> >> when doing msg_apply_changes >> after 1 call >> qm_sums: count= 1 size= 256 bytes from core: >> msg_translator.c: build_body(2986) >> after 2 calls >> qm_sums: count= 2 size= 536 bytes from core: >> msg_translator.c: build_body(2986) >> >> -- >> Best regards, >> Sergey Basov e-mail: sergey.v.ba...@gmail.com >> >> tel: (+38067) 403-62-54 >> >> >> 2016-04-22 10:20 GMT+03:00 Sergey Basov : >> >> Done. >> >> Please see in attached files. >> >> seems textops.c: set_multibody_helper(1637) and textops.c: >> set_multibody_helper(1648) size are increasing.. >> -- >> Best regards, >> Sergey Basov e-mail: sergey.v.ba...@gmail.com >> >> tel: (+38067) 403-62-54 >> >> >> 2016-04-22 10:05 GMT+03:00 Daniel-Constantin Mierla : >> >> Checked the code and noticed that the behaviour is controlled also by >> mem_summary core parameter. >> >> https://www.kamailio.org/wiki/cookbooks/4.4.x/core#mem_summary >> >> Can you redo the tests after setting mem_summary=12 ? >> >> Cheers, >> >> Daniel >> >> >> On 22/04/16 08:52, Sergey Basov wrote: >> >> I have used corex.pkg_summary pid 19607 >> where pid is the pid of "udp receiver" process >> >> I used it few times, and after a while I get that output. >> -- >> Best regards, >> Sergey Basov e-mail: sergey.v.ba...@gmail.com >> >> tel: (+38067) 403-62-54 >> >> >> 2016-04-22 9:24 GMT+03:00 Daniel-Constantin Mierla : >> >> Hello, >> >> this seems to be the memory status output, not the summary. What command did >> you use to generate it? >> >> Also, can you test wit
Re: [SR-Users] set_body_multipart and memory leak
I found root cause of the second issue. after converting body to multipart in msg_translator.c function "check_boundaries" see that flag FL_BODY_MULTIPART is set , executing "build_body" function which returns buffer but function "get_boundary" called at line 1752 of msg_translator.c ( if(get_boundary(msg, &ob)!=0) return -1;) find that content type of message not multipart/mixed but application/sdp and returns -1 then exit from function "int check_boundaries(struct sip_msg *msg, struct dest_info *send_info)" is performed without feeing buffer. I have changed line 1752 of msg_translator.c from if(get_boundary(msg, &ob)!=0) return -1; to if(get_boundary(msg, &ob)!=0) { if(tmp.s) pkg_free(tmp.s); return -1; } And 3-rd, last for my case, memory leak has gone away. I does not know why check "if(!(msg->msg_flags&FL_BODY_MULTIPART))" returns false... But in this way it works for me without memory leak. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-04-22 14:06 GMT+03:00 Daniel-Constantin Mierla : > Thanks for troubleshooting further. If it is convenient for you, make a pull > request with the patch fixing the problem -- it is easier to review online > and merge the patch if everything is ok. > > If not, I am going to check it later today if I get the time, or during the > next days -- right now being caught with some meetings. > > Cheers, > Daniel > > > On 22/04/16 10:18, Sergey Basov wrote: > > Looks like we nned to free memory for > > if(convert && nb.s!=NULL) pkg_free(nb.s); > if(convert && oc.s!=NULL) pkg_free(oc.s); > > before > > LM_DBG("set flag FL_BODY_MULTIPART\n"); > > In this case there no more leak in textops.c: > set_multibody_helper(1637) and textops.c:set_multibody_helper(1648) > > But there is one more trouble after set_body_multipart > > > Apr 22 10:48:39 sip1 /usr/sbin/kamailio-sipt[20349]: ERROR: > [msg_translator.c:1691]: get_boundary(): Content-Type hdr has no > params > Apr 22 10:48:39 sip1 /usr/sbin/kamailio-sipt[20349]: WARNING: > [msg_translator.c:1954]: build_req_buf_from_sip_req(): > check_boundaries error > > when doing msg_apply_changes > after 1 call > qm_sums: count= 1 size= 256 bytes from core: > msg_translator.c: build_body(2986) > after 2 calls > qm_sums: count= 2 size= 536 bytes from core: > msg_translator.c: build_body(2986) > > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-04-22 10:20 GMT+03:00 Sergey Basov : > > Done. > > Please see in attached files. > > seems textops.c: set_multibody_helper(1637) and textops.c: > set_multibody_helper(1648) size are increasing.. > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-04-22 10:05 GMT+03:00 Daniel-Constantin Mierla : > > Checked the code and noticed that the behaviour is controlled also by > mem_summary core parameter. > > https://www.kamailio.org/wiki/cookbooks/4.4.x/core#mem_summary > > Can you redo the tests after setting mem_summary=12 ? > > Cheers, > > Daniel > > > On 22/04/16 08:52, Sergey Basov wrote: > > I have used corex.pkg_summary pid 19607 > where pid is the pid of "udp receiver" process > > I used it few times, and after a while I get that output. > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-04-22 9:24 GMT+03:00 Daniel-Constantin Mierla : > > Hello, > > this seems to be the memory status output, not the summary. What command did > you use to generate it? > > Also, can you test with kamailio 4.4 started with the option '-x qm'? > > Cheers, > > Daniel > > On 22/04/16 07:25, Sergey Basov wrote: > > Hi, Daniel. > > After enabling pkg.summary dump for "udp receiver" process I got 1-st entry > > Apr 22 08:14:12 sip1 /usr/sbin/kamailio-sipt[19613]: INFO: > [cfg/cfg_ctx.c:608]: cfg_set_now(): INFO: cfg_set_now(): > core.mem_dump_pkg has been changed to 19607 > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: > [pt.c:532]: mem_dump_pkg_cb(): Memory status (pkg) of process 19607: > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > fm_status (0x7f9636155010): > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > heap size= 2097152 > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > used= 473912, used+overhead=627
Re: [SR-Users] set_body_multipart and memory leak
Looks like we nned to free memory for if(convert && nb.s!=NULL) pkg_free(nb.s); if(convert && oc.s!=NULL) pkg_free(oc.s); before LM_DBG("set flag FL_BODY_MULTIPART\n"); In this case there no more leak in textops.c: set_multibody_helper(1637) and textops.c:set_multibody_helper(1648) But there is one more trouble after set_body_multipart Apr 22 10:48:39 sip1 /usr/sbin/kamailio-sipt[20349]: ERROR: [msg_translator.c:1691]: get_boundary(): Content-Type hdr has no params Apr 22 10:48:39 sip1 /usr/sbin/kamailio-sipt[20349]: WARNING: [msg_translator.c:1954]: build_req_buf_from_sip_req(): check_boundaries error when doing msg_apply_changes after 1 call qm_sums: count= 1 size= 256 bytes from core: msg_translator.c: build_body(2986) after 2 calls qm_sums: count= 2 size= 536 bytes from core: msg_translator.c: build_body(2986) -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-04-22 10:20 GMT+03:00 Sergey Basov : > Done. > > Please see in attached files. > > seems textops.c: set_multibody_helper(1637) and textops.c: > set_multibody_helper(1648) size are increasing.. > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-04-22 10:05 GMT+03:00 Daniel-Constantin Mierla : >> Checked the code and noticed that the behaviour is controlled also by >> mem_summary core parameter. >> >> https://www.kamailio.org/wiki/cookbooks/4.4.x/core#mem_summary >> >> Can you redo the tests after setting mem_summary=12 ? >> >> Cheers, >> >> Daniel >> >> >> On 22/04/16 08:52, Sergey Basov wrote: >> >> I have used corex.pkg_summary pid 19607 >> where pid is the pid of "udp receiver" process >> >> I used it few times, and after a while I get that output. >> -- >> Best regards, >> Sergey Basov e-mail: sergey.v.ba...@gmail.com >> >> tel: (+38067) 403-62-54 >> >> >> 2016-04-22 9:24 GMT+03:00 Daniel-Constantin Mierla : >> >> Hello, >> >> this seems to be the memory status output, not the summary. What command did >> you use to generate it? >> >> Also, can you test with kamailio 4.4 started with the option '-x qm'? >> >> Cheers, >> >> Daniel >> >> On 22/04/16 07:25, Sergey Basov wrote: >> >> Hi, Daniel. >> >> After enabling pkg.summary dump for "udp receiver" process I got 1-st entry >> >> Apr 22 08:14:12 sip1 /usr/sbin/kamailio-sipt[19613]: INFO: >> [cfg/cfg_ctx.c:608]: cfg_set_now(): INFO: cfg_set_now(): >> core.mem_dump_pkg has been changed to 19607 >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: >> [pt.c:532]: mem_dump_pkg_cb(): Memory status (pkg) of process 19607: >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> fm_status (0x7f9636155010): >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> heap size= 2097152 >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> used= 473912, used+overhead=627848, free=1469304 >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> max used (+overhead)= 642792 >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> dumping free list: >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> hash = 1 fragments no.:10, unused: 0#012#011#011 bucket >> size: 8 - 8 (first 8) >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> hash = 2 fragments no.: 4, unused: 0#012#011#011 bucket >> size:16 -16 (first16) >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> hash = 7 fragments no.: 1, unused: 0#012#011#011 bucket >> size:56 -56 (first56) >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> hash = 8 fragments no.: 1, unused: 0#012#011#011 bucket >> size:64 -64 (first64) >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> hash = 128 fragments no.: 1, unused: 0#012#011#011 bucket >> size: 1024 - 1024 (first 1024) >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> hash = 142 fragments no.: 1, unused: 0#012#011#011 bucket >> size: 1136 - 1136 (first 1136) >> Apr 22 08:14:28
Re: [SR-Users] set_body_multipart and memory leak
Done. Please see in attached files. seems textops.c: set_multibody_helper(1637) and textops.c: set_multibody_helper(1648) size are increasing.. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-04-22 10:05 GMT+03:00 Daniel-Constantin Mierla : > Checked the code and noticed that the behaviour is controlled also by > mem_summary core parameter. > > https://www.kamailio.org/wiki/cookbooks/4.4.x/core#mem_summary > > Can you redo the tests after setting mem_summary=12 ? > > Cheers, > > Daniel > > > On 22/04/16 08:52, Sergey Basov wrote: > > I have used corex.pkg_summary pid 19607 > where pid is the pid of "udp receiver" process > > I used it few times, and after a while I get that output. > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-04-22 9:24 GMT+03:00 Daniel-Constantin Mierla : > > Hello, > > this seems to be the memory status output, not the summary. What command did > you use to generate it? > > Also, can you test with kamailio 4.4 started with the option '-x qm'? > > Cheers, > > Daniel > > On 22/04/16 07:25, Sergey Basov wrote: > > Hi, Daniel. > > After enabling pkg.summary dump for "udp receiver" process I got 1-st entry > > Apr 22 08:14:12 sip1 /usr/sbin/kamailio-sipt[19613]: INFO: > [cfg/cfg_ctx.c:608]: cfg_set_now(): INFO: cfg_set_now(): > core.mem_dump_pkg has been changed to 19607 > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: > [pt.c:532]: mem_dump_pkg_cb(): Memory status (pkg) of process 19607: > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > fm_status (0x7f9636155010): > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > heap size= 2097152 > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > used= 473912, used+overhead=627848, free=1469304 > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > max used (+overhead)= 642792 > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > dumping free list: > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 1 fragments no.:10, unused: 0#012#011#011 bucket > size: 8 - 8 (first 8) > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 2 fragments no.: 4, unused: 0#012#011#011 bucket > size:16 -16 (first16) > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 7 fragments no.: 1, unused: 0#012#011#011 bucket > size:56 -56 (first56) > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 8 fragments no.: 1, unused: 0#012#011#011 bucket > size:64 -64 (first64) > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 128 fragments no.: 1, unused: 0#012#011#011 bucket > size: 1024 - 1024 (first 1024) > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 142 fragments no.: 1, unused: 0#012#011#011 bucket > size: 1136 - 1136 (first 1136) > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 217 fragments no.:12, unused: 0#012#011#011 bucket > size: 1736 - 1736 (first 1736) > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 2055 fragments no.: 1, unused: 0#012#011#011 bucket > size: 1048576 - 2097152 (first 1446048) > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > TOTAL: 31 free fragments = 1469304 free bytes > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > - > > -- > 2-nd entry, after few test calls > > Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: > [pt.c:532]: mem_dump_pkg_cb(): Memory status (pkg) of process 19607: > Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > fm_status (0x7f9636155010): > Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > heap size= 2097152 > Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > used= 476264, used+overhead=637832, free=1459320 > Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > max used (+overhead)= 653072 > Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > dumping free list: > Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >
Re: [SR-Users] set_body_multipart and memory leak
I make test with kamailio 4.4 started with the option '-x qm' result of corex.pkg_summary pid in file attached. Thank you. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-04-22 9:52 GMT+03:00 Sergey Basov : > I have used corex.pkg_summary pid 19607 > where pid is the pid of "udp receiver" process > > I used it few times, and after a while I get that output. > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-04-22 9:24 GMT+03:00 Daniel-Constantin Mierla : >> Hello, >> >> this seems to be the memory status output, not the summary. What command did >> you use to generate it? >> >> Also, can you test with kamailio 4.4 started with the option '-x qm'? >> >> Cheers, >> >> Daniel >> >> On 22/04/16 07:25, Sergey Basov wrote: >> >> Hi, Daniel. >> >> After enabling pkg.summary dump for "udp receiver" process I got 1-st entry >> >> Apr 22 08:14:12 sip1 /usr/sbin/kamailio-sipt[19613]: INFO: >> [cfg/cfg_ctx.c:608]: cfg_set_now(): INFO: cfg_set_now(): >> core.mem_dump_pkg has been changed to 19607 >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: >> [pt.c:532]: mem_dump_pkg_cb(): Memory status (pkg) of process 19607: >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> fm_status (0x7f9636155010): >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> heap size= 2097152 >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> used= 473912, used+overhead=627848, free=1469304 >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> max used (+overhead)= 642792 >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> dumping free list: >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> hash = 1 fragments no.:10, unused: 0#012#011#011 bucket >> size: 8 - 8 (first 8) >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> hash = 2 fragments no.: 4, unused: 0#012#011#011 bucket >> size:16 -16 (first16) >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> hash = 7 fragments no.: 1, unused: 0#012#011#011 bucket >> size:56 -56 (first56) >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> hash = 8 fragments no.: 1, unused: 0#012#011#011 bucket >> size:64 -64 (first64) >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> hash = 128 fragments no.: 1, unused: 0#012#011#011 bucket >> size: 1024 - 1024 (first 1024) >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> hash = 142 fragments no.: 1, unused: 0#012#011#011 bucket >> size: 1136 - 1136 (first 1136) >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> hash = 217 fragments no.:12, unused: 0#012#011#011 bucket >> size: 1736 - 1736 (first 1736) >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> hash = 2055 fragments no.: 1, unused: 0#012#011#011 bucket >> size: 1048576 - 2097152 (first 1446048) >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> TOTAL: 31 free fragments = 1469304 free bytes >> Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> - >> >> -- >> 2-nd entry, after few test calls >> >> Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: >> [pt.c:532]: mem_dump_pkg_cb(): Memory status (pkg) of process 19607: >> Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> fm_status (0x7f9636155010): >> Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> heap size= 2097152 >> Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> used= 476264, used+overhead=637832, free=1459320 >> Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> max used (+overhead)= 653072 >> Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> dumping free list: >> Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: >> hash = 1 fragments no.:10, unused: 0#012#011#
Re: [SR-Users] set_body_multipart and memory leak
I have used corex.pkg_summary pid 19607 where pid is the pid of "udp receiver" process I used it few times, and after a while I get that output. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-04-22 9:24 GMT+03:00 Daniel-Constantin Mierla : > Hello, > > this seems to be the memory status output, not the summary. What command did > you use to generate it? > > Also, can you test with kamailio 4.4 started with the option '-x qm'? > > Cheers, > > Daniel > > On 22/04/16 07:25, Sergey Basov wrote: > > Hi, Daniel. > > After enabling pkg.summary dump for "udp receiver" process I got 1-st entry > > Apr 22 08:14:12 sip1 /usr/sbin/kamailio-sipt[19613]: INFO: > [cfg/cfg_ctx.c:608]: cfg_set_now(): INFO: cfg_set_now(): > core.mem_dump_pkg has been changed to 19607 > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: > [pt.c:532]: mem_dump_pkg_cb(): Memory status (pkg) of process 19607: > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > fm_status (0x7f9636155010): > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > heap size= 2097152 > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > used= 473912, used+overhead=627848, free=1469304 > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > max used (+overhead)= 642792 > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > dumping free list: > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 1 fragments no.:10, unused: 0#012#011#011 bucket > size: 8 - 8 (first 8) > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 2 fragments no.: 4, unused: 0#012#011#011 bucket > size:16 -16 (first16) > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 7 fragments no.: 1, unused: 0#012#011#011 bucket > size:56 -56 (first56) > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 8 fragments no.: 1, unused: 0#012#011#011 bucket > size:64 -64 (first64) > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 128 fragments no.: 1, unused: 0#012#011#011 bucket > size: 1024 - 1024 (first 1024) > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 142 fragments no.: 1, unused: 0#012#011#011 bucket > size: 1136 - 1136 (first 1136) > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 217 fragments no.:12, unused: 0#012#011#011 bucket > size: 1736 - 1736 (first 1736) > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 2055 fragments no.: 1, unused: 0#012#011#011 bucket > size: 1048576 - 2097152 (first 1446048) > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > TOTAL: 31 free fragments = 1469304 free bytes > Apr 22 08:14:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > - > > -- > 2-nd entry, after few test calls > > Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: > [pt.c:532]: mem_dump_pkg_cb(): Memory status (pkg) of process 19607: > Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > fm_status (0x7f9636155010): > Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > heap size= 2097152 > Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > used= 476264, used+overhead=637832, free=1459320 > Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > max used (+overhead)= 653072 > Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > dumping free list: > Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 1 fragments no.:10, unused: 0#012#011#011 bucket > size: 8 - 8 (first 8) > Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 3 fragments no.: 5, unused: 0#012#011#011 bucket > size:24 -24 (first24) > Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 6 fragments no.: 3, unused: 0#012#011#011 bucket > size:48 -48 (first48) > Apr 22 08:18:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: > hash = 7 fragments no.:25, unused: 0#012#011#011 bucket > size:56 -56 (first
Re: [SR-Users] set_body_multipart and memory leak
56 (first56) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 8 fragments no.:45, unused: 0#012#011#011 bucket size:64 -64 (first64) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 9 fragments no.: 5, unused: 0#012#011#011 bucket size:72 -72 (first72) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 12 fragments no.: 2, unused: 0#012#011#011 bucket size:96 -96 (first96) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 13 fragments no.: 3, unused: 0#012#011#011 bucket size: 104 - 104 (first 104) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 14 fragments no.: 1, unused: 0#012#011#011 bucket size: 112 - 112 (first 112) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 15 fragments no.: 1, unused: 0#012#011#011 bucket size: 120 - 120 (first 120) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 16 fragments no.: 2, unused: 0#012#011#011 bucket size: 128 - 128 (first 128) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 18 fragments no.: 3, unused: 0#012#011#011 bucket size: 144 - 144 (first 144) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 19 fragments no.: 1, unused: 0#012#011#011 bucket size: 152 - 152 (first 152) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 20 fragments no.: 2, unused: 0#012#011#011 bucket size: 160 - 160 (first 160) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 29 fragments no.: 2, unused: 0#012#011#011 bucket size: 232 - 232 (first 232) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 33 fragments no.: 1, unused: 0#012#011#011 bucket size: 264 - 264 (first 264) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 39 fragments no.: 1, unused: 0#012#011#011 bucket size: 312 - 312 (first 312) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 50 fragments no.: 2, unused: 0#012#011#011 bucket size: 400 - 400 (first 400) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 59 fragments no.: 3, unused: 0#012#011#011 bucket size: 472 - 472 (first 472) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 60 fragments no.: 1, unused: 0#012#011#011 bucket size: 480 - 480 (first 480) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 71 fragments no.: 1, unused: 0#012#011#011 bucket size: 568 - 568 (first 568) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 79 fragments no.: 1, unused: 0#012#011#011 bucket size: 632 - 632 (first 632) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 118 fragments no.: 1, unused: 0#012#011#011 bucket size: 944 - 944 (first 944) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 141 fragments no.: 1, unused: 0#012#011#011 bucket size: 1128 - 1128 (first 1128) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 186 fragments no.: 1, unused: 0#012#011#011 bucket size: 1488 - 1488 (first 1488) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 221 fragments no.: 1, unused: 0#012#011#011 bucket size: 1768 - 1768 (first 1768) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 229 fragments no.: 1, unused: 0#012#011#011 bucket size: 1832 - 1832 (first 1832) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 313 fragments no.: 1, unused: 0#012#011#011 bucket size: 2504 - 2504 (first 2504) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: hash = 2055 fragments no.: 1, unused: 0#012#011#011 bucket size: 1048576 - 2097152 (first 1435248) Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: TOTAL:126 free fragments = 1456768 free bytes Apr 22 08:24:28 sip1 /usr/sbin/kamailio-sipt[19607]: ALERT: fm_status: - -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-04-21 18:11 GMT+03:00 Sergey Basov : > Hi, Daniel.
Re: [SR-Users] set_body_multipart and memory leak
Hi, Daniel. Tested on 4.3.5 and 4.4.0 - same issue. Tomorrow I will make dump. Thank you. Hello, what version of kamailio are you using? Can you get the pkg summary dump from syslog? http://www.kamailio.org/docs/modules/stable/modules/corex.html#idp5056 Cheers, Daniel On 21/04/16 14:46, Sergey Basov wrote: > Hi, All. > > I have some problems with pkg_memory leak. > > After each call used private memory of the "udp receiver" process > increases at 2500 bytes. > On test environment I hav set it to 2Mbyte, but it is full after 700 calls. > > I need to modify SDP in invite and other packets. > When I do > > > > if(has_body("application/sdp")) >set_body_multipart(); >if (msg_apply_changes()) > { >xlog("L_INFO", "ISUP 1 Changes Applied Succesfully"); > } > } > > record_route(); > dlg_manage > route(RELAY); > > > > > Debug from kamailio: > > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: textops > [textops.c:2627]: has_body_f(): content type is 196611 > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: textops > [textops.c:1577]: set_multibody_helper(): > delimiter<17>:[unique-boundary-1] > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: textops > [textops.c:1486]: generate_boundary(): adding final CRLF+CRLF > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: textops > [textops.c:1714]: set_multibody_helper(): > content-type<44>:[multipart/mixed;boundary="unique-boundary-1"] > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: textops > [textops.c:1766]: set_multibody_helper(): set flag FL_BODY_MULTIPART > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: ERROR: > [msg_translator.c:1691]: get_boundary(): Content-Type hdr has no > params > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: WARNING: > [msg_translator.c:1954]: build_req_buf_from_sip_req(): > check_boundaries error > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: > [msg_translator.c:422]: clen_builder(): content-length: 251 (251) > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: textopsx > [textopsx.c:231]: msg_apply_changes_f(): SIP message content updated - > reparsing > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: > [parser/msg_parser.c:608]: parse_msg(): SIP Request: > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: > [parser/msg_parser.c:610]: parse_msg(): method: > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: > [parser/msg_parser.c:612]: parse_msg(): uri: > > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: > [parser/msg_parser.c:614]: parse_msg(): version: > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: > [parser/parse_via.c:1254]: parse_via_param(): Found param type 232, > = ; state=6 > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: > [parser/parse_via.c:1254]: parse_via_param(): Found param type 236, > = <1>; state=16 > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: > [parser/parse_via.c:2642]: parse_via(): end of header reached, state=5 > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: > [parser/msg_parser.c:496]: parse_headers(): parse_headers: Via found, > flags=2 > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: > [parser/msg_parser.c:498]: parse_headers(): parse_headers: this is the > first via > Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: INFO:
[SR-Users] set_body_multipart and memory leak
Hi, All. I have some problems with pkg_memory leak. After each call used private memory of the "udp receiver" process increases at 2500 bytes. On test environment I hav set it to 2Mbyte, but it is full after 700 calls. I need to modify SDP in invite and other packets. When I do if(has_body("application/sdp")) set_body_multipart(); if (msg_apply_changes()) { xlog("L_INFO", "ISUP 1 Changes Applied Succesfully"); } } record_route(); dlg_manage route(RELAY); Debug from kamailio: Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: textops [textops.c:2627]: has_body_f(): content type is 196611 Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: textops [textops.c:1577]: set_multibody_helper(): delimiter<17>:[unique-boundary-1] Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: textops [textops.c:1486]: generate_boundary(): adding final CRLF+CRLF Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: textops [textops.c:1714]: set_multibody_helper(): content-type<44>:[multipart/mixed;boundary="unique-boundary-1"] Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: textops [textops.c:1766]: set_multibody_helper(): set flag FL_BODY_MULTIPART Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: ERROR: [msg_translator.c:1691]: get_boundary(): Content-Type hdr has no params Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: WARNING: [msg_translator.c:1954]: build_req_buf_from_sip_req(): check_boundaries error Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: [msg_translator.c:422]: clen_builder(): content-length: 251 (251) Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: textopsx [textopsx.c:231]: msg_apply_changes_f(): SIP message content updated - reparsing Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: [parser/msg_parser.c:608]: parse_msg(): SIP Request: Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: [parser/msg_parser.c:610]: parse_msg(): method: Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: [parser/msg_parser.c:612]: parse_msg(): uri: Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: [parser/msg_parser.c:614]: parse_msg(): version: Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: [parser/parse_via.c:1254]: parse_via_param(): Found param type 232, = ; state=6 Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: [parser/parse_via.c:1254]: parse_via_param(): Found param type 236, = <1>; state=16 Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: [parser/parse_via.c:2642]: parse_via(): end of header reached, state=5 Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: [parser/msg_parser.c:496]: parse_headers(): parse_headers: Via found, flags=2 Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: DEBUG: [parser/msg_parser.c:498]: parse_headers(): parse_headers: this is the first via Apr 21 15:38:20 sip1 /usr/sbin/kamailio-sipt[17775]: INFO:
Re: [SR-Users] Textops and Multipart Body - adding ISUP
Hi All. Sorry for delay with reply. But I make workaround by replacing \x00 in my string with values \x01. In this case ISUP body was successfully added. I make some modifications into sipt module to replace this values with 00 under called number modifications using function sipt_destination($rU, 31, 3); I just roll back string to my starting and make debug. config part: if(has_body("application/sdp")) { if (msg_apply_changes()) { xlog("L_INFO", "ISUP 0 Changes Applied Succesfully"); } set_body_multipart(,"2123894789_1257887457"); if (msg_apply_changes()) { xlog("L_INFO", "ISUP 1 Changes Applied Succesfully"); } append_body_part("\x01\x10\x48\x00\x0a\x00\x02\x09\x07\x03\x90\x90\x13\x71\x32\x20\x0a\x04\x02\x13\x73\x12\x01","application/isup;version=itu-t92+","signal;handling=optional"); if(msg_apply_changes()) { xlog("L_INFO", "ISUP 2 Changes Applied Succesfully $rU \n"); } sipt_destination($rU, 31, 3); sipt_set_calling($fU, 2, 0, 3); record_route(); xlog("L_INFO","Route recorded \n"); } Log output Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg/cfg_script.c:41]: new_cfg_script_var(): DEBUG: new_cfg_script_var(): declaring stp1.ip Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg/cfg_script.c:41]: new_cfg_script_var(): DEBUG: new_cfg_script_var(): declaring stp2.ip Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.y:1678]: yyparse(): loading modules under /usr/lib64/kamailio/modules/ Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.y:1659]: yyparse(): loading module mi_fifo.so Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [sr_module.c:569]: load_module(): trying to load Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.lex:1741]: pp_define(): defining id: MOD_mi_fifo Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.y:1659]: yyparse(): loading module kex.so Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [sr_module.c:569]: load_module(): trying to load Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [sr_module.c:334]: register_module(): register PV from: kex Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.lex:1741]: pp_define(): defining id: MOD_kex Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.y:1659]: yyparse(): loading module tm.so Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [sr_module.c:569]: load_module(): trying to load Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.lex:1741]: pp_define(): defining id: MOD_tm Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.y:1659]: yyparse(): loading module tmx.so Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [sr_module.c:569]: load_module(): trying to load Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [sr_module.c:334]: register_module(): register PV from: tmx Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.lex:1741]: pp_define(): defining id: MOD_tmx Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.y:1659]: yyparse(): loading module sl.so Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [sr_module.c:569]: load_module(): trying to load Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.lex:1741]: pp_define(): defining id: MOD_sl Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.y:1659]: yyparse(): loading module rr.so Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [sr_module.c:569]: load_module(): trying to load Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [sr_module.c:334]: register_module(): register PV from: rr Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.lex:1741]: pp_define(): defining id: MOD_rr Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.y:1659]: yyparse(): loading module pv.so Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [sr_module.c:569]: load_module(): trying to load Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [sr_module.c:334]: register_module(): register PV from: pv Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.lex:1741]: pp_define(): defining id: MOD_pv Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.y:1659]: yyparse(): loading module maxfwd.so Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [sr_module.c:569]: load_module(): trying to load Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.lex:1741]: pp_define(): defining id: MOD_maxfwd Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.y:1659]: yyparse(): loading module usrloc.so Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [sr_module.c:569]: load_module(): trying to load Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.lex:1741]: pp_define(): defining id: MOD_usrloc Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [cfg.y:1659]: yyparse(): loading module registrar.so Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [sr_module.c:569]: load_module(): trying to load Feb 16 10:15:03 sip1 kamailio-sipt: DEBUG: [sr_module.c:334]: register_module(): register PV from: registrar Feb 16 10:15:03 sip1 kamailio-sipt: DEB
Re: [SR-Users] Textops and Multipart Body - adding ISUP
Hi Daniel. I just make forward without msg_apply_changes(), and see the same situation. x00 des not added into the body. I try to add append_body_part("\x01\x10\x48\x00\x0a\x0b\x0d","application/isup; version=itu-t92+","signal; handling=optional"); but into the output message added only \x01\x10\x48. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-02-10 18:27 GMT+02:00 Daniel-Constantin Mierla : > Msg length field should not be relevant in this case. > > Can you add the multipart and just forward, without doing > msg_apply_changes()? Just to see if the cut happens during the re-parsing or > not ... > > Cheers, > Daniel > > > On 10/02/16 17:02, Sergey Basov wrote: > > I look at textos sources and seems that most of oparations made using > memcpy. this C functions must work correctly with 0x00 symbol. > > But there are functions which checks msg.len, so may be they cut this > content?.. > > WBR. > Sergey > > 10 февр. 2016 г. 16:58 пользователь "Daniel-Constantin Mierla" > написал: >> >> CC-ed Victor -- iirc, he was the author of the functions for multi-part >> body -- maybe he remembers the rules for these function, if they take >> 0x0 as terminator or not. >> >> From what I remember by heart, a normal body should work fine with >> non-printable characters -- there is easy to check if the content-length >> includes them or not. >> >> Cheers, >> Daniel >> >> On 10/02/16 15:46, Sergey Basov wrote: >> > I am looking what is send to the network. >> > -- >> > Best regards, >> > Sergey Basov e-mail: sergey.v.ba...@gmail.com >> > >> > tel: (+38067) 403-62-54 >> > >> > >> > 2016-02-10 16:43 GMT+02:00 Daniel-Constantin Mierla : >> >> Hello, >> >> >> >> On 10/02/16 15:26, Sergey Basov wrote: >> >>> Thank you for reply. >> >>> >> >>> Yes i need to insert ISUP message >> >>> to update it later via sipt_set_calling($fU, 4, 0, 3); and >> >>> sipt_destination($rU, 31, 4); >> >>> >> >>> I make some progress with >> >>> append_body_part("\x01\x10\x48\x00\x0a\x00","application/isup; >> >>> version=itu-t92+","signal; handling=optional"); >> >>> >> >>> but kamailio does not inserts \x00 into the body, >> >>> May be it thinks that string is terminating? >> >> are you looking to what is sent to the network? Or do you print the new >> >> message to syslog? Printing is typically stopping at 0x0. >> >> >> >> Cheers, >> >> Daniel >> >> >> >>> -- >> >>> Best regards, >> >>> Sergey Basov e-mail: sergey.v.ba...@gmail.com >> >>> >> >>> tel: (+38067) 403-62-54 >> >>> >> >>> >> >>> 2016-02-10 15:17 GMT+02:00 Daniel-Constantin Mierla >> >>> : >> >>>> Hello, >> >>>> >> >>>> On 10/02/16 12:35, Sergey Basov wrote: >> >>>>> Hi All. >> >>>>> >> >>>>> I need to use SIP-I with my upstream to set A number as unknown. >> >>>>> >> >>>>> I was read about adding incapsulation ISUP using >> >>>>> >> >>>>> if(has_body("application/sdp")) >> >>>>> { >> >>>>> set_body_multipart(); >> >>>>> msg_apply_changes() >> >>>>> >> >>>>> $var(acm) = "7e Od 04 55 75 69 20 4d 61 6b 65 43 61 6c 6c"; >> >>>>> >> >>>>> append_body_part("$var(acm)","application/isup;version=itu-t92+","signal; >> >>>>> handling=optional"); >> >>>>> msg_apply_changes() >> >>>>> xlog("L_INFO", "ISUP Changes Applied Succesfully"); >> >>>>> } >> >>>>> >> >>>>> It is converts body to multipart and inserts ISUP >> >>>>> >> >>>>> But it inserts is as text. >> >>>>> >> >>>>> Is there any possibility to insert basic ISUP message to update it >> >>>>> after using >> >>>>> >> >>>>> sipt_destination(
Re: [SR-Users] Textops and Multipart Body - adding ISUP
I look at textos sources and seems that most of oparations made using memcpy. this C functions must work correctly with 0x00 symbol. But there are functions which checks msg.len, so may be they cut this content?.. WBR. Sergey 10 февр. 2016 г. 16:58 пользователь "Daniel-Constantin Mierla" < mico...@gmail.com> написал: > CC-ed Victor -- iirc, he was the author of the functions for multi-part > body -- maybe he remembers the rules for these function, if they take > 0x0 as terminator or not. > > From what I remember by heart, a normal body should work fine with > non-printable characters -- there is easy to check if the content-length > includes them or not. > > Cheers, > Daniel > > On 10/02/16 15:46, Sergey Basov wrote: > > I am looking what is send to the network. > > -- > > Best regards, > > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > > > tel: (+38067) 403-62-54 > > > > > > 2016-02-10 16:43 GMT+02:00 Daniel-Constantin Mierla : > >> Hello, > >> > >> On 10/02/16 15:26, Sergey Basov wrote: > >>> Thank you for reply. > >>> > >>> Yes i need to insert ISUP message > >>> to update it later via sipt_set_calling($fU, 4, 0, 3); and > >>> sipt_destination($rU, 31, 4); > >>> > >>> I make some progress with > >>> append_body_part("\x01\x10\x48\x00\x0a\x00","application/isup; > >>> version=itu-t92+","signal; handling=optional"); > >>> > >>> but kamailio does not inserts \x00 into the body, > >>> May be it thinks that string is terminating? > >> are you looking to what is sent to the network? Or do you print the new > >> message to syslog? Printing is typically stopping at 0x0. > >> > >> Cheers, > >> Daniel > >> > >>> -- > >>> Best regards, > >>> Sergey Basov e-mail: sergey.v.ba...@gmail.com > >>> > >>> tel: (+38067) 403-62-54 > >>> > >>> > >>> 2016-02-10 15:17 GMT+02:00 Daniel-Constantin Mierla >: > >>>> Hello, > >>>> > >>>> On 10/02/16 12:35, Sergey Basov wrote: > >>>>> Hi All. > >>>>> > >>>>> I need to use SIP-I with my upstream to set A number as unknown. > >>>>> > >>>>> I was read about adding incapsulation ISUP using > >>>>> > >>>>> if(has_body("application/sdp")) > >>>>> { > >>>>> set_body_multipart(); > >>>>> msg_apply_changes() > >>>>> > >>>>> $var(acm) = "7e Od 04 55 75 69 20 4d 61 6b 65 43 61 6c 6c"; > >>>>> > append_body_part("$var(acm)","application/isup;version=itu-t92+","signal; > >>>>> handling=optional"); > >>>>> msg_apply_changes() > >>>>> xlog("L_INFO", "ISUP Changes Applied Succesfully"); > >>>>> } > >>>>> > >>>>> It is converts body to multipart and inserts ISUP > >>>>> > >>>>> But it inserts is as text. > >>>>> > >>>>> Is there any possibility to insert basic ISUP message to update it > after using > >>>>> > >>>>> sipt_destination($rU, 31, 4); > >>>>> and > >>>>> > >>>>> sipt_set_calling($fU, 4, 0, 3); > >>>>> > >>>> not much into sip-t/sip-i, but I try to inderstand from kamailio and > sip > >>>> operations point of view. What do you mean by "Is there any > possibility > >>>> to insert basic ISUP message to update it after using ..."? > >>>> > >>>> Do you want to insert first a value and then change it? > >>>> > >>>> Cheers, > >>>> Daniel > >>>> > >>>> -- > >>>> Daniel-Constantin Mierla > >>>> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda > >>>> Book: SIP Routing With Kamailio - http://www.asipto.com > >>>> http://miconda.eu > >>>> > >>>> > >>>> ___ > >>>> SIP Express Router (SER) 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://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda > >> Book: SIP Routing With Kamailio - http://www.asipto.com > >> http://miconda.eu > >> > > -- > Daniel-Constantin Mierla > http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda > Book: SIP Routing With Kamailio - http://www.asipto.com > http://miconda.eu > > ___ SIP Express Router (SER) 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] Textops and Multipart Body - adding ISUP
I am looking what is send to the network. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-02-10 16:43 GMT+02:00 Daniel-Constantin Mierla : > Hello, > > On 10/02/16 15:26, Sergey Basov wrote: >> Thank you for reply. >> >> Yes i need to insert ISUP message >> to update it later via sipt_set_calling($fU, 4, 0, 3); and >> sipt_destination($rU, 31, 4); >> >> I make some progress with >> append_body_part("\x01\x10\x48\x00\x0a\x00","application/isup; >> version=itu-t92+","signal; handling=optional"); >> >> but kamailio does not inserts \x00 into the body, >> May be it thinks that string is terminating? > > are you looking to what is sent to the network? Or do you print the new > message to syslog? Printing is typically stopping at 0x0. > > Cheers, > Daniel > >> -- >> Best regards, >> Sergey Basov e-mail: sergey.v.ba...@gmail.com >> >> tel: (+38067) 403-62-54 >> >> >> 2016-02-10 15:17 GMT+02:00 Daniel-Constantin Mierla : >>> Hello, >>> >>> On 10/02/16 12:35, Sergey Basov wrote: >>>> Hi All. >>>> >>>> I need to use SIP-I with my upstream to set A number as unknown. >>>> >>>> I was read about adding incapsulation ISUP using >>>> >>>> if(has_body("application/sdp")) >>>> { >>>> set_body_multipart(); >>>> msg_apply_changes() >>>> >>>> $var(acm) = "7e Od 04 55 75 69 20 4d 61 6b 65 43 61 6c 6c"; >>>> append_body_part("$var(acm)","application/isup;version=itu-t92+","signal; >>>> handling=optional"); >>>> msg_apply_changes() >>>> xlog("L_INFO", "ISUP Changes Applied Succesfully"); >>>> } >>>> >>>> It is converts body to multipart and inserts ISUP >>>> >>>> But it inserts is as text. >>>> >>>> Is there any possibility to insert basic ISUP message to update it after >>>> using >>>> >>>> sipt_destination($rU, 31, 4); >>>> and >>>> >>>> sipt_set_calling($fU, 4, 0, 3); >>>> >>> not much into sip-t/sip-i, but I try to inderstand from kamailio and sip >>> operations point of view. What do you mean by "Is there any possibility >>> to insert basic ISUP message to update it after using ..."? >>> >>> Do you want to insert first a value and then change it? >>> >>> Cheers, >>> Daniel >>> >>> -- >>> Daniel-Constantin Mierla >>> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda >>> Book: SIP Routing With Kamailio - http://www.asipto.com >>> http://miconda.eu >>> >>> >>> ___ >>> SIP Express Router (SER) 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://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda > Book: SIP Routing With Kamailio - http://www.asipto.com > http://miconda.eu > ___ SIP Express Router (SER) 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] Textops and Multipart Body - adding ISUP
Thank you for reply. Yes i need to insert ISUP message to update it later via sipt_set_calling($fU, 4, 0, 3); and sipt_destination($rU, 31, 4); I make some progress with append_body_part("\x01\x10\x48\x00\x0a\x00","application/isup; version=itu-t92+","signal; handling=optional"); but kamailio does not inserts \x00 into the body, May be it thinks that string is terminating? -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-02-10 15:17 GMT+02:00 Daniel-Constantin Mierla : > Hello, > > On 10/02/16 12:35, Sergey Basov wrote: >> Hi All. >> >> I need to use SIP-I with my upstream to set A number as unknown. >> >> I was read about adding incapsulation ISUP using >> >> if(has_body("application/sdp")) >> { >> set_body_multipart(); >> msg_apply_changes() >> >> $var(acm) = "7e Od 04 55 75 69 20 4d 61 6b 65 43 61 6c 6c"; >> append_body_part("$var(acm)","application/isup;version=itu-t92+","signal; >> handling=optional"); >> msg_apply_changes() >> xlog("L_INFO", "ISUP Changes Applied Succesfully"); >> } >> >> It is converts body to multipart and inserts ISUP >> >> But it inserts is as text. >> >> Is there any possibility to insert basic ISUP message to update it after >> using >> >> sipt_destination($rU, 31, 4); >> and >> >> sipt_set_calling($fU, 4, 0, 3); >> > not much into sip-t/sip-i, but I try to inderstand from kamailio and sip > operations point of view. What do you mean by "Is there any possibility > to insert basic ISUP message to update it after using ..."? > > Do you want to insert first a value and then change it? > > Cheers, > Daniel > > -- > Daniel-Constantin Mierla > http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda > Book: SIP Routing With Kamailio - http://www.asipto.com > http://miconda.eu > > > ___ > SIP Express Router (SER) 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] Textops and Multipart Body - adding ISUP
Hi All. I need to use SIP-I with my upstream to set A number as unknown. I was read about adding incapsulation ISUP using if(has_body("application/sdp")) { set_body_multipart(); msg_apply_changes() $var(acm) = "7e Od 04 55 75 69 20 4d 61 6b 65 43 61 6c 6c"; append_body_part("$var(acm)","application/isup;version=itu-t92+","signal; handling=optional"); msg_apply_changes() xlog("L_INFO", "ISUP Changes Applied Succesfully"); } It is converts body to multipart and inserts ISUP But it inserts is as text. Is there any possibility to insert basic ISUP message to update it after using sipt_destination($rU, 31, 4); and sipt_set_calling($fU, 4, 0, 3); Thank you. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.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] Kamailio replies with SIP/2.0 500 Service Unavailable Under load
Hello. I had similar problems while load test kamailio in front of yate. Yate have rate limiting enabled by default. May be you have it on Freeswitch? I have made loadtest with sipp, kamailio 4.2.6, rtpengines and 2 Asterisk servers as backend. Test was success with 8000 concurrent calls and call-rate 200 cps. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-01-13 22:56 GMT+02:00 Daniel-Constantin Mierla : > Hello, > > as an extra hint on top of Carsten's remarks: search your configuration > for sl_send_reply("500", "Service Unavailable") or t_reply/send_reply > with same parameters. Then you can identify better why that reply is > sent. As Carsten pointed, such reply code and reason text is not coming > from source code, but config. > > Cheers, > Daniel > > On 12/01/16 08:13, Carsten Bock wrote: >> Hi, >> >> If you are using dispatcher module or similar, then the bottle-neck is >> not Kamailio, but Freeswitch. I guess, Kamailio simply doesn't get any >> answer from the AS and thus replies with an error as no AS is >> available. Kamailio by default/minimal configuration won't send any >> errors, it depends on your configuration. >> >> Thanks, >> Carsten >> >> >> >> 2016-01-12 7:27 GMT+01:00 sandeep goje : >>> Hi, >>> >>> I am doing load testing with of Kamailio. I have sipp (version 3.3) as the >>> load generator,Kamailio(4.2.7) as Load Balancer and Freeswitch (1.6.5) as >>> Gateways. >>> >>> I am using the following command to generate load >>> ./sipp -sf uac.xml -d 2000 -m 4000 -l 1000 -r 200 -trace_stat -i SIPP_IP >>> -p 15060 --trace_err -trace_error_codes -trace_calldebug -trace_screen >>> KAM_IP >>> >>> When the rate of generation is below 80 (-r 80), Kamailio behaves fine.But >>> if we go beyond 80, Kamailio starts sending "500 Service Unavailable" >>> >>> 2016-01-12 11:18:15.375103 1452577695.375103: Aborting call on >>> unexpected message for Call-Id '96-32493@SIPP_IP': while expecting '180' >>> (index 2), received 'SIP/2.0 500 Service Unavailable^M >>> Via: SIP/2.0/UDP SIPP_IP:15060;branch=z9hG4bK-32493-96-0^M >>> From: sipp ;tag=96^M >>> To: sut >>> ;tag=55f576f507e822fa6633cf4bc22740e6-6660^M >>> Call-ID: 96-32493@SIPP_IP^M >>> CSeq: 1 INVITE^M >>> Server: kamailio (4.2.7 (x86_64/linux))^M >>> Content-Length: 0^M >>> >>> With the above command, sipp output is >>> >>> - Statistics Screen --- [1-9]: Change Screen >>> -- >>> Start Time | 2016-01-12 11:26:07.723764 1452578167.723764 >>> Last Reset Time| 2016-01-12 11:27:16.280901 1452578236.280901 >>> Current Time | 2016-01-12 11:27:16.282737 1452578236.282737 >>> -+---+-- >>> Counter Name | Periodic value| Cumulative value >>> -+---+-- >>> Elapsed Time | 00:00:00:001000 | 00:01:08:558000 >>> Call Rate |0.000 cps | 58.345 cps >>> -+---+-- >>> Incoming call created |0 |0 >>> OutGoing call created |0 | 4000 >>> Total Call created | | 4000 >>> Current Call |0 | >>> -+---+-- >>> Successful call|0 | 1192 >>> Failed call|0 | 2808 >>> -+---+-- >>> Response Time 1| 00:00:00:00 | 00:00:15:102000 >>> Call Length| 00:00:00:00 | 00:00:10:614000 >>> -- Test Terminated >>> >>> >>> Kamailio is run with command /usr/local/sbin/kamailio -f >>> /usr/local/etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.pid -m >>> 512 -M 8 -u kamailio -g kamailio >>> >>> version: kamailio 4.2.7 (x86_64/linux) 727746 >>> flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_
Re: [SR-Users] Parser error when enabling siptrace with HEP functionality
Hi Daniel. Seems yes, it is captured properly. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-01-13 23:14 GMT+02:00 Daniel-Constantin Mierla : > Hi Sergey, > > thanks for testing and the feedback. The patch is also useful to have > around for those than want to get the feature in 4.3 by one step, not > cherry picking each commit. > > One more thing: are the local message properly captured? I mean the > replies generated with sl_send_reply()/t_reply() as well as request such > as notify or uac_req_send() (in case you have such case in your config). > > Cheers, > Daniel > > On 13/01/16 08:38, Sergey Basov wrote: >> Hi Daniel. >> >> I just build with latest commit. >> It work as expected now. >> Now I can see captured packets as they was send and received by >> kamailio via network interfaces. >> >> Thank you very match. >> >> I make patch which backports your commits to kamailio 4.3.4 >> please find it in attach >> -- >> Best regards, >> Sergey Basov e-mail: sergey.v.ba...@gmail.com >> >> tel: (+38067) 403-62-54 >> >> >> 2016-01-13 1:06 GMT+02:00 Daniel-Constantin Mierla : >>> Earlier today I pushed the patch to catch the incoming traffic before >>> topoh gets the chance to decode it. If you can try with latest master >>> and report the results, it will be appreciated. >>> >>> Cheers, >>> Daniel >>> >>> On 12/01/16 11:02, Sergey Basov wrote: >>>> I am sorry. >>>> I have missed commit 4fc969760d8eec6355ce661ccd3c5fd9ad2a36f0... >>>> >>>> Now all works as I had expected. >>>> >>>> Than you so match. >>>> >>>> If you are interesting, I now try to backport changes to kamailio 4.3.4. >>>> >>>> When it will be done I can email patch file to you. >>>> >>>> -- >>>> Best regards, >>>> Sergey Basov e-mail: sergey.v.ba...@gmail.com >>>> >>>> tel: (+38067) 403-62-54 >>>> >>>> >>>> 2016-01-12 10:45 GMT+02:00 Sergey Basov : >>>>> Thank you for commits. >>>>> >>>>> I just try it and now I can see that sending packets captured properly.. >>>>> >>>>> Now there is a problem with receiving packets, I does not see Initial >>>>> invite from client into the capture. >>>>> >>>>> >>>>> -- >>>>> Best regards, >>>>> Sergey Basov e-mail: sergey.v.ba...@gmail.com >>>>> >>>>> tel: (+38067) 403-62-54 >>>>> >>>>> >>>>> 2016-01-11 23:54 GMT+02:00 Daniel-Constantin Mierla : >>>>>> On 06/01/16 11:49, Daniel-Constantin Mierla wrote: >>>>>>> [...] >>>>>>>> But Packet which is send by siptrace module to homer capture server is >>>>>>>> send before topoh modifications. >>>>>>>> >>>>>>>> If you can correct this flow it will be great. >>>>>>> I will look into it as I said before. >>>>>> Can you try with master branch? I pushed a series of commits for this. >>>>>> You need to set siptrace modparam trace_mode to 1, then remove any use >>>>>> of sip_trace() function as well as setflag() with trace flag. >>>>>> >>>>>> The receiving is after topoh does decoding at this moment, but sending >>>>>> should be after topoh does enconding. Going to finalize the receiving >>>>>> soon, but thought you may want to give it a try and report if sending is >>>>>> captured properly. >>>>>> >>>>>> Cheers, >>>>>> Daniel >>>>>> >>>>>> -- >>>>>> Daniel-Constantin Mierla >>>>>> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda >>>>>> Book: SIP Routing With Kamailio - http://www.asipto.com >>>>>> http://miconda.eu >>>>>> >>> -- >>> Daniel-Constantin Mierla >>> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda >>> Book: SIP Routing With Kamailio - http://www.asipto.com >>> http://miconda.eu >>> > > -- > Daniel-Constantin Mierla > http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda > Book: SIP Routing With Kamailio - http://www.asipto.com > http://miconda.eu > ___ SIP Express Router (SER) 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] Parser error when enabling siptrace with HEP functionality
Hi Daniel. I just build with latest commit. It work as expected now. Now I can see captured packets as they was send and received by kamailio via network interfaces. Thank you very match. I make patch which backports your commits to kamailio 4.3.4 please find it in attach -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-01-13 1:06 GMT+02:00 Daniel-Constantin Mierla : > Earlier today I pushed the patch to catch the incoming traffic before > topoh gets the chance to decode it. If you can try with latest master > and report the results, it will be appreciated. > > Cheers, > Daniel > > On 12/01/16 11:02, Sergey Basov wrote: >> I am sorry. >> I have missed commit 4fc969760d8eec6355ce661ccd3c5fd9ad2a36f0... >> >> Now all works as I had expected. >> >> Than you so match. >> >> If you are interesting, I now try to backport changes to kamailio 4.3.4. >> >> When it will be done I can email patch file to you. >> >> -- >> Best regards, >> Sergey Basov e-mail: sergey.v.ba...@gmail.com >> >> tel: (+38067) 403-62-54 >> >> >> 2016-01-12 10:45 GMT+02:00 Sergey Basov : >>> Thank you for commits. >>> >>> I just try it and now I can see that sending packets captured properly.. >>> >>> Now there is a problem with receiving packets, I does not see Initial >>> invite from client into the capture. >>> >>> >>> -- >>> Best regards, >>> Sergey Basov e-mail: sergey.v.ba...@gmail.com >>> >>> tel: (+38067) 403-62-54 >>> >>> >>> 2016-01-11 23:54 GMT+02:00 Daniel-Constantin Mierla : >>>> >>>> On 06/01/16 11:49, Daniel-Constantin Mierla wrote: >>>>> [...] >>>>>> But Packet which is send by siptrace module to homer capture server is >>>>>> send before topoh modifications. >>>>>> >>>>>> If you can correct this flow it will be great. >>>>> I will look into it as I said before. >>>> Can you try with master branch? I pushed a series of commits for this. >>>> You need to set siptrace modparam trace_mode to 1, then remove any use >>>> of sip_trace() function as well as setflag() with trace flag. >>>> >>>> The receiving is after topoh does decoding at this moment, but sending >>>> should be after topoh does enconding. Going to finalize the receiving >>>> soon, but thought you may want to give it a try and report if sending is >>>> captured properly. >>>> >>>> Cheers, >>>> Daniel >>>> >>>> -- >>>> Daniel-Constantin Mierla >>>> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda >>>> Book: SIP Routing With Kamailio - http://www.asipto.com >>>> http://miconda.eu >>>> > > -- > Daniel-Constantin Mierla > http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda > Book: SIP Routing With Kamailio - http://www.asipto.com > http://miconda.eu > kamailio-4.3.4-siptrace.patch.bz2 Description: BZip2 compressed 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] Parser error when enabling siptrace with HEP functionality
I am sorry. I have missed commit 4fc969760d8eec6355ce661ccd3c5fd9ad2a36f0... Now all works as I had expected. Than you so match. If you are interesting, I now try to backport changes to kamailio 4.3.4. When it will be done I can email patch file to you. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-01-12 10:45 GMT+02:00 Sergey Basov : > Thank you for commits. > > I just try it and now I can see that sending packets captured properly.. > > Now there is a problem with receiving packets, I does not see Initial > invite from client into the capture. > > > -- > Best regards, > Sergey Basov e-mail: sergey.v.ba...@gmail.com > > tel: (+38067) 403-62-54 > > > 2016-01-11 23:54 GMT+02:00 Daniel-Constantin Mierla : >> >> >> On 06/01/16 11:49, Daniel-Constantin Mierla wrote: >>> [...] >>>> But Packet which is send by siptrace module to homer capture server is >>>> send before topoh modifications. >>>> >>>> If you can correct this flow it will be great. >>> I will look into it as I said before. >> Can you try with master branch? I pushed a series of commits for this. >> You need to set siptrace modparam trace_mode to 1, then remove any use >> of sip_trace() function as well as setflag() with trace flag. >> >> The receiving is after topoh does decoding at this moment, but sending >> should be after topoh does enconding. Going to finalize the receiving >> soon, but thought you may want to give it a try and report if sending is >> captured properly. >> >> Cheers, >> Daniel >> >> -- >> Daniel-Constantin Mierla >> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda >> Book: SIP Routing With Kamailio - http://www.asipto.com >> http://miconda.eu >> ___ SIP Express Router (SER) 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] Parser error when enabling siptrace with HEP functionality
Thank you for commits. I just try it and now I can see that sending packets captured properly.. Now there is a problem with receiving packets, I does not see Initial invite from client into the capture. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-01-11 23:54 GMT+02:00 Daniel-Constantin Mierla : > > > On 06/01/16 11:49, Daniel-Constantin Mierla wrote: >> [...] >>> But Packet which is send by siptrace module to homer capture server is >>> send before topoh modifications. >>> >>> If you can correct this flow it will be great. >> I will look into it as I said before. > Can you try with master branch? I pushed a series of commits for this. > You need to set siptrace modparam trace_mode to 1, then remove any use > of sip_trace() function as well as setflag() with trace flag. > > The receiving is after topoh does decoding at this moment, but sending > should be after topoh does enconding. Going to finalize the receiving > soon, but thought you may want to give it a try and report if sending is > captured properly. > > Cheers, > Daniel > > -- > Daniel-Constantin Mierla > http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda > Book: SIP Routing With Kamailio - http://www.asipto.com > http://miconda.eu > ___ SIP Express Router (SER) 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] Parser error when enabling siptrace with HEP functionality
Thank you for patch. I have applied patches from your commits 526fb4cdc2246284ecbd7de9ed65678da2dbe357 and 284c11ed16bdc5afcc9abf49c9f5c1749ce831e0 to kamailio 4.3.4 it was applied and build successfully. There is no more errors in kamailio.log. But Packet which is send by siptrace module to homer capture server is send before topoh modifications. If you can correct this flow it will be great. Thank you. you can see this by looking at contact header: dump from physical interface to upstream INVITE sip:@10.1.23.23;transport=UDP;user=phone SIP/2.0 Record-Route: Record-Route: Via: SIP/2.0/UDP 10.56.42.23;branch=z9hG4bK4fed.265c2242365ddb0a53289d8a3eac05a7.0 Via: SIP/2.0/UDP 127.0.0.8;branch=z9hG4bKsr-s7wTDLa0zUfYZXl5zpl0zpl0z.lRD.zok.sEG.lvBJY.euwReuTfzpl0zpl0z.lRD.zokqZaxuZ9P.c3BJX01R5fO.wCZLZ3WSqMkhBqGgCceVT7G.G.epGwe.wAzh5jz37jDW7ceh52GpZKDpcSBVfSPh7qzh1E Max-Forwards: 69 Contact: To: From: ;tag=34ff4c7e Call-ID: Y2EyYmU5NGZiNjYxMGY3MDc0M2ZhYTU1MmNkODFjOWQ. CSeq: 2 INVITE Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE Content-Type: application/sdp Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri User-Agent: Z 3.3.25608 r25552 Allow-Events: presence, kpml Content-Length: 382 P-Asserted-Identity: Expires: 180 v=0 o=Z 0 0 IN IP4 10.56.42.23 s=Z c=IN IP4 10.56.42.23 t=0 0 m=audio 18274 RTP/AVP 8 101 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv a=rtcp:18275 a=ice-ufrag:MyrLrVTV a=ice-pwd:uoYbKhQTednj4xw3aF2R0ysK6R a=candidate:1zTwRqKsCajOhkZK 1 UDP 2130706431 10.56.42.23 18274 typ host a=candidate:1zTwRqKsCajOhkZK 2 UDP 2130706430 10.56.42.23 18275 typ host dump from homer db INVITE sip:@10.1.23.23;transport=UDP;user=phone SIP/2.0 Record-Route: Record-Route: Via: SIP/2.0/UDP 10.56.42.23;branch=z9hG4bK4fed.265c2242365ddb0a53289d8a3eac05a7.0 Via: SIP/2.0/UDP 10.10.206.39:5060;received=10.10.206.39;TH=div;branch=z9hG4bK-d8754z-dd463ce3ef9a0812-1---d8754z-;rport=5060 Max-Forwards: 69 Contact: To: From: ;tag=34ff4c7e Call-ID: Y2EyYmU5NGZiNjYxMGY3MDc0M2ZhYTU1MmNkODFjOWQ. CSeq: 2 INVITE Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE Content-Type: application/sdp Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri User-Agent: Z 3.3.25608 r25552 Allow-Events: presence, kpml Content-Length: 382 TH: dih P-Asserted-Identity: Expires: 180 v=0 o=Z 0 0 IN IP4 10.56.42.23 s=Z c=IN IP4 10.56.42.23 t=0 0 m=audio 18274 RTP/AVP 8 101 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv a=rtcp:18275 a=ice-ufrag:MyrLrVTV a=ice-pwd:uoYbKhQTednj4xw3aF2R0ysK6R a=candidate:1zTwRqKsCajOhkZK 1 UDP 2130706431 10.56.42.23 18274 typ host a=candidate:1zTwRqKsCajOhkZK 2 UDP 2130706430 10.56.42.23 18275 typ host -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com tel: (+38067) 403-62-54 2016-01-06 11:08 GMT+02:00 Daniel-Constantin Mierla : > > > On 06/01/16 09:19, Sergey Basov wrote: >> Sorry, not only ACK. >> There is ACK, INVITE, ACK and BYE > > OK. > > I pushed two patches to master branch that should fix the issue with the > error log messages. Can you test with master branch? If all goes fine, > then I will consider backporting. > > For capturing the packets after topoh, more time is needed to analyze > and implement if possible. > > Cheers, > Daniel >> >> I am using kamailio as statefull proxy. >> >> So in case of normal callflow there is REGISTER and so on.. >> >> And with sip_trace enabled in onsend_route errors in kamailio.log still >> persist. >> >> Jan 6 10:12:01 sip1 /usr/sbin/kamailio[30545]: INFO:
Re: [SR-Users] Parser error when enabling siptrace with HEP functionality
Sorry, not only ACK. There is ACK, INVITE, ACK and BYE I am using kamailio as statefull proxy. So in case of normal callflow there is REGISTER and so on.. And with sip_trace enabled in onsend_route errors in kamailio.log still persist. Jan 6 10:12:01 sip1 /usr/sbin/kamailio[30545]: INFO:
Re: [SR-Users] Parser error when enabling siptrace with HEP functionality
I just try it. I got only last ACK when call was finished. I think than siptrace must catch and send duplicate message after topoh module. Because in other case we can see message as it is inside kamailio, not message that will be send to upstream or client... WBR. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com SATB-RIPE SATB-UANIC tel: (+38067) 403-62-54 2016-01-05 20:22 GMT+02:00 Daniel-Constantin Mierla : > If you try to use the sip_trace() function inside onsend_route{ }, what > messages do you get? > > Cheers, > Daniel > > On 05/01/16 15:38, Sergey Basov wrote: >> It will be great, because I am using sip TLS in production environment. >> This is why I can not using homer capture agent... > > -- > Daniel-Constantin Mierla > http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda > Book: SIP Routing With Kamailio - http://www.asipto.com > http://miconda.eu > ___ SIP Express Router (SER) 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] Parser error when enabling siptrace with HEP functionality
It will be great, because I am using sip TLS in production environment. This is why I can not using homer capture agent... -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com SATB-RIPE SATB-UANIC tel: (+38067) 403-62-54 2016-01-05 15:37 GMT+02:00 Daniel-Constantin Mierla : > > > On 05/01/16 14:05, Sergey Basov wrote: >> And one more thing. >> >> In captured packet from Homer, I see original SIP packets, without >> topoh modifications. >> But in dump from network interface by wireshark i see that packets was >> modified... > sip_trace module is taking the sip message as it is processed by the > configuration file, after topoh did decryption of headers and before > encrypting again. If you use udp/tcp, perhaps you can use homer agent > application. > > Eventaully, as a new feature, would be good to update sip_trace to hook > into sending process after the topoh. > > Cheers, > Daniel > > -- > Daniel-Constantin Mierla > http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda > Book: SIP Routing With Kamailio - http://www.asipto.com > http://miconda.eu > > > ___ > SIP Express Router (SER) 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] Parser error when enabling siptrace with HEP functionality
And one more thing. In captured packet from Homer, I see original SIP packets, without topoh modifications. But in dump from network interface by wireshark i see that packets was modified... -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com SATB-RIPE SATB-UANIC tel: (+38067) 403-62-54 ___ SIP Express Router (SER) 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] Parser error when enabling siptrace with HEP functionality
Thanks for reply. I check one more time, and does not see any non SIP (HEP) packets received on port 5060 of kamailio. May bee parser trying to parse (HEP) packet when it going out via socket to capture server? When I turn of topoh module I does not see any errors in log. And in both cases I see HEP packets on kamailio capture server. -- Best regards, Sergey Basov e-mail: sergey.v.ba...@gmail.com SATB-RIPE SATB-UANIC tel: (+38067) 403-62-54 ___ SIP Express Router (SER) 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] Parser error when enabling siptrace with HEP functionality
Hi, All. I have a strange issue occuring, when I enable the siptrace functionality within the routing logic, I begin to get a lot of parser error as show below. Is this normal behavior? This errors appears only when topoh module is enabled... As I see with wireshark, there is no duplicates or returned HEP packets... I enable siptrace as follows: request_route { sip_trace(); setflag(22); ... } Configuration of the topoh and siptrace modules: # - topoh params - modparam("topoh", "mask_key", "123456789") modparam("topoh", "mask_ip", "127.0.0.8") #Siptrace modparam("siptrace", "duplicate_uri", "sip:10.1.23.20:9060") modparam("siptrace", "hep_mode_on", 1) modparam("siptrace", "hep_version", 2) modparam("siptrace", "trace_to_database", 0) modparam("siptrace", "trace_flag", 22) modparam("siptrace", "trace_on", 1) modparam("siptrace", "force_send_sock", "sip:10.1.23.23:5060") modparam("siptrace", "traced_user_avp", "$avp(s:user)") output from kamailio.log with debug enabled: Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: topoh [th_msg.c:180]: th_mask_via(): body: 120: [SIP/2.0/UDP 10.10.206.39:5060 ;received=10.10.206.39;TH=dcv;branch=z9hG4bK-d8754z-2e9df22b7c5cb6c9-1---d8754z-;rport=5060] Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: topoh [th_msg.c:191]: th_mask_via(): +body: 199: [SIP/2.0/UDP 127.0.0.8;branch=z9hG4bKsr-s7wTDLa0zUfYZXl5zpl0zpl0z.lRD.zok.sEG.lvBJY.euwReuTfzpl0zpl0z.lRD.zokqZaxuZ.P.c3BJX01R5fO.wCZLZ3WSqMkhBqGgCczJsoeV1SzJa21LY.1.e.kW7jDW7ceh52GpZKDpcSBVfSPh7qzh1E] Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: topoh [th_msg.c:322]: th_mask_record_route(): no record route header Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: tm [t_hooks.c:266]: run_trans_callbacks_internal(): DBG: trans=0x7fcfacccb7a8, callback type 4194304, id 0 entered Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: siptrace [siptrace.c:766]: sip_trace_store_db(): database connection not initialized Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: siptrace [siptrace.c:1875]: pipport2su(): the port string is 5060 Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: siptrace [siptrace.c:1875]: pipport2su(): the port string is 5060 Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: [proxy.c:265]: mk_proxy(): doing DNS lookup... Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: [resolve.c:1208]: srv_sip_resolvehost(): 10.1.23.20:9060 proto=1 Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: [resolve.c:1329]: srv_sip_resolvehost(): returning 0x9da020 (10.1.23.20:9060 proto=1) Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: siptrace [siptrace.c:1687]: trace_send_hep_duplicate(): setting up the socket_info Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: siptrace [siptrace.c:1694]: trace_send_hep_duplicate(): force_send_sock activated, grep for the sock_info Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: [socket_info.c:563]: grep_sock_info(): checking if host==us: 10==11 && [10.1.23.23] == [10.56.41.23] Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: [socket_info.c:566]: grep_sock_info(): checking if port 5060 (advertise 0) matches port 5060 Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: [socket_info.c:563]: grep_sock_info(): checking if host==us: 10==11 && [10.1.23.23] == [10.56.42.23] Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: [socket_info.c:566]: grep_sock_info(): checking if port 5060 (advertise 0) matches port 5060 Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: [socket_info.c:563]: grep_sock_info(): checking if host==us: 10==10 && [10.1.23.23] == [10.1.23.23] Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: [socket_info.c:566]: grep_sock_info(): checking if port 5060 (advertise 0) matches port 5060 Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: siptrace [siptrace.c:1701]: trace_send_hep_duplicate(): found socket while grep: [10.1.23.23] [10.1.23.23] Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: INFO: [parser/parse_fline.c:144]: parse_first_line(): ERROR:parse_first_line: method not followed by SP Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: ERROR: [parser/parse_fline.c:257]: parse_first_line(): parse_first_line: bad message (offset: 0) Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: [parser/msg_parser.c:602]: parse_msg(): parse_msg: invalid message Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: ERROR: [parser/msg_parser.c:688]: parse_msg(): ERROR: parse_msg: message=<#002#020#002#021#023�#023�#0128*#027#0128*#024zx�V�#016#003> Jan 5 10:02:02 sip1 /usr/sbin/kamailio[28348]: DEBUG: topoh [topoh_mod.c:214]: th_prepare_msg(): outbuf buffer parsing failed! Ja