Re: [OpenSIPS-Users] Adding Proxy-Authorization header
Hi Bogdan, I followed your sugestion and found the follwing error: Mar 26 12:53:15 [12396] DBG:uac:uac_auth: no credential for realm ctelpbx So, I added the following lines to my configuration script: modparam(uac,auth_username_avp, $avp(user)) modparam(uac,auth_password_avp, $avp(pass)) modparam(uac,auth_realm_avp, $avp(realm)) route{ $avp(user)=268; $avp(pass)=123456; $avp(realm)=ctelpbx; Opensips is still not sending the invite with the Proxy-Authorizatin header, and now the log is showing this: Mar 26 16:14:32 [5178] DBG:uac:uac_auth: picked reply is 0xb6b68b68, code 407 Mar 26 16:14:32 [5178] DBG:core:parse_headers: flags=200 Mar 26 16:14:32 [5178] DBG:core:parse_authenticate_body: algorithm=MD5 state=7 Mar 26 16:14:32 [5178] DBG:core:parse_authenticate_body: realm=ctelpbx state=2 Mar 26 16:14:32 [5178] DBG:core:parse_authenticate_body: nonce=6f0a2c46 state=3 Mar 26 16:14:32 [5178] DBG:uac_auth:build_authorization_hdr: hdr is Proxy-Authorization: Digest username=268, realm=ctelpbx, nonce=6f0a2c46, uri=sip:229@192.168.2.98:5060, response=fc3cfd31f4a053d5d16b5ae8f463830d, algorithm=MD5 Mar 26 16:14:32 [5178] DBG:core:parse_headers: flags= Mar 26 16:14:32 [5178] DBG:core:buf_init: initializing... Any suggestion? Thanks Diego On Fri, Mar 7, 2014 at 8:50 AM, Bogdan-Andrei Iancu bog...@opensips.orgwrote: Hi Diego, Set debug = 4 and watch the logs from the uac_auth() function (also the return code) - I assume the function did not find any credentials (on the server side) to match the authentication challenge (the matching is done based on the realm). Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developerhttp://www.opensips-solutions.com On 05.03.2014 19:38, Diego Barberio wrote: Hi Stefano, Vlad Thank you for your response I tried your suggestion but still doesn't work. This is a snippet from my script: modparam(uac_auth,credential,268:192.168.2.98:password) t_on_failure(2); t_relay(); failure_route[2] { if(t_check_status(407)){ uac_auth(); xlog(In failure route 2\n); } } According to the log, the uac_auth function is being called but the following INVITEs doesn't include the Proxy-Authorization header What am I missing? Thanks Diego On Mon, Feb 24, 2014 at 2:12 PM, Vlad Paiu vladp...@opensips.org wrote: Hello, The registrant module is to be used only for generating REGISTER requests ( with auth included ). For proxied calls, you need to use the uac and uac_auth modules ( [1] ) for adding the auth headers - call uac_auth() ( [2] ) function within failure route when receiving a challenge. [1] http://www.opensips.org/html/docs/modules/1.11.x/uac_auth.html [2] http://www.opensips.org/html/docs/modules/1.11.x/uac.html#id250288 Best Regards Vlad Paiu OpenSIPS Developerhttp://www.opensips-solutions.com On 24.02.2014 17:33, Stefano Pisani wrote: You can use module UAC_AUTH Il 24/02/2014 16.18, Diego Barberio ha scritto: Hi all, I have opensips registered to an IP-PBX using registrant module and I want to make an outbound call to that PBX through the proxy. I'm sending and INVITE from my application to the proxy with a From that is actually registered by the proxy, however OpenSIPs is not adding the Proxy-Authorization header so the INVITE is rejected with a 401 Unauthorized and that response is forwarded to my application. I just want opensips to add the Proxy-Authorization header so the call is not rejected by the IP-PBX. Is it possible to achieve this? Thanks Diego ___ Users mailing listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Adding Proxy-Authorization header
Hi Stefano, Vlad Thank you for your response I tried your suggestion but still doesn't work. This is a snippet from my script: modparam(uac_auth,credential,268:192.168.2.98:password) t_on_failure(2); t_relay(); failure_route[2] { if(t_check_status(407)){ uac_auth(); xlog(In failure route 2\n); } } According to the log, the uac_auth function is being called but the following INVITEs doesn't include the Proxy-Authorization header What am I missing? Thanks Diego On Mon, Feb 24, 2014 at 2:12 PM, Vlad Paiu vladp...@opensips.org wrote: Hello, The registrant module is to be used only for generating REGISTER requests ( with auth included ). For proxied calls, you need to use the uac and uac_auth modules ( [1] ) for adding the auth headers - call uac_auth() ( [2] ) function within failure route when receiving a challenge. [1] http://www.opensips.org/html/docs/modules/1.11.x/uac_auth.html [2] http://www.opensips.org/html/docs/modules/1.11.x/uac.html#id250288 Best Regards Vlad Paiu OpenSIPS Developerhttp://www.opensips-solutions.com On 24.02.2014 17:33, Stefano Pisani wrote: You can use module UAC_AUTH Il 24/02/2014 16.18, Diego Barberio ha scritto: Hi all, I have opensips registered to an IP-PBX using registrant module and I want to make an outbound call to that PBX through the proxy. I'm sending and INVITE from my application to the proxy with a From that is actually registered by the proxy, however OpenSIPs is not adding the Proxy-Authorization header so the INVITE is rejected with a 401 Unauthorized and that response is forwarded to my application. I just want opensips to add the Proxy-Authorization header so the call is not rejected by the IP-PBX. Is it possible to achieve this? Thanks Diego ___ Users mailing listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Adding Proxy-Authorization header
Hi all, I have opensips registered to an IP-PBX using registrant module and I want to make an outbound call to that PBX through the proxy. I'm sending and INVITE from my application to the proxy with a From that is actually registered by the proxy, however OpenSIPs is not adding the Proxy-Authorization header so the INVITE is rejected with a 401 Unauthorized and that response is forwarded to my application. I just want opensips to add the Proxy-Authorization header so the call is not rejected by the IP-PBX. Is it possible to achieve this? Thanks Diego ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Regular expression matching problem
Hi All, I'm having a really stupid issue with opensips 1.8.1. I need to do different logic if the request line user is a number of 4 digits that can be preceded by any character. So I created this regular expression: ^(.)?\d{4}$ I've tested it on www.regular-expressions.info/javascriptexample.html and works perfect, however on opensips it never matches. I've made the following test script: if($rU =~ '^(.)?\d{4}$') { xlog(MATCHES $rU\n); }else{ xlog(NOT MATCHES $rU\n); } And I always get NOT MATCHES: May 20 11:54:33 localhost /usr/local/sbin/opensips[22628]: NOT MATCHES *5522 May 20 11:54:42 localhost /usr/local/sbin/opensips[22629]: NOT MATCHES 5522 What am I doing wrong? Thanks Diego ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] FW: Opensips 1.6.4 doesn't send an OK response under high load
Hi Binnan, Thanks for all your help. I've made a network trace and the other party is sending the TCP's ACKs with delay, so it's seems opensips is not causing this issue. I will keep you updated if anything else comes out. Thanks Diego On Thu, Oct 11, 2012 at 6:01 PM, Binan AL Halabi binanalhal...@yahoo.comwrote: Hi Diego, I forgot to tell that opening large number of tcp sockets means opening large amount of file descriptors. echo 128000 /proc/sys/fs/inode-max echo 64000 /proc/sys/fs/file-max ulimit -n 64000 // Binan -- *Från:* Diego Barberio diego.barbe...@redmondsoftware.com *Till:* Binan AL Halabi binanalhal...@yahoo.com; OpenSIPS users mailling list users@lists.opensips.org *Skickat:* fredag, 12 oktober 2012 1:38 *Ämne:* Re: [OpenSIPS-Users] FW: Opensips 1.6.4 doesn't send an OK response under high load Hi Binnan, Thanks for all your help. I've applied all you suggestions and nothing changed. I generated a trace of OpenSIPs connections using TCP dump (attached). I noticed that the send queues have a lot of data between 6 pm and 8 pm (when is the period the problem appears). As far as I know this means opensips is calling send funcion but the OS is not actually sending data, am I right? What can be causing this problem? Do you have any other ideas? Again, thanks a lot for your help. Regards Diego On Tue, Oct 9, 2012 at 7:20 PM, Binan AL Halabi binanalhal...@yahoo.comwrote: Do the following to increase TCP performance: 1- Increase the number of available local ports: echo 1024 65000 /proc/sys/net/ipv4/ip_local_port_range 2- Increase the amount of memory associated with socket buffers (socket input and output queues): For input queues: echo 262143 /proc/sys/net/core/rmem_max echo 262143 /proc/sys/net/core/rmem_default And wmem_max , wmem_default for output queues. 3- TCP stack echo 0 /proc/sys/net/ipv4/tcp_sack echo 0 /proc/sys/net/ipv4/tcp_timestamps 4- opensips memory pool is well configured : http://www.opensips.org/Resources/DocsTsMem // Binan -- *Från:* Diego Barberio diego.barbe...@redmondsoftware.com *Till:* OpenSIPS users mailling list users@lists.opensips.org *Skickat:* tisdag, 9 oktober 2012 20:08 *Ämne:* Re: [OpenSIPS-Users] FW: Opensips 1.6.4 doesn't send an OK response under high load Hi Binan, Thank's to Bogdan's patch I was able to run opensips 1.8.1. However, the problem with TCP under highload is still present. Do you have any other ideas? Thanks Diego On Mon, Sep 10, 2012 at 4:59 PM, Diego Barberio diego.barbe...@redmondsoftware.com wrote: Hi Binan, I tried upgrading to 1.8.1 but I'm having some issues I'm duscussin with Bogdan on the following thread: http://lists.opensips.org/pipermail/users/2012-August/022764.html Thanks Diego On Mon, Sep 10, 2012 at 4:47 PM, Binan AL Halabi binanalhal...@yahoo.comwrote: hi Diego, 1- As you dont have state in database so you dont need to check that. 2- Why you dont upgrade to opensips 1.8.1 ? since it contains TCP fix. Regards. //Binan --- On *Mon, 9/10/12, Binan AL Halabi binanalhal...@yahoo.com* wrote: From: Binan AL Halabi binanalhal...@yahoo.com Subject: Re: [OpenSIPS-Users] FW: Opensips 1.6.4 doesn't send an OK response under high load To: OpenSIPS users mailling list users@lists.opensips.org Date: Monday, September 10, 2012, 12:19 PM If you have --- On *Mon, 9/10/12, Diego Barberio diego.barbe...@redmondsoftware.com*wrote: From: Diego Barberio diego.barbe...@redmondsoftware.com Subject: Re: [OpenSIPS-Users] FW: Opensips 1.6.4 doesn't send an OK response under high load To: OpenSIPS users mailling list users@lists.opensips.org Date: Monday, September 10, 2012, 10:51 AM Hi Binan, I understand what do you say with play around TCP connection lifetime however I don't get the part you say check the database. I don't have any database, opensips is working without any DB. Which database are you talking about? Thanks Diego On Mon, Sep 10, 2012 at 1:37 PM, Binan AL Halabi binanalhal...@yahoo.comwrote: Hi Diego, play around TCP connection lifetime, you could find something. one thing more check the database during the busy hour and see if something expired. //Binan --- On *Mon, 9/10/12, Diego Barberio diego.barbe...@redmondsoftware.com*wrote: From: Diego Barberio diego.barbe...@redmondsoftware.com Subject: Re: [OpenSIPS-Users] FW: Opensips 1.6.4 doesn't send an OK response under high load To: OpenSIPS users mailling list users@lists.opensips.org Date: Monday, September 10, 2012, 6:39 AM Hi All, I'm still having this issue. However, I went on with my investigation and I've discovered that this issue only happens with my SIP over TCP connections (I have 10 TCP connections) I've upgraded to version: Server:: OpenSIPS (1.7.2-notls (i386/linux
Re: [OpenSIPS-Users] FW: Opensips 1.6.4 doesn't send an OK response under high load
Hi Binan, Thank's to Bogdan's patch I was able to run opensips 1.8.1. However, the problem with TCP under highload is still present. Do you have any other ideas? Thanks Diego On Mon, Sep 10, 2012 at 4:59 PM, Diego Barberio diego.barbe...@redmondsoftware.com wrote: Hi Binan, I tried upgrading to 1.8.1 but I'm having some issues I'm duscussin with Bogdan on the following thread: http://lists.opensips.org/pipermail/users/2012-August/022764.html Thanks Diego On Mon, Sep 10, 2012 at 4:47 PM, Binan AL Halabi binanalhal...@yahoo.comwrote: hi Diego, 1- As you dont have state in database so you dont need to check that. 2- Why you dont upgrade to opensips 1.8.1 ? since it contains TCP fix. Regards. //Binan --- On *Mon, 9/10/12, Binan AL Halabi binanalhal...@yahoo.com* wrote: From: Binan AL Halabi binanalhal...@yahoo.com Subject: Re: [OpenSIPS-Users] FW: Opensips 1.6.4 doesn't send an OK response under high load To: OpenSIPS users mailling list users@lists.opensips.org Date: Monday, September 10, 2012, 12:19 PM If you have --- On *Mon, 9/10/12, Diego Barberio diego.barbe...@redmondsoftware.com * wrote: From: Diego Barberio diego.barbe...@redmondsoftware.com Subject: Re: [OpenSIPS-Users] FW: Opensips 1.6.4 doesn't send an OK response under high load To: OpenSIPS users mailling list users@lists.opensips.org Date: Monday, September 10, 2012, 10:51 AM Hi Binan, I understand what do you say with play around TCP connection lifetime however I don't get the part you say check the database. I don't have any database, opensips is working without any DB. Which database are you talking about? Thanks Diego On Mon, Sep 10, 2012 at 1:37 PM, Binan AL Halabi binanalhal...@yahoo.com wrote: Hi Diego, play around TCP connection lifetime, you could find something. one thing more check the database during the busy hour and see if something expired. //Binan --- On *Mon, 9/10/12, Diego Barberio diego.barbe...@redmondsoftware.com * wrote: From: Diego Barberio diego.barbe...@redmondsoftware.com Subject: Re: [OpenSIPS-Users] FW: Opensips 1.6.4 doesn't send an OK response under high load To: OpenSIPS users mailling list users@lists.opensips.org Date: Monday, September 10, 2012, 6:39 AM Hi All, I'm still having this issue. However, I went on with my investigation and I've discovered that this issue only happens with my SIP over TCP connections (I have 10 TCP connections) I've upgraded to version: Server:: OpenSIPS (1.7.2-notls (i386/linux)) And the issue is still there. Do you have any other ideas? (Disabling TCP is not an option) Thanks Diego From: users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org] On Behalf Of Ali Pey Sent: viernes, 10 de agosto de 2012 01:30 p.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Opensips 1.6.4 doesn't send an OK response under high load I can't think of anything else. Dear opensips team, Hope you had a good flight-terminator :) Can you take a look at this please? Thanks, Ali Pey On Fri, Aug 10, 2012 at 12:05 PM, Diego Barberio diego.barbe...@redmondsoftware.comhttp://mc/compose?to=diego.barbe...@redmondsoftware.com wrote: Hi Ali, Thanks again for rour feedbak. Unfortunately that's not the case. I'm attaching an example with the same Via that works perfectly. Also, opensips works perfectly all day and only stops sending some OKs during peak hour. Do you have any other idea? Thanks Diego From: users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org] On Behalf Of Ali Pey Sent: viernes, 10 de agosto de 2012 11:00 a.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Opensips 1.6.4 doesn't send an OK response under high load Hi Diego, I looked at your pcap file and I see that your second via has this: BC01.MBCSCR4.MSS.IMS.TIGO.COM.GT Is this a valid address? Maybe opensips can not resolve it so it ignores the via. Have you tried adding it to /etc/hosts. Compare a good 200OK with one of these and see if there is any difference. Regards, Ali Pey On Fri, Aug 10, 2012 at 9:20 AM, Diego Barberio diego.barbe...@redmondsoftware.comhttp://mc/compose?to=diego.barbe...@redmondsoftware.com wrote: Hi Ali, I removed set the debug flag to 0 and added the - before the file path, and I sill have the same issue. Is there any other thing I can try? Thanks Diego From: users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org] On Behalf Of Ali Pey Sent: jueves, 09 de agosto de 2012 03:30 p.m. To: OpenSIPS
Re: [OpenSIPS-Users] Migrating dispatcher module from 1.6.4 to 1.8.1
Hi Bogdan, Its working on my lab now. I will try in production and let you know. Thanks a lot for your support. Diego On Tue, Sep 11, 2012 at 5:21 AM, Bogdan-Andrei Iancu bog...@opensips.orgwrote: ** Thanks Diego, Please try the attached patch - let me know if (a) the error goes away and (b) dispatching work fine. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developerhttp://www.opensips-solutions.com On 09/11/2012 01:17 AM, Diego Barberio wrote: Hi Bogdan, Sorry for my delay. I'm attaching the log you requested Thanks a lot Diego On Thu, Sep 6, 2012 at 3:56 AM, Bogdan-Andrei Iancu bog...@opensips.orgwrote: Hi Diego, Try to run opensips in full debug (debug=6) and post somewhere the output (during startup and during the call attempt). Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developerhttp://www.opensips-solutions.com On 09/03/2012 07:41 PM, Diego Barberio wrote: Hi Bogdan, No, I don't see any errors like that. Below is the result of cat /var/log/messages after starting opensips and placing one call: Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: NOTICE:core:main: version: opensips 1.8.1-notls (i386/linux) Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:core:main: using 32 Mb shared memory Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:core:main: using 2 Mb private memory per process Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:maxfwd:mod_init: initializing... Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:sl:mod_init: Initializing StateLess engine Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:tm:mod_init: TM - initializing... Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: NOTICE:signaling:mod_init: initializing module ... Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:options:mod_init: initializing... Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:sipmsgops:mod_init: initializing... Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:core:probe_max_sock_buff: using rcv buffer of 512 kb Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:core:probe_max_sock_buff: using snd buffer of 255 kb Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:core:init_sock_keepalive: -- TCP keepalive enabled on socket Sep 3 09:57:58 BARNEY opensips: INFO:core:daemonize: pre-daemon process exiting with 0 Sep 3 10:04:38 BARNEY /usr/local/sbin/opensips[11505]: INFO:core:probe_max_sock_buff: using snd buffer of 255 kb Sep 3 10:04:38 BARNEY /usr/local/sbin/opensips[11505]: INFO:core:init_sock_keepalive: -- TCP keepalive enabled on socket Sep 3 10:04:38 BARNEY /usr/local/sbin/opensips[11501]: ERROR:core:new_avp: invalid AVP name! Sep 3 10:04:38 BARNEY /usr/local/sbin/opensips[11501]: ERROR:core:add_avp: Failed to create new avp structure Thanks Diego On Mon, Sep 3, 2012 at 11:23 AM, Bogdan-Andrei Iancu bog...@opensips.org wrote: Diego, what about : do you see any error actually reported by the dispatcher module (should look like ERROR:dispatcher:..) . Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developerhttp://www.opensips-solutions.com On 09/03/2012 05:07 PM, Diego Barberio wrote: Hi Bogdan, Thanks for your response. The errrors only pop up when doing ds_select_dst() I'm able to reproduce this problem in my lab with only one destination and using mysql as database. I left the socket field in (null) and attrs is an empty string It seems the startup is ok: Sep 3 09:57:58 BARNEY opensips: WARNING:core:fix_socket_list: could not rev. resolve 192.168.2.154 Sep 3 09:57:58 BARNEY opensips: WARNING:core:fix_socket_list: could not rev. resolve 192.168.2.154 Sep 3 09:57:58 BARNEY opensips: INFO:core:init_tcp: using epoll_lt as the TCP io watch method (auto detected) Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: NOTICE:core:main: version: opensips 1.8.1-notls (i386/linux) Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:core:main: using 32 Mb shared memory Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:core:main: using 2 Mb private memory per process Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:maxfwd:mod_init: initializing... Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:sl:mod_init: Initializing StateLess engine Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:tm:mod_init: TM - initializing... Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: NOTICE:signaling:mod_init: initializing module ... Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:options:mod_init: initializing... Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:sipmsgops:mod_init: initializing... Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:core:probe_max_sock_buff: using rcv buffer of 512 kb Sep 3 09:57:58 BARNEY /usr/local/sbin
Re: [OpenSIPS-Users] FW: Opensips 1.6.4 doesn't send an OK response under high load
Hi Binan, I understand what do you say with play around TCP connection lifetime however I don't get the part you say check the database. I don't have any database, opensips is working without any DB. Which database are you talking about? Thanks Diego On Mon, Sep 10, 2012 at 1:37 PM, Binan AL Halabi binanalhal...@yahoo.comwrote: Hi Diego, play around TCP connection lifetime, you could find something. one thing more check the database during the busy hour and see if something expired. //Binan --- On *Mon, 9/10/12, Diego Barberio diego.barbe...@redmondsoftware.com*wrote: From: Diego Barberio diego.barbe...@redmondsoftware.com Subject: Re: [OpenSIPS-Users] FW: Opensips 1.6.4 doesn't send an OK response under high load To: OpenSIPS users mailling list users@lists.opensips.org Date: Monday, September 10, 2012, 6:39 AM Hi All, I'm still having this issue. However, I went on with my investigation and I've discovered that this issue only happens with my SIP over TCP connections (I have 10 TCP connections) I've upgraded to version: Server:: OpenSIPS (1.7.2-notls (i386/linux)) And the issue is still there. Do you have any other ideas? (Disabling TCP is not an option) Thanks Diego From: users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org] On Behalf Of Ali Pey Sent: viernes, 10 de agosto de 2012 01:30 p.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Opensips 1.6.4 doesn't send an OK response under high load I can't think of anything else. Dear opensips team, Hope you had a good flight-terminator :) Can you take a look at this please? Thanks, Ali Pey On Fri, Aug 10, 2012 at 12:05 PM, Diego Barberio diego.barbe...@redmondsoftware.comhttp://mc/compose?to=diego.barbe...@redmondsoftware.com wrote: Hi Ali, Thanks again for rour feedbak. Unfortunately that's not the case. I'm attaching an example with the same Via that works perfectly. Also, opensips works perfectly all day and only stops sending some OKs during peak hour. Do you have any other idea? Thanks Diego From: users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org] On Behalf Of Ali Pey Sent: viernes, 10 de agosto de 2012 11:00 a.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Opensips 1.6.4 doesn't send an OK response under high load Hi Diego, I looked at your pcap file and I see that your second via has this: BC01.MBCSCR4.MSS.IMS.TIGO.COM.GT Is this a valid address? Maybe opensips can not resolve it so it ignores the via. Have you tried adding it to /etc/hosts. Compare a good 200OK with one of these and see if there is any difference. Regards, Ali Pey On Fri, Aug 10, 2012 at 9:20 AM, Diego Barberio diego.barbe...@redmondsoftware.comhttp://mc/compose?to=diego.barbe...@redmondsoftware.com wrote: Hi Ali, I removed set the debug flag to 0 and added the - before the file path, and I sill have the same issue. Is there any other thing I can try? Thanks Diego From: users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org] On Behalf Of Ali Pey Sent: jueves, 09 de agosto de 2012 03:30 p.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Opensips 1.6.4 doesn't send an OK response under high load Hi Diego, Have you tried disabling the logging? That's usually the problem. Syslog slows down opensips. Also in /etc/syslog.conf as '-' before the file path to make it asynchronous. Regards, Ali Pey On Thu, Aug 9, 2012 at 2:19 PM, Diego Barberio diego.barbe...@redmondsoftware.comhttp://mc/compose?to=diego.barbe...@redmondsoftware.com wrote: Hello, I'm using opensips to forward incoming INVITEs to a set of 8 applications. I'm using dispatcher module to achieve this. During peak hour, opensips receives about 350 INVITEs per second, during this period about 30 OK responses per second my application sends correctly aren't forwarded by opensips. I've recompiled opensips so it can use more memory by modifing the config.h file: #define PKG_MEM_POOL_SIZE 10*1024*1024 /*! Used only if PKG_MALLOC is defined*/ #define SHM_MEM_SIZE 320/*! Used if SH_MEM is defined*/ The incoming INVITEs come from UDP and TCP. For each of the OK responses that aren't forwarded this entry appears in the messages file: usr/local/sbin/opensips[24554]: ERROR:core:forward_reply: no 2nd via found in reply According to my research on the web this message means that the OK only has one Via header, however this is not the case
Re: [OpenSIPS-Users] FW: Opensips 1.6.4 doesn't send an OK response under high load
Hi Binan, I tried upgrading to 1.8.1 but I'm having some issues I'm duscussin with Bogdan on the following thread: http://lists.opensips.org/pipermail/users/2012-August/022764.html Thanks Diego On Mon, Sep 10, 2012 at 4:47 PM, Binan AL Halabi binanalhal...@yahoo.comwrote: hi Diego, 1- As you dont have state in database so you dont need to check that. 2- Why you dont upgrade to opensips 1.8.1 ? since it contains TCP fix. Regards. //Binan --- On *Mon, 9/10/12, Binan AL Halabi binanalhal...@yahoo.com* wrote: From: Binan AL Halabi binanalhal...@yahoo.com Subject: Re: [OpenSIPS-Users] FW: Opensips 1.6.4 doesn't send an OK response under high load To: OpenSIPS users mailling list users@lists.opensips.org Date: Monday, September 10, 2012, 12:19 PM If you have --- On *Mon, 9/10/12, Diego Barberio diego.barbe...@redmondsoftware.com*wrote: From: Diego Barberio diego.barbe...@redmondsoftware.com Subject: Re: [OpenSIPS-Users] FW: Opensips 1.6.4 doesn't send an OK response under high load To: OpenSIPS users mailling list users@lists.opensips.org Date: Monday, September 10, 2012, 10:51 AM Hi Binan, I understand what do you say with play around TCP connection lifetime however I don't get the part you say check the database. I don't have any database, opensips is working without any DB. Which database are you talking about? Thanks Diego On Mon, Sep 10, 2012 at 1:37 PM, Binan AL Halabi binanalhal...@yahoo.comwrote: Hi Diego, play around TCP connection lifetime, you could find something. one thing more check the database during the busy hour and see if something expired. //Binan --- On *Mon, 9/10/12, Diego Barberio diego.barbe...@redmondsoftware.com*wrote: From: Diego Barberio diego.barbe...@redmondsoftware.com Subject: Re: [OpenSIPS-Users] FW: Opensips 1.6.4 doesn't send an OK response under high load To: OpenSIPS users mailling list users@lists.opensips.org Date: Monday, September 10, 2012, 6:39 AM Hi All, I'm still having this issue. However, I went on with my investigation and I've discovered that this issue only happens with my SIP over TCP connections (I have 10 TCP connections) I've upgraded to version: Server:: OpenSIPS (1.7.2-notls (i386/linux)) And the issue is still there. Do you have any other ideas? (Disabling TCP is not an option) Thanks Diego From: users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org] On Behalf Of Ali Pey Sent: viernes, 10 de agosto de 2012 01:30 p.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Opensips 1.6.4 doesn't send an OK response under high load I can't think of anything else. Dear opensips team, Hope you had a good flight-terminator :) Can you take a look at this please? Thanks, Ali Pey On Fri, Aug 10, 2012 at 12:05 PM, Diego Barberio diego.barbe...@redmondsoftware.comhttp://mc/compose?to=diego.barbe...@redmondsoftware.com wrote: Hi Ali, Thanks again for rour feedbak. Unfortunately that's not the case. I'm attaching an example with the same Via that works perfectly. Also, opensips works perfectly all day and only stops sending some OKs during peak hour. Do you have any other idea? Thanks Diego From: users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org] On Behalf Of Ali Pey Sent: viernes, 10 de agosto de 2012 11:00 a.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Opensips 1.6.4 doesn't send an OK response under high load Hi Diego, I looked at your pcap file and I see that your second via has this: BC01.MBCSCR4.MSS.IMS.TIGO.COM.GT Is this a valid address? Maybe opensips can not resolve it so it ignores the via. Have you tried adding it to /etc/hosts. Compare a good 200OK with one of these and see if there is any difference. Regards, Ali Pey On Fri, Aug 10, 2012 at 9:20 AM, Diego Barberio diego.barbe...@redmondsoftware.comhttp://mc/compose?to=diego.barbe...@redmondsoftware.com wrote: Hi Ali, I removed set the debug flag to 0 and added the - before the file path, and I sill have the same issue. Is there any other thing I can try? Thanks Diego From: users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.orghttp://mc/compose?to=users-boun...@lists.opensips.org] On Behalf Of Ali Pey Sent: jueves, 09 de agosto de 2012 03:30 p.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Opensips 1.6.4 doesn't send an OK response under high load Hi Diego, Have you tried disabling the logging? That's usually the problem. Syslog slows down opensips. Also in /etc/syslog.conf as '-' before the file path
Re: [OpenSIPS-Users] Migrating dispatcher module from 1.6.4 to 1.8.1
Hi Bogdan, Thanks for your response. The errrors only pop up when doing ds_select_dst() I'm able to reproduce this problem in my lab with only one destination and using mysql as database. I left the socket field in (null) and attrs is an empty string It seems the startup is ok: Sep 3 09:57:58 BARNEY opensips: WARNING:core:fix_socket_list: could not rev. resolve 192.168.2.154 Sep 3 09:57:58 BARNEY opensips: WARNING:core:fix_socket_list: could not rev. resolve 192.168.2.154 Sep 3 09:57:58 BARNEY opensips: INFO:core:init_tcp: using epoll_lt as the TCP io watch method (auto detected) Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: NOTICE:core:main: version: opensips 1.8.1-notls (i386/linux) Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:core:main: using 32 Mb shared memory Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:core:main: using 2 Mb private memory per process Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:maxfwd:mod_init: initializing... Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:sl:mod_init: Initializing StateLess engine Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:tm:mod_init: TM - initializing... Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: NOTICE:signaling:mod_init: initializing module ... Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:options:mod_init: initializing... Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:sipmsgops:mod_init: initializing... Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:core:probe_max_sock_buff: using rcv buffer of 512 kb Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:core:probe_max_sock_buff: using snd buffer of 255 kb Sep 3 09:57:58 BARNEY /usr/local/sbin/opensips[11491]: INFO:core:init_sock_keepalive: -- TCP keepalive enabled on socket Sep 3 09:57:58 BARNEY opensips: INFO:core:daemonize: pre-daemon process exiting with 0 Also the destinations list seems to be ok: [root@BARNEY opensips]# opensipsctl fifo ds_list SET_NO:: 1 SET:: 1 URI:: sip:192.168.2.154:5063 flag=A Best Regards Diego On Mon, Sep 3, 2012 at 6:47 AM, Bogdan-Andrei Iancu bog...@opensips.orgwrote: ** Hi Diego, So, the opensips startup is ok (with no errors or so) ? Are the destinations loaded correctly (check with opensipsctl via fifo) The errors you mentioned pop up only when doing ds_select_dst() - do you see any error actually reported by the dispatcher module (should look like ERROR:dispatcher:..) . Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developerhttp://www.opensips-solutions.com On 08/31/2012 09:02 AM, Diego Barberio wrote: Hello all, I'm trying to migrate from opensips 1.7.2 to 1.8.1. I only use opensips to redirect incomming INVITEs to 3 sets of media servers using dispatcher module. This is my current dispatcher file: 1 sip:10.180.12.5:5060 1 sip:10.180.12.13:5060 1 sip:10.180.12.14:5060 1 sip:10.180.12.15:5060 1 sip:10.180.12.16:5060 1 sip:10.180.12.17:5060 1 sip:10.180.12.18:5060 1 sip:10.180.12.19:5060 2 sip:10.180.12.21:5060 3 sip:10.180.12.21:5061 I still want to use a file for the destinations so I've created the dbtext and completed the dispatcher table like this: id(int,auto) setid(int) destination(string) socket(string,null) flags(int) weight(int) attrs(string) description(string) 1:1:sip\:10.180.12.5\:5060::0:1:'':'' 2:1:sip\:10.180.12.13\:5060::0:1:'':'' 3:1:sip\:10.180.12.14\:5060::0:1:'':'' 4:1:sip\:10.180.12.15\:5060::0:1:'':'' 5:1:sip\:10.180.12.16\:5060::0:1:'':'' 6:1:sip\:10.180.12.17\:5060::0:1:'':'' 7:1:sip\:10.180.12.18\:5060::0:1:'':'' 8:1:sip\:10.180.12.19\:5060::0:1:'':'' 9:2:sip\:10.180.12.21\:5060::0:1:'':'' 10:3:sip\:10.180.12.21\:5061::0:1:'':'' However, opensips is returning error when calling to ds_select_dst and I see the following repeating errors in messages file: Aug 30 23:43:15 GT-RBT-SIP-1 /usr/local/sbin/opensips[27008]: ERROR:core:new_avp: invalid AVP name! Aug 30 23:43:15 GT-RBT-SIP-1 /usr/local/sbin/opensips[27006]: ERROR:core:add_avp: Failed to create new avp structure Aug 30 23:43:15 GT-RBT-SIP-1 /usr/local/sbin/opensips[27007]: ERROR:core:add_avp: Failed to create new avp structure Aug 30 23:43:15 GT-RBT-SIP-1 /usr/local/sbin/opensips[27009]: ERROR:core:new_avp: invalid AVP name! This is the part of my configuration script where I set up the dispatcher module: # - setting module-specific parameters --- modparam(db_text, db_mode, 0) modparam(mi_fifo, fifo_name, /tmp/opensips_fifo) modparam(tm, T1_timer, 200) # -- dispatcher params -- modparam(dispatcher, db_url, text:///usr/local/etc/opensips/dbtext) modparam(dispatcher, ds_ping_from, sip:proxy@10.180.12.4) modparam(dispatcher, ds_ping_interval, 10) modparam(dispatcher, ds_probing_mode, 1) modparam(dispatcher, ds_probing_threshhold, 2) Please, could you let me know what am I doing wrong? Thanks Diego
[OpenSIPS-Users] Migrating dispatcher module from 1.6.4 to 1.8.1
Hello all, I'm trying to migrate from opensips 1.7.2 to 1.8.1. I only use opensips to redirect incomming INVITEs to 3 sets of media servers using dispatcher module. This is my current dispatcher file: 1 sip:10.180.12.5:5060 1 sip:10.180.12.13:5060 1 sip:10.180.12.14:5060 1 sip:10.180.12.15:5060 1 sip:10.180.12.16:5060 1 sip:10.180.12.17:5060 1 sip:10.180.12.18:5060 1 sip:10.180.12.19:5060 2 sip:10.180.12.21:5060 3 sip:10.180.12.21:5061 I still want to use a file for the destinations so I've created the dbtext and completed the dispatcher table like this: id(int,auto) setid(int) destination(string) socket(string,null) flags(int) weight(int) attrs(string) description(string) 1:1:sip\:10.180.12.5\:5060::0:1:'':'' 2:1:sip\:10.180.12.13\:5060::0:1:'':'' 3:1:sip\:10.180.12.14\:5060::0:1:'':'' 4:1:sip\:10.180.12.15\:5060::0:1:'':'' 5:1:sip\:10.180.12.16\:5060::0:1:'':'' 6:1:sip\:10.180.12.17\:5060::0:1:'':'' 7:1:sip\:10.180.12.18\:5060::0:1:'':'' 8:1:sip\:10.180.12.19\:5060::0:1:'':'' 9:2:sip\:10.180.12.21\:5060::0:1:'':'' 10:3:sip\:10.180.12.21\:5061::0:1:'':'' However, opensips is returning error when calling to ds_select_dst and I see the following repeating errors in messages file: Aug 30 23:43:15 GT-RBT-SIP-1 /usr/local/sbin/opensips[27008]: ERROR:core:new_avp: invalid AVP name! Aug 30 23:43:15 GT-RBT-SIP-1 /usr/local/sbin/opensips[27006]: ERROR:core:add_avp: Failed to create new avp structure Aug 30 23:43:15 GT-RBT-SIP-1 /usr/local/sbin/opensips[27007]: ERROR:core:add_avp: Failed to create new avp structure Aug 30 23:43:15 GT-RBT-SIP-1 /usr/local/sbin/opensips[27009]: ERROR:core:new_avp: invalid AVP name! This is the part of my configuration script where I set up the dispatcher module: # - setting module-specific parameters --- modparam(db_text, db_mode, 0) modparam(mi_fifo, fifo_name, /tmp/opensips_fifo) modparam(tm, T1_timer, 200) # -- dispatcher params -- modparam(dispatcher, db_url, text:///usr/local/etc/opensips/dbtext) modparam(dispatcher, ds_ping_from, sip:proxy@10.180.12.4) modparam(dispatcher, ds_ping_interval, 10) modparam(dispatcher, ds_probing_mode, 1) modparam(dispatcher, ds_probing_threshhold, 2) Please, could you let me know what am I doing wrong? Thanks Diego ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips 1.6.4 doesn't send an OK response under high load
Hi Ali, I removed set the debug flag to 0 and added the - before the file path, and I sill have the same issue. Is there any other thing I can try? Thanks Diego From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Ali Pey Sent: jueves, 09 de agosto de 2012 03:30 p.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Opensips 1.6.4 doesn't send an OK response under high load Hi Diego, Have you tried disabling the logging? That's usually the problem. Syslog slows down opensips. Also in /etc/syslog.conf as '-' before the file path to make it asynchronous. Regards, Ali Pey On Thu, Aug 9, 2012 at 2:19 PM, Diego Barberio diego.barbe...@redmondsoftware.com wrote: Hello, I'm using opensips to forward incoming INVITEs to a set of 8 applications. I'm using dispatcher module to achieve this. During peak hour, opensips receives about 350 INVITEs per second, during this period about 30 OK responses per second my application sends correctly aren't forwarded by opensips. I've recompiled opensips so it can use more memory by modifing the config.h file: #define PKG_MEM_POOL_SIZE 10*1024*1024 /*! Used only if PKG_MALLOC is defined*/ #define SHM_MEM_SIZE 320/*! Used if SH_MEM is defined*/ The incoming INVITEs come from UDP and TCP. For each of the OK responses that aren't forwarded this entry appears in the messages file: usr/local/sbin/opensips[24554]: ERROR:core:forward_reply: no 2nd via found in reply According to my research on the web this message means that the OK only has one Via header, however this is not the case and the capture attached (made on server which runs opensips) shows it. I've also tried to increase the log level, but it made opensips to work slow even in low traffic hours. I run some test in my lab and opensips worked perfectly even under more than 350 INVITES per second, this problem only occurs in production I really don't know what else to do. Could you help me to fix this issue or at least move on with the investigation? Thanks Diego ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips 1.6.4 doesn't send an OK response under high load
Hi Ali, Thanks again for rour feedbak. Unfortunately that's not the case. I'm attaching an example with the same Via that works perfectly. Also, opensips works perfectly all day and only stops sending some OKs during peak hour. Do you have any other idea? Thanks Diego From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Ali Pey Sent: viernes, 10 de agosto de 2012 11:00 a.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Opensips 1.6.4 doesn't send an OK response under high load Hi Diego, I looked at your pcap file and I see that your second via has this: BC01.MBCSCR4.MSS.IMS.TIGO.COM.GT Is this a valid address? Maybe opensips can not resolve it so it ignores the via. Have you tried adding it to /etc/hosts. Compare a good 200OK with one of these and see if there is any difference. Regards, Ali Pey On Fri, Aug 10, 2012 at 9:20 AM, Diego Barberio diego.barbe...@redmondsoftware.com wrote: Hi Ali, I removed set the debug flag to 0 and added the - before the file path, and I sill have the same issue. Is there any other thing I can try? Thanks Diego From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Ali Pey Sent: jueves, 09 de agosto de 2012 03:30 p.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Opensips 1.6.4 doesn't send an OK response under high load Hi Diego, Have you tried disabling the logging? That's usually the problem. Syslog slows down opensips. Also in /etc/syslog.conf as '-' before the file path to make it asynchronous. Regards, Ali Pey On Thu, Aug 9, 2012 at 2:19 PM, Diego Barberio diego.barbe...@redmondsoftware.com wrote: Hello, I'm using opensips to forward incoming INVITEs to a set of 8 applications. I'm using dispatcher module to achieve this. During peak hour, opensips receives about 350 INVITEs per second, during this period about 30 OK responses per second my application sends correctly aren't forwarded by opensips. I've recompiled opensips so it can use more memory by modifing the config.h file: #define PKG_MEM_POOL_SIZE 10*1024*1024 /*! Used only if PKG_MALLOC is defined*/ #define SHM_MEM_SIZE 320/*! Used if SH_MEM is defined*/ The incoming INVITEs come from UDP and TCP. For each of the OK responses that aren't forwarded this entry appears in the messages file: usr/local/sbin/opensips[24554]: ERROR:core:forward_reply: no 2nd via found in reply According to my research on the web this message means that the OK only has one Via header, however this is not the case and the capture attached (made on server which runs opensips) shows it. I've also tried to increase the log level, but it made opensips to work slow even in low traffic hours. I run some test in my lab and opensips worked perfectly even under more than 350 INVITES per second, this problem only occurs in production I really don't know what else to do. Could you help me to fix this issue or at least move on with the investigation? Thanks Diego ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users okSent.pcap Description: Binary data ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Opensips 1.6.4 doesn't send an OK response under high load
Hello, I'm using opensips to forward incoming INVITEs to a set of 8 applications. I'm using dispatcher module to achieve this. During peak hour, opensips receives about 350 INVITEs per second, during this period about 30 OK responses per second my application sends correctly aren't forwarded by opensips. I've recompiled opensips so it can use more memory by modifing the config.h file: #define PKG_MEM_POOL_SIZE 10*1024*1024 /*! Used only if PKG_MALLOC is defined*/ #define SHM_MEM_SIZE 320/*! Used if SH_MEM is defined*/ The incoming INVITEs come from UDP and TCP. For each of the OK responses that aren't forwarded this entry appears in the messages file: usr/local/sbin/opensips[24554]: ERROR:core:forward_reply: no 2nd via found in reply According to my research on the web this message means that the OK only has one Via header, however this is not the case and the capture attached (made on server which runs opensips) shows it. I've also tried to increase the log level, but it made opensips to work slow even in low traffic hours. I run some test in my lab and opensips worked perfectly even under more than 350 INVITES per second, this problem only occurs in production I really don't know what else to do. Could you help me to fix this issue or at least move on with the investigation? Thanks Diego okNotSent.pcap Description: Binary data opensips.cfg Description: Binary data ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips 1.6.4 doesn't send an OK response under high load
Hi Aly, Thanks for your quick response. I will try both suggestions and let you know the result. Thanks Diego From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Ali Pey Sent: jueves, 09 de agosto de 2012 03:30 p.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Opensips 1.6.4 doesn't send an OK response under high load Hi Diego, Have you tried disabling the logging? That's usually the problem. Syslog slows down opensips. Also in /etc/syslog.conf as '-' before the file path to make it asynchronous. Regards, Ali Pey On Thu, Aug 9, 2012 at 2:19 PM, Diego Barberio diego.barbe...@redmondsoftware.com wrote: Hello, I'm using opensips to forward incoming INVITEs to a set of 8 applications. I'm using dispatcher module to achieve this. During peak hour, opensips receives about 350 INVITEs per second, during this period about 30 OK responses per second my application sends correctly aren't forwarded by opensips. I've recompiled opensips so it can use more memory by modifing the config.h file: #define PKG_MEM_POOL_SIZE 10*1024*1024 /*! Used only if PKG_MALLOC is defined*/ #define SHM_MEM_SIZE 320/*! Used if SH_MEM is defined*/ The incoming INVITEs come from UDP and TCP. For each of the OK responses that aren't forwarded this entry appears in the messages file: usr/local/sbin/opensips[24554]: ERROR:core:forward_reply: no 2nd via found in reply According to my research on the web this message means that the OK only has one Via header, however this is not the case and the capture attached (made on server which runs opensips) shows it. I've also tried to increase the log level, but it made opensips to work slow even in low traffic hours. I run some test in my lab and opensips worked perfectly even under more than 350 INVITES per second, this problem only occurs in production I really don't know what else to do. Could you help me to fix this issue or at least move on with the investigation? Thanks Diego ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] OK not being redirected: 'no 2nd via found in reply'
We use OpenSIPs 1.6.2 to forward incomming invites to a set of 8 media servers, we use distpatcher modules to achive this. We are having an issue where the opensips proxy is not redirecting sip OK messages under high load. When this happens we see the following error in syslog: Jul 24 20:04:52 GT-RBT-SIP-1 /usr/local/sbin/opensips[24554]: ERROR:core:forward_reply: no 2nd via found in reply I am sending you, attached to this email, a network capture of the moment in which this problem occurs. Thanks in advance for any help you can provide ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] ON not being redirected: 'no 2nd via found in reply'
We use OpenSIPs 1.6.2 to forward incomming invites to a set of 8 media servers, we use distpatcher modules to achive this. We are having an issue where the opensips proxy is not redirecting sip OK messages under high load. When this happens we see the following error in syslog: Jul 24 20:04:52 GT-RBT-SIP-1 /usr/local/sbin/opensips[24554]: ERROR:core:forward_reply: no 2nd via found in reply I am sending you, attached to this email, a network capture of the moment in which this problem occurs. Thanks in advance for any help you can provide okNotSent.pcap Description: Binary data ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Dispatcher module with multiple groups
Hi JPS, I'm kind of newbie to opensips, so I don't know all the modules I will investigate dialplan module. Thanks for your suggestion Diego From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Jamuel Starkey Sent: jueves, 31 de mayo de 2012 04:17 p.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Dispatcher module with multiple groups Have you tried the dialplan module? We route TN's to various backend media servers based on a regexp match and then use the avp that you get upon a match from dp_translate to identify the media server to route to. Then we can update the dialplan rules and use dp_reload without penalty to activate any changes. modparam(dialplan, attrs_pvar, $avp(dest)) #Initial value for dialplan group $avp(dpid)=0; dp_translate($avp(dpid),$ruri.user/$ruri.user); if ($avp(dest)==NULL) { xlog(L_INFO, $ruri.user not found.); sl_send_reply(404, Not Found); exit; } Then do_something based on $avp(dest) being set based on the match from dp_translate maybe even call your ds_select_dst based on $avp(dest) being one value or another (assuming you set the $avp(dest) to MATCH in your dialplan rules table: if ($avp(dest)==MATCH) { ds_select_dst(2, 4); } else { ds_select_dst(1, 4); } Hope that helps . . . Cheers, JPS On May 31, 2012, at 11:59 AM, Diego Barberio wrote: Hi All, I'm using dispatcher module to forward incoming INVITEs to two destination groups. I have a set of 8 telephone numbers, if the call goes or comes from any of that numbers I have to send the call to a group otherwise to the other. Right now I'm doing this to select the group: if($rU=~ '^*40109615*' || $rU=~ '^*40109541*' || $rU=~ '^*40285849*' || $rU=~ '^*40284592*' || $rU=~ '^*40117817*' || $rU=~ '^*40117830*' || $rU=~ '^*40489340*' || $rU=~ '^*40489455*' || $fU= ~ '^*40109615*' || $fU=~ '^*40109541*' || $fU=~ '^*40285849*' || $fU=~ '^*40284592*' || $fU=~ '^*40117817*' || $fU=~ '^*40117830*' || $fU=~ '^*40489340*' || $fU=~ '^*40489455*' ){ ds_select_dst(2, 4); }else{ ds_select_dst(1, 4); } Is there any better way to do this, I mean something like: if(is_in_file($fU, 'numbers.txt') || is_in_file($rU, 'numbers.txt')) Of course any option will be welcome, however it would be very nice if there's an option which allows me to modify the numbers list without restarting opensips. Thanks a lot Diego ATT1.c ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Dispatcher module with multiple groups
Hi All, I'm using dispatcher module to forward incoming INVITEs to two destination groups. I have a set of 8 telephone numbers, if the call goes or comes from any of that numbers I have to send the call to a group otherwise to the other. Right now I'm doing this to select the group: if($rU=~ '^*40109615*' || $rU=~ '^*40109541*' || $rU=~ '^*40285849*' || $rU=~ '^*40284592*' || $rU=~ '^*40117817*' || $rU=~ '^*40117830*' || $rU=~ '^*40489340*' || $rU=~ '^*40489455*' || $fU= ~ '^*40109615*' || $fU=~ '^*40109541*' || $fU=~ '^*40285849*' || $fU=~ '^*40284592*' || $fU=~ '^*40117817*' || $fU=~ '^*40117830*' || $fU=~ '^*40489340*' || $fU=~ '^*40489455*' ){ ds_select_dst(2, 4); }else{ ds_select_dst(1, 4); } Is there any better way to do this, I mean something like: if(is_in_file($fU, 'numbers.txt') || is_in_file($rU, 'numbers.txt')) Of course any option will be welcome, however it would be very nice if there's an option which allows me to modify the numbers list without restarting opensips. Thanks a lot Diego ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Opensips doens't answer to SIP messages
Hi All, I'm using opensips with distpatcher module to load balance incoming calls . Opensips has been running perfectly for a year. However, two weeks ago it hanged. It didn't answer the OPTIONS messages, and didn't forward any incoming INVITE. I was able to execute fifo commands, the problem was solved when I restarted opensips. Yesterday, the same problem appeared again, but this time I didn't restarted it, after 2 hours the process recovered it's normal behavior without any external intervention. The opensips receives 370 calls per second during peak hour. I'm not sure what can be causing this problem, please could you give me some advice.? Opensips Version: version: opensips 1.6.4-notls (i386/linux) flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. svnrevision: unknown @(#) $Id: main.c 7530 2010-12-13 19:07:53Z bogdan_iancu $ main.c compiled on 03:34:47 Feb 23 2011 with gcc 4.1.2 Linux Version: Red Hat Enterprise Linux Server release 5.4 (Tikanga) Kernel \r on an \m Kernel Version: 2.6.18-164.el5PAE I'm attaching my opensips configuration file and my distpatcher.list file Thanks Diego dispatcher.list Description: Binary data opensips.cfg Description: Binary data ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Problem with siptrace module
Hi Duane, Dani, I've tried adding the call to create_dialog() and still no messages I've also added a call to sip_trace() at the beginning of route, and nothing. This is my script now: ##Global Parameters # debug=3 #log_facility=LOG_LOCAL6 fork=yes children=4 /* uncomment the following lines to enable debugging */ #debug=6 #fork=no #log_stderror=yes /* uncomment the next line to disable TCP (default on) */ disable_tcp=yes port=5060 /* uncomment and configure the following line if you want opensips to bind on a specific interface/port/proto (default bind on all available) */ listen=udp:192.168.2.154:5060 # -- module loading -- mpath=/usr/local/lib/opensips/modules/ loadmodule maxfwd.so loadmodule sl.so loadmodule tm.so loadmodule dispatcher.so loadmodule mi_fifo.so loadmodule signaling.so loadmodule options.so loadmodule textops.so loadmodule db_mysql.so loadmodule siptrace.so loadmodule dialog.so loadmodule rr.so # - setting module-specific parameters --- # -- dispatcher params -- modparam(mi_fifo, fifo_name, /tmp/opensips_fifo) modparam(dispatcher, ds_ping_from, sip:proxy@192.1.8.2.154) modparam(dispatcher, ds_ping_interval, 30) modparam(dispatcher, ds_probing_threshhold, 2) modparam(dispatcher, ds_probing_mode, 1) modparam(dispatcher, list_file, /usr/local/etc/opensips/dispatcher.list) # modparam(dispatcher, force_dst, 1) modparam(siptrace, db_url, mysql://root:Viamonte1621@localhost/opensips) #modparam(siptrace, enable_ack_trace, 1) modparam(siptrace, trace_on, 1) modparam(siptrace, table, sip_trace) #modparam(siptrace, trace_flag, 22) #modparam(acc, log_level, 1) #modparam(acc, log_flag, 1) #modparam(acc, db_url, mysql://root:Viamonte1621@localhost/opensips) route{ sip_trace(); if ( !mf_process_maxfwd_header(10) ) { sl_send_reply(483,To Many Hops); drop(); }; if (is_method(OPTIONS)) { options_reply(); exit; } if(is_method(INVITE)){ create_dialog(); trace_dialog(); } ds_select_dst(1, 0); if ($retcode0) { xlog([Redmond] Service full\n); sl_send_reply(500,Service full); exit; } forward(); } failure_route[1] { if (t_check_status((408)|(5[0-9][0-9]))) { ds_mark_dst(); if (ds_select_dst(1, 0)) { forward(); } else { t_reply(503, Service Unavailable); } } } Any other ideas? Thanks Diego From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of duane.lar...@gmail.com Sent: martes, 12 de julio de 2011 06:35 p.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Problem with siptrace module Diego, So I think your wanting to do Stateless routing. I just saw this posting of Known Issues under version 1.7. Not sure if it applies to your version also http://www.opensips.org/html/docs/modules/1.7.x/siptrace.html#id250363 I see you are using sip_trace() in your script. I have personally never messed with stateless and siptrace. Might need someone else to weigh in on this. On Jul 12, 2011 1:09pm, Diego Barberio diego.barbe...@redmondsoftware.com wrote: Hi All, I'm having a minnor configuration problem with the siptrace.I'm trying to trace all the messages and their responses, but I'm only able to log the methods (INVITE, ACK and BYE) but not the responses.This is my configuration script. ##Global Parameters # debug=3#log_facility=LOG_LOCAL6 fork=yeschildren=4 /* uncomment the following lines to enable debugging */#debug=6#fork=no#log_stderror=yes /* uncomment the next line to disable TCP (default on) */disable_tcp=yes port=5060 /* uncomment and configure the following line if you want opensips to bind on a specific interface/port/proto (default bind on all available) */listen=udp:192.168.2.154:5060 # -- module loading --mpath=/usr/local/lib/opensips/modules/lo admodule maxfwd.soloadmodule sl.soloadmodule tm.soloadmodule dispatcher.soloadmodule mi_fifo.soloadmodule signaling.soloadmodule options.soloadmodule textops.soloadmodule db_mysql.soloadmodule siptrace.so#loadmodule acc.so# - setting module-specific parameters ---# -- dispatcher params --modparam(mi_fifo, fifo_name, /tmp/opensips_fifo) modparam(dispatcher, ds_ping_from, sip:proxy@192.1.8.2.154)modparam(dispatcher
Re: [OpenSIPS-Users] Problem with siptrace module
Hi Duane, Thanks for you quick response. I tried using trace_dialog() but it doesn't log any message. Below is the new version of my configuration script: BTW: This is my opensips version: opensips -V version: opensips 1.6.4-2-notls (i386/linux) flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. svnrevision: unknown @(#) $Id: main.c 7530 2010-12-13 19:07:53Z bogdan_iancu $ main.c compiled on 14:20:52 May 2 2011 with gcc 4.1.2 ##Global Parameters # debug=3 #log_facility=LOG_LOCAL6 fork=yes children=4 /* uncomment the following lines to enable debugging */ #debug=6 #fork=no #log_stderror=yes /* uncomment the next line to disable TCP (default on) */ disable_tcp=yes port=5060 /* uncomment and configure the following line if you want opensips to bind on a specific interface/port/proto (default bind on all available) */ listen=udp:192.168.2.154:5060 # -- module loading -- mpath=/usr/local/lib/opensips/modules/ loadmodule maxfwd.so loadmodule sl.so loadmodule tm.so loadmodule dispatcher.so loadmodule mi_fifo.so loadmodule signaling.so loadmodule options.so loadmodule textops.so loadmodule db_mysql.so loadmodule siptrace.so loadmodule acc.so loadmodule dialog.so loadmodule rr.so # - setting module-specific parameters --- # -- dispatcher params -- modparam(mi_fifo, fifo_name, /tmp/opensips_fifo) modparam(dispatcher, ds_ping_from, sip:proxy@192.1.8.2.154) modparam(dispatcher, ds_ping_interval, 30) modparam(dispatcher, ds_probing_threshhold, 2) modparam(dispatcher, ds_probing_mode, 1) modparam(dispatcher, list_file, /usr/local/etc/opensips/dispatcher.list) # modparam(dispatcher, force_dst, 1) modparam(siptrace, db_url, mysql://root:Viamonte1621@localhost/opensips) #modparam(siptrace, enable_ack_trace, 1) modparam(siptrace, trace_on, 1) modparam(siptrace, table, sip_trace) #modparam(siptrace, trace_flag, 22) #modparam(acc, log_level, 1) #modparam(acc, log_flag, 1) #modparam(acc, db_url, mysql://root:Viamonte1621@localhost/opensips) route{ if ( !mf_process_maxfwd_header(10) ) { sl_send_reply(483,To Many Hops); drop(); }; if (is_method(OPTIONS)) { options_reply(); exit; } if(is_method(INVITE)) trace_dialog(); ds_select_dst(1, 0); if ($retcode0) { xlog([Redmond] Service full\n); sl_send_reply(500,Service full); exit; } forward(); } Thanks Diego From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of duane.lar...@gmail.com Sent: martes, 12 de julio de 2011 05:01 p.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Problem with siptrace module Not sure what version of OpenSIPS you are using but you might want to use this instead of sip_trace() http://www.opensips.org/html/docs/modules/1.7.x/siptrace.html#id250195 On Jul 12, 2011 1:09pm, Diego Barberio diego.barbe...@redmondsoftware.com wrote: Hi All, I'm having a minnor configuration problem with the siptrace.I'm trying to trace all the messages and their responses, but I'm only able to log the methods (INVITE, ACK and BYE) but not the responses.This is my configuration script. ##Global Parameters # debug=3#log_facility=LOG_LOCAL6 fork=yeschildren=4 /* uncomment the following lines to enable debugging */#debug=6#fork=no#log_stderror=yes /* uncomment the next line to disable TCP (default on) */disable_tcp=yes port=5060 /* uncomment and configure the following line if you want opensips to bind on a specific interface/port/proto (default bind on all available) */listen=udp:192.168.2.154:5060 # -- module loading --mpath=/usr/local/lib/opensips/modules/lo admodule maxfwd.soloadmodule sl.soloadmodule tm.soloadmodule dispatcher.soloadmodule mi_fifo.soloadmodule signaling.soloadmodule options.soloadmodule textops.soloadmodule db_mysql.soloadmodule siptrace.so#loadmodule acc.so# - setting module-specific parameters ---# -- dispatcher params --modparam(mi_fifo, fifo_name, /tmp/opensips_fifo) modparam(dispatcher, ds_ping_from, sip:proxy@192.1.8.2.154)modparam(dispatcher, ds_ping_interval, 30)modparam(dispatcher, ds_probing_threshhold, 2)modparam(dispatcher, ds_probing_mode, 1)modparam
[OpenSIPS-Users] Question regarding load_balancer resources
Hi All, I have opensips using load_balancer module with two destinations. Both have 500 pstn resources and execute a simple application that answers a call, plays some audio and waits for the BYE message. If I place few calls (10 at the same time) all works great. However, if I put more traffic, the pstn resources are not freed always, even if all the calls are ended gracefully and the BYE and the subsequent OK messages are forwarded correctly. I'm sure there's a problem with my configuration or my destinations. So I need to now what triggers the liberation of the resource. This is my configuration script: ### Global Parameters # debug=3 #log_facility=LOG_LOCAL6 fork=yes children=4 /* uncomment the following lines to enable debugging */ #debug=6 #fork=no #log_stderror=yes /* uncomment the next line to disable TCP (default on) */ disable_tcp=yes port=5061 /* uncomment and configure the following line if you want opensips to bind on a specific interface/port/proto (default bind on all available) */ listen=udp:10.180.12.6:5061 ### Modules Section #set module path mpath=/usr/local/lib/opensips/modules/ loadmodule maxfwd.so loadmodule sl.so loadmodule db_mysql.so loadmodule tm.so loadmodule uri.so loadmodule rr.so loadmodule dialog.so loadmodule mi_fifo.so loadmodule signaling.so loadmodule textops.so loadmodule load_balancer.so loadmodule options.so # - setting module-specific parameters --- # - mi_fifo params - modparam(mi_fifo, fifo_name, /tmp/opensips_fifo) # - rr params - # add value to ;lr param to cope with most of the UAs #modparam(rr, enable_full_lr, 1) # do not append from tag to the RR (no need for this script) #modparam(rr, append_fromtag, 0) modparam(rr,enable_double_rr,1) modparam(rr,append_fromtag,1) # - uri params - modparam(uri, use_uri_table, 0) modparam(dialog, dlg_flag, 13) modparam(dialog, db_mode, 1) modparam(dialog, db_url, mysql://root:Viamonte1621@localhost/opensips) modparam(load_balancer, db_url,mysql://root:Viamonte1621@localhost/opensips) modparam(load_balancer, probing_interval, 30) modparam(load_balancer, probing_method, OPTIONS) modparam(load_balancer, probing_from, sip:proxy@10.180.12.6:5061) ### Routing Logic # main request routing logic route{ if (!mf_process_maxfwd_header(3)) { sl_send_reply(483,looping); exit; } if (!has_totag()) { xlog([Redmond] Hast'n to tag\n); # initial request record_route(); } else { # sequential request - obey Route indication xlog([Redmond] Has to tag\n); loose_route(); t_relay(); exit; } # handle cancel and re-transmissions if ( is_method(CANCEL) ) { if ( t_check_trans() ) t_relay(); exit; } if (uri==myself){ if (is_method(OPTIONS) (! uri=~sip:.*[@]+.*)) { options_reply(); exit; } } # from now on we have only the initial requests if (!is_method(INVITE)) { xlog([Redmond] Not invite\n); if ( t_check_trans() ) t_relay(); exit; #send_reply(405,Method Not Allowed); #exit; } load_balance(0,pstn); # LB function returns negative if no suitable destination (for requested resources) is found, # or if all destinations are full if ($retcode0) { xlog([Redmond] Service full\n); sl_send_reply(500,Service full); exit; } xlog([Redmond] Selected destination is: $du\n); # send it out if (!t_relay()) { sl_reply_error(); } } failure_route[1] { xlog([Redmond] Failure route\n); if (t_check_status((408)|(5[0-9][0-9]))) { lb_disable(); if (load_balance(0,pstn)) { t_on_failure(1); t_relay(); } else { t_reply(503, Service Unavailable); } } } Thanks, Diego ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Problem with load balancer module
Hi Bogdan, Have you been able to take a look at the traces I sent? Thanks Diego -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Diego Barberio Sent: lunes, 10 de enero de 2011 12:51 p.m. To: users@lists.opensips.org Subject: [OpenSIPS-Users] Problem with load balancer module Hi Bogdan, Thank you for your prompt response. I'm sorry I couldn't send the trace before but I had some problems with my network. Also I've change the IP Address schema. The call is originated from 192.168.2.150 to 192.168.2.165:5060 which is the opensips address. Currently, the load balancer is configured to redirect the calls to 192.168.2.165:5061 or 192.168.2.165:5062. In the call I'm sending the INVITE was redirected to 5061. The you will see that the ACK is not redirected to the destination. Thanks Diego -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu Sent: viernes, 07 de enero de 2011 01:19 p.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Problem with load balancer module Hi Diego, Could you post a SIP capture of a complete call (starting with INVITE) from the opensips LB machine ? Regards, Bogdan Diego Barberio wrote: Diego Sebastián Barberio www.redmondsoftware.com +54 11 48153511 (Ext 143) -Original Message- From: Diego Barberio [mailto:diego.barbe...@redmondsoftware.com] Sent: jueves, 06 de enero de 2011 03:50 p.m. To: 'users@lists.opensips.org' Subject: Problem with load balancer module Hello, Im testing the Load Balancing module and I have a problem I cant fix by myself. The INVITE message is routed correctly to one of the destinations. However the subsequent ACK and the BYE messages are not sent to the destinations. I set up opensips to run only in the udp 5060 port. Then I have two identical applications: one running on port 5061 and the other on port 5062, the 3 components are running in the same server which has a single IP address: 192.168.1.195. The application is very simple: 1. Receives the INVITE, starts streaming the RTP, and sends the OK 2. When the ACK is received injects some music in the streaming 3. Waits until de BYE is received. Then stops the streaming and sends the OK. This is the configuration of the load_balancer table: mysql select * from load_balancer; ++--++---++--- ++--++---++--- ++--++---++--- + | id | group_id | dst_uri| resources | probe_mode | description | ++--++---++--- ++--++---++--- ++--++---++--- + | 1 |0 | sip:192.168.1.195:5061 | pstn=1| 0 | | | 2 |0 | sip:192.168.1.195:5062 | pstn=1| 0 | | ++--++---++--- ++--++---++--- ++--++---++--- + I've configured only one resource in each application because I'm just testing. Finally, this is the configuration script, which is the one from the tutorial on the website: debug=3 log_facility=LOG_LOCAL6 fork=yes children=4 /* uncomment the following lines to enable debugging */ debug=6 fork=no #log_stderror=yes /* uncomment the next line to disable TCP (default on) */ disable_tcp=yes port=5060 /* uncomment and configure the following line if you want opensips to bind on a specific interface/port/proto (default bind on all available) */ listen=udp:192.168.1.195:5060 ### Modules Section #set module path mpath=/usr/local/lib/opensips/modules/ loadmodule maxfwd.so loadmodule sl.so loadmodule db_mysql.so loadmodule tm.so loadmodule uri.so loadmodule rr.so loadmodule dialog.so loadmodule mi_fifo.so loadmodule signaling.so loadmodule textops.so loadmodule load_balancer.so # - setting module-specific parameters --- # - mi_fifo params - modparam(mi_fifo, fifo_name, /tmp/opensips_fifo) # - rr params - # add value to ;lr param to cope with most of the UAs #modparam(rr, enable_full_lr, 1) # do not append from tag to the RR (no need for this script) #modparam(rr, append_fromtag, 0) modparam(rr,enable_double_rr,1) modparam(rr,append_fromtag,1) # - uri params - modparam(uri, use_uri_table, 0) modparam(dialog, dlg_flag, 13) modparam(dialog, db_mode, 1) modparam(dialog, db_url, mysql://root:viamonte1...@localhost/opensips) modparam(load_balancer, db_url,mysql://root:viamonte1
Re: [OpenSIPS-Users] Problem with load balancer module
Hi Bogdan, Thanks again for your response. I understand your point but as fair as I know if the contact is set to 50257609...@192.168.2.165:5061 the subsequent messages (i.e. ACK and BYE) will be sent directly to the callee bypassing the proxy. This is OK for me, but I understand that the LB needs to receive the BYE message to keep track of the available resources. Please correct me if I'm wrong. Thanks Diego -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu Sent: miércoles, 12 de enero de 2011 09:15 a.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Problem with load balancer module Hi Diego, The bug seams to be in your callee device. Take a look at the 200 OK it sends: U 192.168.2.165:5061 - 192.168.2.165:5060 SIP/2.0 200 OK..From: Your Long Namesip:usern...@192.168.2.150:5060;tag=A46E9878A6B36612423768382DD6C758. .To: sip:50257609...@192.168.2.165;tag=843e7f0-a502a8c0-13c5-50022-1110-60a48c5 6-1110..Call-ID: d059e3f6f50cacfb33b4526b0a1ca...@192.168.2 .150..CSeq: 1 INVITE..Via: SIP/2.0/UDP 192.168.2.165;branch=z9hG4bK7bcf.2d3c8236.0..Via: SIP/2.0/UDP 192.168.2.150:5060;received=192.168.2.150;rport=5060;branch=z9hG4bKC115ED423 0E704ED2956D13FC3999153..Record-Route: sip:192.168.2.165;lr;ftag=A46E98 78A6B36612423768382DD6C758;did=08c.697623b5..Contact: sip:50257609...@192.168.2.165..Allow: INVITE, CANCEL, ACK, BYE, OPTIONS, INFO..Content-Type: application/sdp..Content-Length: 210v=0..o=RBTAlerting 2844730 0 IN IP4 192.168.2.165..s=INTEL_ SIP_CCLIB..i=session information..c=IN IP4 192.168.2.165..t=0 0..m=audio 49152 RTP/AVP 8 101..a=rtpmap:8 PCMA/8000..a=rtpmap:101 telephone-event/8000.. # The 200 OK is sent from 192.168.2.165:5061, but in contact it places sip:50257609...@192.168.2.165 - the port is missing, so the sequential requests are going to the wrong destination (to sip:50257609...@192.168.2.165 which is actually the LB ,not the callee) Regards, Bogdan Diego Barberio wrote: Hi Bogdan, Have you been able to take a look at the traces I sent? Thanks Diego -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Diego Barberio Sent: lunes, 10 de enero de 2011 12:51 p.m. To: users@lists.opensips.org Subject: [OpenSIPS-Users] Problem with load balancer module Hi Bogdan, Thank you for your prompt response. I'm sorry I couldn't send the trace before but I had some problems with my network. Also I've change the IP Address schema. The call is originated from 192.168.2.150 to 192.168.2.165:5060 which is the opensips address. Currently, the load balancer is configured to redirect the calls to 192.168.2.165:5061 or 192.168.2.165:5062. In the call I'm sending the INVITE was redirected to 5061. The you will see that the ACK is not redirected to the destination. Thanks Diego -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu Sent: viernes, 07 de enero de 2011 01:19 p.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Problem with load balancer module Hi Diego, Could you post a SIP capture of a complete call (starting with INVITE) from the opensips LB machine ? Regards, Bogdan Diego Barberio wrote: Diego Sebastián Barberio www.redmondsoftware.com +54 11 48153511 (Ext 143) -Original Message- From: Diego Barberio [mailto:diego.barbe...@redmondsoftware.com] Sent: jueves, 06 de enero de 2011 03:50 p.m. To: 'users@lists.opensips.org' Subject: Problem with load balancer module Hello, Im testing the Load Balancing module and I have a problem I cant fix by myself. The INVITE message is routed correctly to one of the destinations. However the subsequent ACK and the BYE messages are not sent to the destinations. I set up opensips to run only in the udp 5060 port. Then I have two identical applications: one running on port 5061 and the other on port 5062, the 3 components are running in the same server which has a single IP address: 192.168.1.195. The application is very simple: 1. Receives the INVITE, starts streaming the RTP, and sends the OK 2. When the ACK is received injects some music in the streaming 3. Waits until de BYE is received. Then stops the streaming and sends the OK. This is the configuration of the load_balancer table: mysql select * from load_balancer; ++--++---++--- ++--++---++--- ++--++---++--- + | id | group_id | dst_uri| resources | probe_mode | description
Re: [OpenSIPS-Users] Problem with load balancer module
Hi Bogdan, Thanks for your prompt response and all your support. I will correct that bug, and test again. Thanks Diego -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu Sent: miércoles, 12 de enero de 2011 05:58 p.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Problem with load balancer module That's not true - the contact address is the address of the other end point, it does not mean that the communication is done directly between the end points. The Route hdr is the one dictating the intermediary hopsbottom line , contact points the end point, sequential requests will visit opensips because of the Route hdr. Regards, Bogdan Diego Barberio wrote: Hi Bogdan, Thanks again for your response. I understand your point but as fair as I know if the contact is set to 50257609...@192.168.2.165:5061 the subsequent messages (i.e. ACK and BYE) will be sent directly to the callee bypassing the proxy. This is OK for me, but I understand that the LB needs to receive the BYE message to keep track of the available resources. Please correct me if I'm wrong. Thanks Diego -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu Sent: miércoles, 12 de enero de 2011 09:15 a.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Problem with load balancer module Hi Diego, The bug seams to be in your callee device. Take a look at the 200 OK it sends: U 192.168.2.165:5061 - 192.168.2.165:5060 SIP/2.0 200 OK..From: Your Long Namesip:usern...@192.168.2.150:5060;tag=A46E9878A6B36612423768382DD6C758. .To: sip:50257609...@192.168.2.165;tag=843e7f0-a502a8c0-13c5-50022-1110-60a48c5 6-1110..Call-ID: d059e3f6f50cacfb33b4526b0a1ca...@192.168.2 .150..CSeq: 1 INVITE..Via: SIP/2.0/UDP 192.168.2.165;branch=z9hG4bK7bcf.2d3c8236.0..Via: SIP/2.0/UDP 192.168.2.150:5060;received=192.168.2.150;rport=5060;branch=z9hG4bKC115ED423 0E704ED2956D13FC3999153..Record-Route: sip:192.168.2.165;lr;ftag=A46E98 78A6B36612423768382DD6C758;did=08c.697623b5..Contact: sip:50257609...@192.168.2.165..Allow: INVITE, CANCEL, ACK, BYE, OPTIONS, INFO..Content-Type: application/sdp..Content-Length: 210v=0..o=RBTAlerting 2844730 0 IN IP4 192.168.2.165..s=INTEL_ SIP_CCLIB..i=session information..c=IN IP4 192.168.2.165..t=0 0..m=audio 49152 RTP/AVP 8 101..a=rtpmap:8 PCMA/8000..a=rtpmap:101 telephone-event/8000.. # The 200 OK is sent from 192.168.2.165:5061, but in contact it places sip:50257609...@192.168.2.165 - the port is missing, so the sequential requests are going to the wrong destination (to sip:50257609...@192.168.2.165 which is actually the LB ,not the callee) Regards, Bogdan Diego Barberio wrote: Hi Bogdan, Have you been able to take a look at the traces I sent? Thanks Diego -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Diego Barberio Sent: lunes, 10 de enero de 2011 12:51 p.m. To: users@lists.opensips.org Subject: [OpenSIPS-Users] Problem with load balancer module Hi Bogdan, Thank you for your prompt response. I'm sorry I couldn't send the trace before but I had some problems with my network. Also I've change the IP Address schema. The call is originated from 192.168.2.150 to 192.168.2.165:5060 which is the opensips address. Currently, the load balancer is configured to redirect the calls to 192.168.2.165:5061 or 192.168.2.165:5062. In the call I'm sending the INVITE was redirected to 5061. The you will see that the ACK is not redirected to the destination. Thanks Diego -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu Sent: viernes, 07 de enero de 2011 01:19 p.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Problem with load balancer module Hi Diego, Could you post a SIP capture of a complete call (starting with INVITE) from the opensips LB machine ? Regards, Bogdan Diego Barberio wrote: Diego Sebastián Barberio www.redmondsoftware.com +54 11 48153511 (Ext 143) -Original Message- From: Diego Barberio [mailto:diego.barbe...@redmondsoftware.com] Sent: jueves, 06 de enero de 2011 03:50 p.m. To: 'users@lists.opensips.org' Subject: Problem with load balancer module Hello, Im testing the Load Balancing module and I have a problem I cant fix by myself. The INVITE message is routed correctly to one of the destinations. However the subsequent ACK and the BYE messages are not sent to the destinations. I set up opensips to run only in the udp 5060 port. Then I have two identical applications: one running on port 5061 and the other on port 5062, the 3
[OpenSIPS-Users] Problem with load balancer module
Hi Bogdan, Thank you for your prompt response. I'm sorry I couldn't send the trace before but I had some problems with my network. Also I've change the IP Address schema. The call is originated from 192.168.2.150 to 192.168.2.165:5060 which is the opensips address. Currently, the load balancer is configured to redirect the calls to 192.168.2.165:5061 or 192.168.2.165:5062. In the call I'm sending the INVITE was redirected to 5061. The you will see that the ACK is not redirected to the destination. Thanks Diego -Original Message- From: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu Sent: viernes, 07 de enero de 2011 01:19 p.m. To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Problem with load balancer module Hi Diego, Could you post a SIP capture of a complete call (starting with INVITE) from the opensips LB machine ? Regards, Bogdan Diego Barberio wrote: Diego Sebastián Barberio www.redmondsoftware.com +54 11 48153511 (Ext 143) -Original Message- From: Diego Barberio [mailto:diego.barbe...@redmondsoftware.com] Sent: jueves, 06 de enero de 2011 03:50 p.m. To: 'users@lists.opensips.org' Subject: Problem with load balancer module Hello, Im testing the Load Balancing module and I have a problem I cant fix by myself. The INVITE message is routed correctly to one of the destinations. However the subsequent ACK and the BYE messages are not sent to the destinations. I set up opensips to run only in the udp 5060 port. Then I have two identical applications: one running on port 5061 and the other on port 5062, the 3 components are running in the same server which has a single IP address: 192.168.1.195. The application is very simple: 1. Receives the INVITE, starts streaming the RTP, and sends the OK 2. When the ACK is received injects some music in the streaming 3. Waits until de BYE is received. Then stops the streaming and sends the OK. This is the configuration of the load_balancer table: mysql select * from load_balancer; ++--++---++--- ++--++---++--- ++--++---++--- + | id | group_id | dst_uri| resources | probe_mode | description | ++--++---++--- ++--++---++--- ++--++---++--- + | 1 |0 | sip:192.168.1.195:5061 | pstn=1| 0 | | | 2 |0 | sip:192.168.1.195:5062 | pstn=1| 0 | | ++--++---++--- ++--++---++--- ++--++---++--- + I've configured only one resource in each application because I'm just testing. Finally, this is the configuration script, which is the one from the tutorial on the website: debug=3 log_facility=LOG_LOCAL6 fork=yes children=4 /* uncomment the following lines to enable debugging */ debug=6 fork=no #log_stderror=yes /* uncomment the next line to disable TCP (default on) */ disable_tcp=yes port=5060 /* uncomment and configure the following line if you want opensips to bind on a specific interface/port/proto (default bind on all available) */ listen=udp:192.168.1.195:5060 ### Modules Section #set module path mpath=/usr/local/lib/opensips/modules/ loadmodule maxfwd.so loadmodule sl.so loadmodule db_mysql.so loadmodule tm.so loadmodule uri.so loadmodule rr.so loadmodule dialog.so loadmodule mi_fifo.so loadmodule signaling.so loadmodule textops.so loadmodule load_balancer.so # - setting module-specific parameters --- # - mi_fifo params - modparam(mi_fifo, fifo_name, /tmp/opensips_fifo) # - rr params - # add value to ;lr param to cope with most of the UAs #modparam(rr, enable_full_lr, 1) # do not append from tag to the RR (no need for this script) #modparam(rr, append_fromtag, 0) modparam(rr,enable_double_rr,1) modparam(rr,append_fromtag,1) # - uri params - modparam(uri, use_uri_table, 0) modparam(dialog, dlg_flag, 13) modparam(dialog, db_mode, 1) modparam(dialog, db_url, mysql://root:viamonte1...@localhost/opensips) modparam(load_balancer, db_url,mysql://root:viamonte1...@localhost/opensips) ### Routing Logic # main request routing logic route{ if (!mf_process_maxfwd_header(3)) { sl_send_reply(483,looping); exit; } if (!has_totag()) { xlog([Redmond] Hast'n to tag\n); # initial request record_route
[OpenSIPS-Users] Problem with load balancer module
Diego Sebastián Barberio www.redmondsoftware.com +54 11 48153511 (Ext 143) -Original Message- From: Diego Barberio [mailto:diego.barbe...@redmondsoftware.com] Sent: jueves, 06 de enero de 2011 03:50 p.m. To: 'users@lists.opensips.org' Subject: Problem with load balancer module Hello, Im testing the Load Balancing module and I have a problem I cant fix by myself. The INVITE message is routed correctly to one of the destinations. However the subsequent ACK and the BYE messages are not sent to the destinations. I set up opensips to run only in the udp 5060 port. Then I have two identical applications: one running on port 5061 and the other on port 5062, the 3 components are running in the same server which has a single IP address: 192.168.1.195. The application is very simple: 1. Receives the INVITE, starts streaming the RTP, and sends the OK 2. When the ACK is received injects some music in the streaming 3. Waits until de BYE is received. Then stops the streaming and sends the OK. This is the configuration of the load_balancer table: mysql select * from load_balancer; ++--++---++- + | id | group_id | dst_uri| resources | probe_mode | description | ++--++---++- + | 1 |0 | sip:192.168.1.195:5061 | pstn=1| 0 | | | 2 |0 | sip:192.168.1.195:5062 | pstn=1| 0 | | ++--++---++- + I've configured only one resource in each application because I'm just testing. Finally, this is the configuration script, which is the one from the tutorial on the website: debug=3 log_facility=LOG_LOCAL6 fork=yes children=4 /* uncomment the following lines to enable debugging */ debug=6 fork=no #log_stderror=yes /* uncomment the next line to disable TCP (default on) */ disable_tcp=yes port=5060 /* uncomment and configure the following line if you want opensips to bind on a specific interface/port/proto (default bind on all available) */ listen=udp:192.168.1.195:5060 ### Modules Section #set module path mpath=/usr/local/lib/opensips/modules/ loadmodule maxfwd.so loadmodule sl.so loadmodule db_mysql.so loadmodule tm.so loadmodule uri.so loadmodule rr.so loadmodule dialog.so loadmodule mi_fifo.so loadmodule signaling.so loadmodule textops.so loadmodule load_balancer.so # - setting module-specific parameters --- # - mi_fifo params - modparam(mi_fifo, fifo_name, /tmp/opensips_fifo) # - rr params - # add value to ;lr param to cope with most of the UAs #modparam(rr, enable_full_lr, 1) # do not append from tag to the RR (no need for this script) #modparam(rr, append_fromtag, 0) modparam(rr,enable_double_rr,1) modparam(rr,append_fromtag,1) # - uri params - modparam(uri, use_uri_table, 0) modparam(dialog, dlg_flag, 13) modparam(dialog, db_mode, 1) modparam(dialog, db_url, mysql://root:viamonte1...@localhost/opensips) modparam(load_balancer, db_url,mysql://root:viamonte1...@localhost/opensips) ### Routing Logic # main request routing logic route{ if (!mf_process_maxfwd_header(3)) { sl_send_reply(483,looping); exit; } if (!has_totag()) { xlog([Redmond] Hast'n to tag\n); # initial request record_route(); } else { # sequential request - obey Route indication xlog([Redmond] Has to tag\n); loose_route(); t_relay(); exit; } # handle cancel and re-transmissions if ( is_method(CANCEL) ) { if ( t_check_trans() ) t_relay(); exit; } # from now on we have only the initial requests if (!is_method(INVITE)) { xlog([Redmond] Not invite\n); if ( t_check_trans() ) t_relay(); exit; #send_reply(405,Method Not Allowed); #exit; } load_balance(0,pstn); # LB function returns negative if no suitable destination (for requested resources) is found, # or if all destinations are full if ($retcode0) { xlog([Redmond] Service full\n); sl_send_reply(500,Service full); exit; } xlog([Redmond] Selected destination is: $du\n); # send it out if (!t_relay()) { sl_reply_error(); } } It seems that the route is not saved, because the To tag is sent in the ACK and BYE messages, also the logs I've added are written as expected for each message. If necesarry I can send a new email with the log attached. Please, can you help me to find what's