Re: [OpenSIPS-Users] Opensips 1.6 as a Proxy and Presence Server
That's right. All calls were working well before I add these lines. I noticed, that when I erase these lines *if (is_method("PUBLISH|SUBSCRIBE")) { ** **route(handle_presence); ** **exit; ** ** } *problem is gone, and all calls goes smoothly.* * Were your calls properly working before adding the BLF and presence scripting ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 03.01.2017 15:00, maatohewetbi wrote: It doesn't work. If I call number B, it rings, and BLF LED is blinking, but after picking up the phone, call is without audio and LED is still blinking event I disconnect call. Then If I try to call again, call freezes like if it's routing in loop, and B side doesn't ring at all. I heve to restart Opensips. Here is my config: . Modules, general config .. # - request routing logic --- route{ if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); exit; }; if (msg:len >= 2048 ) { sl_send_reply("513", "Message too big"); exit; }; if (nat_uac_test("3")) { if (is_method("REGISTER") || !is_present_hf("Record-Route")) { log("LOG:Someone trying to register from private IP, rewriting\n"); fix_nated_contact(); if ( is_method("INVITE") ) { fix_nated_sdp("1"); }; force_rport(); setbflag(6); setbflag(8); }; }; if (loose_route()) { append_hf("P-hint: rr-enforced\r\n"); if(src_ip == 'YYY.YYY.YYY.YYY'){ route(1); }else{ route(2); } exit; }; if (!is_method("REGISTER")) record_route(); if (!uri==myself) { append_hf("P-hint: outbound\r\n"); if(src_ip == 'YYY.YYY.YYY.YYY'){ route(1); }else{ route(2); } exit; }; if (uri==myself) { if (is_method("REGISTER")) { if (!www_authorize("", "subscriber")) { www_challenge("", "0"); return; }; save("location"); exit; }; lookup("aliases"); if (!uri==myself) { append_hf("P-hint: outbound alias\r\n"); if(src_ip == 'YYY.YYY.YYY.YYY'){ route(1); }else{ route(2); } exit; }; alias_db_lookup("dbaliases","d"); if (!lookup("location")) { route(2); exit; }; }; if (is_method("INVITE")) { create_dialog(); dialoginfo_set(); } if (is_method("PUBLISH|SUBSCRIBE")) { route(handle_presence); exit; } append_hf("P-hint: usrloc applied\r\n"); if(src_ip == 'YYY.YYY.YYY.YYY'){ route(1); }else{ route(2); } } route[handle_presence] { if(!t_newtran()){ sl_reply_error(); exit; } if (is_method("PUBLISH")) { handle_publish(); } else if (is_method("SUBSCRIBE")) { handle_subscribe(); } exit; } route[1] { if (uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)" && !search("^Route:")){ sl_send_reply("479", "We don't forward to private IP addresses"); exit; }; if (isbflagset(6)) { force_rtp_proxy(); }; t_on_reply("1"); if (!t_relay()) { sl_reply_error(); }; } route[2] { force_rtp_proxy(); rewritehostport ("YYY.YYY.YYY.YYY:xx"); t_relay(); } onreply_route[1] { if (isbflagset(6) && status =~ "(183)|2[0-9][0-9]") { fix_nated_contact(); force_rtp_proxy(); } else if (nat_uac_test("1")) { fix_nated_contact(); }; } -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-6-as-a-Proxy-and-Presence-Server-tp7605411p7605416.html Sent from the OpenSIPS - Users mailing list archive at Nabble.com. ___ 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 -- Z poważaniem Marcin Zieliński easyCALL.PL S.A. ul. Pianistów 2 02-403 Warszawa ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips 1.6 as a Proxy and Presence Server
Were your calls properly working before adding the BLF and presence scripting ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 03.01.2017 15:00, maatohewetbi wrote: It doesn't work. If I call number B, it rings, and BLF LED is blinking, but after picking up the phone, call is without audio and LED is still blinking event I disconnect call. Then If I try to call again, call freezes like if it's routing in loop, and B side doesn't ring at all. I heve to restart Opensips. Here is my config: . Modules, general config .. # - request routing logic --- route{ if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); exit; }; if (msg:len >= 2048 ) { sl_send_reply("513", "Message too big"); exit; }; if (nat_uac_test("3")) { if (is_method("REGISTER") || !is_present_hf("Record-Route")) { log("LOG:Someone trying to register from private IP, rewriting\n"); fix_nated_contact(); if ( is_method("INVITE") ) { fix_nated_sdp("1"); }; force_rport(); setbflag(6); setbflag(8); }; }; if (loose_route()) { append_hf("P-hint: rr-enforced\r\n"); if(src_ip == 'YYY.YYY.YYY.YYY'){ route(1); }else{ route(2); } exit; }; if (!is_method("REGISTER")) record_route(); if (!uri==myself) { append_hf("P-hint: outbound\r\n"); if(src_ip == 'YYY.YYY.YYY.YYY'){ route(1); }else{ route(2); } exit; }; if (uri==myself) { if (is_method("REGISTER")) { if (!www_authorize("", "subscriber")) { www_challenge("", "0"); return; }; save("location"); exit; }; lookup("aliases"); if (!uri==myself) { append_hf("P-hint: outbound alias\r\n"); if(src_ip == 'YYY.YYY.YYY.YYY'){ route(1); }else{ route(2); } exit; }; alias_db_lookup("dbaliases","d"); if (!lookup("location")) { route(2); exit; }; }; if (is_method("INVITE")) { create_dialog(); dialoginfo_set(); } if (is_method("PUBLISH|SUBSCRIBE")) { route(handle_presence); exit; } append_hf("P-hint: usrloc applied\r\n"); if(src_ip == 'YYY.YYY.YYY.YYY'){ route(1); }else{ route(2); } } route[handle_presence] { if(!t_newtran()){ sl_reply_error(); exit; } if (is_method("PUBLISH")) { handle_publish(); } else if (is_method("SUBSCRIBE")) { handle_subscribe(); } exit; } route[1] { if (uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)" && !search("^Route:")){ sl_send_reply("479", "We don't forward to private IP addresses"); exit; }; if (isbflagset(6)) { force_rtp_proxy(); }; t_on_reply("1"); if (!t_relay()) { sl_reply_error(); }; } route[2] { force_rtp_proxy(); rewritehostport ("YYY.YYY.YYY.YYY:xx"); t_relay(); } onreply_route[1] { if (isbflagset(6) && status =~ "(183)|2[0-9][0-9]") { fix_nated_contact(); force_rtp_proxy(); } else if (nat_uac_test("1")) { fix_nated_contact(); }; } -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-6-as-a-Proxy-and-Presence-Server-tp7605411p7605416.html Sent from the OpenSIPS - Users mailing list archive at Nabble.com. ___ 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-cp missing
hello Razvan, I installed opensips manually using the video "2012-05-17 18.02 OpenSIPS Kick Start" because I am not familiar with linux and opensips. I will try your example. Because there were bounces from compuserve.com I changed my email to solnet.ch and subscribed with this new email address but I made an error by still using my old email address. On 1/3/2017 9:35 AM, Răzvan Crainea wrote: Hi, Jaap! How did you initially install opensips CP? Because most likely it is was a manual install, and you will need to restore the apache config file. You can use this example[1]. PS: please subscribe to the mailing list, otherwise you won't get further replies. [1] https://github.com/OpenSIPS/opensips-cp/blob/abafe7503dd8ad089b834cfcb7058deeda30375e/INSTALL#L30 Best regards, Răzvan Crainea OpenSIPS Solutions www.opensips-solutions.com On 01/02/2017 10:28 PM, Jaap van der Starre wrote: After upgrade from wheezy to jessie opensips-cp is missing while my grandstream HT503 is still registered to opensips, I cannot use the control panel anymore obviously. Not Found The requested URL /opensips-cp was not found on this server. Apache/2.4.10 (Debian) Server at 192.168.2.12 Port 80 My opensips installation is 1.10. Because it is not supported anymore I should at least migrate to 1.11 now. This will only change the database and Script migration. Would it bring back opensips-cp in Apache? jaap ___ 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 crashes on sip_capture()
Hi Schneur, I've got a few questions for you: 1) Do you have a separate capturing node, using siptrace for sending and sipcapture for recieving? 2) If so what protocol are you using for sending the packets? Do you use proto_hep? 3) Are you calling sip_capture function in one of your request routes? 4) Can you send me your debug logs? Regards, Ionut Ionita OpenSIPS Developer On 12/29/2016 04:10 PM, Schneur Rosenberg wrote: I just added modparam("sipcapture", "hep_capture_on", 1) and its not crashing anymore but now my syslog gets flooded with the following error WARNING:sipcapture:w_sip_capture: not a hep message! On Thu, Dec 29, 2016 at 3:34 PM, Schneur Rosenberg> wrote: I'm trying to use Homer on OpenSIPS 2.2 and when I call sip_capture() the system crashes without creating a dump and this is what I find in my syslog file Dec 29 08:28:52 sip /sbin/opensips[15524]: CRITICAL:sipcapture:ip_addr2a: unknown address family 825112372 Dec 29 08:28:52 sip /sbin/opensips[15524]: CRITICAL:sipcapture:ip_addr2a: unknown address family 775435057 Dec 29 08:28:52 sip kernel: [675596.209597] opensips[15524]: segfault at 40 ip 7f361a810e46 sp 7ffcd8f850a0 error 4 in sipcapture.so[7f361a7fc000+26000] ___ 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 as a Proxy and Presence Server
It doesn't work. If I call number B, it rings, and BLF LED is blinking, but after picking up the phone, call is without audio and LED is still blinking event I disconnect call. Then If I try to call again, call freezes like if it's routing in loop, and B side doesn't ring at all. I heve to restart Opensips. Here is my config: . Modules, general config .. # - request routing logic --- route{ if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); exit; }; if (msg:len >= 2048 ) { sl_send_reply("513", "Message too big"); exit; }; if (nat_uac_test("3")) { if (is_method("REGISTER") || !is_present_hf("Record-Route")) { log("LOG:Someone trying to register from private IP, rewriting\n"); fix_nated_contact(); if ( is_method("INVITE") ) { fix_nated_sdp("1"); }; force_rport(); setbflag(6); setbflag(8); }; }; if (loose_route()) { append_hf("P-hint: rr-enforced\r\n"); if(src_ip == 'YYY.YYY.YYY.YYY'){ route(1); }else{ route(2); } exit; }; if (!is_method("REGISTER")) record_route(); if (!uri==myself) { append_hf("P-hint: outbound\r\n"); if(src_ip == 'YYY.YYY.YYY.YYY'){ route(1); }else{ route(2); } exit; }; if (uri==myself) { if (is_method("REGISTER")) { if (!www_authorize("", "subscriber")) { www_challenge("", "0"); return; }; save("location"); exit; }; lookup("aliases"); if (!uri==myself) { append_hf("P-hint: outbound alias\r\n"); if(src_ip == 'YYY.YYY.YYY.YYY'){ route(1); }else{ route(2); } exit; }; alias_db_lookup("dbaliases","d"); if (!lookup("location")) { route(2); exit; }; }; if (is_method("INVITE")) { create_dialog(); dialoginfo_set(); } if (is_method("PUBLISH|SUBSCRIBE")) { route(handle_presence); exit; } append_hf("P-hint: usrloc applied\r\n"); if(src_ip == 'YYY.YYY.YYY.YYY'){ route(1); }else{ route(2); } } route[handle_presence] { if(!t_newtran()){ sl_reply_error(); exit; } if (is_method("PUBLISH")) { handle_publish(); } else if (is_method("SUBSCRIBE")) { handle_subscribe(); } exit; } route[1] { if (uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)" && !search("^Route:")){ sl_send_reply("479", "We don't forward to private IP addresses"); exit; }; if (isbflagset(6)) { force_rtp_proxy(); }; t_on_reply("1"); if (!t_relay()) { sl_reply_error(); }; } route[2] { force_rtp_proxy(); rewritehostport ("YYY.YYY.YYY.YYY:xx"); t_relay(); } onreply_route[1] { if (isbflagset(6) && status =~ "(183)|2[0-9][0-9]") { fix_nated_contact(); force_rtp_proxy(); } else if (nat_uac_test("1")) { fix_nated_contact(); }; } -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-6-as-a-Proxy-and-Presence-Server-tp7605411p7605416.html Sent from the OpenSIPS - Users mailing list archive at Nabble.com. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips for windows
Hi, Mohsin! OpenSIPS was designed to work on Unix systems, I never tried to compile it on Windows. Best regards, Răzvan Crainea OpenSIPS Solutions www.opensips-solutions.com On 12/31/2016 12:32 PM, Mohsin Barbhaiwala wrote: can this opensips be compiled & run on windows. if so does anybody know ? ___ 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 as a Proxy and Presence Server
Hello! Basically merging the two separate configs together should do the trick. If you follow this[1] example, change your Proxy config as it follows: When an initial INVITE comes in, create the dialog and publish the information: if (is_method("INVITE")) { create_dialog(); # publish for both legs dialoginfo_set("AB"); } When a publish or subscribe methods come in handle them accordingly: ... if (is_method("PUBLISH|SUBSCRIBE")) { route(handle_presence); exit; } ... route[handle_presence] { if(!t_newtran()){ sl_reply_error(); exit; } if (is_method("PUBLISH")) { handle_publish(); } else if (is_method("SUBSCRIBE")) { handle_subscribe(); } exit; } [1] http://www.opensips.org/Documentation/Tutorials-Presence-PuaDialoinfoConfig PS: Please subscribe on the mailing list, otherwise you will loose further replies Răzvan Crainea OpenSIPS Solutions www.opensips-solutions.com On 01/03/2017 10:13 AM, maatohewetbi wrote: I use Opensips 1.6.2 on my server. I want to add BLF function to it but I don't know how. I have config where I route calls to asterisk. There are tutorials where I can set Opensip Presence Server as standalone, with OpenXcap as well, but there's nowhere config how to set Opensips to work on one machine as Presence Server, and also as a Proxy at same Opensips instance - in one config. How can I make it? Ok, I can set one Opensips as a proxy, and other Opensips (on another machine) as a Presence Server. But how can I connect them so that they work together? -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-6-as-a-Proxy-and-Presence-Server-tp7605411.html Sent from the OpenSIPS - Users mailing list archive at Nabble.com. ___ 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-cp missing
Hi, Jaap! How did you initially install opensips CP? Because most likely it is was a manual install, and you will need to restore the apache config file. You can use this example[1]. PS: please subscribe to the mailing list, otherwise you won't get further replies. [1] https://github.com/OpenSIPS/opensips-cp/blob/abafe7503dd8ad089b834cfcb7058deeda30375e/INSTALL#L30 Best regards, Răzvan Crainea OpenSIPS Solutions www.opensips-solutions.com On 01/02/2017 10:28 PM, Jaap van der Starre wrote: After upgrade from wheezy to jessie opensips-cp is missing while my grandstream HT503 is still registered to opensips, I cannot use the control panel anymore obviously. Not Found The requested URL /opensips-cp was not found on this server. Apache/2.4.10 (Debian) Server at 192.168.2.12 Port 80 My opensips installation is 1.10. Because it is not supported anymore I should at least migrate to 1.11 now. This will only change the database and Script migration. Would it bring back opensips-cp in Apache? jaap ___ 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-cp missing
After upgrade from wheezy to jessie opensips-cp is missing while my grandstream HT503 is still registered to opensips, I cannot use the control panel anymore obviously. Not Found The requested URL /opensips-cp was not found on this server. Apache/2.4.10 (Debian) Server at 192.168.2.12 Port 80 My opensips installation is 1.10. Because it is not supported anymore I should at least migrate to 1.11 now. This will only change the database and Script migration. Would it bring back opensips-cp in Apache? jaap ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Opensips 1.6 as a Proxy and Presence Server
I use Opensips 1.6.2 on my server. I want to add BLF function to it but I don't know how. I have config where I route calls to asterisk. There are tutorials where I can set Opensip Presence Server as standalone, with OpenXcap as well, but there's nowhere config how to set Opensips to work on one machine as Presence Server, and also as a Proxy at same Opensips instance - in one config. How can I make it? Ok, I can set one Opensips as a proxy, and other Opensips (on another machine) as a Presence Server. But how can I connect them so that they work together? -- View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-1-6-as-a-Proxy-and-Presence-Server-tp7605411.html Sent from the OpenSIPS - Users mailing list archive at Nabble.com. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users