Re: [OpenSIPS-Users] ACK and NAT problem
Hello Bogdan, Thanks for reply my email and just say i fixed the problem.It was exactly like you explain in your email so i did 2 changes in my opensips.cfg: first i preset the record route with my public ip ""record_route_preset("Public IP")" and second i put aliases= "Public IP" and then everything seems work well. Best Regards and great job!! Nawfel 2010/11/25 Bogdan-Andrei Iancu > Hi Nawfel, > > The problem is that opensips, as running on a private address, will > advertise in Route hdr that private IP (that will be useless when GW tries > to route the ACK). > > So, currently, what is the way your opensips is reachable from outside ? > > Best regards, > Bogdan > > Nawfel Oujdi wrote: > >> 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 >> >> > > > -- > 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 > -- Nawfel Oujdi *Ingeniero VoIP* nou...@egtelecom.es EG telecom S.A | www.egtelecom.es Oficina: *902 050 080* Agustín de Foxá, 25 - 9B | 28036 Madrid -- 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/listin
[OpenSIPS-Users] opensips 100% cpu
Hello, my opensips process goes to 100% cpu after first call with default script and auth_aaa module enabled. No such problem at all when auth_aaa disabled. OS FreeBSD 8.1/amd64 #loadmodule "auth_aaa.so" #modparam("auth_aaa", "aaa_url", "radius:/usr/local/etc/radiusclient-ng/radiusclient.conf") #modparam("auth_aaa", "service_type", 15) It hangs at modules/tm/t_reply.c on LOCK_REPLIES( t ); * +if (!onreply_avp_mode) LM_DBG("!onreply_avp_mode!\n"); +if (!has_reply_route)LM_DBG("!has_reply_route!\n"); if (!onreply_avp_mode || !has_reply_route) { + LM_DBG("Before lock\n"); /* lock the reply*/ LOCK_REPLIES( t ); +LM_DBG("After lock\n"); } Here logs, without loadmodule "auth_aaa.so" and modparam auth_aaa Nov 26 15:33:14 noc-pbx /usr/local/sbin/opensips[70850]: DBG:tm:reply_received: org. status uas=0, uac[0]=0 local=0 is_invite=0) Nov 26 15:33:14 noc-pbx /usr/local/sbin/opensips[70850]: DBG:tm:reply_received: !onreply_avp_mode! Nov 26 15:33:14 noc-pbx /usr/local/sbin/opensips[70850]: DBG:tm:reply_received: !has_reply_route! Nov 26 15:33:14 noc-pbx /usr/local/sbin/opensips[70850]: DBG:tm:reply_received: Before lock Nov 26 15:33:14 noc-pbx /usr/local/sbin/opensips[70850]: DBG:tm:reply_received: After lock Nov 26 15:33:14 noc-pbx /usr/local/sbin/opensips[70850]: DBG:tm:t_should_relay_response: T_code=0, new_code=200 Nov 26 15:33:14 noc-pbx /usr/local/sbin/opensips[70850]: DBG:tm:relay_reply: branch=0, save=0, relay=0 with them Nov 26 15:35:33 noc-pbx /usr/local/sbin/opensips[70900]: DBG:tm:reply_received: org. status uas=0, uac[0]=0 local=0 is_invite=0) Nov 26 15:35:33 noc-pbx /usr/local/sbin/opensips[70900]: DBG:tm:reply_received: !onreply_avp_mode! Nov 26 15:35:33 noc-pbx /usr/local/sbin/opensips[70900]: DBG:tm:reply_received: !has_reply_route! Nov 26 15:35:33 noc-pbx /usr/local/sbin/opensips[70900]: DBG:tm:reply_received: Before lock ..100%CPU. gdb Loaded symbols for /usr/local/lib/libradiusclient-ng.so.2 Reading symbols from /usr/local/lib/opensips/modules/auth_aaa.so...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/opensips/modules/auth_aaa.so Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. Loaded symbols for /libexec/ld-elf.so.1 [Switching to Thread 800c041c0 (LWP 100216)] 0x00080089e74c in sched_yield () from /lib/libc.so.7 (gdb) bt #0 0x00080089e74c in sched_yield () from /lib/libc.so.7 #1 0x00080073e10f in pthread_mutex_getyieldloops_np () from /lib/libthr.so.3 #2 0x0008014f98a2 in reply_received () from /usr/local/lib/opensips/modules/tm.so #3 0x0041c5fe in forward_reply () #4 0x00444078 in receive_msg () #5 0x004746d4 in udp_rcv_loop () #6 0x00422b5a in main () * Any tips ? ___ 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
Thank You Bogdan. This is the way i am going to follow. Maciej. > 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 > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] nat transversal
The port is on the m line On Nov 23, 2010, at 9:04 PM, abdelghafour harraz wrote: > hey, > > actually i wanted to know how the nat helper module manage to inform the > rtpproxy of the port number used by a symmetric nat, cause in the sdp packet, > the only thing that is mentionned is the public address of the nat, and not > the port number used by the nat. > > thanks > ___ > 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] MySQL LAST_INSERT_ID() safe?
Hi, I am trying to figure out if is it safe to use in OpenSIPs config file: avp_db_query("INSERT INTO some_table VALUES ('data1')"); avp_db_query("SELECT LAST_INSERT_ID()","$avp(last_id);"); // do stuff with $avp(last_id); How does OpenSIPs connects to MySQL sever? Does it use some smart connection pooling maybe, which could result in unexpected behaviour? Regards, Chris ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Opensisp behind a Firewall and NAT
Hallo, my architecture needs the Opensips behind a firewall than does static NAT between the private IP of the opensips and the public ip. I would use advertise_host to give correct public IP only for the messages directed outside and not for those directed inside; in different words, if an internal client calls another internal client I do not want to use advertise_host but If an internal client calls an external client I need to use it. I can't see how to manage different behavior of advertise_host. The is a way to specify which of the networks are local? Thanks. s ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users