Re: [OpenSIPS-Users] How to Solve 'Discarding fwd for a 6xx Transaction'?
Hello, Thank you Liviu and Ben for your response. It's working fine for me. I know it is not recommended by RFC :) Thanks & Regards *Diptesh Patel* Software Developer Ecosmob Technologies Ltd, Ahmedabad Mo:*+919898962659* On Fri, Sep 25, 2020 at 6:56 PM Ben Newlin wrote: > https://opensips.org/docs/modules/3.1.x/tm.html#param_disable_6xx_block > > > > Ben Newlin > > > > *From: *Users > *Date: *Friday, September 25, 2020 at 5:58 AM > *To: *OpenSIPS users mailling list > *Subject: *[OpenSIPS-Users] How to Solve 'Discarding fwd for a 6xx > Transaction'? > > Hello, > > > > I want to fail-over my call on 6xx response and I use failure route for > that but t_relay() gives below errors and reply with '500 No destination > available (18/SL)'. > > > > Sep 25 05:47:10 OLD-OVW-SBCA01 /usr/local/sbin/opensips[28174]: > INFO:tm:t_forward_nonack: discarding fwd for a 6xx transaction > Sep 25 05:47:10 OLD-OVW-SBCA01 /usr/local/sbin/opensips[28174]: > ERROR:tm:w_t_relay: t_forward_nonack failed > > > > Anyone have an idea how I can resolve this? > > > > > > Thanks & Regards > > *Diptesh Patel* > > Software Developer > > Ecosmob Technologies Ltd, > > Ahmedabad > > Mo:*+919898962659* > > > > *Disclaimer* > > In addition to generic Disclaimer which you have agreed on our website, > any views or opinions presented in this email are solely those of the > originator and do not necessarily represent those of the Company or its > sister concerns. Any liability (in negligence, contract or otherwise) > arising from any third party taking any action, or refraining from taking > any action on the basis of any of the information contained in this email > is hereby excluded. > > > > *Confidentiality* > > This communication (including any attachment/s) is intended only for the > use of the addressee(s) and contains information that is PRIVILEGED AND > CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying > of this communication is prohibited. Please inform originator if you have > received it in error. > > > > *Caution for viruses, malware etc.* > > This communication, including any attachments, may not be free of viruses, > trojans, similar or new contaminants/malware, interceptions or > interference, and may not be compatible with your systems. You shall carry > out virus/malware scanning on your own before opening any attachment to > this e-mail. The sender of this e-mail and Company including its sister > concerns shall not be liable for any damage that may incur to you as a > result of viruses, incompleteness of this message, a delay in receipt of > this message or any other computer problems. > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- *Disclaimer* In addition to generic Disclaimer which you have agreed on our website, any views or opinions presented in this email are solely those of the originator and do not necessarily represent those of the Company or its sister concerns. Any liability (in negligence, contract or otherwise) arising from any third party taking any action, or refraining from taking any action on the basis of any of the information contained in this email is hereby excluded. *Confidentiality* This communication (including any attachment/s) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying of this communication is prohibited. Please inform originator if you have received it in error. *Caution for viruses, malware etc.* This communication, including any attachments, may not be free of viruses, trojans, similar or new contaminants/malware, interceptions or interference, and may not be compatible with your systems. You shall carry out virus/malware scanning on your own before opening any attachment to this e-mail. The sender of this e-mail and Company including its sister concerns shall not be liable for any damage that may incur to you as a result of viruses, incompleteness of this message, a delay in receipt of this message or any other computer problems. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] OpenSIPs Crash on reporting delay.
Hello, My OpenSIPS crashed once in heavy load. I don't know the exact reason and it does not usually happen. can you please suggest what is wrong with it? Please find gdb backtrace in attachment. Let me know If you need anything else. version: opensips 2.4.1 (x86_64/linux) flags: STATS: On, DISABLE_NAGLE, USE_MCAST, 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, sigio_rt, select. git revision: 5d042cffc main.c compiled on 02:09:27 Feb 24 2020 with gcc 4.8.5 Thanks & Regards *Diptesh Patel* Software Developer Ecosmob Technologies Ltd, Ahmedabad Mo:*+919898962659* -- *Disclaimer* In addition to generic Disclaimer which you have agreed on our website, any views or opinions presented in this email are solely those of the originator and do not necessarily represent those of the Company or its sister concerns. Any liability (in negligence, contract or otherwise) arising from any third party taking any action, or refraining from taking any action on the basis of any of the information contained in this email is hereby excluded. *Confidentiality* This communication (including any attachment/s) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying of this communication is prohibited. Please inform originator if you have received it in error. *Caution for viruses, malware etc.* This communication, including any attachments, may not be free of viruses, trojans, similar or new contaminants/malware, interceptions or interference, and may not be compatible with your systems. You shall carry out virus/malware scanning on your own before opening any attachment to this e-mail. The sender of this e-mail and Company including its sister concerns shall not be liable for any damage that may incur to you as a result of viruses, incompleteness of this message, a delay in receipt of this message or any other computer problems. GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-115.el7 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/local/sbin/opensips...done. [New LWP 13167] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `/usr/local/sbin/opensips -P /var/run/opensips/opensips.pid -f /usr/local/etc/op'. Program terminated with signal 11, Segmentation fault. #0 0x00462bbf in log_expiry (func_info=0x60fc5a "msg processing", tcp=0, dbg_len=1056, extra_dbg=0x89e5a0 "INVITE sip:6042352637@216.123.235.115:5060;user=phone SIP/2.0\r\nVia: SIP/2.0/UDP 209.91.94.6:5060;branch=z9hG4bKketago30306suciqkm90.1\r\nFrom: \"PRABHJOT KAUR\", time_diff=60635) at ut.h:1085 1085LM_WARN("#%i is a module action : %s - %dus - line %d\n",i+1, Missing separate debuginfos, use: debuginfo-install MariaDB-shared-10.1.43-1.el7.centos.x86_64 glibc-2.17-292.el7.x86_64 gmp-6.0.0-15.el7.x86_64 gnutls-3.3.29-9.el7_6.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-37.el7_7.2.x86_64 libcom_err-1.42.9-16.el7.x86_64 libffi-3.0.13-18.el7.x86_64 libgcc-4.8.5-39.el7.x86_64 libgcrypt-1.5.3-14.el7.x86_64 libgpg-error-1.12-3.el7.x86_64 libmicrohttpd-0.9.33-2.el7.x86_64 librabbitmq-0.8.0-2.el7.x86_64 libselinux-2.5-14.1.el7.x86_64 libstdc++-4.8.5-39.el7.x86_64 libtasn1-4.10-1.el7.x86_64 libxml2-2.9.1-6.el7_2.3.x86_64 nettle-2.7.1-8.el7.x86_64 openssl-libs-1.0.2k-19.el7.x86_64 p11-kit-0.23.5-3.el7.x86_64 pcre-8.32-17.el7.x86_64 xz-libs-5.2.2-1.el7.x86_64 zlib-1.2.7-18.el7.x86_64 (gdb) bt full #0 0x00462bbf in log_expiry (func_info=0x60fc5a "msg processing", tcp=0, dbg_len=1056, extra_dbg=0x89e5a0 "INVITE sip:6042352637@216.123.235.115:5060;user=phone SIP/2.0\r\nVia: SIP/2.0/UDP 209.91.94.6:5060;branch=z9hG4bKketago30306suciqkm90.1\r\nFrom: \"PRABHJOT KAUR\", time_diff=60635) at ut.h:1085 param = {s = 0x5f639328 , len = 100387} list = i = 0 func_str = {s = 0x60fca1 "source", len = 6} time_str = {s = 0x63935d "time", len = 4} extra_str = {s = 0x61a8a6 "extra", len = 5} #1 receive_msg ( buf=0x89e5a0 "INVITE sip:6042352637@216.123.235.115:5060;user=phone SIP/2.0\r\nVi
[OpenSIPS-Users] How to Solve 'Discarding fwd for a 6xx Transaction'?
Hello, I want to fail-over my call on 6xx response and I use failure route for that but t_relay() gives below errors and reply with '500 No destination available (18/SL)'. Sep 25 05:47:10 OLD-OVW-SBCA01 /usr/local/sbin/opensips[28174]: INFO:tm:t_forward_nonack: discarding fwd for a 6xx transaction Sep 25 05:47:10 OLD-OVW-SBCA01 /usr/local/sbin/opensips[28174]: ERROR:tm:w_t_relay: t_forward_nonack failed Anyone have an idea how I can resolve this? Thanks & Regards *Diptesh Patel* Software Developer Ecosmob Technologies Ltd, Ahmedabad Mo:*+919898962659* -- *Disclaimer* In addition to generic Disclaimer which you have agreed on our website, any views or opinions presented in this email are solely those of the originator and do not necessarily represent those of the Company or its sister concerns. Any liability (in negligence, contract or otherwise) arising from any third party taking any action, or refraining from taking any action on the basis of any of the information contained in this email is hereby excluded. *Confidentiality* This communication (including any attachment/s) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying of this communication is prohibited. Please inform originator if you have received it in error. *Caution for viruses, malware etc.* This communication, including any attachments, may not be free of viruses, trojans, similar or new contaminants/malware, interceptions or interference, and may not be compatible with your systems. You shall carry out virus/malware scanning on your own before opening any attachment to this e-mail. The sender of this e-mail and Company including its sister concerns shall not be liable for any damage that may incur to you as a result of viruses, incompleteness of this message, a delay in receipt of this message or any other computer problems. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] siprec module does response re-invite from a siprec server.
Hello Razvan, Thanks for your prompt response. I opened a feature request. https://github.com/OpenSIPS/opensips/issues/2167 Thanks & Regards *Diptesh Patel* Software Developer Ecosmob Technologies Ltd, Ahmedabad Mo:*+919898962659* On Fri, Jul 10, 2020 at 9:05 PM Răzvan Crainea wrote: > Hi, Diptesh! > > Unfortunately reinvites from the SIPREC servers are not supported by the > module right now. Please open a feature request for this. > > Best regards, > > Răzvan Crainea > OpenSIPS Core Developer > http://www.opensips-solutions.com > > On 7/10/20 4:28 PM, Diptesh Patel wrote: > > Hello, > > > > I am using opensips 2.4.7 and opensips is working as a siprec client > > with rtpproxy. It is working fine but it does not respond to any > > re-invite from siprec server as a refresher after a few seconds and the > > siprec server rejects the call with BYE due to timeout and recording > > stops there. Is there any configuration required for that? > > > > Thanks & Regards > > *Diptesh Patel* > > Software Developer > > Ecosmob Technologies Ltd, > > Ahmedabad > > Mo:*+919898962659* > > > > *Disclaimer* > > In addition to generic Disclaimer which you have agreed on our website, > > any views or opinions presented in this email are solely those of the > > originator and do not necessarily represent those of the Company or its > > sister concerns. Any liability (in negligence, contract or otherwise) > > arising from any third party taking any action, or refraining from > > taking any action on the basis of any of the information contained in > > this email is hereby excluded. > > > > *Confidentiality* > > This communication (including any attachment/s) is intended only for the > > use of the addressee(s) and contains information that is PRIVILEGED AND > > CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or > > copying of this communication is prohibited. Please inform originator if > > you have received it in error. > > > > *Caution for viruses, malware etc.* > > This communication, including any attachments, may not be free of > > viruses, trojans, similar or new contaminants/malware, interceptions or > > interference, and may not be compatible with your systems. You shall > > carry out virus/malware scanning on your own before opening any > > attachment to this e-mail. The sender of this e-mail and Company > > including its sister concerns shall not be liable for any damage that > > may incur to you as a result of viruses, incompleteness of this message, > > a delay in receipt of this message or any other computer problems. > > > > ___ > > 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 > -- *Disclaimer* In addition to generic Disclaimer which you have agreed on our website, any views or opinions presented in this email are solely those of the originator and do not necessarily represent those of the Company or its sister concerns. Any liability (in negligence, contract or otherwise) arising from any third party taking any action, or refraining from taking any action on the basis of any of the information contained in this email is hereby excluded. *Confidentiality* This communication (including any attachment/s) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying of this communication is prohibited. Please inform originator if you have received it in error. *Caution for viruses, malware etc.* This communication, including any attachments, may not be free of viruses, trojans, similar or new contaminants/malware, interceptions or interference, and may not be compatible with your systems. You shall carry out virus/malware scanning on your own before opening any attachment to this e-mail. The sender of this e-mail and Company including its sister concerns shall not be liable for any damage that may incur to you as a result of viruses, incompleteness of this message, a delay in receipt of this message or any other computer problems. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] siprec module does response re-invite from a siprec server.
Hello, I am using opensips 2.4.7 and opensips is working as a siprec client with rtpproxy. It is working fine but it does not respond to any re-invite from siprec server as a refresher after a few seconds and the siprec server rejects the call with BYE due to timeout and recording stops there. Is there any configuration required for that? Thanks & Regards *Diptesh Patel* Software Developer Ecosmob Technologies Ltd, Ahmedabad Mo:*+919898962659* -- *Disclaimer* In addition to generic Disclaimer which you have agreed on our website, any views or opinions presented in this email are solely those of the originator and do not necessarily represent those of the Company or its sister concerns. Any liability (in negligence, contract or otherwise) arising from any third party taking any action, or refraining from taking any action on the basis of any of the information contained in this email is hereby excluded. *Confidentiality* This communication (including any attachment/s) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying of this communication is prohibited. Please inform originator if you have received it in error. *Caution for viruses, malware etc.* This communication, including any attachments, may not be free of viruses, trojans, similar or new contaminants/malware, interceptions or interference, and may not be compatible with your systems. You shall carry out virus/malware scanning on your own before opening any attachment to this e-mail. The sender of this e-mail and Company including its sister concerns shall not be liable for any damage that may incur to you as a result of viruses, incompleteness of this message, a delay in receipt of this message or any other computer problems. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] changing callerids
Hello Vic, Can you tell me from which route are you trying this function? It only allows on request route, branch route and failure route. I think you misunderstood how to use the exported function, let me guide you. It will not update only the user part of the 'from' uri but works on uri. So you need to create a custom string like below to fulfill your requirements and the first argument is for display part not for uri part. $avp(fromuri) = "sip:" + *$avp(650)* + "@" + $fd; It should be called only once at initial requests and the subsequent requests(if you loaded the dialog module and created module or used forced_dialog in the uri module) and responses(using tm module) will be automatically updated your 'from uri'. Refer the below example which helps you to guide how you can use this function in different use cases. *$avp(display) = "Jolin";* *$avp(fromuri) = "sip:+18736352...@myopensipsdomain.com "* *REPLACE BOTH display name and uri* *uac_replace_from("$avp(display)","$avp(fromuri)");* *e.g. received From: "Vic" >;tag=ca4a1348* * sent From: "Jolin" >;tag=ca4a1348* REPLACE ONLY display name *uac_replace_from("$avp(display)","");* *e.g. received From: "Vic" >;tag=ca4a1348* * sent From: "Jolin" ;tag=ca4a1348* *REPLACE ONLY uri WITHOUT TOUCHING display name* *uac_replace_from( ,"$avp(fromuri)");* *e.g. received From: "Vic" >;tag=ca4a1348* * sent From: "Vic" >;tag=ca4a1348* REMOVE display and REPLACE uri *uac_replace_from("","$avp(fromuri)");* *e.g. received From: "Vic" >;tag=ca4a1348* * sent From: >;tag=ca4a1348* For more information you can read the uri module documentation here. <https://opensips.org/html/docs/modules/devel/uac.html#func_uac_replace_from> *NOTE:* If you're using *3.X.X* version then avoid double quotes for avp variables. *e.g. **uac_replace_from($avp(display),$avp(fromuri));* Thanks & Regards *Diptesh Patel* Software Developer Ecosmob Technologies Ltd, Ahmedabad Mo:*+919898962659* On Fri, Jul 10, 2020 at 12:29 AM Vic Jolin wrote: > Hi, > > Are there other ways of "changing" callerids for a certain call aside from > uac_replace_from? > > And what is the correct way of doing this? > > I have uac_replace_from("$avp(650)", ""); > > I find it giving errors when I try to update the uri with > > sip:$avp(650)@ipadddress:poprt > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- *Disclaimer* In addition to generic Disclaimer which you have agreed on our website, any views or opinions presented in this email are solely those of the originator and do not necessarily represent those of the Company or its sister concerns. Any liability (in negligence, contract or otherwise) arising from any third party taking any action, or refraining from taking any action on the basis of any of the information contained in this email is hereby excluded. *Confidentiality* This communication (including any attachment/s) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying of this communication is prohibited. Please inform originator if you have received it in error. *Caution for viruses, malware etc.* This communication, including any attachments, may not be free of viruses, trojans, similar or new contaminants/malware, interceptions or interference, and may not be compatible with your systems. You shall carry out virus/malware scanning on your own before opening any attachment to this e-mail. The sender of this e-mail and Company including its sister concerns shall not be liable for any damage that may incur to you as a result of viruses, incompleteness of this message, a delay in receipt of this message or any other computer problems. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] adding and reading a SIP header to a 302 Redirect
Hello, The next destination(s) should be decided based on Contact Header(s) of 3xx Responses. You can configure one or more destinations based on priority and fail-over enabled to multiple destinations. But in your case I found, Contact Header is malformed i.e. *Contact: . * Thanks & Regards *Diptesh Patel* Software Developer Ecosmob Technologies Ltd, Ahmedabad Mo:*+919898962659* On Sat, May 30, 2020 at 5:47 PM Saint Michael wrote: > I need to add a new SIP header to the response below. > > > if ($rm=="INVITE") { > /* add the redirect destinations as branches */ > $branch = "sip:bat...@gotham.com"; > $branch = $avp(my_custom_uri); > /* sending a 3xx reply will automatically push all > * existing branches as Contact URIs */ > send_reply("302","Moved Temporarily"); > exit; > } > the final result should be: > > SIP/2.0 302 Moved Temporarily > Via: SIP/2.0/UDP 172.16.7.254:52169 > ;rport=52169;received=47.205.172.89;branch=z9hG4bK-524287-1---129f4244aaba9f04 > Call-ID: 102650Mzg4NmFiNTQzOGY5NDJmNjM3OTYzNmE5MzNlZDIwZmI > From: "X" ;tag=81a25c36 > To: .124.224.87>;tag=9e198dc4-7ce8-433d-ae23-05b9bc14d55a > > Identity:eyJhbGciOiJFUzI1NiIsInR5cCI6InBhc3Nwb3J0IiwicHB0Ijoic2hha2VuIiwieDV1IjoiaHR0cHM6Ly9jZXJ0LmV4YW1wbGUub3JnL3Bhc3Nwb3J0LmNlciJ9.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyI2MzE3OTE4Mzc4Il19LCJpYXQiOjE1OTA4MTEyMzgsIm9yaWciOnsidG4iOiI3Mjc0NDMzMDE5In0sIm9yaWdpZCI6IjEyM2U0NTY3LWU4OWItMTJkMy1hNDU2LTQyNjY1NTQ0MDAwMCJ9.AKViDWA3uonP6tt5cKBh0FUPY5zBuJnwZLQNTrp9LCWJ-vLY1Xx5i3_oXGh1ERL4tnD-KK5wsP3FdByDa_cjGw;info=< > https://cert.example.org/passport.cer>;alg=ES256;ppt=shaken > CSeq: 1 INVITE > Server: Asterisk PBX 16.10.0 > Contact: > Reason: Q.850;cause=0 > Content-Length: 0 > > also if I get that packet at my end, how do I extract the Identity header > and apply it to the next INVITE? > Is this even doable? > > > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- *Disclaimer* In addition to generic Disclaimer which you have agreed on our website, any views or opinions presented in this email are solely those of the originator and do not necessarily represent those of the Company or its sister concerns. Any liability (in negligence, contract or otherwise) arising from any third party taking any action, or refraining from taking any action on the basis of any of the information contained in this email is hereby excluded. *Confidentiality* This communication (including any attachment/s) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying of this communication is prohibited. Please inform originator if you have received it in error. *Caution for viruses, malware etc.* This communication, including any attachments, may not be free of viruses, trojans, similar or new contaminants/malware, interceptions or interference, and may not be compatible with your systems. You shall carry out virus/malware scanning on your own before opening any attachment to this e-mail. The sender of this e-mail and Company including its sister concerns shall not be liable for any damage that may incur to you as a result of viruses, incompleteness of this message, a delay in receipt of this message or any other computer problems. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] SIPREC server does not send BYE while capturing Early-Media.
Hello, I am using the SIPREC module to send the request to SRS with fail-over. While recording early media and after Originator Cancel OpenSIPS does not send a BYE request to the SRS. Please look at the script snippet of how I implemented that. if (is_method ("INVITE")) { if (siprec_start_recording ("sip:XX.XX.XXX.X00:5060")) { xlog ("L_INFO", "SIP RECORDING THROUGH XX.XX.XXX.X00"); } else if (siprec_start_recording ("sip:XX.XX.XXX.X04:5060")) { xlog ("L_INFO", "SIP RECORDING THROUGH XX.XX.XXX.X04"); } else sl_send_reply ("404", "SIPREC Server NOT FOUND "); } } local_route { if(is_method("INVITE")) { xlog("L_INFO","LOCAL ROUTE"); subst('/^Contact:(.*)(.*)$/Contact:\1;+sip.src\3/ig'); } } Thanks & Regards *Diptesh Patel* Software Developer Ecosmob Technologies Ltd, Ahmedabad Mo:*+919898962659* -- *Disclaimer* In addition to generic Disclaimer which you have agreed on our website, any views or opinions presented in this email are solely those of the originator and do not necessarily represent those of the Company or its sister concerns. Any liability (in negligence, contract or otherwise) arising from any third party taking any action, or refraining from taking any action on the basis of any of the information contained in this email is hereby excluded. *Confidentiality* This communication (including any attachment/s) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying of this communication is prohibited. Please inform originator if you have received it in error. *Caution for viruses, malware etc.* This communication, including any attachments, may not be free of viruses, trojans, similar or new contaminants/malware, interceptions or interference, and may not be compatible with your systems. You shall carry out virus/malware scanning on your own before opening any attachment to this e-mail. The sender of this e-mail and Company including its sister concerns shall not be liable for any damage that may incur to you as a result of viruses, incompleteness of this message, a delay in receipt of this message or any other computer problems. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] 502 Bad Gateway events leads to calls being rejected with 480 Temporarily Unavailable
Hello Solarmon, I think, The * ds_mark_dst("p");* put your destinations on Probing and after a few seconds you will get the reply for OPTIONS and now your destinations are Active. Are you making a second call immediately? If yes then it is clear. Please remove the ds_mark_dst("p"), OpenSIPS automatically change the destination's state using OPTIONS. Thanks & Regards *Diptesh Patel* Software Developer Ecosmob Technologies Ltd, Ahmedabad Mo:*+919898962659* On Mon, Jun 8, 2020 at 4:27 PM solarmon wrote: > Hi Diptesh , > > Thanks for your reply. > > Apologies, I'm using the term 'blacklist' to generally mean that the > endpoints are not available. > > Also, the 502 Bad Gateway is response to an INVITE, not SIP OPTIONS, > returned by the far end and the ITSP is just passing that back to us, > because the call has failed. For such call failures, I'm not expecting for > the dispatcher endpoints to be marked as unavailable for routing. > > I am not using, or have not set, the '*ds_define_blacklist (str)*' option > in my dispatcher module config. > > My probing mode is: > > modparam("dispatcher", "ds_probing_mode", 1) > > I'm not seeing anything in the logs regarding the dispatcher nodes going > into Probing mode - should there be logs for that, or can it be enabled to > be logged? > > When I check the endpoints with ' opensipsctl dispatcher dump' they always > seem to be '*Active*' - so it is either they are like that, or they > may have only been in '*Probing*' mode very briefly. Again, I was hoping > to see mode/state change in the historical logs. > > In my *opensips.cfg* (which was created for me) I can see the following > code, which looks like this is where it is introducing this behaviour in > question: > > failure_route[call_failover] > { > xlog("[$ci] call failed to established with $T_reply_code code\n"); > > rtpproxy_unforce("$avp(rtpp_set)"); > > if (t_was_cancelled()) { > t_reply("487","Request cancelled"); > exit; > } > > # any failure indication ? > if ( t_check_status("[56][0-9][0-9]") > || (t_check_status("408") && t_local_replied("all")) > ) { > xlog("[$ci] destination $rd failed with $T_reply_code -> > retry\n "); > >* ds_mark_dst("p");* > > if ( ds_next_domain() ) { > xlog("[$ci] using new destination <$rd>\n "); > > # send it out again > t_on_failure("call_failover"); > t_relay(); > exit; > } else { > xlog("[$ci] no other destination to retry\n "); > t_reply("503","Service not available"); > exit; > } > } > > # if call failure, allow the reply to propagate to caller > exit; > } > > > > Thank you for the tip about the 'modparam("dispatcher", > "options_reply_codes", "502")' option. I will try that if it is not > recommend to change the above code. > > Thank you. > > > On Mon, 8 Jun 2020 at 10:47, Diptesh Patel > wrote: > >> Hello Solarmon, >> >> Need some clarification on term blacklisting, Are you using the blacklist >> for Probing Mode of destination? or Are you using the *'ds_define_blacklist >> (str)' *parameter. If you are not using the blacklist parameter then >> below information help you. It is great if you share your script snippet >> and output of *'opensipsctl dispatcher dump'* which shows you the >> current status of your destinations. >> >> If you are getting success(200 OK) response on OPTIONS then it is not >> possible that you got a negative response from a destination and it will >> not be blacklisted(probing mode) in dispatcher until you blacklist(probing >> mode) from the script using 'ds_mark_dst()' exported function. I doubt that >> you are also getting '502 Bad Gateway' on OPTIONS which is sending to the >> destination to check the availability. If It is right and you want to add >> the 502 response as a good response for OPTIONS. you can add the 502 as >> *'modparam("dispatcher", >> "options_reply_codes", "502")'.* >> >> Thanks &am
Re: [OpenSIPS-Users] 502 Bad Gateway events leads to calls being rejected with 480 Temporarily Unavailable
Hello Solarmon, Need some clarification on term blacklisting, Are you using the blacklist for Probing Mode of destination? or Are you using the *'ds_define_blacklist (str)' *parameter. If you are not using the blacklist parameter then below information help you. It is great if you share your script snippet and output of *'opensipsctl dispatcher dump'* which shows you the current status of your destinations. If you are getting success(200 OK) response on OPTIONS then it is not possible that you got a negative response from a destination and it will not be blacklisted(probing mode) in dispatcher until you blacklist(probing mode) from the script using 'ds_mark_dst()' exported function. I doubt that you are also getting '502 Bad Gateway' on OPTIONS which is sending to the destination to check the availability. If It is right and you want to add the 502 response as a good response for OPTIONS. you can add the 502 as *'modparam("dispatcher", "options_reply_codes", "502")'.* Thanks & Regards *Diptesh Patel* Software Developer Ecosmob Technologies Ltd, Ahmedabad Mo:*+919898962659* On Mon, Jun 8, 2020 at 2:24 PM solarmon wrote: > Hi, > > I'm trying to understand whether this is the correct or expected behaviour. > > We have two destinations configured in Dispatcher. > > What I am noticing is that when we receive 502 Bad Gateway messages > (logged as ("call failed to established with 502 code") from both > endpoints. After both endpoints have returned 502 Bad Gateway, opensips > pass back 503 Service Unavailable back to the originating endpoint of the > call. However, subsequent calls are being immediately rejected with 480 > Temporarily Unavailable (logged as "failed to find an available > destination, rejecting") for a period of time. > > It seems that opensips is blacklisting the Dispatcher endpoints because of > receiving the 502 Bad Gateway messages. Is this the correct/expected > behaviour? I would have thought the blacklisting should be based on the SIP > OPTIONS sent to the Dispatcher endpoints. > > I do not currently see any issues with SIP OPTIONS to these endpoints so > I'm confused as to why they are seemingly blacklisted. > > If this is the correct/expected behaviour, can it be changed to only > blacklist based on the SIP OPTIONs pings? > > Thank you. > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- *Disclaimer* In addition to generic Disclaimer which you have agreed on our website, any views or opinions presented in this email are solely those of the originator and do not necessarily represent those of the Company or its sister concerns. Any liability (in negligence, contract or otherwise) arising from any third party taking any action, or refraining from taking any action on the basis of any of the information contained in this email is hereby excluded. *Confidentiality* This communication (including any attachment/s) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying of this communication is prohibited. Please inform originator if you have received it in error. *Caution for viruses, malware etc.* This communication, including any attachments, may not be free of viruses, trojans, similar or new contaminants/malware, interceptions or interference, and may not be compatible with your systems. You shall carry out virus/malware scanning on your own before opening any attachment to this e-mail. The sender of this e-mail and Company including its sister concerns shall not be liable for any damage that may incur to you as a result of viruses, incompleteness of this message, a delay in receipt of this message or any other computer problems. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] ACK Routing Issue
Hello Mark, You need to modify your script. Let me explain to you how topology hiding works. If you're using topology hiding then we are hiding the information from the other node right? So the topology hiding stores your next hop information. When you call topology_hiding_match() then it will replace the request uri with the next hop. So you need to use topology_hiding_match() on every within dialog request(sequential requests), otherwise it will create looping. you can check the following snippet which i modified. It helps you !! if (has_totag()) { xlog("CUSTOM_LOG: in-dialog $rm has message flags: $mf and branch flags: $bf"); #Set correct SIP User-Agent Header if (remove_hf("User-Agent")) { xlog("CUSTOM_LOG: Setting SIP User-Agent on In-Dialog Request"); insert_hf("User-Agent: OpenSIPS\r\n"); } # handle hop-by-hop ACK (no routing required) if ( is_method("ACK") && t_check_trans() ) { xlog("CUSTOM_LOG: ACK detected with valid transaction - t_relay"); t_relay(); exit; } if (topology_hiding_match()) { ##TH match and relay all the within dialog packets. t_relay(); exit; } else { xlog("CUSTOM_LOG: cannot match request to a dialog \n"); send_reply(404,"Not found"); exit; } } Thanks & Regards *Diptesh Patel* Software Developer Ecosmob Technologies Ltd, Ahmedabad Mo:*+919898962659* On Fri, Jun 5, 2020 at 6:37 PM Mark Farmer wrote: > Thanks Diptesh > > I'm using topology hiding, so now I have this: > > if (has_totag()) { > xlog("CUSTOM_LOG: in-dialog $rm has message flags: $mf and > branch flags: $bf"); > > #Set correct SIP User-Agent Header > if (remove_hf("User-Agent")) { > xlog("CUSTOM_LOG: Setting SIP User-Agent on In-Dialog > Request"); > insert_hf("User-Agent: OpenSIPS\r\n"); > } > > if (!topology_hiding_match() ) { > xlog("CUSTOM_LOG: cannot match request to a dialog > \n"); > send_reply(404,"Not found"); > } > > # handle hop-by-hop ACK (no routing required) > if ( is_method("ACK") && t_check_trans() ) { > xlog("CUSTOM_LOG: ACK detected with valid > transaction - t_relay"); > t_relay(); > exit; > } > > I don't see a 404 going out so I think topology_hiding_match is working. > But it tries to send the ACK to itself on it's private interface (I have > mhomed=1). > > ACK sip:+44XX@10.150.50.72;did=e07.595f3776 SIP/2.0 > Via: SIP/2.0/UDP PUB.LIC.IP.ADDR:5060;branch=z9hG4bKc219.d1f5b08.2 > From: ;tag=gK0c801c8d > To: ;tag=3800350621-1224267434 > Call-ID: 543691539-3800350621-1514620...@sbc-uk-bs13b.uk.sdin.bt.net > CSeq: 202841 ACK > Max-Forwards: 69 > Content-Length: 0 > > Best regards > Mark. > > > On Fri, 5 Jun 2020 at 13:03, Diptesh Patel > wrote: > >> Hello Mark, >> >> Are you using Topology Hiding or Loose Routing? >> >> If you are using Topology Hiding then you need to match the topology >> using *topology_hiding_match()* first. >> >> It is great if you can share SIP packets. >> >> Thanks & Regards >> *Diptesh Patel* >> Software Developer >> Ecosmob Technologies Ltd, >> Ahmedabad >> Mo:*+919898962659* >> >> >> On Fri, Jun 5, 2020 at 5:00 PM Mark Farmer wrote: >> >>> Hi everyone >>> >>> I've upgraded an OpenSIPS box to 3.1 and am now seeing an issue with >>> ACK's trying to route to an incorrect IP - in this case our own advertised >>> IP. >>> >>> I think I'm right in saying that PRACK's & ACK's are treated equally and >>> should route in the same manner? However, PRACK's are routing correctly. >>> >>> I have this: >>> >>> if (has_totag()) { >>> --- >>> >>> # handle hop-by-hop ACK (no routing required) >>> #if ( is_method("ACK") && t_check_trans() ) { >>> if (is_method("ACK")) { >>> t_relay(); >>> exit; >>> } >>> --- >>> >>> Thanks for any ideas! >>> Mark. >>> >>> >>> _
Re: [OpenSIPS-Users] ACK Routing Issue
Hello Mark, Are you using Topology Hiding or Loose Routing? If you are using Topology Hiding then you need to match the topology using *topology_hiding_match()* first. It is great if you can share SIP packets. Thanks & Regards *Diptesh Patel* Software Developer Ecosmob Technologies Ltd, Ahmedabad Mo:*+919898962659* On Fri, Jun 5, 2020 at 5:00 PM Mark Farmer wrote: > Hi everyone > > I've upgraded an OpenSIPS box to 3.1 and am now seeing an issue with ACK's > trying to route to an incorrect IP - in this case our own advertised IP. > > I think I'm right in saying that PRACK's & ACK's are treated equally and > should route in the same manner? However, PRACK's are routing correctly. > > I have this: > > if (has_totag()) { > --- > > # handle hop-by-hop ACK (no routing required) > #if ( is_method("ACK") && t_check_trans() ) { > if (is_method("ACK")) { > t_relay(); > exit; > } > --- > > Thanks for any ideas! > Mark. > > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- *Disclaimer* In addition to generic Disclaimer which you have agreed on our website, any views or opinions presented in this email are solely those of the originator and do not necessarily represent those of the Company or its sister concerns. Any liability (in negligence, contract or otherwise) arising from any third party taking any action, or refraining from taking any action on the basis of any of the information contained in this email is hereby excluded. *Confidentiality* This communication (including any attachment/s) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying of this communication is prohibited. Please inform originator if you have received it in error. *Caution for viruses, malware etc.* This communication, including any attachments, may not be free of viruses, trojans, similar or new contaminants/malware, interceptions or interference, and may not be compatible with your systems. You shall carry out virus/malware scanning on your own before opening any attachment to this e-mail. The sender of this e-mail and Company including its sister concerns shall not be liable for any damage that may incur to you as a result of viruses, incompleteness of this message, a delay in receipt of this message or any other computer problems. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users