Re: [OpenSIPS-Users] Problem NAT RTPproxy
The relevant one should be INVITE leaving you opensips - to see if RTPproxy was inserted in the SDP. Regards, Bogdan On 04/02/2012 11:41 PM, magnusadil...@gmail.com wrote: In ngrep traffic check no active rdp-session-id but do not know how to solve # U +3.135110 IP-ASTERISK:5060 - IP_OPENSIPS:5060 INVITE sip:100@ IP_OPENSIPS SIP/2.0 Via: SIP/2.0/UDP IP-ASTERISK:5060;branch=z9hG4bK3e684698;rport Max-Forwards: 70 From: 3414741468 sip:TRK00253-001@IP-ASTERISK;tag=as33306c2a To: sip:100@IP_OPENSIPS Contact: sip:TRK00253-001@IP-ASTERISK Call-ID: 46ea6e9819e3583c59479d9304cc2b4f@IP-ASTERISK CSeq: 102 INVITE User-Agent: Asterisk PBX 1.6.2.20 Date: Mon, 26 Mar 2012 16:29:17 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces, timer Content-Type: application/sdp Content-Length: 333 v=0 o=root 1324806659 1324806659 IN IP4 IP-ASTERISK s=Asterisk PBX 1.6.2.20 c=IN IP4 IP-ASTERISK t=0 0 m=audio 10788 RTP/AVP 0 18 8 3 101 a=rtpmap:0 PCMU/8000 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=no a=rtpmap:8 PCMA/8000 a=rtpmap:3 GSM/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=sendrecv tanks Bogdan-Andrei Iancu wrote: Well, you know, one is what we want to do , another we actually get. I was rather asking if, making a sip capture (with ngrep) you see in your call the RTPproxy insertion - check it in traffic, not in script. Regards, Bogdan On 04/02/2012 10:05 PM, magnusadil...@gmail.com wrote: hi, yes, rtpproxy is active in invite 200 onreply_route[3] { if ((isflagset(5) || isbflagset(0)) status =~ (183)|(2[0-9][0-9]) has_body(application/sdp)) { if (rtpproxy_answer()) { log(L_INFO: rtpproxy_answer NAT); } } if (!subst_uri('/(sip:.*);nat=yes/\1/')) { search_append('Contact:.*sip:[^[:cntrl:]]*', ';nat=yes'); } exit; } But i'm implemented this in invite route if (is_method(INVITE) { if ($si == IP ASTERISK is_method(INVITE)) { fix_nated_contact(); fix_nated_sdp(1); xlog(L_INFO, NAT detected3 PSTN for SIP); setflag(5); return; } } and worked, but I think it is not correct tansk Bogdan-Andrei Iancu wrote: Hi Magnus, attaching cfg files is useless, as no one will debug the script, but we will help you to debug your script. So, for the non-working case (PSTN to SIP) does your script force RTPproxy in INVITE and 200 OK ? Regards, Bogdan On 03/29/2012 01:52 AM, magnusadil...@gmail.com wrote: I have phones (some behind NAT) connecting to Opensips server an Asterisk and an rtpproxy as seen below: rtpproxy started with ps -aux | grep rtpproxy root 15666 0.0 0.0 14472 920 ?Ssl Mar23 0:05 ./rtpproxy -F -l 189.254.2.19 -s udp:* 7890 -d DBUG LOG_LOCAL3 UAC1 username = 100Firewall/routerOpensips 1.7-- RTP PROXYAsterisk 1.6 192.168.1.10192.168.1.1 65.254.63.212 189.254.2.19 190.61.201.89 external ip dinamic 169.254.2.2 - Calls between UAC are OK (both SIP and RTP). - Calls UAC for PSTN is OK. - Did numbers is received in Asterisk, and destination for UAC registered in opensips, but no work audio . (EX User call cellphone for DID 54115368566, call is received in asterisk, and destination for user 100, registered in opensips) -- Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Call parking with loadbalancing
thanks On Mon, Apr 2, 2012 at 8:23 PM, Olle E. Johansson o...@edvina.net wrote: Make sure you have different parkinglots so one server is 700 to 750, the other 751 to 800 etc. Either fork the call to all servers or write a config so you can route based on number. /O 2 apr 2012 kl. 18:36 skrev Bogdan-Andrei Iancu: Hi, But this park location - is it unique on your system ? I mean all your Asterisk boxes do transfer all the parked calls to the same park location ? And once the park is done, is the original Asterisk still involved in call? I'm asking as I'm not so familiar on how the parking is done with Asterisk. Regards, Bogdan On 04/02/2012 05:09 PM, Schneur Rosenberg wrote: Hi I have a Opensips server that handles registration and loadbalancing, it load balances a few asterisk servers, I was having issues with transfers that if each leg is on a different server it would hangup, so Bogdan suggested I use dialogs and when opensips sees a call on a extension, next time it wont use loadbalancing it will just rewrite the host to the same host as initial call, therefore both calls will be on same server. My problem is when I use call parking, the way I did it was that calls gets transferred to a park location by asterisk, and then other party can pick up from the park location, problem is that the the second person picking up park, has no way of knowing which server to retrieve it from. Can anyone suggest a solution please. thanks in advance S. Rosenberg ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users --- * Olle E Johansson - o...@edvina.net * Cell phone +46 70 593 68 51, Office +46 8 96 40 20, Sweden ___ 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] Opensips 1.6.2-notls - Died
Dear list, In the last days, I'm having problems with my opensips server. It just died! In the log files I see: /usr/local/sbin/opensips[9361]: INFO:core:handle_sigs: child process 9365 exited by a signal 11 /usr/local/sbin/opensips[9361]: INFO:core:handle_sigs: core was generated /usr/local/sbin/opensips[9361]: INFO:core:handle_sigs: terminating due to SIGCHLD /usr/local/sbin/opensips[9364]: INFO:core:sig_usr: signal 15 received /usr/local/sbin/opensips[9368]: INFO:core:sig_usr: signal 15 received /usr/local/sbin/opensips[9369]: INFO:core:sig_usr: signal 15 received /usr/local/sbin/opensips[9366]: INFO:core:sig_usr: signal 15 received /usr/local/sbin/opensips[9367]: INFO:core:sig_usr: signal 15 received /usr/local/sbin/opensips[9363]: INFO:core:sig_usr: signal 15 received /usr/local/sbin/opensips[9361]: INFO:db_mysql:get_new_stmt_ctx: disconect event for 0x81d13d0 /usr/local/sbin/opensips[9361]: INFO:db_mysql:reset_all_statements: reseting all statements on connection: (0x81d1ac4) 0x81d13d0 /usr/local/sbin/opensips[9361]: INFO:db_mysql:get_new_stmt_ctx: re-connected successful for 0x81d13d0 I see 2 core files each one with different information. I have opened it with gdb program and did a bt full command to see the full information. Could someone help me? Follow the core files information: *CORE 1:* re was generated by `/usr/local/sbin/opensips -P /var/run/opensips.pid -m 1024 -u root -g root'. Program terminated with signal 11, Segmentation fault. #0 0x002502a7 in unref_dlg (dlg=0x78136b98, cnt=1) at dlg_hash.c:587 587 d_entry = (d_table-entries[dlg-h_entry]); (gdb) bt full #0 0x002502a7 in unref_dlg (dlg=0x78136b98, cnt=1) at dlg_hash.c:587 d_entry = 0x8c3abd8 __FUNCTION__ = unref_dlg #1 0x00244fd4 in tmcb_unreference_dialog (t=0x7a8c1ad4, type=8192, param=0x1acd14) at dlg_handlers.c:518 No locals. #2 0x001834c2 in run_trans_callbacks (type=8192, trans=0x7a8c1ad4, req=0x0, rpl=0x0, code=0) at t_hooks.c:208 cbp = 0x78173a8c backup = 0x81a2504 trans_backup = 0x __FUNCTION__ = run_trans_callbacks #3 0x0016fa81 in free_cell (dead_cell=0x7a8c1ad4) at h_table.c:124 b = value optimized out i = value optimized out rpl = value optimized out tt = value optimized out foo = value optimized out p = value optimized out #4 0x0016fadb in free_hash_table () at h_table.c:342 p_cell = 0x267ccc tmp_cell = 0x0 i = 1538 #5 0x0017dba4 in tm_shutdown () at t_funcs.c:99 __FUNCTION__ = tm_shutdown #6 0x080be491 in destroy_modules () at sr_module.c:370 t = 0x81b8570 foo = 0x81b8554 #7 0x0806b0a0 in cleanup (show_status=1) at main.c:336 No locals. #8 0x0806bfd4 in handle_sigs () at main.c:533 chld = 0 chld_status = 139 i = 6 do_exit = 1 __FUNCTION__ = handle_sigs #9 0x08070564 in main_loop (argc=9, argv=0xbf85e4a4) at main.c:913 i = 4 pid = value optimized out si = 0x0 startup_done = 0x0 chd_rank = 4 __FUNCTION__ = main_loop #10 main (argc=9, argv=0xbf85e4a4) at main.c:1388 cfg_log_stderr = 0 cfg_stream = 0x8c26008 c = value optimized out r = 0 ---Type return to continue, or q return to quit--- tmp = 0xbf85ff64 tmp_len = value optimized out port = 12570437 proto = value optimized out ret = value optimized out seed = 196014188 rfd = 4 __FUNCTION__ = main *CORE 2:* Core was generated by `/usr/local/sbin/opensips -P /var/run/opensips.pid -m 1024 -u root -g root'. Program terminated with signal 11, Segmentation fault. #0 0x080faab7 in get_all_bodies (msg=0x81d419c) at parser/parse_multipart.c:193 193 if (msg-buf + msg-len - start get_content_length(msg)) (gdb) bt full #0 0x080faab7 in get_all_bodies (msg=0x81d419c) at parser/parse_multipart.c:193 start = 0x81926e0 end = value optimized out type = value optimized out cur = value optimized out temp = value optimized out delimiter = {s = 0x0, len = 0} __FUNCTION__ = get_all_bodies #1 0x00e59f0d in force_rtp_proxy (msg=0x81926e0, str1=0x81d419c \'1, str2=0x0, offer=0) at nathelper.c:2773 m = value optimized out p = value optimized out body = {s = 0x0, len = 0} skip = value optimized out c = value optimized out __FUNCTION__ = force_rtp_proxy #2 0x00e5edae in rtpproxy_answer2_f (msg=0x81d419c, str1=0x81c8920 FW, str2=0x0) at nathelper.c:2742 No locals. #3 rtpproxy_answer1_f (msg=0x81d419c, str1=0x81c8920 FW, str2=0x0) at nathelper.c:2731 cp = value optimized out newip = 177.107.192.207\000@ \240\317\000\001\000\000\000\b\000\000\000\364_\322\000@ \220\035\b8\253\303\b #4 0x080544fd in do_action (a=0x81c89ac, msg=0x81d419c) at action.c:967 val_s = { s = 0x819254e
[OpenSIPS-Users] Fix source IP in a 2-NICs router with openSIPS
Hi! I'm trying to set up OpenSIPS in a router with 2 NICs that performs a dynamic NAT. It will receive requests from the UACs on eth0 (NIC behind NAT) and should forward them through eth1 (public NIC) to an Asterisk outside of the NAT. I'm not allowed to configure the Asterisk. I have also configured rtpproxy and would like to use it in order to traverse the NAT. I have openSIPS listening on both NICs, so the UACs inside of the NAT connect directly to the socket of openSIPS in eth0. The question is: I have tried to use fix_nated_contact() and fix_nated_sdp() but they don't actually change the source IP, so I get no RTP traffic. Seems like openSIPS doesn't realise there is a NAT, since it receives the requests directly through its socket in the LAN. So when I use rewritehostport(IP_OF_ASTERISK), Asterisk is getting the LAN IPs instead of the IP of eth1, which is the public IP. I'm using force_send_socket() to force openSIPS to send the SIP messages to Asterisk through eth1. Is there some way to fix the IPs so Asterisk gets the public IP (eth1)? Thank you very much in advance. Barracuda Networks AG Vorsitzender des Aufsichtsrates/ Chairman of the supervisory board: Dean Drako Vorstand/ Executive Board: Dr. Wieland Alge, Mag. Guenter Klausner Sitz der Gesellschaft/ Registered office: 6020 Innsbruck, Austria Handelsgericht Innsbruck Firmenbuch/ Registration Number: 184392s UID-Nr/ VAT Number: ATU47509003 Diese Nachricht und allfaellige angehaengte Dokumente sind vertraulich und nur fuer den/die Adressaten bestimmt. Sollten Sie nicht der beabsichtigte Adressat sein, ist jede Offenlegung, Weiterleitung oder sonstige Verwendung dieser Information nicht gestattet. In diesem Fall bitten wir, den Absender zu verstaendigen und die Information zu vernichten. Fuer Uebermittlungsfehler oder sonstige Irrtuemer bei Uebermittlung besteht keine Haftung. This message and any attached files are confidential and intended solely for the addressee(s). Any publication, transmission or other use of the information by a person or entity other than the intended addressee is prohibited. If you receive this in error please contact the sender and delete the material. The sender does not accept liability for any errors or omissions as a result of the transmission. 'Like' us on Facebook for exclusive content and other resources on all Barracuda Networks solutions. Visit http://barracudanetworks.com/facebook ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] MediaProxy loading issues - I think I need some tuning here
Greetings all; We have several mediaproxy systems running in small scale production (~50-100 calls concurrently) and have been very pleased with the results. We find that we have to restart the relay/dispatcher machines daily to keep them ticking over (they tend to get lost on their own after a few days runtime), but this is a minor inconvenience. Until today. Today I tried moving one of our small carrier circuits over to it and gee whiz did all sorts of exciting things happen. I have our systems set up with an initial OpenSIPS/media-dispatcher running on a VM (public IP). This dispatcher speaks to a blade server which is running a single media-relay instance. Under light load all is well. When the load starts ramping up (800+ calls) thing start going a bit pear-shaped, however. I end up with massive numbers of entries like this in the syslog of the relay: Cannot use port pair 53378/53379 Which appears to bog the whole relay down to the point where it's using 100% of the core. Even after turning the calls back off, the -relay remains at 100% and continues to dump more 'Cannot use port pair' notices into rsyslog and is impossible to stop normally due to it being so tied up. rsyslog was not loaded out in the 'top', so although it was clearly being hammered by -relay, I don't think rsyslog was the bottleneck here. I guess my first question is, what am I doing wrong here to cause it to be pushing literally tens of thousands of these errors? And then, next, how do I best tune mediaproxy to handle larger loads? I was thinking I could run several -relays on a single blade as they appear to be single-threaded and, therefore, multiple forks will load across the machine properly... but I'm not even sure if -relay can use a different conf file to the default. The dispatcher, which as I said lives on the OpenSIPS vm, looks like this: [Dispatcher] socket_path=/tmp/dispatcher.sock listen=dispatcher.public.ip.address management_use_tls=no log_level=WARNING The relay, on a Dell M610 blade, looks like: [Relay] dispatchers=dispatcher.public.ip.address relay_ip=relay.public.ip.address port_range=5:6 log_level=WARNING Any suggestions would be gratefully received; - Jock ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users