Re: [OpenSIPS-Users] Load balancer probing from incorrect interface
Hi Bill, hmm...that's a tough one as, again, the kernel, when routing to destination 10.0.10.1 seas as alternatives both .2 and .3 local interfaces, but for whatever reason (kernel specific), .3 is used (default ? first configured?)... And how the auto detection is done in opensips, you cannot simply do like: detect .3 -> it is not used by opensips -> detect next one, .2 -> is used by opensips, let's go for it. maybe switching on .3 on a different port 5070 will do th trick. Regards, Bogdan Bill W wrote: Hi Bogdan, Thanks so much for explaining how interface selection works. Unfortunately the other interfaces all have daemons listening on port 5060 and are in production and I can't simply reallocate IPs. So for the error messages below, is the problem that opensips is trying to send out a packet on the automatically selected IP but since port 5060 is occupied on that address, the socket is failing? If so, is it possible to specify a different source port so the packet will go out? Thanks, Bill On 11/12/2010 5:43 AM, Bogdan-Andrei Iancu wrote: Hi Bill, I was strictly speaking about the mhomed=1 case. Opensips doing detection (based on default IP routing rules from kernel) "sees" that it should use first available interface (as returned by kernel)..it cannot simply pick up all possible and see which one is also listening on. in your case, if 10.0.10.2 and 10.0.10.3 doing the same, but 10.0.10.3 is used by default by kernel for reaching 10.0.10.xx network, simply use 10.0.10.3 for opensips also. Regards, Bogdan Bill W wrote: Hey Bogdan, I think we're confusing two issues. The first issue was when mhomed=0, it was trying to options ping the internal interface with an external IP, which clearly won't work, as you described below. The second issue is when I set mhomed=1, opensips is cannot options ping anything at all because it's trying to bind to an IP that doesn't belong to opensips. For example: DBG:tm:t_uac: next_hop= DBG:core:mk_proxy: doing DNS lookup... ERROR:core:get_out_socket: -- detected IP 10.0.10.2,proto=1 ERROR:tm:uri2sock: no corresponding socket for af 2 ERROR:tm:t_uac: no socket found ERROR:load_balancer:lb_do_probing: probing failed 10.0.10.1 is on another machine 10.0.10.2 is on this machine 10.0.10.3 is on this machine, and allocated to opensips via listen= Opensips should be binding to 10.0.1.3 which is specified in the listen= directive, not 10.0.10.2, which is another IP on the box but is not allocated to opensips. Summary: With mhomed=1 opensips is detecting the correct interface to ping from, but it is selecting an IP on that interface that is not specified in the listen= directives. Hopefully I explained the behavior clearly. Thanks, Bill. On 11/11/2010 11:39 AM, Bogdan-Andrei Iancu wrote: It looks to me more like a misconfiguration on network level for the machine ...Opensips tries to detect the interface with the default route to the destination IP (the info id provided by kernel)..So if the kernel "sees" 66.180.205.11 as default interface for reaching a private IP.does look sane to me :) Regards, Bogdan Bill W wrote: Ahhh, I see what's going on. Opensips is trying to probe from a different IP on that interface instead of the IP alias opensips bound to. For example, on the public interface I have IP 66.180.205.11 Then I have an IP alias of 66.180.205.3 on that same interface: eth0 66.180.205.11 eth0:0 66.180.205.3 DBG:tm:t_uac: next_hop= DBG:core:mk_proxy: doing DNS lookup... ERROR:core:get_out_socket: -- detected IP 66.180.205.11,proto=1 ERROR:core:get_out_socket: no socket found ERROR:tm:uri2sock: no corresponding socket for af 2 ERROR:tm:t_uac: no socket found ERROR:load_balancer:lb_do_probing: probing failed It's not getting the IP from the listen= directive but from an interface probe, which is getting the wrong IP. On 11/11/2010 6:29 AM, Bogdan-Andrei Iancu wrote: Hi Bill, could you try the attached patch along mhomed option? the patch will simply print what is the IP opensips is trying to use for the outgoing probes Regards, Bogdan Bill W wrote: Hey Bogdan, Yes, I have 3 listen= lines; two with public IPs and one with a private IP. When I remove the mhomed=1 then things work as intended except for the probing. I can proxy traffic correctly on all interfaces. When I enable mhomed=1, then I get the errors below. Thanks, Bill On 11/10/2010 5:38 AM, Bogdan-Andrei Iancu wrote: Hi Bill, is your opensips actually listening (configured as listener in .cfg) on a interface in the private network (where the probing needs to be done) ?? Regards, Bogdan Bill W wrote: Hey Bogdan, I enabled the mhomed=1 parameter, and now I'm getting a bunch of errors in the logs. ERROR:tm:t_uac: no socket found ERROR:load_balancer:lb_do_probing: probing failed ERROR:core:get_out_socket: no socket found ERROR:tm:uri2sock: no corresponding socket for af 2 Thoughts? Bill On 11/8/2010 6:05 AM, Bogdan-Andrei Iancu wr
Re: [OpenSIPS-Users] Load balancer probing from incorrect interface
Bill W. wrote: Hello Bogdan, Okay I've been researching this more. I am not a programmer, but it looks like get_out_socket and find_si in forward.c and socket_info.c are just comparing ip addresses, and when opensips is trying to probe an interface on the same machine, but is not bound to that IP, then source IP address selection fails. The challenge is that my instance of opensips is an HA service between two machines, so I cannot simply specify IPs to listen on in opensips.cfg because the source IPs I need to probe from will change depending on which machine opensips is running on. That is not possible - you cannot change at runtime the interfaces opensips works with - you cannot make it to listen on a newly added interface, you cannot make it stop using an already configured interface. Each time you change the interfaces on the server, if you need to restart opensips. It looks like the solution to make this work with the existing get_out_socket code is to be able to specify interface aliases in the listen= directive. If I could do something like this: listen=udp:eth0:5090# for probing eth0 IP alias listen=udp:eth0.0:5090 # for probing eth0:0 IP alias listen=udp:eth1.1:5090 # for probing eth1:1 IP alias Then opensips could pick the appropriate IP from the interface/alias on the machine where it is running. If that's too complex, then the brute-force method would be to allow this: listen=udp:*:5090 # for probing to be honest, never tried something like that - let me know if it works for you Regards, Bogdan I can't simply use the port= directive because I've got other services running on 5060. Thoughts? Thanks! Bill On 11/12/10 8:27 PM, Bill W wrote: Hi Bogdan, Thanks so much for explaining how interface selection works. Unfortunately the other interfaces all have daemons listening on port 5060 and are in production and I can't simply reallocate IPs. So for the error messages below, is the problem that opensips is trying to send out a packet on the automatically selected IP but since port 5060 is occupied on that address, the socket is failing? If so, is it possible to specify a different source port so the packet will go out? Thanks, Bill ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Bootcamp www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] db_mysql core dump
Hi Duane, in frame 2 print the followings: _h _h->curr_ps (struct prep_stmt*)(*(_h)->curr_ps) ((struct prep_stmt*)(*(_h)->curr_ps))->stmts ((struct prep_stmt*)(*(_h)->curr_ps))->stmts->table.s ((struct prep_stmt*)(*(_h)->curr_ps))->stmts->query.s Thanks and regards, Bogdan duane.lar...@gmail.com wrote: I searched the mailing list and couldn't find anything related to this. For the last couple of nights OpenSIPS has died on me. Each time in Syslog I see Nov 13 02:54:25 Proxy01 kernel: [1750051.944109] opensips[6645]: segfault at 0 ip 7f7fd431bafd sp 7fff67048fc0 error 6 in db_mysql.so[7f7fd4311000+d 000] Nov 13 02:54:25 Proxy01 ./opensips[6654]: CRITICAL:core:receive_fd: EOF on 24 Nov 13 02:54:25 Proxy01 ./opensips[6631]: INFO:core:handle_sigs: child process 6645 exited by a signal 11 Nov 13 02:54:25 Proxy01 ./opensips[6631]: INFO:core:handle_sigs: core was generated Nov 13 02:54:25 Proxy01 ./opensips[6631]: INFO:core:handle_sigs: terminating due to SIGCHLD The backtrace has the following Core was generated by `./opensips -f /usr/local/etc/opensips/opensips.cfg'. Program terminated with signal 11, Segmentation fault. #0 0x7f7fd431bafd in db_mysql_val2bind (v=0x7fff67049120, binds=0x7ffd68, i=112) at val.c:274 274 *(binds[i].is_null) = 0; (gdb) backtrace #0 0x7f7fd431bafd in db_mysql_val2bind (v=0x7fff67049120, binds=0x7ffd68, i=112) at val.c:274 #1 0x7f7fd431607a in db_mysql_do_prepared_query (conn=0x7ff5f8, query=0x7f7fd452e6d0, v=0x7fff67049100, n=2, uv=0x0, un=0) at dbase.c:443 #2 0x7f7fd4318305 in db_mysql_delete (_h=0x7ff5f8, _k=0x7fff67049180, _o=0x7fff67049160, _v=0x7fff67049100, _n=2) at dbase.c:893 #3 0x7f7fd0a96b10 in msg_watchers_clean (ticks=out>, param=) at subscribe.c:484 #4 0x0049e3da in timer_ticker () at timer.c:325 #5 run_timer_process () at timer.c:395 #6 start_timer_processes () at timer.c:475 #7 0x0042be57 in main_loop (argc=, argv=0x7fff67049378) at main.c:867 #8 main (argc=, argv=0x7fff67049378) at main.c:1388 If need be I could also look in the MySQL logs and see what the last execution was. Any ideas? ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] CANCELing the connection - no totag in ACK
Maciej, skip auth challenge for the ACK requests as you cannot send replies for an ACK So you have 2 options: 1) if you do not want to auth ACK at all, simple skip them from auth 2) if you want the auth ACK, if the ACK does not have an Authorize hdr from beginning (as RFC sais) you cannot do much about it. Regards, Bogdan Maciej Bylica wrote: Iñaki It's well explained in RFC 3261. An ACK for a [3456]XX response must have same branch and same CSeq number (but "ACK" method) as the INVITE of the transaction. I meant some hints regarding script configuration, because as far as i understand i should double check my .cfg Okay i may proxy auth only INVITE methods - at this moment i do have if (!(method=="REGISTER") && from_uri==myself) /*no multidomain version*/ { if (!proxy_authorize("", "subscriber")) { xlog("L_INFO","proxy auth"); proxy_challenge("", "0"); exit; } so there wont be any problem to filter that out, but how to inspect branch, CSeq - isn't that functionality hardcoded? Thx, Maciej. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensipsctl interaction
Hi Anton, how do you load these params at startup and where do you store them (what kind of variables)? Regards, Bogdan Anton Zagorskiy wrote: Hello. I have some parameters that are stored in a DB. I'm loading it once time when opensips starts. After when they are changed in the DB I want to re-read it. How can I do this without restarting opensips? WBR, Anton Zagorskiy VoIP Developer, Oyster Telecom Phone.: +7 812 601-0666 Fax: +7 812 601-0593 a.zagors...@oyster-telecom.ru www.oyster-telecom.ru ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips BYE issue
Hi Tomasz, It looks like the routing set for the call is broken...Could you post here the SIP capture (from opensips server) of such call (showing in and out traffic, from the beginning of the call, to the end) Regards, Bogdan Tomasz wrote: Hello, Can you helo me with some issue? I have such scenario: Dialer registered to asterisk via outbound proxy (TCP) and XLite connected to the same asterisk via UDP. When I make a call from dialer to XLite I have no problem until I want to end a call on XLite side. When XLite disconnects a call, than on dialer side the call is not finished. Wireshark logs show all comunication goes via TCP but BYE is sent from opensips via UDP. Is it possible to force opensips to send BYE via TCP too. I tried: if (is_method("BYE") && src_ip=="xx.xx.xx.xx") { search_append('Request-URI:.*sip:[^>[:cntrl:]]*', ';transport=tcp'); xlog("L_INFO", " $ru \n"); } but this looks like not working for me. RURI port and IP is correct but transport is not set to TCP. Can you help me? \ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Generating CDRs and Dialogs
Hello, i'm Neven, a freshman at OpenSIPS. I'm using OpenSIPS 1.6.3 /w Control Panel 4.0. Now I have question about generating CDRs and Dialogs. MI connector is setup correctly, smonitor is working properly also. I have two extensions 41001 and 41002, which use authentication, and they can communicate normally. Now I have two problems: 1. When I have call in progress i should see that dialog by issuing "dlg_list" command, correct me if I'm wrong. But when I use "dlg_list" command (command is issued inside CP, under MI frontend) I get something like "Executed successfully, output not generated". In database OPENSIPS I also don't see dialog data in table, neither in CP -> System -> Dialog Part of opensips.cfg for dialog (some parts are omitted) loadmodule "rr.so" loadmodule "tm.so" loadmodule "dialog.so" modparam("dialog", "enable_stats", 1) modparam("dialog", "db_url", "mysql://opensips:opensip...@localhost /opensips") modparam("dialog", "db_mode", 1) modparam("dialog", "db_update_period", 90) modparam("dialog", "table_name", "dialog") This is my first problem... :( 2. My second problem is with CDRS... I can get any CDRS generated, i've even try manually run generate-cdrs_mysql.sh during call, I tried directly in database to call stored procedure, I tried to run script using cron, but with no success. I've tried to set permissions to 777. This was the first thing i've done: mysql –D opensips -p < cdrs.sql mysql –u root –p mysql> use opensips mysql –D opensips -p < opensips_cdrs_1_6.mysql I put correct database credentials and data in generate-cdrs_mysql.sh. But i don't know what problem is I assume my connection to database is working because "location" table is filling when new peer registers to server. 3. And i have question (you haven't seen that coming :) ) which is best method for accounting RADIUS or generating cdrs via generate-cdrs_mysql.sh script. Please help me :) P.S. Sorry if some of questions were stupid, but i need somewhere to start. And it seems I stuck at very beginning, and i'm long way from NAT traversal, drouting and other complex things. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] ACK and NAT problem
Hi!! I load balancing between 2 asterisk,the load_balancer it s done correctly but the calls hangs up after 10 second approximately. My setup is (just with 1 asterisk): Cisco GW (NAT)> Opensips > Asterisk My problem is that opensips never receive the ACK from Cisco GW even if this last one sent it. CISCO logs: ACK sip:911126...@*public ip of asterisk* :5060 SIP/2.0 Route: I think cisco reply ACK to Asterisk through the internal ip of opensips cause opensips did not provide Cisco with his public IP (NAT). Can somebody help me with this?? I heard aboutfix_nated_contact() but i don't know how and where in my script¿Somebody send me examples ? Thank you very much!! my opensips.cfg: route{ if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","looping"); exit; } if ($rU==NULL) { # request with no Username in RURI sl_send_reply("484","Address Incomplete"); exit; } if (!has_totag()) { # initial request record_route(); } else { # sequential request -> obey Route indication loose_route(); t_relay(); exit; } if ( is_method("CANCEL") ) { if ( t_check_trans() ) t_relay(); exit; } # from now on we have only the initial requests if (!is_method("INVITE")) { send_reply("405","Method Not Allowed"); exit; } # detect resources and do balancing if (method=="INVITE") { load_balance("1","calls"); } # LB function returns negative if no suitable destination (for requested resources) is found, # or if all destinations are full if ($retcode<0) { sl_send_reply("500","Service full"); exit; } xlog("Selected destination is: $du\n"); # send it out if (!t_relay()) { sl_reply_error(); } } -- Aviso legal: Este mensaje electrónico está dirigido únicamente a la(s) dirección(es) indicadas anteriormente; el carácter confidencial, personal e intransferible del mismo está protegido legalmente. Cualquier revelación, uso o reenvío no autorizado, completo o en parte, está prohibido. Si ha recibido este mensaje por equivocación, notifíquelo inmediatamente a la persona que lo ha enviado y borre el mensaje original junto con sus ficheros anexos sin leerlo ni grabarlo, total o parcialmente. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Nat helper in 1.6.2
Hello, we upgraded from OpenSer 1.2 to OpenSIPS 1.6.2. For NAT traversal we have used nathelper + mediaproxy in 1.2. However in 1.6.2 both modules are very different, and we are looking for the best way to upgrade. In previous installations we had for example te following: if (client_nat_test("3") && !is_present_hf("Route")){ setflag(8); force_rport(); fix_contact(); append_hf("P-hint: NAT\r\n"); } What is the equivalent for this in 1.6.2? As well as fix_nated_contact(); What is the equivalent for this in 1.6.2? As well as if (client_nat_test("1")) { fix_contact(); } What is the equivalent for this in 1.6.2? -- With kind regards Peter Steinbach Telefaks Services GmbH Theo-Geisel-Strasse 25 D 61250 Usingen, Germany mailto:lists (att) telefaks.de Internet: www.telefaks.de ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] radius debugging
Hi Brett, looks like a VSA (Vendor-Specific-Attribute) AVP Cisco like. and you cannot add such nested AVP with opensips... Regards, Bogdan Brett Nemeroff wrote: Hello List, I'm wondering if there is a good way to debug radius requests. I'm sending Auth requests via radius_send_auth. I'm pretty sure my sets are broken, but I can't really see what it's attempting to send out. The radius server is on another server and isn't a local freeradius. One of my issues is that I need to send a param like: Cisco-AVPair="h323-gw-address=1.2.3.4" I'm not sure how to populate that into a set. I've tried to set up the whole "h323-gw-address=1.2.3.4" bit as the contents of an avp like $avp(s:some_avp)="h323-gw-address=1.2.3.4"; and using that AVP as the value in the set. But that doesn't work either. Any advice? Thanks, Brett ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Bootcamp 15 - 19 November 2010, Edison, New Jersey, USA www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensipsctl interaction
Hello. I'm loading them in the startup_route and store them using cache_store. Now I'm using the following scheme: 1. I defined a variable in the cfgutils module using modparam("cfgutils", "shvset", "blah") 2. In the main route block I check does blah's value equal 2 (for example). If it is, I reload data from DB. 3. When I need to reload data I use a command 'opensipsctl fifo shv_set blah int 2'. The main inconvenience is that I need to call (or to send any valid SIP request) to someone to reload data. > > Hi Anton, > > how do you load these params at startup and where do you store them > (what kind of variables)? > > Regards, > Bogdan > > Anton Zagorskiy wrote: > > Hello. > > > > I have some parameters that are stored in a DB. I'm loading it once > time > > when opensips starts. > > After when they are changed in the DB I want to re-read it. How can I > do > > this without restarting opensips? > > > > > > > > > > > > > > WBR, Anton Zagorskiy > > VoIP Developer, Oyster Telecom > > Phone.: +7 812 601-0666 > > Fax: +7 812 601-0593 > > a.zagors...@oyster-telecom.ru > > www.oyster-telecom.ru > > > > > > > > > > > > ___ > > Users mailing list > > Users@lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > > > -- > Bogdan-Andrei Iancu > OpenSIPS Bootcamp > 15 - 19 November 2010, Edison, New Jersey, USA > www.voice-system.ro > > > ___ > 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