From john.quick at smartvox.co.uk Mon Oct 3 12:52:12 2022 From: john.quick at smartvox.co.uk (John Quick) Date: Mon, 3 Oct 2022 13:52:12 +0100 Subject: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay and rtpproxy Message-ID: <000f01d8d726$f8e5d2d0$eab17870$@smartvox.co.uk> Thomas, ACK messages are normally loose routed. Perhaps you need to call loose_route() before t_relay(). You could try reading my article here which may help explain things: https://kb.smartvox.co.uk/opensips/contact-and-record-route-headers-explaine d/ John Quick Smartvox Limited Web: www.smartvox.co.uk From art666 at hotmail.com Wed Oct 5 07:16:48 2022 From: art666 at hotmail.com (Arto Kuiri) Date: Wed, 5 Oct 2022 07:16:48 +0000 Subject: [OpenSIPS-Users] Possible memory leak in PKG Message-ID: Hi, I think I have stumbled to some kind of memory leak. I made new opensips server used same opensips.cfg (changed only ip address) as in my older servers and after some time I started to get these to log file: /usr/sbin/opensips[1145854]: ERROR:core:fm_malloc: not enough free pkg memory (2312 bytes left, need 2472), please increase the "-M" command line parameter! /usr/sbin/opensips[1145854]: ERROR:core:receive_msg: no pkg mem left for sip_msg Older servers works fine with much higher load. Old servers are with opensips 3.1.1 and new server is 3.2.7 : opensips -V version: opensips 3.1.1 (x86_64/linux) flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_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. main.c compiled on with gcc 9 opensips -V version: opensips 3.2.7 (x86_64/linux) flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_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. main.c compiled on with gcc 11 I allocated more memory and changed private memory allocator to F_MALLOC_DBG After while I checked what process had highest memory useage and I did: opensips-cli -x mi mem_pkg_dump (PID was "SIP receiver udp") from log file: dumping summary of all alloc'ed. fragments: ------------+--------------------------------------- total_bytes | num_allocations x [file: func, line] ------------+--------------------------------------- 40 : 1 x [acc.c: init_acc_evi, line 1137] 8 : 1 x [drouting.c: dr_init, line 1819] 200 : 7 x [script_var.c: set_var_value, line 101] 128 : 13 x [script_var.c: add_var, line 59] 1432 : 176 x [sip_i.c: pv_parse_isup_param_name, line 242] 335544 : 1 x [io_wait.c: init_io_wait, line 568] 109600 : 4858 x [dlg_vals.c: fetch_dlg_value, line 176] 16 : 1 x [cfg.y: yyparse, line 510] 32 : 1 x [rr_cb.c: register_rrcb, line 57] 1160 : 1 x [my_con.c: db_mysql_new_connection, line 158] 48 : 1 x [parser/parse_to.c: parse_to_param, line 289] 80 : 1 x [sr_module_deps.c: _alloc_module_dep, line 60] 312 : 9 x [sipmsgops.c: fixup_parse_hname, line 670] 1056 : 33 x [transformations.c: tr_parse_nparam, line 2629] 360 : 18 x [map.c: map_get, line 155] 1904 : 34 x [route_struct.c: mk_exp, line 53] 512 : 8 x [route.c: fix_expr, line 1056] 24 : 1 x [ul_evi.c: ul_event_init, line 155] 1342176 : 1 x [io_wait.c: init_io_wait, line 559] 48 : 1 x [ipc.c: ipc_register_handler, line 154] 168 : 3 x [script_var.c: set_var_value, line 112] 48 : 1 x [transformations.c: tr_eval_uri, line 1028] 16 : 1 x [dp_db.c: dp_add_connection, line 848] 624 : 13 x [script_var.c: add_var, line 52] 48 : 1 x [dlg_hash.c: state_changed_event_init, line 1024] 32 : 1 x [map.c: map_create, line 84] 24 : 1 x [ul_evi.c: ul_event_init, line 132] 8 : 1 x [socket_info.c: fix_socket_list, line 615] 96 : 1 x [mi/mi_trace.c: try_load_trace_api, line 53] 160 : 5 x [transformations.c: tr_parse_string, line 2906] 912 : 1 x [transformations.c: tr_eval_nameaddr, line 2375] 640 : 4 x [db/db.c: db_do_init, line 351] 144 : 3 x [sr_module_deps.c: solve_module_dependencies, line 293] 832 : 13 x [mod_fix.c: fixup_regcomp, line 55] 128 : 1 x [prefix_tree.c: init_prefix_tree, line 53] 503320 : 1 x [io_wait.c: init_io_wait, line 621] 40 : 1 x [transformations.c: tr_add_extra, line 109] 15456 : 276 x [route_struct.c: mk_elem, line 69] 112 : 1 x [route.c: fix_actions, line 1338] 88 : 2 x [flags.c: get_flag_id_by_name, line 202] 272 : 2 x [db/db.c: db_do_init, line 314] 41528 : 324 x [pvar.c: pv_parse_format, line 4716] 24 : 1 x [socket_info.c: fix_socket_list, line 760] 400 : 11 x [acc_extra.c: add_extra, line 155] 16 : 1 x [socket_info.c: new_sock_info, line 127] 4104 : 1 x [xlog.c: buf_init, line 124] 24 : 1 x [ul_evi.c: ul_event_init, line 269] 32 : 1 x [acc.c: init_acc_evi, line 1151] 10448 : 1 x [route.c: new_sroutes_holder, line 104] 200 : 5 x [script_cb.c: add_callback, line 60] 320 : 20 x [sipmsgops.c: fixup_method, line 728] 432 : 9 x [sr_module_deps.c: solve_module_dependencies, line 335] 240 : 1 x [acc_extra.c: add_tag, line 110] 8 : 1 x [pvar.c: pv_init_extra_list, line 5223] 5016 : 153 x [mod_fix.c: alloc_gp, line 72] 24 : 1 x [cfg.y: yyparse, line 1301] 168 : 1 x [../../ut.h: pkg_str_extend, line 953] 64 : 2 x [dr_cb.c: register_dr_cb, line 116] 5808 : 1 x [mi/mi.c: register_mi_cmd, line 154] 72 : 1 x [transformations.c: tr_eval_paramlist, line 2088] 680 : 12 x [sr_module_deps.c: add_module_dependency, line 135] 24 : 1 x [ut.h: pkg_str_extend, line 953] 72 : 1 x [db/db_id.c: new_db_id, line 272] 168 : 3 x [parser/parse_param.c: parse_params, line 370] 104 : 1 x [my_con.c: db_mysql_new_connection, line 149] 656 : 2 x [dbase.c: get_new_stmt_ctx, line 492] 140112 : 1 x [pvar.c: init_pvar_support, line 133] 3096 : 64 x [evi/evi_params.c: evi_param_create, line 43] 72 : 1 x [transformations.c: tr_eval_nameaddr, line 2355] 134912 : 544 x [route_struct.c: mk_action, line 105] 224 : 3 x [context.c: register_context_destroy, line 66] 64 : 1 x [cfg.y: mk_listen_id, line 2287] 16 : 1 x [socket_info.c: fix_socket_list, line 666] 1064 : 18 x [map.c: map_get, line 144] 288 : 1 x [socket_info.c: new_sock_info, line 120] 136 : 2 x [context.c: context_alloc, line 119] 2320 : 29 x [pvar.c: pv_add_extra, line 5287] 24 : 1 x [acc.c: init_acc_evi, line 1144] 8 : 1 x [drouting.c: route2_carrier, line 3587] 2064 : 43 x [transformations.c: parse_transformation, line 2491] 104192 : 809 x [cfg.lex: addstr, line 788] 16 : 1 x [io_wait.c: init_io_wait, line 576] 96 : 5 x [db/db_id.c: dupl_string, line 47] 1344 : 21 x [sr_module.c: register_module, line 151] 224 : 7 x [transformations.c: tr_parse_sparam, line 2707] 160 : 1 x [lookup.c: reg_init_lookup, line 39] 24128 : 232 x [cfg.y: yyparse, line 1571] 5952 : 2 x [dbase.c: alloc_new_prepared_stmt, line 548] 80 : 2 x [pvar.c: new_pv_context, line 5362] 64 : 7 x [acc_logic.c: _do_acc_fixup, line 1148] ---------------------------------------------------- and after 18,5h later (after night) I did same and log shows: dumping summary of all alloc'ed. fragments: ------------+--------------------------------------- total_bytes | num_allocations x [file: func, line] ------------+--------------------------------------- 40 : 1 x [acc.c: init_acc_evi, line 1137] 8 : 1 x [drouting.c: dr_init, line 1819] 200 : 7 x [script_var.c: set_var_value, line 101] 128 : 13 x [script_var.c: add_var, line 59] 1432 : 176 x [sip_i.c: pv_parse_isup_param_name, line 242] 335544 : 1 x [io_wait.c: init_io_wait, line 568] 224160 : 9855 x [dlg_vals.c: fetch_dlg_value, line 176] 16 : 1 x [cfg.y: yyparse, line 510] 32 : 1 x [rr_cb.c: register_rrcb, line 57] 1160 : 1 x [my_con.c: db_mysql_new_connection, line 158] 48 : 1 x [parser/parse_to.c: parse_to_param, line 289] 80 : 1 x [sr_module_deps.c: _alloc_module_dep, line 60] 312 : 9 x [sipmsgops.c: fixup_parse_hname, line 670] 1056 : 33 x [transformations.c: tr_parse_nparam, line 2629] 360 : 18 x [map.c: map_get, line 155] 1904 : 34 x [route_struct.c: mk_exp, line 53] 512 : 8 x [route.c: fix_expr, line 1056] 24 : 1 x [ul_evi.c: ul_event_init, line 155] 1342176 : 1 x [io_wait.c: init_io_wait, line 559] 48 : 1 x [ipc.c: ipc_register_handler, line 154] 168 : 3 x [script_var.c: set_var_value, line 112] 48 : 1 x [transformations.c: tr_eval_uri, line 1028] 16 : 1 x [dp_db.c: dp_add_connection, line 848] 624 : 13 x [script_var.c: add_var, line 52] 48 : 1 x [dlg_hash.c: state_changed_event_init, line 1024] 32 : 1 x [map.c: map_create, line 84] 24 : 1 x [ul_evi.c: ul_event_init, line 132] 8 : 1 x [socket_info.c: fix_socket_list, line 615] 96 : 1 x [mi/mi_trace.c: try_load_trace_api, line 53] 160 : 5 x [transformations.c: tr_parse_string, line 2906] 912 : 1 x [transformations.c: tr_eval_nameaddr, line 2375] 640 : 4 x [db/db.c: db_do_init, line 351] 144 : 3 x [sr_module_deps.c: solve_module_dependencies, line 293] 832 : 13 x [mod_fix.c: fixup_regcomp, line 55] 128 : 1 x [prefix_tree.c: init_prefix_tree, line 53] 503320 : 1 x [io_wait.c: init_io_wait, line 621] 40 : 1 x [transformations.c: tr_add_extra, line 109] 15456 : 276 x [route_struct.c: mk_elem, line 69] 112 : 1 x [route.c: fix_actions, line 1338] 88 : 2 x [flags.c: get_flag_id_by_name, line 202] 272 : 2 x [db/db.c: db_do_init, line 314] 41528 : 324 x [pvar.c: pv_parse_format, line 4716] 24 : 1 x [socket_info.c: fix_socket_list, line 760] 400 : 11 x [acc_extra.c: add_extra, line 155] 16 : 1 x [socket_info.c: new_sock_info, line 127] 4104 : 1 x [xlog.c: buf_init, line 124] 24 : 1 x [ul_evi.c: ul_event_init, line 269] 32 : 1 x [acc.c: init_acc_evi, line 1151] 10448 : 1 x [route.c: new_sroutes_holder, line 104] 200 : 5 x [script_cb.c: add_callback, line 60] 320 : 20 x [sipmsgops.c: fixup_method, line 728] 432 : 9 x [sr_module_deps.c: solve_module_dependencies, line 335] 240 : 1 x [acc_extra.c: add_tag, line 110] 8 : 1 x [pvar.c: pv_init_extra_list, line 5223] 5016 : 153 x [mod_fix.c: alloc_gp, line 72] 24 : 1 x [cfg.y: yyparse, line 1301] 168 : 1 x [../../ut.h: pkg_str_extend, line 953] 64 : 2 x [dr_cb.c: register_dr_cb, line 116] 5808 : 1 x [mi/mi.c: register_mi_cmd, line 154] 72 : 1 x [transformations.c: tr_eval_paramlist, line 2088] 680 : 12 x [sr_module_deps.c: add_module_dependency, line 135] 24 : 1 x [ut.h: pkg_str_extend, line 953] 72 : 1 x [db/db_id.c: new_db_id, line 272] 168 : 3 x [parser/parse_param.c: parse_params, line 370] 104 : 1 x [my_con.c: db_mysql_new_connection, line 149] 656 : 2 x [dbase.c: get_new_stmt_ctx, line 492] 140112 : 1 x [pvar.c: init_pvar_support, line 133] 3096 : 64 x [evi/evi_params.c: evi_param_create, line 43] 72 : 1 x [transformations.c: tr_eval_nameaddr, line 2355] 134912 : 544 x [route_struct.c: mk_action, line 105] 224 : 3 x [context.c: register_context_destroy, line 66] 64 : 1 x [cfg.y: mk_listen_id, line 2287] 16 : 1 x [socket_info.c: fix_socket_list, line 666] 1064 : 18 x [map.c: map_get, line 144] 288 : 1 x [socket_info.c: new_sock_info, line 120] 136 : 2 x [context.c: context_alloc, line 119] 2320 : 29 x [pvar.c: pv_add_extra, line 5287] 24 : 1 x [acc.c: init_acc_evi, line 1144] 8 : 1 x [drouting.c: route2_carrier, line 3587] 2064 : 43 x [transformations.c: parse_transformation, line 2491] 104192 : 809 x [cfg.lex: addstr, line 788] 16 : 1 x [io_wait.c: init_io_wait, line 576] 96 : 5 x [db/db_id.c: dupl_string, line 47] 1344 : 21 x [sr_module.c: register_module, line 151] 224 : 7 x [transformations.c: tr_parse_sparam, line 2707] 160 : 1 x [lookup.c: reg_init_lookup, line 39] 24128 : 232 x [cfg.y: yyparse, line 1571] 5952 : 2 x [dbase.c: alloc_new_prepared_stmt, line 548] 80 : 2 x [pvar.c: new_pv_context, line 5362] 64 : 7 x [acc_logic.c: _do_acc_fixup, line 1148] ---------------------------------------------------- So it looks like [dlg_vals.c: fetch_dlg_value, line 176] starts to eat memory? What I could check next? We do not use any perl_exec (noticed that 3.28 changelog had entry that it had PKG memory leak). Best regards, Arto Kuiri -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Thu Oct 6 13:56:52 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Thu, 6 Oct 2022 16:56:52 +0300 Subject: [OpenSIPS-Users] OpenSIPS Summit 2022 - post processing Message-ID: <0438807c-5e92-99fb-c202-798ddf909d6a@opensips.org> Hello all !! I would like to thank you all for being part of the OpenSIPS Summit 2022 - you were an fabulous audience, live or online. I hope you enjoyed the event, and even more, I hope you found it useful in terms of getting the updates and news from the VoIP and RTC words. Now that the event is behind us, let me fill in here some post facts * the presentations are in process of being uploaded / linked to the web site * the recordings are available on the OpenSIPS YouTube channel - in the next weeks we will do some post processing in order to link them for each presentation (also from the the web site ) * we will also collect more photos (in addition to ones we have on the slack channel) and update with the link For any questions or feedback, please do not hesitate to ping me back !!! PS: we already started to boil ideas for the 2023 edition ;) ;) Best regards, -- Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From aviator.nitesh.d at gmail.com Fri Oct 7 18:00:21 2022 From: aviator.nitesh.d at gmail.com (Nitesh Divecha) Date: Fri, 7 Oct 2022 14:00:21 -0400 Subject: [OpenSIPS-Users] OpenSIPS Control Panel Message-ID: Hello All, Anyone using OpenSIPS CP 9.3.2? Need small help! I got OpenSIPS 3.3.1 running and I can make calls out to the gateway (SIP trunk) without any problems. My provider issued me a DID with user/pass and I was able to configure them under "UAC Registrant" and registered to a remote server. Question is - how can I route calls to "UAC Registrant"? From the "Dynamic Routing" menu I can only route calls to Gateway. How can I route calls to "UAC Registrant"? Any suggestions? Thank you in advance! Cheers, Nitesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Oct 10 12:12:02 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 10 Oct 2022 15:12:02 +0300 Subject: [OpenSIPS-Users] OPENSIPS 3.2.8 msilo can't send offline message on Register In-Reply-To: References: Message-ID: Hi, It looks to me you are trying to compare apples with pears :) In the 3.1 test, the TCP connection was found as already existing, while in the 3.2 test no TCP conn was found and it is proceeding to opening a new one -> so, yeah, different cases, different logs :) Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 9/26/22 11:39 AM, jacky z wrote: > Hi Team, > > We are testing Opensips 3.2.8 and found it can't send stored offline > messages on register. Compared with 3.1, it doesn't look for the tcp > con. Here are the comparisons between the logs of these two versions: > > In 3.1, the existing con was looked and found and then the message was > sent. Please refer to the texts in red. > > Sep 26 08:09:56 opensips[11566]: DBG:tm:print_request_uri: > sip:3293543374 at sip.domain.com:5061 > > Sep 26 08:09:56 opensips[11566]: DBG:tm:run_local_route: building > sip_msg from buffer > Sep 26 08:09:56 opensips[11566]: DBG:core:parse_msg: SIP Request: > Sep 26 08:09:56 opensips[11566]: DBG:core:parse_msg: method:  > Sep 26 08:09:56 opensips[11566]: DBG:core:parse_msg: uri:    >   > > Sep 26 08:09:56 opensips[11566]: DBG:core:parse_msg: version: > Sep 26 08:09:56 opensips[11566]: DBG:core:parse_headers: > flags=ffffffffffffffff > Sep 26 08:09:56 opensips[11566]: DBG:core:parse_via_param: found param > type 232, = ; state=16 > Sep 26 08:09:56 opensips[11566]: DBG:core:parse_via: end of header > reached, state=5 > Sep 26 08:09:56 opensips[11566]: DBG:core:parse_headers: via found, > flags=ffffffffffffffff > Sep 26 08:09:56 opensips[11566]: DBG:core:parse_headers: this is the > first via > Sep 26 08:09:56 opensips[11566]: DBG:core:_parse_to: end of header > reached, state=9 > Sep 26 08:09:56 opensips[11566]: DBG:core:_parse_to: display={}, > ruri={sip:3293543374 at sip.domain.com:5061 > } > Sep 26 08:09:56 opensips[11566]: DBG:core:get_hdr_field: [38]; > uri=[sip:3293543374 at sip.domain.com:5061 > ] > Sep 26 08:09:56 opensips[11566]: DBG:core:get_hdr_field: to body > [sip:3293543374 at sip.domain.com:5061#015#012 > ] > Sep 26 08:09:56 opensips[11566]: DBG:core:get_hdr_field: cseq : > <10> > Sep 26 08:09:56 opensips[11566]: DBG:core:get_hdr_field: content_length=28 > Sep 26 08:09:56 opensips[11566]: DBG:core:get_hdr_field: found end of > header > Sep 26 08:09:56 opensips[11566]: DBG:core:parse_headers: > flags=ffffffffffffffff > Sep 26 08:09:56 opensips[11566]: DBG:core:parse_headers: flags=78 > *Sep 26 08:09:56 opensips[11566]: DBG:core:tcp_conn_get: con found in > state 0* > *Sep 26 08:09:56 opensips[11566]: DBG:core:tcp_conn_get: tcp > connection found (0x7fd4544f8130), acquiring fd* > *Sep 26 08:09:56 opensips[11566]: DBG:core:tcp_conn_get: c= > 0x7fd4544f8130, n=16, Usock=89* > Sep 26 08:09:56 opensips[11571]: DBG:core:handle_worker: read > response= 7fd4544f8130, 1, fd -1 from 9 (11566) > Sep 26 08:09:56 opensips[11566]: DBG:core:tcp_conn_get: after > receive_fd: c= 0x7fd4544f8130 n=8 fd=118 > Sep 26 08:09:56 opensips[11566]: DBG:proto_tls:proto_tls_send: sending > via fd 118... > Sep 26 08:09:56 opensips[11566]: DBG:proto_tls:tls_update_fd: New fd > is 118 > Sep 26 08:09:56 opensips[11566]: DBG:proto_tls:tls_write: write was > successful (555 bytes) > > > In 3.2.8, it seems the tcp connection was not looked for or found. > There is no tcp_conn_get as shown in the logs of 3.1, but reach the > conclusion no tcp connection found. It seems something is missing. > > Sep 26 08:18:33 opensips[3481]: DBG:tm:run_local_route: building > sip_msg from buffer > Sep 26 08:18:33 opensips[3481]: DBG:core:parse_msg: SIP Request: > Sep 26 08:18:33 opensips[3481]: DBG:core:parse_msg: method:  > Sep 26 08:18:33 opensips[3481]: DBG:core:parse_msg: uri:    >  > > Sep 26 08:18:33 opensips[3481]: DBG:core:parse_msg: version: > Sep 26 08:18:33 opensips[3481]: DBG:core:parse_headers: > flags=ffffffffffffffff > Sep 26 08:18:33 opensips[3481]: DBG:core:parse_via_param: found param > type 232, = ; state=16 > Sep 26 08:18:33 opensips[3481]: DBG:core:parse_via: end of header > reached, state=5 > Sep 26 08:18:33 opensips[3481]: DBG:core:parse_headers: via found, > flags=ffffffffffffffff > Sep 26 08:18:33 opensips[3481]: DBG:core:parse_headers: this is the > first via > Sep 26 08:18:33 opensips[3481]: DBG:core:_parse_to: end of header > reached, state=9 > Sep 26 08:18:33 opensips[3481]: DBG:core:_parse_to: display={}, > ruri={sip:6989229721 at sip.domain.com > } > Sep 26 08:18:33 opensips[3481]: DBG:core:get_hdr_field: [32]; > uri=[sip:6989229721 at sip.domain.com > ] > Sep 26 08:18:33 opensips[3481]: DBG:core:get_hdr_field: to body > [sip:6989229721 at sip.domain.com#015#012 > ] > Sep 26 08:18:33 opensips[3481]: DBG:core:get_hdr_field: cseq : > <10> > Sep 26 08:18:33 opensips[3481]: DBG:core:get_hdr_field: content_length=36 > Sep 26 08:18:33 opensips[3481]: DBG:core:get_hdr_field: found end of > header > Sep 26 08:18:33 opensips[3481]: DBG:core:parse_headers: > flags=ffffffffffffffff > Sep 26 08:18:33 opensips[3481]: DBG:core:parse_headers: flags=78 > *Sep 26 08:18:33 opensips[3481]: DBG:proto_tls:proto_tls_send: no open > tcp connection found, opening new one, async = 0* > > Thank you! > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From serdar.gucluer at netgsm.com.tr Mon Oct 10 09:43:06 2022 From: serdar.gucluer at netgsm.com.tr (Serdar GUCLUER) Date: Mon, 10 Oct 2022 12:43:06 +0300 Subject: [OpenSIPS-Users] Formating issue for string that contains pv Message-ID: <810e4b53-a397-a03d-7add-795984355d66@netgsm.com.tr> Hi All, In my situation, i want to format string which contains pseudo-variables. These string are stored in db and cached with "cache_table" module. I tried it like that; $avp(value) = $sql_cached_value(caching_name:column_name:key); pv_printf($var(formatted_value), $sql_cached_value(caching_name:column_name:key)); xlog("L_INFO", "*** Value: $avp(value) | Formatted Value: $var(formatted_value) ***"); but noting is changed, *** Value: r-uri: $ru | Formatted Value:  r-uri: $ru *** Where am i doing wrong? Thanks in advance. Serdar -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Oct 10 12:17:07 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 10 Oct 2022 15:17:07 +0300 Subject: [OpenSIPS-Users] Connect to AWS RDS database with SSL enabled In-Reply-To: References: <7b8c2116-ba32-13a0-09a3-8b6b766dcf21@opensips.org> <5acc7fc0-a15c-8d89-0cc6-bb7ce76ca09d@opensips.org> <196a3818-fe31-780f-de6a-0b2790214173@opensips.org> <56988f27-6eba-6d2b-539a-ed85851fa6d0@opensips.org> Message-ID: Hi, That;s a really bad example of how to hide trash beneath the carpet :(.... The instructions on how to get a backtrace are simple and clear [1] - please consider doing this and helping back the project you are using. [1] https://www.opensips.org/Documentation/TroubleShooting-Crash Best regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 9/27/22 5:12 AM, jacky z wrote: > Hi Ovidiu, > > I solved this problem by hardcoding the cert address in the my_con.c > address. Guess the cert setup in the config file can't be loaded > correctly when my_con.c calls it. > > On Tue, Sep 27, 2022 at 7:34 AM Ovidiu Sas > wrote: > > I encountered a crash related to TLS connections and I was wondering > if it's a similar issue. > It seems not, the crash that I encountered happens only on 3.3. > > If you installed opensips from a package, you need to install > opensips-dbg package to get the debug symbols. > After that, you can locate the core file on your server and > inspect it with gdb. > Everything should be detailed here: > https://www.opensips.org/Documentation/TroubleShooting-Crash > > > -ovidiu > > On Mon, Sep 26, 2022 at 2:54 AM jacky z > wrote: > > > > Hi Ovidiu, > > > > The version I am using is 3.2. I am not familiar with the debug > symbols, but guess this can be reproduced easily. With > ?tls_domain=dom1 attached after the mysql address, it happens. Can > you simply check if it is the same behavior? If not, I will dig > further by learning how to use the debug symbols. Thanks! > > > > On Mon, Sep 26, 2022 at 12:30 AM Ovidiu Sas > > wrote: > >> > >> Which version of opensips are you using? > >> Can you install the debug symbols and get a backtrace from the > core file? > >> https://www.opensips.org/Documentation/TroubleShooting-Crash > > >> > >> Regards, > >> Ovidiu Sas > >> > >> On Sun, Sep 25, 2022 at 6:32 AM jacky z > wrote: > >> > > >> > Hi Vlad, > >> > > >> > It seems opensips crashed when I set ?tls_domain=dom1 to > enable tls connection to mysql db.  I followed the method in the > manual. > >> > > >> > modparam("usrloc", "db_url", > "mysql://root:1234 at localhost/opensips?tls_domain=dom1") > >> > > >> > > >> > Here is the log. > >> > > >> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]: > INFO:tls_mgm:mod_init: initializing TLS management > >> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]: > INFO:tls_mgm:init_tls_dom: Processing TLS domain 'dom' > >> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]: > NOTICE:tls_mgm:init_tls_dom: no CA dir for tls 'dom' defined, > using default '/etc/pki/CA/' > >> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]: > NOTICE:tls_mgm:init_tls_dom: no crl for tls, using none > >> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]: > NOTICE:tls_openssl:openssl_init_tls_dom: No EC curve defined > >> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]: > INFO:tls_openssl:get_ssl_ctx_verify_mode: client verification NOT > activated. Weaker security. > >> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]: > INFO:tls_mgm:init_tls_dom: Processing TLS domain 'dom1' > >> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]: > NOTICE:tls_mgm:init_tls_dom: no CA dir for tls 'dom1' defined, > using default '/etc/pki/CA/' > >> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]: > NOTICE:tls_mgm:init_tls_dom: no crl for tls, using none > >> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]: > NOTICE:tls_openssl:openssl_init_tls_dom: No EC curve defined > >> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]: > INFO:tls_openssl:get_ssl_ctx_verify_mode: server verification NOT > activated. Weaker security. > >> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]: > INFO:proto_tls:mod_init: initializing TLS protocol > >> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]: > INFO:proto_bin:mod_init: initializing BIN protocol > >> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]: > INFO:clusterer:mod_init: Clusterer module - initializing > >> > Sep 25 10:14:01 ip-10-100-20-35 /usr/sbin/opensips[4935]: > CRITICAL:core:sig_usr: segfault in attendant (starter) process! > >> > Sep 25 10:14:01 ip-10-100-20-35 kernel: [39023.653243] > opensips[4935]: segfault at 0 ip 0000000000000000 sp > 00007ffececa3d08 error 14 in opensips[558b5bb75000+1c000] > >> > Sep 25 10:14:01 ip-10-100-20-35 kernel: [39023.666503] Code: > Bad RIP value. > >> > Sep 25 10:14:01 ip-10-100-20-35 opensips: > INFO:core:daemonize: pre-daemon process exiting with -1 > >> > > >> > and my client domain settings > >> > > >> > #client domain > >> > modparam("tls_mgm", "client_domain", "dom1") > >> > modparam("tls_mgm", "match_ip_address", "[dom1]*") > >> > modparam("tls_mgm", "match_sip_domain", "[dom1]*") > >> > modparam("tls_mgm","certificate", > "[dom1]/etc/ssl/certs/rootCACert.pem") > >> > modparam("tls_mgm","private_key", > "[dom1]/etc/ssl/private/rootCAKey.pem") > >> > modparam("tls_mgm","ca_list", > "[dom1]/etc/ssl/certs/rootCACert.pem") > >> > modparam("tls_mgm","tls_method", "[dom1]SSLv23") > >> > modparam("tls_mgm","verify_cert", "[dom1]0") > >> > modparam("tls_mgm","require_cert", "[dom1]0") > >> > > >> > It is expected to see some other errors such as invalid cert > but not crash in pre-daemon process. Any clue on this for me to > debug? If I remove "?tls_domain=dom1", there is no such crash > though the opensips server still couldn't start because I forced > the mysql db to use ssl connection. Thanks! > >> > > >> > On Mon, Sep 19, 2022 at 9:09 PM Vlad Patrascu > > wrote: > >> >> > >> >> Hi Jacky, > >> >> > >> >> I cant think of any workaround unfortunately. > >> >> > >> >> Regards, > >> >> > >> >> -- > >> >> Vlad Patrascu > >> >> OpenSIPS Core Developer > >> >> http://www.opensips-solutions.com > > >> >> > >> >> On 17.09.2022 18:46, jacky z wrote: > >> >> > >> >> Hi  Vlad, > >> >> > >> >> Is there any workaround to disable the client cert? Thanks! > >> >> > >> >> On Wed, Sep 14, 2022 at 9:16 PM Vlad Patrascu > > wrote: > >> >>> > >> >>> Hi Jacky, > >> >>> > >> >>> OpenSIPS will always require you to configure a client > certificate for TLS client domains and will also present that > certificate when connecting. But normally, a TLS server can simply > choose not to verify the client certificate. I don't have any > experience with AWS RDS though but it seems odd to not accept a > connection only because the client did present a certificate. > >> >>> > >> >>> Regards, > >> >>> > >> >>> -- > >> >>> Vlad Patrascu > >> >>> OpenSIPS Core Developer > >> >>> http://www.opensips-solutions.com > > >> >>> > >> >>> On 14.09.2022 05:42, jacky z wrote: > >> >>> > >> >>> Hi Bogdan-Andrei, > >> >>> > >> >>> I checked the mariadb documentation and found mariadb has > two options to set ssl connection: two-way TSL and one-way TSL. It > seems AWS RDS only supports one-way TSL, that is, TSL is used > without a client cert. Does OPENSIPS support such one-way TSL to > connect a database? Thanks! > >> >>> > >> >>> On Wed, Sep 14, 2022 at 12:06 AM jacky z > > wrote: > >> >>>> > >> >>>> Hi Bogdan-Andrei, > >> >>>> > >> >>>> I have set the "certificate" and "private_key" in my > script, as I explained in method 1. However, AWS RDS doesn't > support a client cert. Please refer to > >> >>>> > https://stackoverflow.com/questions/53760104/how-to-configure-x509-client-certificate-based-authentication-to-connect-to-aws > > >> >>>> > >> >>>> Is there any workaround to use the public cert list > provided by AWS? Anyone has successfully used RDS with SSL > connections? Thanks! > >> >>>> > >> >>>> On Tue, Sep 13, 2022 at 9:54 PM Bogdan-Andrei Iancu > > wrote: > >> >>>>> > >> >>>>> Set the certificate and key you have in the tls_mgm > module, for the "certificate" and "private_key" parameters. > >> >>>>> > >> >>>>> Regards, > >> >>>>> > >> >>>>> Bogdan-Andrei Iancu > >> >>>>> > >> >>>>> OpenSIPS Founder and Developer > >> >>>>> https://www.opensips-solutions.com > > >> >>>>> OpenSIPS Summit 27-30 Sept 2022, Athens > >> >>>>> https://www.opensips.org/events/Summit-2022Athens/ > > >> >>>>> > >> >>>>> On 9/13/22 2:57 PM, jacky z wrote: > >> >>>>> > >> >>>>> Hi Bogdan-Andrei, > >> >>>>> > >> >>>>> I tried two methods. > >> >>>>> > >> >>>>> Method 1: > >> >>>>> > >> >>>>> #enabled TLS connection: > >> >>>>> modparam("db_mysql", "use_tls", 1) > >> >>>>> > >> >>>>> #setup a client domain: > >> >>>>> modparam("tls_mgm", "client_domain", "dom1") > >> >>>>> modparam("tls_mgm", "match_ip_address", "[dom1]*") > >> >>>>> modparam("tls_mgm", "match_sip_domain", "[dom1]*") > >> >>>>> modparam("tls_mgm","certificate", > "[dom1]/etc/ssl/certs/rootCACert.pem") > >> >>>>> modparam("tls_mgm","private_key", > "[dom1]/etc/ssl/private/rootCAKey.pem") > >> >>>>> modparam("tls_mgm","ca_list", > "[dom1]/etc/ssl/certs/rootCACert.pem") > >> >>>>> modparam("tls_mgm","tls_method", "[dom1]SSLv23") > >> >>>>> modparam("tls_mgm","verify_cert", "[dom1]0") > >> >>>>> modparam("tls_mgm","require_cert", "[dom1]0") > >> >>>>> # set db_url > >> >>>>> modparam("usrloc", "db_url", > "mysql://root:1234@/opensips?tls_domain=dom1") > >> >>>>> ... > >> >>>>> > >> >>>>> I couldn't figure out how to use global-bundle.pem AWS > provided with this method. No luck to get a connection with RDS. > If I don't use ssl, opensips can connect to RDS without encryption. > >> >>>>> > >> >>>>> Method 2: > >> >>>>> > >> >>>>> I tried > >> >>>>> > >> >>>>> modparam("usrloc", "db_url", > "mysql://root:1234@/opensips?ssl=true&ssl_ca_certs=/etc/ssl/certs/global-bundle.pem") > >> >>>>> > >> >>>>> to include the AWS cert. Still no luck. > >> >>>>> > >> >>>>> Thanks! > >> >>>>> > >> >>>>> On Tue, Sep 13, 2022 at 4:52 PM Bogdan-Andrei Iancu > > wrote: > >> >>>>>> > >> >>>>>> Hi, > >> >>>>>> > >> >>>>>> sorry for my silly question, but how do you connect from > the OpenSIPS side ?? > >> >>>>>> > >> >>>>>> Regards, > >> >>>>>> > >> >>>>>> Bogdan-Andrei Iancu > >> >>>>>> > >> >>>>>> OpenSIPS Founder and Developer > >> >>>>>> https://www.opensips-solutions.com > > >> >>>>>> OpenSIPS Summit 27-30 Sept 2022, Athens > >> >>>>>> https://www.opensips.org/events/Summit-2022Athens/ > > >> >>>>>> > >> >>>>>> On 9/13/22 10:41 AM, jacky z wrote: > >> >>>>>> > >> >>>>>> Hi Team, > >> >>>>>> > >> >>>>>> We hope to connect to aws RDS database with ssl > encryption. We have setup a client domain according to OPENSIPS > documents. However, AWS RDS does not support client cert as > someone has confirmed with AWS > https://stackoverflow.com/questions/53760104/how-to-configure-x509-client-certificate-based-authentication-to-connect-to-aws > > >> >>>>>> > >> >>>>>> Is there any way to use the cert provided by AWS to > connect? AWS provides a global-bundle.pem > (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html > ) > for such a connection, but we don't know how to include it in the > config file. > >> >>>>>> > >> >>>>>> Thanks > >> >>>>>> > >> >>>>>> Jacky z > >> >>>>>> > >> >>>>>> _______________________________________________ > >> >>>>>> Users mailing list > >> >>>>>> Users at lists.opensips.org > >> >>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > >> >>>>>> > >> >>>>>> > >> >>>>> > >> >>> > >> >>> _______________________________________________ > >> >>> Users mailing list > >> >>> Users at lists.opensips.org > >> >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > >> >>> > >> >>> _______________________________________________ > >> >>> Users mailing list > >> >>> Users at lists.opensips.org > >> >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > >> >> > >> >> > >> >> _______________________________________________ > >> >> Users mailing list > >> >> Users at lists.opensips.org > >> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > >> >> > >> >> _______________________________________________ > >> >> Users mailing list > >> >> Users at lists.opensips.org > >> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > >> > > >> > _______________________________________________ > >> > Users mailing list > >> > Users at lists.opensips.org > >> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > >> > >> > >> > >> -- > >> VoIP Embedded, Inc. > >> http://www.voipembedded.com > >> > >> _______________________________________________ > >> Users mailing list > >> Users at lists.opensips.org > >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > _______________________________________________ > > Users mailing list > > Users at lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > -- > VoIP Embedded, Inc. > http://www.voipembedded.com > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From liviu at opensips.org Mon Oct 10 12:29:03 2022 From: liviu at opensips.org (Liviu Chircu) Date: Mon, 10 Oct 2022 15:29:03 +0300 Subject: [OpenSIPS-Users] Formating issue for string that contains pv In-Reply-To: <810e4b53-a397-a03d-7add-795984355d66@netgsm.com.tr> References: <810e4b53-a397-a03d-7add-795984355d66@netgsm.com.tr> Message-ID: <93457826-a3b6-32aa-4bda-93d2dd0ce2da@opensips.org> On 10.10.2022 12:43, Serdar GUCLUER wrote: > > In my situation, i want to format string which contains > pseudo-variables. These string are stored in db and cached with > "cache_table" module. > > I tried it like that; > > $avp(value) = $sql_cached_value(caching_name:column_name:key); > pv_printf($var(formatted_value), $sql_cached_value(caching_name:column_name:key)); > xlog("L_INFO", "*** Value: $avp(value) | Formatted Value: $var(formatted_value) ***"); Hi Serdar, I remember that at some point, there was some support for string evaluation added as part of the {s.eval} transformation[1].  Unfortunately, I don't recall an equivalent function, so you may have to play around with the transformation only. [1]: https://www.opensips.org/Documentation/Script-Tran-3-4#s.eval Best regards, -- Liviu Chircu www.twitter.com/liviuchircu |www.opensips-solutions.com OpenSIPS Summit 2022 Athens, Sep 27-30 |www.opensips.org/events -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Oct 10 12:32:37 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 10 Oct 2022 15:32:37 +0300 Subject: [OpenSIPS-Users] Dialplan/Routing In-Reply-To: References: Message-ID: <09fa6fb9-b988-6ecc-9214-2a73e0d2c4a0@opensips.org> Hi Nitesh, The "420 Bad Extension" is generated by the residential cfg when the lookup on the caller fails (the caller party is not found as registered in OpenSIPS). Now, I assume you are dialing kind of DID (to be routed to PSTN), so it should NOT hit the lookup (which is when calling to local subscribers). So you may dial something wrong. As per default residential cfg, the dialed number must start with `+` in order to be considered a PSTN destination. Best regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 9/27/22 6:09 PM, Nitesh Divecha wrote: > Hello All, > > I'm a newbie with Opensips! Got good knowledge with Asterisk and SIP > in general. > > Trying to figure out how to route calls out on the SIP trunk. > > Running following: > "Server": "OpenSIPS (3.3.1 (x86_64/linux))" > OpenSIPS Control Panel 9.3.2 > Debian 11 > > Opensips is configured with residential configuration and I can make > the following: > 1) local SIP to SIP calls (registered SIP endpoints). > 2) External DID to Opensips to local SIP endpoint. > > But failing to call out from the local SIP endpoint to SIP trunk > (external). Every time I make a call I get SIP 420 Bad Extension. > > I did follow all the instructions regarding Opensips-CP from > (https://powerpbx.org/content/opensips-v30-debian-v10-mariadb-apache-v1 > ) > to setup SIP trunk, dial plan, dynamic routing and > edit "opensips_residential.cfg" but failing to send the call out. > > Any suggestions? > > Thanking in advance. > > Cheers, > Nite > > > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Oct 10 12:39:48 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 10 Oct 2022 15:39:48 +0300 Subject: [OpenSIPS-Users] Creating branches inside a while loop In-Reply-To: References: Message-ID: <5bb617e0-50b9-e7f4-a3c4-9fdc3ac0dc18@opensips.org> Hi Takeshi, Aren't you missing the "seturi()" + "append_branch()" in the loop ?? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 9/28/22 4:26 PM, mayamatakeshi wrote: > > On Wed, Sep 28, 2022 at 2:21 PM mayamatakeshi > wrote: > > Hi, > I'm testing latest commit b243666098be44226ade6a7df2b62851efcb5de8 > of opensips-3.2. > > I tested adding branches to an INVITE for a fixed size list of > AORs this way: > >             $var(aors) = "sip:user1 at test1.com > ,sip:user2 at test1.com > ,sip:user3 at test1.com > "; > >             seturi($(var(aors){s.select,0,,})); > >             append_branch(); >             seturi($(var(aors){s.select,1,,})); > >             append_branch(); >             seturi($(var(aors){s.select,2,,})); > >             lookup("location", "r") > > The above works fine and all 3 destinations resolved by AOR lookup > are called (max of contact per AOR). > > However, in case of a a list of unknown size, I tried to use a > while loop like this: >             $var(aors) = "sip:user1 at test1.com > ,sip:user2 at test1.com > ,sip:user3 at test1.com > "; > >             $var(idx) = 0; >             $var(aor) = $(var(aors){s.select,$var(idx),,}); > >             while($var(aor) != null) { >                 seturi($var(aor)); > >                 $var(idx) = $var(idx) + 1; >                 $var(aor) = $(var(aors){s.select,$var(idx),,}); >             } > >             lookup("location", "r") > > But with the above, only the last destination (lookup of > user3 at test1.com ) is called. > I confirmed this is not related to the lookup function because I > tried with fixed destinations like this: > >             $var(aors) = "sip:user1 at 10.0.0.1:5072 > ,sip:user2 at 10.0.0.1:5074 > ,sip:user3 at 10.0.0.1:5076 > "; > >             $var(idx) = 0; >             $var(aor) = $(var(aors){s.select,$var(idx),,}); > >             while($var(aor) != null) { >                 seturi($var(aor)); > >                 $var(idx) = $var(idx) + 1; >                 $var(aor) = $(var(aors){s.select,$var(idx),,}); >             } > > and the same problem happens: only the last destination > sip:user3 at 10.0.0.1:5076  is called. > > So, is there a way to append a non-fixed number of branches to an > INVITE? > > Regards, > Takeshi > > > Sorry, I think I did something wrong. > I was able to make append_branch to work inside a while loop. > So there is no problem. > Regards, > Takeshi > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Oct 10 12:44:24 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 10 Oct 2022 15:44:24 +0300 Subject: [OpenSIPS-Users] Opensips 3.2.8 does not send message with opensips-cli command In-Reply-To: References: Message-ID: Hi, On 3.2, are you sure you actually have the ongoing connection? Try running the list_tcp_conns MI cmd just before trying to push the MESSAGE out. Be sure that the remote point (proto:ip:port) of the connection matches the destination of your MESSAGE (so the connection gets re-used). https://www.opensips.org/Documentation/Interface-CoreMI-3-2#toc4 Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 9/29/22 5:09 PM, jacky z wrote: > Also tried version 3.2.2. The same issue. The existing TCP connection > can't be found when there is a Message request, either from msilo dump > or opensips-cli command. A message sent directly is normal when the > receiver side registers with a living TCP socket. Guess this would > also affect other behavior where an existing TCP connection needs to > be found. From the log, the connection ID is zero. Very strange > behavior. I would like to debug, but not familiar with the source code > structure. For example how a TCP connection is looked for and which > file handles this. Guess it is not difficult to fix, hope the Opensips > team can help. Thank you! > > On Tue, Sep 27, 2022 at 10:56 PM jacky z > wrote: > > Who can help on this? It is difficult to understand why the live > tcp connection can't be found with opensips 3.2. It works well > with opensips 3.1. Thanks! > > On Mon, Sep 26, 2022 at 3:54 PM jacky z > wrote: > > Hi Team, > > We use MI command to send messages to a user successfully with > opensips 3.1, but after we upgraded to 3.2.8, the message > can't be sent with opensips-cli command. > > We compared the logs and found that when the command was run > on 3.2.8, the tcp connection couldn't be found though we can > confirm there was a tcp connection. Another strange behavior > is that it did not lookup the location table for the ruri and > it seems the message route was not called. On 3.2.8, if we > specify the ruri in the command with the actual ip address and > port we manually found in the location table, the message can > be sent. We also found the msilo module can't send messages on > 3.2.8 but it works well on 3.1. > > Here is the command we used: > > opensips-cli -x mi t_uac_dlg method=MESSAGE > ruri="sip:12345 at sip.domain.com:5061;transport=TLS" > headers="From: > sip:6789 at sip.domain.com:5061;transport=tls\r\nTo: > sip:12345 at sip.domain.com:5061;transport=TLS\r\nContact: > sip:6789 at sip.domain.com:5061;transport=tls\r\nContent-Type: > text/plain\r\n" body="this is a message" > > Here are the logs on 3.1 and 3.2.8 respectively, > > Logs for OPENSIPS 3.2 > > Sep 26 07:21:13 opensips[3477]: DBG:core:parse_msg: SIP Request: > Sep 26 07:21:13 opensips[3477]: DBG:core:parse_msg:  method:  > > Sep 26 07:21:13 opensips[3477]: DBG:core:parse_msg:  uri: >   > Sep 26 07:21:13 opensips[3477]: DBG:core:parse_msg:  version: > > Sep 26 07:21:13 opensips[3477]: DBG:core:parse_headers: > flags=ffffffffffffffff > Sep 26 07:21:13 opensips[3477]: DBG:core:parse_via_param: > found param type 232, = ; state=16 > Sep 26 07:21:13 opensips[3477]: DBG:core:parse_via: end of > header reached, state=5 > Sep 26 07:21:13 opensips[3477]: DBG:core:parse_headers: via > found, flags=ffffffffffffffff > Sep 26 07:21:13 opensips[3477]: DBG:core:parse_headers: this > is the first via > Sep 26 07:21:13 opensips[3477]: DBG:core:_parse_to: end of > header reached, state=9 > Sep 26 07:21:13 opensips[3477]: DBG:core:_parse_to: > display={}, ruri={sip:6989229721 at sip.domain.com:5061 > } > Sep 26 07:21:13 opensips[3477]: DBG:core:get_hdr_field: > [37]; uri=[sip:6989229721 at sip.domain.com:5061 > ] > Sep 26 07:21:13 opensips[3477]: DBG:core:get_hdr_field: to > body [sip:6989229721 at sip.domain.com:5061#015#012 > ] > Sep 26 07:21:13 opensips[3477]: DBG:core:get_hdr_field: cseq > : <10> > Sep 26 07:21:13 opensips[3477]: DBG:core:get_hdr_field: > content_length=28 > Sep 26 07:21:13 opensips[3477]: DBG:core:get_hdr_field: found > end of header > Sep 26 07:21:13 opensips[3477]: DBG:core:parse_headers: > flags=ffffffffffffffff > Sep 26 07:21:13 opensips[3477]: DBG:core:parse_headers: flags=78 > Sep 26 07:21:13 opensips[3477]: DBG:proto_tls:proto_tls_send: > no open tcp connection found, opening new one, async = 0 > Sep 26 07:21:13 opensips[3477]: DBG:core:probe_max_sock_buff: > getsockopt: snd is initially 16384 > Sep 26 07:21:13 opensips[3477]: DBG:core:probe_max_sock_buff: > using snd buffer of 416 kb > Sep 26 07:21:13 opensips[3477]: DBG:core:init_sock_keepalive: > TCP keepalive enabled on socket 103 > Sep 26 07:21:14 opensips[3477]: > ERROR:core:tcp_connect_blocking_timeout: connect timed out, > 1000079 us elapsed out of 1000000 us > Sep 26 07:21:14 opensips[3477]: > ERROR:core:tcp_sync_connect_fd: tcp_blocking_connect failed > Sep 26 07:21:14 opensips[3477]: > ERROR:proto_tls:proto_tls_send: connect failed > Sep 26 07:21:14 opensips[3477]: ERROR:tm:msg_send: send() to > 12.34.56.78:5061 for proto tls/3 failed > Sep 26 07:21:14 opensips[3477]: ERROR:tm:t_uac: attempt to > send to 'sip:6989229721 at sip.domain.com:5061;transport=TLS' failed > > Logs for OPENSIPS 3.1 > > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:parse_msg: SIP Request: > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:parse_msg:  method:  > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:parse_msg:  uri: >   > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:parse_msg:  version: > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:parse_headers: flags=ffffffffffffffff > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:parse_via_param: found param type 232, = > ; state=16 > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:parse_via: end of header reached, state=5 > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:parse_headers: via found, flags=ffffffffffffffff > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:parse_headers: this is the first via > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:_parse_to: end of header reached, state=9 > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:_parse_to: display={}, > ruri={sip:3293543374 at sip.domain.com:5061 > } > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:get_hdr_field: [38]; > uri=[sip:3293543374 at sip.domain.com:5061 > ] > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:get_hdr_field: to body > [sip:3293543374 at sip.domain.com:5061#015#012 > ] > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:get_hdr_field: cseq : <10> > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:get_hdr_field: content_length=28 > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:get_hdr_field: found end of header > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:parse_headers: flags=ffffffffffffffff > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11569]: > DBG:core:parse_headers: flags=78 > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11558]: > DBG:core:tcp_conn_get: con found in state 0 > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11558]: > DBG:core:tcp_conn_get: tcp connection found (0x7fd4544ee2f0), > acquiring fd > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11558]: > DBG:core:tcp_conn_get: c= 0x7fd4544ee2f0, n=16, Usock=75 > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11571]: > DBG:core:handle_worker: read response= 7fd4544ee2f0, 1, fd -1 > from 2 (11558) > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11558]: > DBG:core:tcp_conn_get: after receive_fd: c= 0x7fd4544ee2f0 n=8 > fd=102 > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11558]: > DBG:proto_tls:proto_tls_send: sending via fd 102... > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11558]: > DBG:proto_tls:tls_update_fd: New fd is 102 > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11558]: > DBG:proto_tls:tls_write: write was successful (534 bytes) > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11558]: > DBG:proto_tls:proto_tls_send: after write: c= 0x7fd4544ee2f0 > n=534 fd=102 > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11558]: > DBG:proto_tls:proto_tls_send: buf=#012MESSAGE > sip:3293543374 at sip.domain.com:5061;transport=TLS > SIP/2.0#015#012Via: SIP/2.0/TLS > sip.domain.com:5061;branch=z9hG4bK08a6.250aa504.0#015#012To: > sip:3293543374 at sip.domain.com:5061#015#012From > : > >;tag=fb020df94c5e77218c43e857503e9580-89dd#015#012CSeq: > 10 MESSAGE#015#012Call-ID: > 70bcd9894ae296f3-11558 at 172.31.14.229#015#012Max-Forwards > : > 70#015#012Content-Length: 28#015#012User-Agent: OpenSIPS > (3.1.11 (x86_64/linux))#015#012Contact: > sip:3293543374 at sip.domain.com:5061;transport=tls#015#012Content-Type: > text/plain#015#012#015#012{"type":"11", "cont":"test"} > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11558]: > DBG:tm:insert_timer_unsafe: [0]: 0x7fd4545590c0 (42) > Sep 26 07:32:00 ip-172-31-14-229 /usr/sbin/opensips[11558]: > DBG:mi_fifo:mi_fifo_server: got mi response = [0xffffffffffffffff] > > > Thanks! > > jacky > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Oct 10 12:49:45 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 10 Oct 2022 15:49:45 +0300 Subject: [OpenSIPS-Users] Request-Disposition: no-fork In-Reply-To: References: Message-ID: <06d8dcf8-c973-b17e-c162-ffe2c597543a@opensips.org> Hi Bela, What you are trying to do (messing with the TO-tags) is a bad idea, as you will be breaking the upstream parallel forking. If the GW does not support forking, what you can do is to avoid doing parallel forking in your cfg (like when routing to users via lookup). You do not need any special support. Best regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 9/29/22 7:10 AM, Bela H wrote: > > Hello, > > I have call forwarding busy/no answer scenario: A number is from a > gateway, B and C numbers are our own subs. > > The gateway is sending us the INVITE message with > “Request-Disposition: no-fork” header field. > > That means we must use one dialog for the mentioned scenario. > > Currently the To tag we are sending to the GW in the first 180 > ringing/181 Call is being forwarded messages are different to the To > tag in the second 180 ringing and 200 OK (SDP). > > Gateway                  OpenSips > >               INVITE > > ------------------------------------------> > > 100 GIVING IT A TRY > > <-- ----------------------------------------- > >       180 RINGING > > <- ------------------------------------------- > > 181 CALL IS BEING FORWARDED > > <- ------------------------------------------- > >       180 RINGING > > <- ------------------------------------------- > >       200 OK (SDP) > > <- ------------------------------------------- > > What would be the easiest way from OpenSIPS to send the same To tag > (it should be the same from the first 180 ringing through to the 200 > OK) and using one dialog for this scenario? > > Cheers, > > Bela > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Oct 10 12:50:31 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 10 Oct 2022 15:50:31 +0300 Subject: [OpenSIPS-Users] Does OpenSIPS support Request-Disposition: no-fork in INVITE message? In-Reply-To: References: Message-ID: <15423890-a476-a1f3-60f0-661ea11782d8@opensips.org> Hi Bela, As per prev email, there is nothing to be supported by OpenSIPS, just don;t do forking in your cfg, nothing more. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 9/30/22 12:15 AM, Bela H wrote: > > Hello, > > Does OpenSIPS 3.2.6 version support Request-Disposition: no-fork in > INVITE message? > > Cheers, > > Bela > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Oct 10 12:53:47 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 10 Oct 2022 15:53:47 +0300 Subject: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay and rtpproxy In-Reply-To: References: Message-ID: <1a54c921-5321-9c74-e95b-74f968b1e4f9@opensips.org> Hi Thomas, Your handling of sequential requests is broken, see here for a correct sample: https://github.com/OpenSIPS/opensips/blob/master/etc/opensips.cfg#L109 Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 9/30/22 11:07 AM, Thomas Pircher via Users wrote: > Thomas Pircher wrote: >> The problem I am seeing is when I initiate a connection from the sipp >> client then I see RTP flowing only in one direction (sipp client to sipp >> server). I believe this is due to a missing ACK from OpenSIPS to the >> sipp server following the 200 OK. > > Hi, > > I no longer think the rtpproxy is part of the problem. I believe this is > purely an issue with my t_relay configuration. > > I did some more tests, and I think the issue is that the ACK from the > sipp client at 10.30.8.203 is discarded by OpenSIPS, and therefore the > OpenSIPS does not send the ACK to the sipp server on the internal > interface. > > This would also explain the "404 Not here" response to the BYE at the > end of the connection: > >>  ┌───────────┐ ┌─────────────────┐ >> ┌─────────────────┐                    ┌───────────┐ >>  │sipp client│                    │OpenSIPS external│ │OpenSIPS >> internal│                    │sipp server│ >>  │10.30.8.203│                    │10.30.8.201      │ >> │10.30.9.10       │                    │10.30.90.11│ >>  └─────┬─────┘                    └────────┬────────┘ >> └────────┬────────┘                    └─────┬─────┘ >>        │        INVITE SDP (g711A) │                            │ │ >> │──────────────────────────────────>│ >> │                                   │ >>        │ │                            │ │ >>        │       100 Giving it a try │                            │ │ >> │<──────────────────────────────────│ >> │                                   │ >>        │ │                            │ │ >>        │ │                            │        INVITE SDP (g711A) │ >>        │ │ │──────────────────────────────────>│ >>        │ │                            │ │ >>        │ │                            │           180 Ringing │ >>        │ │ │<──────────────────────────────────│ >>        │ │                            │ │ >>        │           180 Ringing │                            │ │ >> │<──────────────────────────────────│ >> │                                   │ >>        │ │                            │ │ >>        │ │                            │200 OK SDP (g711A >> telephone-event) │ >>        │ │ │<──────────────────────────────────│ >>        │ │                            │ │ >>        │200 OK SDP (g711A telephone-event) >> │                            │ │ >> │<──────────────────────────────────│ >> │                                   │ >>        │ │                            │ │ >>        │               ACK │                            │ │ >> │──────────────────────────────────>│ >> │                                   │ >>        │ │                            │ │ >>        │ │                            │200 OK SDP (g711A >> telephone-event) │ >>        │ │ │<──────────────────────────────────│ >>        │ │                            │ │ >>        │200 OK SDP (g711A telephone-event) >> │                            │ │ >> │<──────────────────────────────────│ >> │                                   │ >>        │ │                            │ │ >>        │               ACK │                            │ │ >> │──────────────────────────────────>│ >> │                                   │ >>        │ │                            │ │ >>        │ │                            │200 OK SDP (g711A >> telephone-event) │ >>        │ │ │<──────────────────────────────────│ >>        │ │                            │ │ >>        │200 OK SDP (g711A telephone-event) >> │                            │ │ >> │<──────────────────────────────────│ >> │                                   │ >>        │ │                            │ │ >>        │               ACK │                            │ │ >> │──────────────────────────────────>│ >> │                                   │ >>        │ │                            │ │ >>        │ │                            │200 OK SDP (g711A >> telephone-event) │ >>        │ │ │<──────────────────────────────────│ >>        │ │                            │ │ >>        │200 OK SDP (g711A telephone-event) >> │                            │ │ >> │<──────────────────────────────────│ >> │                                   │ >>        │ │                            │ │ >>        │               ACK │                            │ │ >> │──────────────────────────────────>│ >> │                                   │ >>        │ │                            │ │ >>        │ │                            │200 OK SDP (g711A >> telephone-event) │ >>        │ │ │<──────────────────────────────────│ >>        │ │                            │ │ >>        │               BYE │                            │ │ >> │──────────────────────────────────>│ >> │                                   │ >>        │ │                            │ │ >>        │           404 Not here │                            │ │ >> │<──────────────────────────────────│ >> │                                   │ >>        │ │                            │ │ >>        │               BYE │                            │ │ >> │──────────────────────────────────>│ >> │                                   │ >>        │ │                            │ │ >>        │           404 Not here │                            │ │ >> │<──────────────────────────────────│ >> │                                   │ >>  ┌─────┴─────┐                    ┌────────┴────────┐ >> ┌────────┴────────┐                    ┌─────┴─────┐ >>  │sipp client│                    │OpenSIPS external│ │OpenSIPS >> internal│                    │sipp server│ >>  │10.30.8.203│                    │10.30.8.201      │ >> │10.30.9.10       │                    │10.30.90.11│ >>  └───────────┘                    └─────────────────┘ >> └─────────────────┘                    └───────────┘ > > > In my understanding the ACK from the sipp client should be handled by > the t_relay() code in the global route: > >> route { >>     if (!mf_process_maxfd_header(10) { >>         send_reply(483, "Too many hops"); >>         exit; >>     } >> >>     if (has_totag()) { >>         if (is_method("ACK") && t_check_trans()) { >>         t_relay(); >>         exit; >>     } >> ... > > However, the t_check_trans() function seems to return False for the ACK > from the sipp client. Is my understanding wrong? Or is there a mistake > in my usage in t_relay(, "udp:10.30.90.11:5060")? > > Any help is greatly appreciated. > > Thanks, > Thomas > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From bogdan at opensips.org Mon Oct 10 13:33:15 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 10 Oct 2022 16:33:15 +0300 Subject: [OpenSIPS-Users] Possible memory leak in PKG In-Reply-To: References: Message-ID: <849643ba-3d00-5642-10c8-cbdd4b8d735f@opensips.org> Hi Arto, Thanks for the report here. So, the 3.2.7 suffers of a mem leak which DOES NOT exist in 3.1.1, mainly this       109600 : 4858 x [dlg_vals.c: fetch_dlg_value, line 176] right ? Best regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/5/22 10:16 AM, Arto Kuiri wrote: > Hi, > > I think I have stumbled to some kind of memory leak. I made new > opensips server used same opensips.cfg (changed only ip address) as in > my older servers and after some time I started to get these to log file: > > /usr/sbin/opensips[1145854]: ERROR:core:fm_malloc: not enough free pkg > memory (2312 bytes left, need 2472), please increase the "-M" command > line parameter! > /usr/sbin/opensips[1145854]: ERROR:core:receive_msg: no pkg mem left > for sip_msg > > Older servers works fine with much higher load. Old servers are with > opensips 3.1.1 and new server is 3.2.7 : > > opensips -V > version: opensips 3.1.1 (x86_64/linux) > flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, > Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_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. > main.c compiled on  with gcc 9 > > opensips -V > version: opensips 3.2.7 (x86_64/linux) > flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, > Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_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. > main.c compiled on  with gcc 11 > > I allocated more memory and changed private memory allocator to > F_MALLOC_DBG > > After while I checked what process had highest memory useage and I did: > opensips-cli -x mi mem_pkg_dump > (PID was "SIP receiver udp") > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryzhik.ivan at gmail.com Mon Oct 10 13:33:21 2022 From: ryzhik.ivan at gmail.com (Ryzhik Ivan) Date: Mon, 10 Oct 2022 16:33:21 +0300 Subject: [OpenSIPS-Users] early dialog termination Message-ID: Hello! My opensips version is 3.1 with tm,dialog and rtpengine modules. On incoming INVITE i'm creating an early dialog with 183 replies and i'm playing audio to caller with rtpengine, no t_relay() on this step, OS is acting as UAS endpoint. If the caller cancels the invite with a CANCEL message - all works great. But some users terminate dialog with BYE message. 1) on BYE with to-tag OS can't find dialog with match_dialog(), because to-tag presents. 2) if i use load_dialog_ctx($ci) - it is possible to handle BYE. 3) in early dialog termination with BYE we also need to send final response to the INVITE transaction. Maybe I did something wrong, but I can't handle the final response to INVITE in this case. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Oct 10 13:42:10 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 10 Oct 2022 16:42:10 +0300 Subject: [OpenSIPS-Users] OpenSIPS Control Panel In-Reply-To: References: Message-ID: <475406d8-af11-034d-cfbc-430a38c77b63@opensips.org> Hi Nitesh, In SIP, registration is done for receiving calls, it does not impact sending calls. So, define the remote server as GW in Dynamic Route and simply route the calls to it.  Note that maybe the remote server will expect you to use the as FROM hdr (calling identity) the AOR (SIP address) you are registering with, so maybe you should be an uac_replace_from() in cfg when sending to the GW. Best regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/7/22 9:00 PM, Nitesh Divecha wrote: > Hello All, > > Anyone using OpenSIPS CP 9.3.2? Need small help! > > I got OpenSIPS 3.3.1 running and I can make calls out to the gateway > (SIP trunk) without any problems. > > My provider issued me a DID with user/pass and I was able to configure > them under "UAC Registrant" and registered to a remote server. > > Question is - how can I route calls to "UAC Registrant"? From the > "Dynamic Routing" menu I can only route calls to Gateway. How can I > route calls to "UAC Registrant"? > > Any suggestions? > > Thank you in advance! > > Cheers, > Nitesh > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Oct 10 13:50:31 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 10 Oct 2022 16:50:31 +0300 Subject: [OpenSIPS-Users] Expires value - [ZVP-JQSVP-142] In-Reply-To: <18304509_fwuacc91@support.qualityunit.com> References: <18304509_fwuacc91@support.qualityunit.com> <18304509_fwuacc91@support.qualityunit.com> Message-ID: Hi Artem, This is the intended behavior of the module, re-register with the last "expires" provided by the server - if the server had a good reason to lower the registration time on first register, it will most probably do it for the re-register's also. So does not make too much of a sense to keep using the initial DB value - or do you have some good reason not to update ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 9/23/22 7:15 PM, Artem Fomenko via Users wrote: > > Hello, > > I'm Artem and configuring telephony system via OpenSIPS v3.1.9. In > outgoing REGISTER request the "expires" parameter set according > "expiry" value in "uac_registrant" DB table. But in all subsequent > REGISTERs "expires" value takes same as in 200 OK response on previous > REGISTER request. Is it possible to configure OpenSIPS to use same > "expiry" value for all subsequent REGISTER requests also? > > Regards, > > LiveAgent > > *Artem Fomenko* > > *Development Team* > > +421 2 33 456 826 (EU & Worldwide) > > +1-888-257-8754 (USA & Canada) > > www.liveagent.com > > > *How nice was my reply?* > > 1 > > 2 > > 3 > > 4 > > 5 > > 6 > > 7 > > 8 > > 9 > > 10 > > > *Rate the answer or view the ticket history here > * > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Oct 10 14:04:40 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 10 Oct 2022 17:04:40 +0300 Subject: [OpenSIPS-Users] early dialog termination In-Reply-To: References: Message-ID: Hi Ryzhik, Without a t_relay() it makes not much sense to have an dialog structure at all - the dialog module in opensips is actually design for proxied calls, not for UAC calls. IMO, you should keep it a transaction level, by sending replies back only. When getting the INVITE, put its call-id into a DB table (to keep only the "active" session) together with a lifetime / expiration time. When getting a CANCEL, update the table (set lifetime to 0), to know it is terminated. And use an simple external script that keeps scanning the DB for (1) sending 487 Terminated via MI if the record has 0 lifetime or (2) send a 408 Timeout via MI if the lifetime exceeded. In a similar way you can handle the BYE - send back 200OK for the BYE and set 0 in lifetime, to send a 487 canceled back Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/10/22 4:33 PM, Ryzhik Ivan wrote: > Hello! > My opensips version is 3.1 with tm,dialog and rtpengine modules. > On incoming INVITE i'm creating an early dialog with 183 replies and > i'm playing audio to caller with rtpengine, no t_relay() on this step, > OS is acting as UAS endpoint. > If the caller cancels the invite with a CANCEL message - all works great. > But some users terminate dialog with BYE message. > 1) on BYE with to-tag OS can't find dialog with match_dialog(), > because to-tag presents. > 2) if i use load_dialog_ctx($ci) -  it is possible to handle BYE. > 3) in early dialog termination with BYE we also need to send final > response to the INVITE transaction. > > Maybe I did something wrong, but I can't handle the final response to > INVITE in this case. > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From liviu at opensips.org Mon Oct 10 15:20:06 2022 From: liviu at opensips.org (Liviu Chircu) Date: Mon, 10 Oct 2022 18:20:06 +0300 Subject: [OpenSIPS-Users] [Release] OpenSIPS 3.3.2, 3.2.9 and 3.1.12 minor releases Message-ID: Hi, everyone! The 3.3.2, 3.2.9 and 3.1.12 OpenSIPS minor versions are scheduled for release on Wednesday, October 19th -- a week and a half from now. In preparation for the releases, we are imposing the usual freeze on any significant fixes (as complexity) on these stable branches, in order to ensure a safe window for testing in the days ahead. Happy testing, -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com From hobe69 at hotmail.com Mon Oct 10 19:06:24 2022 From: hobe69 at hotmail.com (Bela H) Date: Mon, 10 Oct 2022 19:06:24 +0000 Subject: [OpenSIPS-Users] Request-Disposition: no-fork In-Reply-To: <06d8dcf8-c973-b17e-c162-ffe2c597543a@opensips.org> References: <06d8dcf8-c973-b17e-c162-ffe2c597543a@opensips.org> Message-ID: Thanks Bogdan! However, I am talking about serial forking, call forwarding busy/no answer scenario. Is there a way to avoid that in the cfg without messing up with the to tags? How do I achieve “proxy to only a single address ("no-fork")”? According to fork-directive in https://www.rfc-editor.org/rfc/rfc3841#section-9.1. Cheers, Bela From: Bogdan-Andrei Iancu Sent: Tuesday, 11 October 2022 01:49 To: OpenSIPS users mailling list; Bela H Subject: Re: [OpenSIPS-Users] Request-Disposition: no-fork Hi Bela, What you are trying to do (messing with the TO-tags) is a bad idea, as you will be breaking the upstream parallel forking. If the GW does not support forking, what you can do is to avoid doing parallel forking in your cfg (like when routing to users via lookup). You do not need any special support. Best regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 9/29/22 7:10 AM, Bela H wrote: Hello, I have call forwarding busy/no answer scenario: A number is from a gateway, B and C numbers are our own subs. The gateway is sending us the INVITE message with “Request-Disposition: no-fork” header field. That means we must use one dialog for the mentioned scenario. Currently the To tag we are sending to the GW in the first 180 ringing/181 Call is being forwarded messages are different to the To tag in the second 180 ringing and 200 OK (SDP). Gateway OpenSips INVITE ------------------------------------------> 100 GIVING IT A TRY <-- ----------------------------------------- 180 RINGING <- ------------------------------------------- 181 CALL IS BEING FORWARDED <- ------------------------------------------- 180 RINGING <- ------------------------------------------- 200 OK (SDP) <- ------------------------------------------- What would be the easiest way from OpenSIPS to send the same To tag (it should be the same from the first 180 ringing through to the 200 OK) and using one dialog for this scenario? Cheers, Bela _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From hobe69 at hotmail.com Mon Oct 10 19:13:27 2022 From: hobe69 at hotmail.com (Bela H) Date: Mon, 10 Oct 2022 19:13:27 +0000 Subject: [OpenSIPS-Users] Request-Disposition: no-fork In-Reply-To: References: <06d8dcf8-c973-b17e-c162-ffe2c597543a@opensips.org> Message-ID: Or is the dialoginfo_set_branch_callee(callee) function the key here? From: Bela H Sent: Tuesday, 11 October 2022 08:09 To: Bogdan-Andrei Iancu; OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Request-Disposition: no-fork Thanks Bogdan! However, I am talking about serial forking, call forwarding busy/no answer scenario. Is there a way to avoid that in the cfg without messing up with the to tags? How do I achieve “proxy to only a single address ("no-fork")”? According to fork-directive in https://www.rfc-editor.org/rfc/rfc3841#section-9.1. Cheers, Bela From: Bogdan-Andrei Iancu Sent: Tuesday, 11 October 2022 01:49 To: OpenSIPS users mailling list; Bela H Subject: Re: [OpenSIPS-Users] Request-Disposition: no-fork Hi Bela, What you are trying to do (messing with the TO-tags) is a bad idea, as you will be breaking the upstream parallel forking. If the GW does not support forking, what you can do is to avoid doing parallel forking in your cfg (like when routing to users via lookup). You do not need any special support. Best regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 9/29/22 7:10 AM, Bela H wrote: Hello, I have call forwarding busy/no answer scenario: A number is from a gateway, B and C numbers are our own subs. The gateway is sending us the INVITE message with “Request-Disposition: no-fork” header field. That means we must use one dialog for the mentioned scenario. Currently the To tag we are sending to the GW in the first 180 ringing/181 Call is being forwarded messages are different to the To tag in the second 180 ringing and 200 OK (SDP). Gateway OpenSips INVITE ------------------------------------------> 100 GIVING IT A TRY <-- ----------------------------------------- 180 RINGING <- ------------------------------------------- 181 CALL IS BEING FORWARDED <- ------------------------------------------- 180 RINGING <- ------------------------------------------- 200 OK (SDP) <- ------------------------------------------- What would be the easiest way from OpenSIPS to send the same To tag (it should be the same from the first 180 ringing through to the 200 OK) and using one dialog for this scenario? Cheers, Bela _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From mayamatakeshi at gmail.com Tue Oct 11 07:29:41 2022 From: mayamatakeshi at gmail.com (mayamatakeshi) Date: Tue, 11 Oct 2022 16:29:41 +0900 Subject: [OpenSIPS-Users] Creating branches inside a while loop In-Reply-To: <5bb617e0-50b9-e7f4-a3c4-9fdc3ac0dc18@opensips.org> References: <5bb617e0-50b9-e7f4-a3c4-9fdc3ac0dc18@opensips.org> Message-ID: Hi Bogdan, indeed, I think I removed the append_branch() line by mistake when removing some debug lines I added to check function return code etc. Thanks, Takeshi On Mon, Oct 10, 2022 at 9:39 PM Bogdan-Andrei Iancu wrote: > Hi Takeshi, > > Aren't you missing the "seturi()" + "append_branch()" in the loop ?? > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 9/28/22 4:26 PM, mayamatakeshi wrote: > > > On Wed, Sep 28, 2022 at 2:21 PM mayamatakeshi > wrote: > >> Hi, >> I'm testing latest commit b243666098be44226ade6a7df2b62851efcb5de8 of >> opensips-3.2. >> >> I tested adding branches to an INVITE for a fixed size list of AORs this >> way: >> >> $var(aors) = "sip:user1 at test1.com,sip:user2 at test1.com, >> sip:user3 at test1.com"; >> >> seturi($(var(aors){s.select,0,,})); >> >> append_branch(); >> seturi($(var(aors){s.select,1,,})); >> >> append_branch(); >> seturi($(var(aors){s.select,2,,})); >> >> lookup("location", "r") >> >> The above works fine and all 3 destinations resolved by AOR lookup are >> called (max of contact per AOR). >> >> However, in case of a a list of unknown size, I tried to use a while loop >> like this: >> $var(aors) = "sip:user1 at test1.com,sip:user2 at test1.com, >> sip:user3 at test1.com"; >> >> $var(idx) = 0; >> $var(aor) = $(var(aors){s.select,$var(idx),,}); >> >> while($var(aor) != null) { >> seturi($var(aor)); >> >> $var(idx) = $var(idx) + 1; >> $var(aor) = $(var(aors){s.select,$var(idx),,}); >> } >> >> lookup("location", "r") >> >> But with the above, only the last destination (lookup of user3 at test1.com) >> is called. >> I confirmed this is not related to the lookup function because I tried >> with fixed destinations like this: >> >> $var(aors) = "sip:user1 at 10.0.0.1:5072,sip:user2 at 10.0.0.1:5074 >> ,sip:user3 at 10.0.0.1:5076"; >> >> $var(idx) = 0; >> $var(aor) = $(var(aors){s.select,$var(idx),,}); >> >> while($var(aor) != null) { >> seturi($var(aor)); >> >> $var(idx) = $var(idx) + 1; >> $var(aor) = $(var(aors){s.select,$var(idx),,}); >> } >> >> and the same problem happens: only the last destination >> sip:user3 at 10.0.0.1:5076 is called. >> >> So, is there a way to append a non-fixed number of branches to an INVITE? >> >> Regards, >> Takeshi >> > > Sorry, I think I did something wrong. > I was able to make append_branch to work inside a while loop. > So there is no problem. > Regards, > Takeshi > > > _______________________________________________ > Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Tue Oct 11 08:55:51 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Tue, 11 Oct 2022 11:55:51 +0300 Subject: [OpenSIPS-Users] Request-Disposition: no-fork In-Reply-To: References: <06d8dcf8-c973-b17e-c162-ffe2c597543a@opensips.org> Message-ID: Hi Bela, If the directive is indicated in the INVITE, simply avoid doing any forking in your cfg, nothing more. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/10/22 10:06 PM, Bela H wrote: > > Thanks Bogdan! > > However, I am talking about serial forking, call forwarding busy/no > answer scenario. > > Is there a way to avoid that in the cfg without messing up with the to > tags? > > How do I achieve “proxy to only a single address ("no-fork")”? > > According to fork-directive in > https://www.rfc-editor.org/rfc/rfc3841#section-9.1. > > Cheers, > > Bela > > *From: *Bogdan-Andrei Iancu > *Sent: *Tuesday, 11 October 2022 01:49 > *To: *OpenSIPS users mailling list ; > Bela H > *Subject: *Re: [OpenSIPS-Users] Request-Disposition: no-fork > > Hi Bela, > > What you are trying to do (messing with the TO-tags) is a bad idea, as > you will be breaking the upstream parallel forking. > > If the GW does not support forking, what you can do is to avoid doing > parallel forking in your cfg (like when routing to users via lookup). > You do not need any special support. > > Best regards, > > Bogdan-Andrei Iancu > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 9/29/22 7:10 AM, Bela H wrote: > > Hello, > > I have call forwarding busy/no answer scenario: A number is from a > gateway, B and C numbers are our own subs. > > The gateway is sending us the INVITE message with > “Request-Disposition: no-fork” header field. > > That means we must use one dialog for the mentioned scenario. > > Currently the To tag we are sending to the GW in the first 180 > ringing/181 Call is being forwarded messages are different to the > To tag in the second 180 ringing and 200 OK (SDP). > > Gateway                  OpenSips > >               INVITE > > ------------------------------------------> > > 100 GIVING IT A TRY > > <-- ----------------------------------------- > >       180 RINGING > > <- ------------------------------------------- > > 181 CALL IS BEING FORWARDED > > <- ------------------------------------------- > >       180 RINGING > > <- ------------------------------------------- > >       200 OK (SDP) > > <- ------------------------------------------- > > What would be the easiest way from OpenSIPS to send the same To > tag (it should be the same from the first 180 ringing through to > the 200 OK) and using one dialog for this scenario? > > Cheers, > > Bela > > > > _______________________________________________ > > Users mailing list > > Users at lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Tue Oct 11 08:56:37 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Tue, 11 Oct 2022 11:56:37 +0300 Subject: [OpenSIPS-Users] Request-Disposition: no-fork In-Reply-To: References: <06d8dcf8-c973-b17e-c162-ffe2c597543a@opensips.org> Message-ID: That's only for BLF (dialog/info presence), nothing to do with the calling. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/10/22 10:13 PM, Bela H wrote: > > Or is the dialoginfo_set_branch_callee(callee) function the key here? > > *From: *Bela H > *Sent: *Tuesday, 11 October 2022 08:09 > *To: *Bogdan-Andrei Iancu ; OpenSIPS users > mailling list > *Subject: *Re: [OpenSIPS-Users] Request-Disposition: no-fork > > Thanks Bogdan! > > However, I am talking about serial forking, call forwarding busy/no > answer scenario. > > Is there a way to avoid that in the cfg without messing up with the to > tags? > > How do I achieve “proxy to only a single address ("no-fork")”? > > According to fork-directive in > https://www.rfc-editor.org/rfc/rfc3841#section-9.1. > > Cheers, > > Bela > > *From: *Bogdan-Andrei Iancu > *Sent: *Tuesday, 11 October 2022 01:49 > *To: *OpenSIPS users mailling list ; > Bela H > *Subject: *Re: [OpenSIPS-Users] Request-Disposition: no-fork > > Hi Bela, > > What you are trying to do (messing with the TO-tags) is a bad idea, as > you will be breaking the upstream parallel forking. > > If the GW does not support forking, what you can do is to avoid doing > parallel forking in your cfg (like when routing to users via lookup). > You do not need any special support. > > Best regards, > > Bogdan-Andrei Iancu > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 9/29/22 7:10 AM, Bela H wrote: > > Hello, > > I have call forwarding busy/no answer scenario: A number is from a > gateway, B and C numbers are our own subs. > > The gateway is sending us the INVITE message with > “Request-Disposition: no-fork” header field. > > That means we must use one dialog for the mentioned scenario. > > Currently the To tag we are sending to the GW in the first 180 > ringing/181 Call is being forwarded messages are different to the > To tag in the second 180 ringing and 200 OK (SDP). > > Gateway                  OpenSips > >               INVITE > > ------------------------------------------> > > 100 GIVING IT A TRY > > <-- ----------------------------------------- > >       180 RINGING > > <- ------------------------------------------- > > 181 CALL IS BEING FORWARDED > > <- ------------------------------------------- > >       180 RINGING > > <- ------------------------------------------- > >       200 OK (SDP) > > <- ------------------------------------------- > > What would be the easiest way from OpenSIPS to send the same To > tag (it should be the same from the first 180 ringing through to > the 200 OK) and using one dialog for this scenario? > > Cheers, > > Bela > > _______________________________________________ > > Users mailing list > > Users at lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thp.opensips at p5r.uk Tue Oct 11 08:59:09 2022 From: thp.opensips at p5r.uk (Thomas Pircher) Date: Tue, 11 Oct 2022 09:59:09 +0100 Subject: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay and rtpproxy In-Reply-To: <000f01d8d726$f8e5d2d0$eab17870$@smartvox.co.uk> References: <000f01d8d726$f8e5d2d0$eab17870$@smartvox.co.uk> Message-ID: John Quick wrote: >ACK messages are normally loose routed. Perhaps you need to call >loose_route() before t_relay(). >You could try reading my article here which may help explain things: >https://kb.smartvox.co.uk/opensips/contact-and-record-route-headers-explained/ Hi John, thanks for the reply and sorry for the late response. Your articles are quite informative, they made a few bits clearer. I tried tracing the sequence diagram from your page on the opensips.cfg file attached in my first post, and I believe all the necessary bits are there -- I have taken the residential configuration from the config generator and added an additiona "route[byNumber]" in the flow. Unless I'm missing something when looking at the config file, I do believe my config does match the flow you described. However, I have not looked at the headers in the trace in detail, perhaps that's where my problem lies? Thanks, Thomas From thp.opensips at p5r.uk Tue Oct 11 09:06:23 2022 From: thp.opensips at p5r.uk (Thomas Pircher) Date: Tue, 11 Oct 2022 10:06:23 +0100 Subject: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay In-Reply-To: <1a54c921-5321-9c74-e95b-74f968b1e4f9@opensips.org> References: <1a54c921-5321-9c74-e95b-74f968b1e4f9@opensips.org> Message-ID: Bogdan-Andrei Iancu wrote: >Hi Thomas, > >Your handling of sequential requests is broken, see here for a correct >sample: > >https://github.com/OpenSIPS/opensips/blob/master/etc/opensips.cfg#L109 Hi Bogdan-Andrei, thanks for your reply. I had a look at my config (both the config attached to the first mail, and the fragment in my second mail) and it does match -- modulo whitespace changes and one additional route[byNumber] -- the config in git. The bracket placement in the config fragment in my second mail was misleading, I made a copy&paste error, that might have created a confusion? Or is there something I continue missing when I read and compare the config files? Thanks, Thomas From bogdan at opensips.org Tue Oct 11 09:32:53 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Tue, 11 Oct 2022 12:32:53 +0300 Subject: [OpenSIPS-Users] Creating branches inside a while loop In-Reply-To: References: <5bb617e0-50b9-e7f4-a3c4-9fdc3ac0dc18@opensips.org> Message-ID: Hi, and it works now, right? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/11/22 10:29 AM, mayamatakeshi wrote: > Hi Bogdan, > indeed, I think I removed the append_branch() line by mistake when > removing some debug lines I added to check function return code etc. > Thanks, > Takeshi > > On Mon, Oct 10, 2022 at 9:39 PM Bogdan-Andrei Iancu > > wrote: > > Hi Takeshi, > > Aren't you missing the "seturi()" + "append_branch()" in the loop ?? > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 9/28/22 4:26 PM, mayamatakeshi wrote: >> >> On Wed, Sep 28, 2022 at 2:21 PM mayamatakeshi >> > wrote: >> >> Hi, >> I'm testing latest >> commit b243666098be44226ade6a7df2b62851efcb5de8 of opensips-3.2. >> >> I tested adding branches to an INVITE for a fixed size list >> of AORs this way: >> >>             $var(aors) = "sip:user1 at test1.com >> ,sip:user2 at test1.com >> ,sip:user3 at test1.com >> "; >> >>             seturi($(var(aors){s.select,0,,})); >> >>             append_branch(); >>             seturi($(var(aors){s.select,1,,})); >> >>             append_branch(); >>             seturi($(var(aors){s.select,2,,})); >> >>             lookup("location", "r") >> >> The above works fine and all 3 destinations resolved by AOR >> lookup are called (max of contact per AOR). >> >> However, in case of a a list of unknown size, I tried to use >> a while loop like this: >>             $var(aors) = "sip:user1 at test1.com >> ,sip:user2 at test1.com >> ,sip:user3 at test1.com >> "; >> >>             $var(idx) = 0; >>             $var(aor) = $(var(aors){s.select,$var(idx),,}); >> >>             while($var(aor) != null) { >>                 seturi($var(aor)); >> >>                 $var(idx) = $var(idx) + 1; >>                 $var(aor) = $(var(aors){s.select,$var(idx),,}); >>             } >> >>             lookup("location", "r") >> >> But with the above, only the last destination (lookup of >> user3 at test1.com ) is called. >> I confirmed this is not related to the lookup function >> because I tried with fixed destinations like this: >> >>             $var(aors) = "sip:user1 at 10.0.0.1:5072 >> ,sip:user2 at 10.0.0.1:5074 >> ,sip:user3 at 10.0.0.1:5076 >> "; >> >>             $var(idx) = 0; >>             $var(aor) = $(var(aors){s.select,$var(idx),,}); >> >>             while($var(aor) != null) { >>                 seturi($var(aor)); >> >>                 $var(idx) = $var(idx) + 1; >>                 $var(aor) = $(var(aors){s.select,$var(idx),,}); >>             } >> >> and the same problem happens: only the last destination >> sip:user3 at 10.0.0.1:5076  is >> called. >> >> So, is there a way to append a non-fixed number of branches >> to an INVITE? >> >> Regards, >> Takeshi >> >> >> Sorry, I think I did something wrong. >> I was able to make append_branch to work inside a while loop. >> So there is no problem. >> Regards, >> Takeshi >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From serdar.gucluer at netgsm.com.tr Mon Oct 10 14:23:37 2022 From: serdar.gucluer at netgsm.com.tr (Serdar GUCLUER) Date: Mon, 10 Oct 2022 17:23:37 +0300 Subject: [OpenSIPS-Users] Formating issue for string that contains pv In-Reply-To: <93457826-a3b6-32aa-4bda-93d2dd0ce2da@opensips.org> References: <810e4b53-a397-a03d-7add-795984355d66@netgsm.com.tr> <93457826-a3b6-32aa-4bda-93d2dd0ce2da@opensips.org> Message-ID: <909e7c33-7625-6a92-0f90-27efb7bda96a@netgsm.com.tr> Hi Liviu, I tried /s.eval/ transformation for opensips 3.3.1 and it worked, thanks for your helping. Serdar > Hi Serdar, > > I remember that at some point, there was some support for string > evaluation added as part of the {s.eval} transformation[1].  > Unfortunately, I don't recall an equivalent function, so you may have > to play around with the transformation only. > > [1]: https://www.opensips.org/Documentation/Script-Tran-3-4#s.eval > > Best regards, > -------------- next part -------------- An HTML attachment was scrubbed... URL: From support at liveagent.com Tue Oct 11 08:23:21 2022 From: support at liveagent.com (Artem Fomenko) Date: Tue, 11 Oct 2022 08:23:21 +0000 Subject: [OpenSIPS-Users] Expires value - [ZVP-JQSVP-142] In-Reply-To: References: <18304509_fwuacc91@support.qualityunit.com> Message-ID: <18454055_fwuacc91@support.qualityunit.com> Hello Bogdan-Andrei, I have a conversation with VoIP provider, he decrease "expires" time by 1 sec on each registration from 120 sec (our expiry value) to 29 sec (according 30 sec - minimal provider's value). So registration become to process too often. It is not make any problems for now. The provider motivates its behavior by the following: > " > > In fact, this is the time left to the end of the registration, which is indicated in the "expires" parameter sent in our 200 OK. "The time left to the end of the registration" was my interpretation, but I think it's a reasonable one. When your side requests "expires=120", our side honors this request, but due to the actual record in the location registrar occurring milliseconds later, the required "expires" time becomes 119. > > Imagine that a bigger delay happens between receiving INVITE and the actual recording to the location registrar, let's say about 2 seconds. In this case, if 200 OK was generated with "expires=120" and sent 2 seconds later after receiving the first INVITE, your side would think that the registration ends 2 seconds later than actually it was requested. > > " this is not a violation of RFC3261 Section 10.3 step 8: > ``` > > " > The registrar returns a 200 (OK) response. The response MUST contain Contact header field values enumerating all current bindings. Each Contact value MUST feature an "expires" parameter indicating its expiration interval chosen by the registrar. > ``` > > " But in my opinion, the interpretation of the provider is not entirely correct. Despite this, I would like to know your opinion on this issue. Regards,
![LiveAgent](https://www.qualityunit.com/mail/mail-logo-la.png) **Artem Fomenko** **Development Team** +421 2 33 456 826 (EU & Worldwide) +1-888-257-8754 (USA & Canada) [www.liveagent.com](https://www.liveagent.com/)
**How nice was my reply?**
[![1](https://www.qualityunit.com/mail/mail-star-1.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=1) [![2](https://www.qualityunit.com/mail/mail-star-2.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=2) [![3](https://www.qualityunit.com/mail/mail-star-3.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=3) [![4](https://www.qualityunit.com/mail/mail-star-4.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=4) [![5](https://www.qualityunit.com/mail/mail-star-5.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=5) [![6](https://www.qualityunit.com/mail/mail-star-6.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=6) [![7](https://www.qualityunit.com/mail/mail-star-7.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=7) [![8](https://www.qualityunit.com/mail/mail-star-8.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=8) [![9](https://www.qualityunit.com/mail/mail-star-9.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=9) [![10](https://www.qualityunit.com/mail/mail-star-10.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=10)
**Rate the answer or view the ticket history [here](https://support.qualityunit.com/ticket_HGFe1uycDX9XkGp8)**
-----Original message----- From: Bogdan-Andrei Iancu <bogdan at opensips.org> Sent: 2022-10-10 16:50:42 > Hi Artem, > > This is the intended behavior of the module, re-register with the last "expires" provided by the server - if the server had a good reason to lower the registration time on first register, it will most probably do it for the re-register's also. So does not make too much of a sense to keep using the initial DB value - or do you have some good reason not to update ? > > Regards, > ``` >
Bogdan-Andrei Iancu
> 
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit 27-30 Sept 2022, Athens
>   https://www.opensips.org/events/Summit-2022Athens/
> ```
> 
> 
On 9/23/22 7:15 PM, Artem Fomenko via Users wrote: >
-------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Tue Oct 11 09:35:43 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Tue, 11 Oct 2022 12:35:43 +0300 Subject: [OpenSIPS-Users] early dialog termination In-Reply-To: References: Message-ID: <0907245b-2b56-5a0c-cdaf-aca2d8853405@opensips.org> Hi Ivan, you can use timer_route, but as there is no way to send a reply for a particular transaction from script level (only to the currently processed request), you will have to trigger the MI cmds from the timer route, which is a bit hackish .... Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/11/22 11:47 AM, Ryzhik Ivan wrote: > Hi, Bogdan! > What d' you think, can we use timer_route instead of an external script? > Regards, Ivan. > > пн, 10 окт. 2022 г. в 17:04, Bogdan-Andrei Iancu >: > > Hi Ryzhik, > > Without a t_relay() it makes not much sense to have an dialog > structure at all - the dialog module in opensips is actually > design for proxied calls, not for UAC calls. > > IMO, you should keep it a transaction level, by sending replies > back only. When getting the INVITE, put its call-id into a DB > table (to keep only the "active" session) together with a lifetime > / expiration time. When getting a CANCEL, update the table (set > lifetime to 0), to know it is terminated. And use an simple > external script that keeps scanning the DB for (1) sending 487 > Terminated via MI if the record has 0 lifetime or (2) send a 408 > Timeout via MI if the lifetime exceeded. > In a similar way you can handle the BYE - send back 200OK for the > BYE and set 0 in lifetime, to send a 487 canceled back > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 10/10/22 4:33 PM, Ryzhik Ivan wrote: >> Hello! >> My opensips version is 3.1 with tm,dialog and rtpengine modules. >> On incoming INVITE i'm creating an early dialog with 183 replies >> and i'm playing audio to caller with rtpengine, no t_relay() on >> this step, OS is acting as UAS endpoint. >> If the caller cancels the invite with a CANCEL message - all >> works great. >> But some users terminate dialog with BYE message. >> 1) on BYE with to-tag OS can't find dialog with match_dialog(), >> because to-tag presents. >> 2) if i use load_dialog_ctx($ci) -  it is possible to handle BYE. >> 3) in early dialog termination with BYE we also need to send >> final response to the INVITE transaction. >> >> Maybe I did something wrong, but I can't handle the final >> response to INVITE in this case. >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Tue Oct 11 09:37:21 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Tue, 11 Oct 2022 12:37:21 +0300 Subject: [OpenSIPS-Users] Expires value - [ZVP-JQSVP-142] In-Reply-To: <18454055_fwuacc91@support.qualityunit.com> References: <18304509_fwuacc91@support.qualityunit.com> <18454055_fwuacc91@support.qualityunit.com> Message-ID: Hi Artem, I see - so at each re-registration cycle you loose 1 secs, dropping from the 120 provisioned all the way the minimum of 29...., right ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/11/22 11:23 AM, Artem Fomenko wrote: > > Hello Bogdan-Andrei, > > I have a conversation with VoIP provider, he decrease "expires" time > by 1 sec on each registration from 120 sec (our expiry value) to 29 > sec (according 30 sec - minimal provider's value). So registration > become to process too often. It is not make any problems for now. The > provider motivates its behavior by the following: > > " > > In fact, this is the time left to the end of the registration, > which is indicated in the "expires" parameter sent in our 200 OK. > "The time left to the end of the registration" was my > interpretation, but I think it's a reasonable one.  When your side > requests "expires=120", our side honors this request, but due to > the actual record in the location registrar occurring milliseconds > later, the required "expires" time becomes 119. > > Imagine that a bigger delay happens between receiving INVITE and > the actual recording to the location registrar, let's say about 2 > seconds. In this case, if 200 OK was generated with "expires=120" > and sent 2 seconds later after receiving the first INVITE, your > side would think that the registration ends 2 seconds later than > actually it was requested. > > " > > this is not a violation of RFC3261 Section 10.3 step 8: > > " > The registrar returns a 200 (OK) response. The response MUST contain Contact header field values enumerating all current bindings. Each Contact value MUST feature an "expires" parameter indicating its expiration interval chosen by the registrar. > > " > > But in my opinion, the interpretation of the provider is not entirely > correct. Despite this, I would like to know your opinion on this issue. > > Regards, > > LiveAgent > > *Artem Fomenko* > > *Development Team* > > +421 2 33 456 826 (EU & Worldwide) > > +1-888-257-8754 (USA & Canada) > > www.liveagent.com > > > *How nice was my reply?* > > 1 > > 2 > > 3 > > 4 > > 5 > > 6 > > 7 > > 8 > > 9 > > 10 > > > *Rate the answer or view the ticket history here > * > > > > > -----Original message----- > From: Bogdan-Andrei Iancu > Sent: 2022-10-10 16:50:42 > > > > Hi Artem, > > This is the intended behavior of the module, re-register with the > last "expires" provided by the server - if the server had a good > reason to lower the registration time on first register, it will > most probably do it for the re-register's also. So does not make > too much of a sense to keep using the initial DB value - or do you > have some good reason not to update ? > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 9/23/22 7:15 PM, Artem Fomenko via Users wrote: > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Tue Oct 11 11:54:26 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Tue, 11 Oct 2022 14:54:26 +0300 Subject: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay In-Reply-To: References: <1a54c921-5321-9c74-e95b-74f968b1e4f9@opensips.org> Message-ID: <494bb0cb-41b6-0ec0-166d-7cac07fa6a9f@opensips.org> Hi Thomas, Could you post a pcap or ngrep capture of the failing call (with the broken ACK) - PM me if info is too sensitive. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/11/22 12:06 PM, Thomas Pircher via Users wrote: > Bogdan-Andrei Iancu wrote: >> Hi Thomas, >> >> Your handling of sequential requests is broken, see here for a >> correct sample: >> >> https://github.com/OpenSIPS/opensips/blob/master/etc/opensips.cfg#L109 > > Hi Bogdan-Andrei, > > thanks for your reply. I had a look at my config (both the config > attached to the first mail, and the fragment in my second mail) and it > does match -- modulo whitespace changes and one additional > route[byNumber] -- the config in git. > > The bracket placement in the config fragment in my second mail was > misleading, I made a copy&paste error, that might have created a > confusion? Or is there something I continue missing when I read and > compare the config files? > > Thanks, > Thomas > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From bogdan at opensips.org Tue Oct 11 11:56:04 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Tue, 11 Oct 2022 14:56:04 +0300 Subject: [OpenSIPS-Users] Failed to trigger pkg stats in logs In-Reply-To: References: <1fd56384-e60f-a6ab-356e-6d5267ea07ca@opensips.org> Message-ID: <83a340e1-1692-6048-bf49-eb6c6015dbaa@opensips.org> Hi Yury, trying to recap here - after completely removing the auto-scaling, do you still have issues with fetching the pkg stats? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 9/22/22 5:39 PM, Yury Kirsanov wrote: > Hi Bogdan, > Sorry, I just realized that I haven't turned off the auto-scaler for > UDP processes so you're right - that error is for them. I've switched > TCP auto-scaling off due to all my previous issues that I wasn't able > to overcome. > > auto_scaling_profile = PROFILE_UDP >      scale up to 32 on 80% for 4 cycles within 5 >      scale down to 2 on 10% for 5 cycles > > udp_workers=1 use_auto_scaling_profile PROFILE_UDP > > socket=udp:10.x.x.x:5060 > socket=udp:103.x.x.x:7060 > > In regards to pkg memory - I only have 32MB as -M parameter, maybe > that's not enough? I'm not sure how to do 'pkg dump' - never tried to > do that before, is this what you're asking about? > > Sep 21 18:52:09 ERROR:core:signal_pkg_status: failed to trigger pkg > stats for process 45 >  opensips-cli -x mi ps > { >     "Processes": [ > ... >         { >   "ID": 45, >             "PID": 310115, >             "Type": "SIP receiver udp:103.x.x.x:7060" >         } >     ] > } > root at osgw1:~# opensips-cli -x mi mem_pkg_dump 310115 > ERROR: command 'mem_pkg_dump' returned: 500: Internal error > > Best regards, > Yury. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Tue Oct 11 11:58:00 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Tue, 11 Oct 2022 14:58:00 +0300 Subject: [OpenSIPS-Users] OpenSIPS 3.2.7 tracer module for sip dialogs leads to an endless loop In-Reply-To: References: <074b0305-ade4-c50b-484a-a464b311cf55@opensips.org> Message-ID: Hi PAvel, How do you define the tid you use for tracing ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 9/21/22 7:45 PM, Pavel Ekshin wrote: > Hi Bogdan, > > Thanks for the answer. > I tried this module, but nothing weird was found. On reply ACK > messages in sngrep capture I see the correct "To/Contact'' header, but > in log the "To" header looks different, but it's not lead to any loop. > > Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script > Trace][/etc/opensips/opensips_residential.cfg:430][script_trace][core > if] -> (INVITE from 172.18.53.131, ruri=sip:4002 at 172.16.34.173:5060 > , > contact= >) > Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script > Trace][/etc/opensips/opensips_residential.cfg:427][script_trace][module > t_relay] -> (INVITE from 172.18.53.131, > ruri=sip:4002 at 172.16.34.173:5060 , > contact= >) > Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script > Trace][/etc/opensips/opensips_residential.cfg:430][script_trace][core > exit] -> (INVITE from 172.18.53.131, ruri=sip:4002 at 172.16.34.173:5060 > , > contact= >) > Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script > Trace][/etc/opensips/opensips_residential.cfg:221][script_trace][core > if] -> (ACK from 172.18.53.131, > ruri=sip:172.16.34.173:5060;transport=udp, > contact= >) > Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script > Trace][/etc/opensips/opensips_residential.cfg:214][script_trace][module > mf_process_maxfwd_header] -> (ACK from 172.18.53.131, > ruri=sip:172.16.34.173:5060;transport=udp, > contact= >) > Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script > Trace][/etc/opensips/opensips_residential.cfg:258][script_trace][core > if] -> (ACK from 172.18.53.131, > ruri=sip:172.16.34.173:5060;transport=udp, > contact= >) > Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script > Trace][/etc/opensips/opensips_residential.cfg:221][script_trace][module > has_totag] -> (ACK from 172.18.53.131, > ruri=sip:172.16.34.173:5060;transport=udp, > contact= >) > > ________________________________________________________________________________________________________________________ > ____________172.18.53.131:5060___________172.16.34.91:5060______________172.16.34.173:5060___________172.16.34.173:64087 > > __________qqqqqqqqqqwqqqqqqqqq__________qqqqqqqqqqwqqqqqqqqq__________qqqqqqqqqqwqqqqqqqqq__________qqqqqqqqqqwqqqqqqqqqx > __16:06:48.772459___x________INVITE_(SDP)_________x_____________________________x_____________________________x_________ > ________+0.001900___x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_____________________________x_________ > __16:06:48.774359___x__407_Proxy_Authentication_R_x_____________________________x_____________________________x_________ > ________+0.014197___x_ __16:06:48.788556___x_____________ACK_____________x_____________________________x_____________________________x________ > ________+0.000103___x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_____________________________x_________ > __16:06:48.788659___x________INVITE_(SDP)_________x_____________________________x_____________________________x_________ > ________+0.005221___x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_____________________________x_________ > __16:06:48.793880___x_____100_Giving_it_a_try_____x_____________________________x_____________________________x_________ > ________+0.000664___x_ __16:06:48.794544___x_____________________________x________INVITE_(SDP)_________x_____________________________x_________ > ________+0.004555___x_____________________________x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_________ > __16:06:48.799099___x_____________________________x________________________100_Trying_________________________x_________ > ________+0.039449___x_____________________________x_ __16:06:48.838548___x_____________________________x_______________________200_Ok_(SDP)________________________x_________ > ________+0.000493___x_____________________________x_ __16:06:48.839041___x________200_Ok_(SDP)_________x_____________________________x_____________________________x_________ > ________+0.012395___x_ __16:06:48.851436___x_____________ACK_____________x_____________________________x_____________________________x_________ > ________+0.000488___x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_____________________________x_________ > __16:06:48.851924___x_____________________________x_____________ACK_____________x_____________________________x_________ > ________+8.768408___x_____________________________x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_________ > __16:06:57.620332___x_____________BYE_____________x_____________________________x_____________________________x_________ > ________+0.000966___x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_____________________________x_________ > __16:06:57.621298___x_____________________________x_____________BYE_____________x_____________________________x_________ > ________+0.003895___x_____________________________x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x________ > __16:06:57.625193___x_____________________________x__________________________200_Ok___________________________x_________ > ________+0.000271___x_____________________________x_ __16:06:57.625464___x___________200_Ok____________x_____________________________x_____________________________x_________ > ____________________x_ ____________________x_____________________________x_____________________________x_____________________________x_________ > ____________________x_____________________________x_____________________________x_____________________________x_________ > > If I disable trace("tid", "d/t/m", "sip") module at route level, I > never faced with loop.I also found that trace("tid", "m", "sip") is > worked for specific messages, f.e INVITE, and not looped too. > If I have something wrong with the route, it should also be looped > without enabled trace(), but it's not happen. I think it's around the > rules of trace() module and rules there this module may be enabled. > Maybe you have an example for enabling the trace() module globally? > > BR, Pavel > > вт, 6 сент. 2022 г. в 11:53, Bogdan-Andrei Iancu >: > > Hi Pavel, > > The tracing part has nothing to do with the routing on the SIP > side. And > usually you end up with SIP loops if, without changing the RURI, you > send the SIP request out, making OpenSIPS to send the request back to > itself (as the destination in RURI still points to OpenSIPS). > > I advice you to try to understand the execution flow via your > script by > using the script_trace[1] function and logging the RURI (as $ru) > > [1] > https://www.opensips.org/Documentation/Script-CoreFunctions-3-2#script_trace > > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > > On 8/30/22 9:31 PM, Pavel Ekshin wrote: > > Hi there, > > I try very basic scenario with tracing sip dialogs in OpenSIPS > 3.2.7, > > and this scenario leads in an endless loop inside Opensips for SIP > > messages. > > Maybe someone is similarly affected or can point to the error on > the > > route scenario? I use out of box residential configuration. I > read the > > tracer module doc > (https://opensips.org/docs/modules/devel/tracer.html > > > >), but dialog > > examples from doc also lead to loops. > > I also tried with transactions, but they are looped too. Trace for > > messages works fine.  I think I miss some points. > > > > MariaDB [opensips]> select method,COUNT(*) from sip_trace group > by method; > > +--------+----------+ > > | method | COUNT(*) | > > +--------+----------+ > > | ACK    |     2625 | > > | BYE    |     2270 | > > | INVITE |      219 | > > +--------+----------+ > > > > Below my config: > [...] > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Tue Oct 11 12:03:09 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Tue, 11 Oct 2022 15:03:09 +0300 Subject: [OpenSIPS-Users] b2bua top hiding behind NAT In-Reply-To: References: <914ddad5-357f-bf99-4321-9f9649f3ec24@opensips.org> Message-ID: <498566de-bc49-4bfe-fc3c-b1c666796a88@opensips.org> Hi Alex, Could you detail the prev UPDATE message (prev frame) that loops on udp:10.130.23:5070 - that is the UPDATE as generated by OpenSIPS, right ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 9/21/22 5:07 PM, Alex wrote: > Hello, > > Not only do I need force messages from internet to lan through > udp:10.130.23:5070 but also I need send messages from lan > (udp:10.130.23:5070) to internet (udp:10.130.23:5060). So I make rule > with if and $socket_in . > But Messages (Updates, reInvites) and replies go directly between LAN > and 10.130.23:5060 thought. > All messages (input, output, replies) must go between two sockets > 10.130.23:5070 <-> 10.130.23:5060 . >                 b2b_server_new("server1",$avp(b2b_hdrs), > $avp(b2b_hdr_bodies)); >                 if ($socket_in == "udp:10.130.0.23:5070 > ") { > force_send_socket("udp:10.130.23:5060"); >                 } else { > force_send_socket("udp:10.130.23:5070"); >                 } >                 b2b_client_new("Unistar","sip:09876543322 at provider.com > ","sip:provider","test","sip:1234567 at 1.1.1.1 > "); >                 #force_send_socket("udp:10.130.23:5070"); >                 b2b_init_request("top hiding"); >                 exit; > > But Updates go from 5060 directly to lan. I made a screenshot you can > see by the url > https://drive.google.com/file/d/1bpwmXCB6qRxbDk8KZ6GuCg3-hwfABvwk/view?usp=sharing > > > > > > > вт, 23 авг. 2022 г. в 12:44, Bogdan-Andrei Iancu >: > > Hi Alex, > > Have you tried something like this (for calls from Internet) : > > b2b_server_new("server1",$avp(b2b_hdrs), $avp(b2b_hdr_bodies)); > force_send_socket("udp:10.130.23:5070"); > b2b_client_new("Unistar","sip:09876543322 at provider.com > ","sip:provider","test","sip:1234567 at 1.1.1.1 > "); > b2b_init_request("top hiding"); > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 8/19/22 6:12 PM, Alex wrote: >> Hello, >> >> My opensips is behind NAT in cloud >> internet - (1.1.1.1)Cone_NAT - >> port_5060__10.130.0.23(opensips)__port_5070 - >> main_registrar_sip_server >> >> So I made 2 sockets >> socket=udp:10.130.0.23:5070   # for LAN >> socket=udp:10.130.0.23:5060 as >> 1.1.1.1:5060 #for Internet >> >> I try to make call from lan to Tel provider with using b2bua. >> >> Is any way to setup b2bua with more than one socket? >> >> loadmodule "b2b_entities.so" >> loadmodule "b2b_logic.so" >> modparam("b2b_logic", "custom_headers", "P-Asserted-Identity") >> #"User-Agent;Date") >> #modparam("b2b_logic", "contact_user", 1) >> modparam("b2b_logic", "server_address", "sip:1234567 at 1.1.1.1 >> ") >> >> >> #force_send_socket("udp:10.130.23:5060"); >> b2b_server_new("server1",$avp(b2b_hdrs), $avp(b2b_hdr_bodies)); >> force_send_socket("udp:10.130.23:5060"); >> b2b_client_new("Unistar","sip:09876543322 at provider.com >> ","sip:provider","test","sip:1234567 at 1.1.1.1 >> "); >> #force_send_socket("udp:10.130.23:5070"); >> b2b_init_request("top hiding"); >> exit; >> >> I use this construction in route[relay]. And I`ve tried to insert >> in before b2b_server_new. But  it didn`t help >> if ($socket_in == "udp:10.130.0.23:5070 ") { >>                 $socket_out = "udp:10.130.0.23:5060 >> "; >>         } else { >>                 $socket_out = "udp:10.130.0.23:5070 >> "; >>         } >> >> 1) with force_send_socket I made to send requests from :5070 to >> :5060 . But my provider`s Udpates and re-Invites go to my LAN >> directly from socket :5060 . They don`t go  through :5070 >> 2) I can`t change contact in request to provider. Default contact >> looks like this Contact: . I whant to change to >> "sip:1234567 at 1.1.1.1 " >> >> -- >> С уважением, >> Якимкин Алексей >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > -- > С уважением, > Якимкин Алексей -------------- next part -------------- An HTML attachment was scrubbed... URL: From support at liveagent.com Tue Oct 11 11:06:03 2022 From: support at liveagent.com (Artem Fomenko) Date: Tue, 11 Oct 2022 11:06:03 +0000 Subject: [OpenSIPS-Users] Expires value - [ZVP-JQSVP-142] In-Reply-To: References: <18304509_fwuacc91@support.qualityunit.com> <18454055_fwuacc91@support.qualityunit.com> Message-ID: <18457273_fwuacc91@support.qualityunit.com> Yes, it is right. Regards,
![LiveAgent](https://www.qualityunit.com/mail/mail-logo-la.png) **Artem Fomenko** **Development Team** +421 2 33 456 826 (EU & Worldwide) +1-888-257-8754 (USA & Canada) [www.liveagent.com](https://www.liveagent.com/)
**How nice was my reply?**
[![1](https://www.qualityunit.com/mail/mail-star-1.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=1) [![2](https://www.qualityunit.com/mail/mail-star-2.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=2) [![3](https://www.qualityunit.com/mail/mail-star-3.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=3) [![4](https://www.qualityunit.com/mail/mail-star-4.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=4) [![5](https://www.qualityunit.com/mail/mail-star-5.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=5) [![6](https://www.qualityunit.com/mail/mail-star-6.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=6) [![7](https://www.qualityunit.com/mail/mail-star-7.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=7) [![8](https://www.qualityunit.com/mail/mail-star-8.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=8) [![9](https://www.qualityunit.com/mail/mail-star-9.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=9) [![10](https://www.qualityunit.com/mail/mail-star-10.png)](https://survey.nicereply.com/qualityunitqu/wuo5vwrn/fwuacc91?s=10)
**Rate the answer or view the ticket history [here](https://support.qualityunit.com/ticket_HGFe1uycDX9XkGp8)**
-----Original message----- From: Bogdan-Andrei Iancu <bogdan at opensips.org> Sent: 2022-10-11 12:37:40 > Hi Artem, > > I see - so at each re-registration cycle you loose 1 secs, dropping from the 120 provisioned all the way the minimum of 29...., right ? > > Regards, > ``` >
Bogdan-Andrei Iancu
> 
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit 27-30 Sept 2022, Athens
>   https://www.opensips.org/events/Summit-2022Athens/
> ```
> 
> 
On 10/11/22 11:23 AM, Artem Fomenko wrote: >
-------------- next part -------------- An HTML attachment was scrubbed... URL: From mayamatakeshi at gmail.com Tue Oct 11 12:13:51 2022 From: mayamatakeshi at gmail.com (mayamatakeshi) Date: Tue, 11 Oct 2022 21:13:51 +0900 Subject: [OpenSIPS-Users] Creating branches inside a while loop In-Reply-To: References: <5bb617e0-50b9-e7f4-a3c4-9fdc3ac0dc18@opensips.org> Message-ID: Hi Bogdan, yes. It works. I am using it like this: * $var(idx) = 0; $var(aor) = $(var(aors){s.select,$var(idx),,}); while($var(aor) != null) { if($var(idx) > 0) { append_branch(); } seturi("sip:$var(aor)@$fd"); $var(idx) = $var(idx) + 1; $var(aor) = $(var(aors){s.select,$var(idx),!}); } if (lookup("location", "r")) { t_on_branch("USERAGENT_BRANCH"); route(RELAY_REQUEST); } else { sl_send_reply(480, "subscriber not online retcode=$retcode"); }* Thanks and regards, Takeshi On Tue, Oct 11, 2022 at 6:32 PM Bogdan-Andrei Iancu wrote: > Hi, and it works now, right? > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 10/11/22 10:29 AM, mayamatakeshi wrote: > > Hi Bogdan, > indeed, I think I removed the append_branch() line by mistake when > removing some debug lines I added to check function return code etc. > Thanks, > Takeshi > > On Mon, Oct 10, 2022 at 9:39 PM Bogdan-Andrei Iancu > wrote: > >> Hi Takeshi, >> >> Aren't you missing the "seturi()" + "append_branch()" in the loop ?? >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Summit 27-30 Sept 2022, Athens >> https://www.opensips.org/events/Summit-2022Athens/ >> >> On 9/28/22 4:26 PM, mayamatakeshi wrote: >> >> >> On Wed, Sep 28, 2022 at 2:21 PM mayamatakeshi >> wrote: >> >>> Hi, >>> I'm testing latest commit b243666098be44226ade6a7df2b62851efcb5de8 of >>> opensips-3.2. >>> >>> I tested adding branches to an INVITE for a fixed size list of AORs this >>> way: >>> >>> $var(aors) = "sip:user1 at test1.com,sip:user2 at test1.com, >>> sip:user3 at test1.com"; >>> >>> seturi($(var(aors){s.select,0,,})); >>> >>> append_branch(); >>> seturi($(var(aors){s.select,1,,})); >>> >>> append_branch(); >>> seturi($(var(aors){s.select,2,,})); >>> >>> lookup("location", "r") >>> >>> The above works fine and all 3 destinations resolved by AOR lookup are >>> called (max of contact per AOR). >>> >>> However, in case of a a list of unknown size, I tried to use a while >>> loop like this: >>> $var(aors) = "sip:user1 at test1.com,sip:user2 at test1.com, >>> sip:user3 at test1.com"; >>> >>> $var(idx) = 0; >>> $var(aor) = $(var(aors){s.select,$var(idx),,}); >>> >>> while($var(aor) != null) { >>> seturi($var(aor)); >>> >>> $var(idx) = $var(idx) + 1; >>> $var(aor) = $(var(aors){s.select,$var(idx),,}); >>> } >>> >>> lookup("location", "r") >>> >>> But with the above, only the last destination (lookup of user3 at test1.com) >>> is called. >>> I confirmed this is not related to the lookup function because I tried >>> with fixed destinations like this: >>> >>> $var(aors) = "sip:user1 at 10.0.0.1:5072, >>> sip:user2 at 10.0.0.1:5074,sip:user3 at 10.0.0.1:5076"; >>> >>> $var(idx) = 0; >>> $var(aor) = $(var(aors){s.select,$var(idx),,}); >>> >>> while($var(aor) != null) { >>> seturi($var(aor)); >>> >>> $var(idx) = $var(idx) + 1; >>> $var(aor) = $(var(aors){s.select,$var(idx),,}); >>> } >>> >>> and the same problem happens: only the last destination >>> sip:user3 at 10.0.0.1:5076 is called. >>> >>> So, is there a way to append a non-fixed number of branches to an INVITE? >>> >>> Regards, >>> Takeshi >>> >> >> Sorry, I think I did something wrong. >> I was able to make append_branch to work inside a while loop. >> So there is no problem. >> Regards, >> Takeshi >> >> >> _______________________________________________ >> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thp.opensips at p5r.uk Tue Oct 11 14:52:13 2022 From: thp.opensips at p5r.uk (Thomas Pircher) Date: Tue, 11 Oct 2022 15:52:13 +0100 Subject: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay In-Reply-To: <494bb0cb-41b6-0ec0-166d-7cac07fa6a9f@opensips.org> References: <1a54c921-5321-9c74-e95b-74f968b1e4f9@opensips.org> <494bb0cb-41b6-0ec0-166d-7cac07fa6a9f@opensips.org> Message-ID: Bogdan-Andrei Iancu wrote: >Could you post a pcap or ngrep capture of the failing call (with the >broken ACK) - PM me if info is too sensitive. Hi Bogdan-Andrei, sure, please find the trace attached. This was captured using sudo tcpdump -lnn -i any udp port 5060 -w opensips-any.pcap i.e. it contains both OpenSIPS interfaces in one file: - ens4, 10.30.8.201, external - ens5, 10.30.9.10, internal The other IPs are: - 10.30.8.204: sipp uac - 10.30.9.11: sipp uas Thanks, Thomas From thp.opensips at p5r.uk Tue Oct 11 15:07:47 2022 From: thp.opensips at p5r.uk (Thomas Pircher) Date: Tue, 11 Oct 2022 16:07:47 +0100 Subject: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay In-Reply-To: References: <1a54c921-5321-9c74-e95b-74f968b1e4f9@opensips.org> <494bb0cb-41b6-0ec0-166d-7cac07fa6a9f@opensips.org> Message-ID: Thomas Pircher via Users wrote: >sure, please find the trace attached. This was captured using >sudo tcpdump -lnn -i any udp port 5060 -w opensips-any.pcap >i.e. it contains both OpenSIPS interfaces in one file: >- ens4, 10.30.8.201, external >- ens5, 10.30.9.10, internal > >The other IPs are: >- 10.30.8.204: sipp uac >- 10.30.9.11: sipp uas This time with actual attachment; sorry... Thomas -------------- next part -------------- A non-text attachment was scrubbed... Name: opensips-any.pcap Type: application/vnd.tcpdump.pcap Size: 14216 bytes Desc: not available URL: From marcin at voipplus.net Tue Oct 11 15:19:22 2022 From: marcin at voipplus.net (Marcin Groszek) Date: Tue, 11 Oct 2022 10:19:22 -0500 Subject: [OpenSIPS-Users] dr_partitions reload Message-ID: <3dce6c57-668d-d7a7-2e1b-bac3d9740d64@voipplus.net> opensips 3.1.5 opensips-cli -x mi dr_reload part_name  reloads the partition part_name When new entry is added or removed from  dr_partitions table opensips-cli -x mi dr_reload is needed to reload the content of dr_partitions, but this also reloads all partitions. Is there a way to do a dr_reload without all partitions, or perhaps reload only dr_partitions table? -- Best Regards: Marcin Groszek Business Phone Service https://www.voipplus.net From marcin at voipplus.net Tue Oct 11 16:07:52 2022 From: marcin at voipplus.net (Marcin Groszek) Date: Tue, 11 Oct 2022 11:07:52 -0500 Subject: [OpenSIPS-Users] dr_partitions reload In-Reply-To: <3dce6c57-668d-d7a7-2e1b-bac3d9740d64@voipplus.net> References: <3dce6c57-668d-d7a7-2e1b-bac3d9740d64@voipplus.net> Message-ID: <3cad5755-1e56-c40a-5241-19310d81acc4@voipplus.net> Well, after some more testing I noticed that dr_partitions does not get reloaded with "opensips-cli -x mi dr_reload" How can one reload the content of dr_partitions without restarting opensips process? On 10/11/2022 10:19 AM, Marcin Groszek wrote: > opensips 3.1.5 > > opensips-cli -x mi dr_reload part_name  reloads the partition part_name > > When new entry is added or removed from  dr_partitions table > opensips-cli -x mi dr_reload is needed to reload the content of > dr_partitions, but this also reloads all partitions. > > Is there a way to do a dr_reload without all partitions, or perhaps > reload only dr_partitions table? > -- Best Regards: Marcin Groszek Business Phone Service https://www.voipplus.net From y.kirsanov at gmail.com Tue Oct 11 22:34:21 2022 From: y.kirsanov at gmail.com (Yury Kirsanov) Date: Wed, 12 Oct 2022 09:34:21 +1100 Subject: [OpenSIPS-Users] Failed to trigger pkg stats in logs In-Reply-To: <83a340e1-1692-6048-bf49-eb6c6015dbaa@opensips.org> References: <1fd56384-e60f-a6ab-356e-6d5267ea07ca@opensips.org> <83a340e1-1692-6048-bf49-eb6c6015dbaa@opensips.org> Message-ID: Hi Bogdan, No, after I removed all the autoscaling I'm not getting any 'core:signal_pkg_status' errors. Regards, Yury. On Tue, Oct 11, 2022 at 10:56 PM Bogdan-Andrei Iancu wrote: > Hi Yury, > > trying to recap here - after completely removing the auto-scaling, do you > still have issues with fetching the pkg stats? > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 9/22/22 5:39 PM, Yury Kirsanov wrote: > > Hi Bogdan, > Sorry, I just realized that I haven't turned off the auto-scaler for UDP > processes so you're right - that error is for them. I've switched TCP > auto-scaling off due to all my previous issues that I wasn't able to > overcome. > > auto_scaling_profile = PROFILE_UDP > scale up to 32 on 80% for 4 cycles within 5 > scale down to 2 on 10% for 5 cycles > > udp_workers=1 use_auto_scaling_profile PROFILE_UDP > > socket=udp:10.x.x.x:5060 > socket=udp:103.x.x.x:7060 > > In regards to pkg memory - I only have 32MB as -M parameter, maybe that's > not enough? I'm not sure how to do 'pkg dump' - never tried to do that > before, is this what you're asking about? > > Sep 21 18:52:09 ERROR:core:signal_pkg_status: failed to trigger pkg stats > for process 45 > opensips-cli -x mi ps > { > "Processes": [ > ... > { > "ID": 45, > "PID": 310115, > "Type": "SIP receiver udp:103.x.x.x:7060" > } > ] > } > root at osgw1:~# opensips-cli -x mi mem_pkg_dump 310115 > ERROR: command 'mem_pkg_dump' returned: 500: Internal error > > Best regards, > Yury. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From razvan at opensips.org Wed Oct 12 07:42:36 2022 From: razvan at opensips.org (=?UTF-8?Q?R=c4=83zvan_Crainea?=) Date: Wed, 12 Oct 2022 10:42:36 +0300 Subject: [OpenSIPS-Users] dr_partitions reload In-Reply-To: <3cad5755-1e56-c40a-5241-19310d81acc4@voipplus.net> References: <3dce6c57-668d-d7a7-2e1b-bac3d9740d64@voipplus.net> <3cad5755-1e56-c40a-5241-19310d81acc4@voipplus.net> Message-ID: Hi, Marcin! Unfortunately this is not possible right now, OpenSIPS only uses the partitions it sees at startup. I know Nick was working on support for this, but it hasn't been completed yet. Nevertheless, feel free to open a feature request for this. Best regards, Răzvan Crainea OpenSIPS Core Developer http://www.opensips-solutions.com On 10/11/22 19:07, Marcin Groszek wrote: > Well, after some more testing I noticed that dr_partitions does not get > reloaded with "opensips-cli -x mi dr_reload" > > How can one reload the content of dr_partitions without restarting > opensips process? > > > On 10/11/2022 10:19 AM, Marcin Groszek wrote: >> opensips 3.1.5 >> >> opensips-cli -x mi dr_reload part_name  reloads the partition part_name >> >> When new entry is added or removed from  dr_partitions table >> opensips-cli -x mi dr_reload is needed to reload the content of >> dr_partitions, but this also reloads all partitions. >> >> Is there a way to do a dr_reload without all partitions, or perhaps >> reload only dr_partitions table? >> From ryzhik.ivan at gmail.com Wed Oct 12 08:13:58 2022 From: ryzhik.ivan at gmail.com (Ryzhik Ivan) Date: Wed, 12 Oct 2022 11:13:58 +0300 Subject: [OpenSIPS-Users] early dialog termination In-Reply-To: <0907245b-2b56-5a0c-cdaf-aca2d8853405@opensips.org> References: <0907245b-2b56-5a0c-cdaf-aca2d8853405@opensips.org> Message-ID: Thank you, Bogdan. I got stuck with tm documentation. 1) MI t_reply command has named parameters, ok, no problem. 2) trans_id - transaction identifier (has the hash_entry:label format) - what is this? if i use $T_id i got reply "Invalid trans_id". 3) Where can I get to_tag from script level on initial invite? ... t_reply_with_body(183, "Session progress", $(var(body){re.subst,$var(re)}) ); avp_db_query("insert into moh (callid, timeout, tid,totag) values ('$ci', $var(wait_time), '$T_id', '??????')"); ... Regards, Ivan. вт, 11 окт. 2022 г. в 12:35, Bogdan-Andrei Iancu : > Hi Ivan, > > you can use timer_route, but as there is no way to send a reply for a > particular transaction from script level (only to the currently processed > request), you will have to trigger the MI cmds from the timer route, which > is a bit hackish .... > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 10/11/22 11:47 AM, Ryzhik Ivan wrote: > > Hi, Bogdan! > What d' you think, can we use timer_route instead of an external script? > Regards, Ivan. > > пн, 10 окт. 2022 г. в 17:04, Bogdan-Andrei Iancu : > >> Hi Ryzhik, >> >> Without a t_relay() it makes not much sense to have an dialog structure >> at all - the dialog module in opensips is actually design for proxied >> calls, not for UAC calls. >> >> IMO, you should keep it a transaction level, by sending replies back >> only. When getting the INVITE, put its call-id into a DB table (to keep >> only the "active" session) together with a lifetime / expiration time. When >> getting a CANCEL, update the table (set lifetime to 0), to know it is >> terminated. And use an simple external script that keeps scanning the DB >> for (1) sending 487 Terminated via MI if the record has 0 lifetime or (2) >> send a 408 Timeout via MI if the lifetime exceeded. >> In a similar way you can handle the BYE - send back 200OK for the BYE and >> set 0 in lifetime, to send a 487 canceled back >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Summit 27-30 Sept 2022, Athens >> https://www.opensips.org/events/Summit-2022Athens/ >> >> On 10/10/22 4:33 PM, Ryzhik Ivan wrote: >> >> Hello! >> My opensips version is 3.1 with tm,dialog and rtpengine modules. >> On incoming INVITE i'm creating an early dialog with 183 replies and i'm >> playing audio to caller with rtpengine, no t_relay() on this step, OS is >> acting as UAS endpoint. >> If the caller cancels the invite with a CANCEL message - all works great. >> But some users terminate dialog with BYE message. >> 1) on BYE with to-tag OS can't find dialog with match_dialog(), because >> to-tag presents. >> 2) if i use load_dialog_ctx($ci) - it is possible to handle BYE. >> 3) in early dialog termination with BYE we also need to send final >> response to the INVITE transaction. >> >> Maybe I did something wrong, but I can't handle the final response to >> INVITE in this case. >> >> _______________________________________________ >> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Wed Oct 12 10:11:08 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Wed, 12 Oct 2022 13:11:08 +0300 Subject: [OpenSIPS-Users] early dialog termination In-Reply-To: References: <0907245b-2b56-5a0c-cdaf-aca2d8853405@opensips.org> Message-ID: Perfect !!! Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/12/22 1:09 PM, Ryzhik Ivan wrote: > I found a solution. hex strings are reversed). > Thank you very much! > > ср, 12 окт. 2022 г. в 12:59, Ryzhik Ivan >: > > and one more research: $T_id returns hex encoded label.hashid > but my attempts failed: > got $T_id = 6545e285.3fe4 > Send: {"jsonrpc": "2.0", "method": "t_reply", "id": 1, "params": > {"code": "487", "reason": "Terminating", "trans_id": > "16356:1699078789", "to_tag": ""}} > Got: b'{"jsonrpc":"2.0","error":{"code":404,"message":"Transaction > not found"},"id":1}' > > > ср, 12 окт. 2022 г. в 11:13, Ryzhik Ivan >: > > Thank you, Bogdan. > I got stuck with tm documentation. >   1) MI t_reply command has named parameters, ok, no problem. >   2) trans_id - transaction identifier (has the > hash_entry:label format)  - what is this? if i use $T_id i got > reply "Invalid trans_id". >   3) Where can I get to_tag from script level on initial invite? >       ... >       t_reply_with_body(183, "Session progress", > $(var(body){re.subst,$var(re)}) ); >       avp_db_query("insert into moh (callid, timeout, > tid,totag) values ('$ci', $var(wait_time), '$T_id', '??????')"); >       ... > > Regards, Ivan. > > вт, 11 окт. 2022 г. в 12:35, Bogdan-Andrei Iancu > >: > > Hi Ivan, > > you can use timer_route, but as there is no way to send a > reply for a particular transaction from script level (only > to the currently processed request), you will have to > trigger the MI cmds from the timer route, which is a bit > hackish .... > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 10/11/22 11:47 AM, Ryzhik Ivan wrote: >> Hi, Bogdan! >> What d' you think, can we use timer_route instead of an >> external script? >> Regards, Ivan. >> >> пн, 10 окт. 2022 г. в 17:04, Bogdan-Andrei Iancu >> >: >> >> Hi Ryzhik, >> >> Without a t_relay() it makes not much sense to have >> an dialog structure at all - the dialog module in >> opensips is actually design for proxied calls, not >> for UAC calls. >> >> IMO, you should keep it a transaction level, by >> sending replies back only. When getting the INVITE, >> put its call-id into a DB table (to keep only the >> "active" session) together with a lifetime / >> expiration time. When getting a CANCEL, update the >> table (set lifetime to 0), to know it is terminated. >> And use an simple external script that keeps scanning >> the DB for (1) sending 487 Terminated via MI if the >> record has 0 lifetime or (2) send a 408 Timeout via >> MI if the lifetime exceeded. >> In a similar way you can handle the BYE - send back >> 200OK for the BYE and set 0 in lifetime, to send a >> 487 canceled back >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Summit 27-30 Sept 2022, Athens >> https://www.opensips.org/events/Summit-2022Athens/ >> >> On 10/10/22 4:33 PM, Ryzhik Ivan wrote: >>> Hello! >>> My opensips version is 3.1 with tm,dialog and >>> rtpengine modules. >>> On incoming INVITE i'm creating an early dialog with >>> 183 replies and i'm playing audio to caller with >>> rtpengine, no t_relay() on this step, OS is acting >>> as UAS endpoint. >>> If the caller cancels the invite with a CANCEL >>> message - all works great. >>> But some users terminate dialog with BYE message. >>> 1) on BYE with to-tag OS can't find dialog with >>> match_dialog(), because to-tag presents. >>> 2) if i use load_dialog_ctx($ci) -  it is possible >>> to handle BYE. >>> 3) in early dialog termination with BYE we also need >>> to send final response to the INVITE transaction. >>> >>> Maybe I did something wrong, but I can't handle the >>> final response to INVITE in this case. >>> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pavel.ekshine at gmail.com Wed Oct 12 16:23:38 2022 From: pavel.ekshine at gmail.com (Pavel Ekshin) Date: Wed, 12 Oct 2022 19:23:38 +0300 Subject: [OpenSIPS-Users] OpenSIPS 3.2.7 tracer module for sip dialogs leads to an endless loop In-Reply-To: References: <074b0305-ade4-c50b-484a-a464b311cf55@opensips.org> Message-ID: Hi Bogdan! Thanks for the answer! I tried this one: #### TRACE module loadmodule "tracer.so" modparam("tracer", "trace_on", 1) modparam("tracer", "trace_id","[tid]uri=mysql://XXXXX:XXXXXXX at localhost /opensips;table=sip_trace;") modparam("tracer", "trace_id","[tid]uri=sip:172.16.34.91:5060") modparam("tracer", "trace_local_ip", "172.16.34.91") I use the constant string "tid" inside the trace(), no specific variable. route{ script_trace( 1, "$rm from $si, ruri=$ru, contact=$ct", "script_trace"); #trace("tid", "d", "sip"); #xlog("here_trace"); #if (!has_totag()) { # if(is_method("INVITE") ) { # # We need to use the dialog module to have the outgoing ACK traced # # trace("tid", "d", "sip"); #} #} #else { # match_dialog(); #} #if (!is_method("INVITE,ACK,BYE,PRACK")) { # Requests that are not part of an established dialog will be transaction base traced # trace("tid", "t", "sip"); # xlog("Message not in dialog - $rm\n"); #} #trace("tid", "t", "sip"); .. BR, Pavel вт, 11 окт. 2022 г. в 14:58, Bogdan-Andrei Iancu : > Hi PAvel, > > How do you define the tid you use for tracing ? > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 9/21/22 7:45 PM, Pavel Ekshin wrote: > > Hi Bogdan, > > Thanks for the answer. > I tried this module, but nothing weird was found. On reply ACK messages in > sngrep capture I see the correct "To/Contact'' header, but in log the "To" > header looks different, but it's not lead to any loop. > > Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script > Trace][/etc/opensips/opensips_residential.cfg:430][script_trace][core if] > -> (INVITE from 172.18.53.131, ruri=sip:4002 at 172.16.34.173:5060, contact=< > sip:opensips at 172.18.53.131:5060>) > Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script > Trace][/etc/opensips/opensips_residential.cfg:427][script_trace][module > t_relay] -> (INVITE from 172.18.53.131, ruri=sip:4002 at 172.16.34.173:5060, > contact=) > Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script > Trace][/etc/opensips/opensips_residential.cfg:430][script_trace][core exit] > -> (INVITE from 172.18.53.131, ruri=sip:4002 at 172.16.34.173:5060, contact=< > sip:opensips at 172.18.53.131:5060>) > Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script > Trace][/etc/opensips/opensips_residential.cfg:221][script_trace][core if] > -> (ACK from 172.18.53.131, ruri=sip:172.16.34.173:5060;transport=udp, > contact=) > Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script > Trace][/etc/opensips/opensips_residential.cfg:214][script_trace][module > mf_process_maxfwd_header] -> (ACK from 172.18.53.131, ruri= > sip:172.16.34.173:5060;transport=udp, contact=< > sip:opensips at 172.18.53.131:5060>) > Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script > Trace][/etc/opensips/opensips_residential.cfg:258][script_trace][core if] > -> (ACK from 172.18.53.131, ruri=sip:172.16.34.173:5060;transport=udp, > contact=) > Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script > Trace][/etc/opensips/opensips_residential.cfg:221][script_trace][module > has_totag] -> (ACK from 172.18.53.131, ruri= > sip:172.16.34.173:5060;transport=udp, contact=< > sip:opensips at 172.18.53.131:5060>) > > > ________________________________________________________________________________________________________________________ > ____________172.18.53.131:5060___________172.16.34.91:5060 > ______________172.16.34.173:5060___________172.16.34.173:64087 > > __________qqqqqqqqqqwqqqqqqqqq__________qqqqqqqqqqwqqqqqqqqq__________qqqqqqqqqqwqqqqqqqqq__________qqqqqqqqqqwqqqqqqqqqx > > __16:06:48.772459___x________INVITE_(SDP)_________x_____________________________x_____________________________x_________ > > ________+0.001900___x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_____________________________x_________ > > __16:06:48.774359___x__407_Proxy_Authentication_R_x_____________________________x_____________________________x_________ > > ________+0.014197___x_ > __16:06:48.788556___x_____________ACK_____________x_____________________________x_____________________________x________ > > ________+0.000103___x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_____________________________x_________ > > __16:06:48.788659___x________INVITE_(SDP)_________x_____________________________x_____________________________x_________ > > ________+0.005221___x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_____________________________x_________ > > __16:06:48.793880___x_____100_Giving_it_a_try_____x_____________________________x_____________________________x_________ > > ________+0.000664___x_ > __16:06:48.794544___x_____________________________x________INVITE_(SDP)_________x_____________________________x_________ > > ________+0.004555___x_____________________________x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_________ > > __16:06:48.799099___x_____________________________x________________________100_Trying_________________________x_________ > > ________+0.039449___x_____________________________x_ > __16:06:48.838548___x_____________________________x_______________________200_Ok_(SDP)________________________x_________ > > ________+0.000493___x_____________________________x_ > __16:06:48.839041___x________200_Ok_(SDP)_________x_____________________________x_____________________________x_________ > > ________+0.012395___x_ > __16:06:48.851436___x_____________ACK_____________x_____________________________x_____________________________x_________ > > ________+0.000488___x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_____________________________x_________ > > __16:06:48.851924___x_____________________________x_____________ACK_____________x_____________________________x_________ > > ________+8.768408___x_____________________________x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_________ > > __16:06:57.620332___x_____________BYE_____________x_____________________________x_____________________________x_________ > > ________+0.000966___x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_____________________________x_________ > > __16:06:57.621298___x_____________________________x_____________BYE_____________x_____________________________x_________ > > ________+0.003895___x_____________________________x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x________ > > __16:06:57.625193___x_____________________________x__________________________200_Ok___________________________x_________ > > ________+0.000271___x_____________________________x_ > __16:06:57.625464___x___________200_Ok____________x_____________________________x_____________________________x_________ > > ____________________x_ > ____________________x_____________________________x_____________________________x_____________________________x_________ > > ____________________x_____________________________x_____________________________x_____________________________x_________ > > If I disable trace("tid", "d/t/m", "sip") module at route level, I never > faced with loop.I also found that trace("tid", "m", "sip") is worked for > specific messages, f.e INVITE, and not looped too. > If I have something wrong with the route, it should also be looped without > enabled trace(), but it's not happen. I think it's around the rules of > trace() module and rules there this module may be enabled. Maybe you have > an example for enabling the trace() module globally? > > BR, Pavel > > вт, 6 сент. 2022 г. в 11:53, Bogdan-Andrei Iancu : > >> Hi Pavel, >> >> The tracing part has nothing to do with the routing on the SIP side. And >> usually you end up with SIP loops if, without changing the RURI, you >> send the SIP request out, making OpenSIPS to send the request back to >> itself (as the destination in RURI still points to OpenSIPS). >> >> I advice you to try to understand the execution flow via your script by >> using the script_trace[1] function and logging the RURI (as $ru) >> >> [1] >> >> https://www.opensips.org/Documentation/Script-CoreFunctions-3-2#script_trace >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Summit 27-30 Sept 2022, Athens >> https://www.opensips.org/events/Summit-2022Athens/ >> >> On 8/30/22 9:31 PM, Pavel Ekshin wrote: >> > Hi there, >> > I try very basic scenario with tracing sip dialogs in OpenSIPS 3.2.7, >> > and this scenario leads in an endless loop inside Opensips for SIP >> > messages. >> > Maybe someone is similarly affected or can point to the error on the >> > route scenario? I use out of box residential configuration. I read the >> > tracer module doc (https://opensips.org/docs/modules/devel/tracer.html >> > ), but dialog >> > examples from doc also lead to loops. >> > I also tried with transactions, but they are looped too. Trace for >> > messages works fine. I think I miss some points. >> > >> > MariaDB [opensips]> select method,COUNT(*) from sip_trace group by >> method; >> > +--------+----------+ >> > | method | COUNT(*) | >> > +--------+----------+ >> > | ACK | 2625 | >> > | BYE | 2270 | >> > | INVITE | 219 | >> > +--------+----------+ >> > >> > Below my config: >> [...] >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From john.quick at smartvox.co.uk Wed Oct 12 16:29:29 2022 From: john.quick at smartvox.co.uk (John Quick) Date: Wed, 12 Oct 2022 17:29:29 +0100 Subject: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay Message-ID: <000601d8de57$d0e047b0$72a0d710$@smartvox.co.uk> Thomas, The UAS at 10.30.9.11 has failed to process the two Record-Route headers sent in the INVITE. It should send the Route Set back as part of the Response - i.e. within the 200 OK. But it hasn't. It has just absorbed the Record-Route headers and ignored them. I would say that is faulty UAS behaviour, but maybe Bogdan could confirm. Consequently, the ACK has no Route headers. That means OpenSIPS is treated as the final destination - it doesn't know that it is meant to relay the ACK to 10.30.9.11 If you can't fix the UAS, you could try using the Topology hiding module in OpenSIPS. That would probably overcome the problem because Topology hiding doesn't send Record-Route headers downstream. John Quick Smartvox Limited Web: www.smartvox.co.uk From johan at democon.be Wed Oct 12 16:47:15 2022 From: johan at democon.be (johan) Date: Wed, 12 Oct 2022 18:47:15 +0200 Subject: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay In-Reply-To: <000601d8de57$d0e047b0$72a0d710$@smartvox.co.uk> References: <000601d8de57$d0e047b0$72a0d710$@smartvox.co.uk> Message-ID: <17e3d1c9-b807-33bb-2d31-9bf3cad7f9ad@democon.be> ++ John. On 12/10/2022 18:29, John Quick wrote: > Thomas, > > The UAS at 10.30.9.11 has failed to process the two Record-Route headers > sent in the INVITE. It should send the Route Set back as part of the > Response - i.e. within the 200 OK. But it hasn't. It has just absorbed the > Record-Route headers and ignored them. I would say that is faulty UAS > behaviour, but maybe Bogdan could confirm. > > Consequently, the ACK has no Route headers. That means OpenSIPS is treated > as the final destination - it doesn't know that it is meant to relay the ACK > to 10.30.9.11 > > If you can't fix the UAS, you could try using the Topology hiding module in > OpenSIPS. That would probably overcome the problem because Topology hiding > doesn't send Record-Route headers downstream. > > John Quick > Smartvox Limited > Web: www.smartvox.co.uk > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From whitepj at manx.biz Wed Oct 12 21:39:24 2022 From: whitepj at manx.biz (White, Phil) Date: Wed, 12 Oct 2022 22:39:24 +0100 Subject: [OpenSIPS-Users] Configuration Message-ID: Hi Team, May I ask for some help please? I am trying to configure Opensips to proxy calls to & from the PSTN. Being a complete novice, I'm flying somewhat blind, and things are not working as I expect. Currently, Opensips is working with all of my local sip phones, so I think I now need to configure (a) incoming calls, and (b) outgoing calls to my PSTN/SIP provider. I have included uac_auth in my configuration, together with the appropriate modparam("uac_auth","credential","username:domain:password") details. However,currently I am not seeing anything in the debug log to suggest that this has any effect. Can anyone help with pointers on what I need to include in the configuration file for each direction of call? Thanks for your help, Phil. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Thu Oct 13 06:05:10 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Thu, 13 Oct 2022 09:05:10 +0300 Subject: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay In-Reply-To: References: <1a54c921-5321-9c74-e95b-74f968b1e4f9@opensips.org> <494bb0cb-41b6-0ec0-166d-7cac07fa6a9f@opensips.org> Message-ID: Hi Thomas, Sorry, my wireshark is not able to open that pcap :(, complains on a unknown command or so :(. Try exportting the pcap as SIP text only. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/11/22 6:07 PM, Thomas Pircher via Users wrote: > Thomas Pircher via Users wrote: >> sure, please find the trace attached. This was captured using >> sudo tcpdump -lnn -i any udp port 5060 -w opensips-any.pcap >> i.e. it contains both OpenSIPS interfaces in one file: >> - ens4, 10.30.8.201, external >> - ens5, 10.30.9.10, internal >> >> The other IPs are: >> - 10.30.8.204: sipp uac >> - 10.30.9.11: sipp uas > > This time with actual attachment; sorry... > > Thomas > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Thu Oct 13 06:56:41 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Thu, 13 Oct 2022 09:56:41 +0300 Subject: [OpenSIPS-Users] Failed to trigger pkg stats in logs In-Reply-To: References: <1fd56384-e60f-a6ab-356e-6d5267ea07ca@opensips.org> <83a340e1-1692-6048-bf49-eb6c6015dbaa@opensips.org> Message-ID: <9f131343-6611-f6f7-1312-613ad5b1d4e5@opensips.org> Hi Yury, OK, but could you try to see the relation between the pkg status and errors, like such errors appear after:     * simple scaling up ?     * simple scaling down ?     * scaling up and down ? Thanks, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/12/22 1:34 AM, Yury Kirsanov wrote: > Hi Bogdan, > No, after I removed all the autoscaling I'm not getting any > 'core:signal_pkg_status' errors. > > Regards, > Yury. > > On Tue, Oct 11, 2022 at 10:56 PM Bogdan-Andrei Iancu > > wrote: > > Hi Yury, > > trying to recap here - after completely removing the auto-scaling, > do you still have issues with fetching the pkg stats? > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 9/22/22 5:39 PM, Yury Kirsanov wrote: >> Hi Bogdan, >> Sorry, I just realized that I haven't turned off the auto-scaler >> for UDP processes so you're right - that error is for them. I've >> switched TCP auto-scaling off due to all my previous issues that >> I wasn't able to overcome. >> >> auto_scaling_profile = PROFILE_UDP >>      scale up to 32 on 80% for 4 cycles within 5 >>      scale down to 2 on 10% for 5 cycles >> >> udp_workers=1 use_auto_scaling_profile PROFILE_UDP >> >> socket=udp:10.x.x.x:5060 >> socket=udp:103.x.x.x:7060 >> >> In regards to pkg memory - I only have 32MB as -M parameter, >> maybe that's not enough? I'm not sure how to do 'pkg dump' - >> never tried to do that before, is this what you're asking about? >> >> Sep 21 18:52:09 ERROR:core:signal_pkg_status: failed to trigger >> pkg stats for process 45 >>  opensips-cli -x mi ps >> { >>     "Processes": [ >> ... >>         { >>             "ID": 45, >>             "PID": 310115, >>             "Type": "SIP receiver udp:103.x.x.x:7060" >>         } >>     ] >> } >> root at osgw1:~# opensips-cli -x mi mem_pkg_dump 310115 >> ERROR: command 'mem_pkg_dump' returned: 500: Internal error >> >> Best regards, >> Yury. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From y.kirsanov at gmail.com Thu Oct 13 06:59:45 2022 From: y.kirsanov at gmail.com (Yury Kirsanov) Date: Thu, 13 Oct 2022 17:59:45 +1100 Subject: [OpenSIPS-Users] Failed to trigger pkg stats in logs In-Reply-To: <9f131343-6611-f6f7-1312-613ad5b1d4e5@opensips.org> References: <1fd56384-e60f-a6ab-356e-6d5267ea07ca@opensips.org> <83a340e1-1692-6048-bf49-eb6c6015dbaa@opensips.org> <9f131343-6611-f6f7-1312-613ad5b1d4e5@opensips.org> Message-ID: Hi Bogdan, Can't say for sure at the moment but I believe this was happening during the scale-down procedure. Currently that server is running without an autoscaler as it's a production one, unfortunately. Regards, Yury. On Thu, Oct 13, 2022 at 5:56 PM Bogdan-Andrei Iancu wrote: > Hi Yury, > > OK, but could you try to see the relation between the pkg status and > errors, like such errors appear after: > * simple scaling up ? > * simple scaling down ? > * scaling up and down ? > > Thanks, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 10/12/22 1:34 AM, Yury Kirsanov wrote: > > Hi Bogdan, > No, after I removed all the autoscaling I'm not getting any > 'core:signal_pkg_status' errors. > > Regards, > Yury. > > On Tue, Oct 11, 2022 at 10:56 PM Bogdan-Andrei Iancu > wrote: > >> Hi Yury, >> >> trying to recap here - after completely removing the auto-scaling, do you >> still have issues with fetching the pkg stats? >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Summit 27-30 Sept 2022, Athens >> https://www.opensips.org/events/Summit-2022Athens/ >> >> On 9/22/22 5:39 PM, Yury Kirsanov wrote: >> >> Hi Bogdan, >> Sorry, I just realized that I haven't turned off the auto-scaler for UDP >> processes so you're right - that error is for them. I've switched TCP >> auto-scaling off due to all my previous issues that I wasn't able to >> overcome. >> >> auto_scaling_profile = PROFILE_UDP >> scale up to 32 on 80% for 4 cycles within 5 >> scale down to 2 on 10% for 5 cycles >> >> udp_workers=1 use_auto_scaling_profile PROFILE_UDP >> >> socket=udp:10.x.x.x:5060 >> socket=udp:103.x.x.x:7060 >> >> In regards to pkg memory - I only have 32MB as -M parameter, maybe that's >> not enough? I'm not sure how to do 'pkg dump' - never tried to do that >> before, is this what you're asking about? >> >> Sep 21 18:52:09 ERROR:core:signal_pkg_status: failed to trigger pkg stats >> for process 45 >> opensips-cli -x mi ps >> { >> "Processes": [ >> ... >> { >> "ID": 45, >> "PID": 310115, >> "Type": "SIP receiver udp:103.x.x.x:7060" >> } >> ] >> } >> root at osgw1:~# opensips-cli -x mi mem_pkg_dump 310115 >> ERROR: command 'mem_pkg_dump' returned: 500: Internal error >> >> Best regards, >> Yury. >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ideanethelp at gmail.com Thu Oct 13 07:49:27 2022 From: ideanethelp at gmail.com (ideanet help) Date: Thu, 13 Oct 2022 20:49:27 +1300 Subject: [OpenSIPS-Users] Configuration In-Reply-To: References: Message-ID: Hi Phil, Easy thing, if your user is registered and he makes a call that will become an outgoing call. Just send it to PSTN. You can simply use t_relay or use the dispatcher module. You only need uac_auth if your PSTN network somehow sends calls to your opensips using SIP and trying to authenticate. is this the case? On Thu, Oct 13, 2022 at 10:42 AM White, Phil wrote: > Hi Team, > > May I ask for some help please? > I am trying to configure Opensips to proxy calls to & from the PSTN. > Being a complete novice, I'm flying somewhat blind, and things are not > working as I expect. > > Currently, Opensips is working with all of my local sip phones, so I think > I now need to configure (a) incoming calls, and (b) outgoing calls to my > PSTN/SIP provider. > I have included uac_auth in my configuration, together with the appropriate > modparam("uac_auth","credential","username:domain:password") details. > However,currently I am not seeing anything in the debug log to suggest > that this has any effect. > > Can anyone help with pointers on what I need to include in the > configuration file for each direction of call? > > Thanks for your help, > Phil. > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thp.opensips at p5r.uk Thu Oct 13 08:26:03 2022 From: thp.opensips at p5r.uk (Thomas Pircher) Date: Thu, 13 Oct 2022 09:26:03 +0100 Subject: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay In-Reply-To: <000601d8de57$d0e047b0$72a0d710$@smartvox.co.uk> References: <000601d8de57$d0e047b0$72a0d710$@smartvox.co.uk> Message-ID: John Quick wrote: >The UAS at 10.30.9.11 has failed to process the two Record-Route headers >sent in the INVITE. It should send the Route Set back as part of the >Response - i.e. within the 200 OK. But it hasn't. It has just absorbed the >Record-Route headers and ignored them. I would say that is faulty UAS >behaviour, but maybe Bogdan could confirm. Hi John, thanks for the reply. Your explanation makes sense to me; I can see that in the packet capture file, in the replies from the UAS in packets 4 and 6. Also, your article explains why OpenSIPS adds two RR headers in this scenario. >Consequently, the ACK has no Route headers. That means OpenSIPS is treated >as the final destination - it doesn't know that it is meant to relay the ACK >to 10.30.9.11 Now I have the right keywords to search for some more information; it looks like there was an attempt to fix this in 2006: https://sourceforge.net/p/sipp/mailman/sipp-users/thread/200606071744.k57HiPJ4002550%40mail.zserv.tuwien.ac.at/#msg9012298 But then there is http://yuminstallgit.blogspot.com/2011/03/record-route-and-route-fun-in-sipp.html and the comment from 2021 at the end suggests others have seen the same issue relatively recently. >If you can't fix the UAS, you could try using the Topology hiding module in >OpenSIPS. That would probably overcome the problem because Topology hiding >doesn't send Record-Route headers downstream. That gives me a few options; I'll try replacing the SIPp UAS with FreeSWITCH. This may sound a bit over-engineered, as all I need is a machine that automatically answers calls to a bunch of usernames and plays an audio file. But it gives me a scenario that vaguely resembles a real-world setup, to test against. Thanks, Thomas From thp.opensips at p5r.uk Thu Oct 13 08:57:18 2022 From: thp.opensips at p5r.uk (Thomas Pircher) Date: Thu, 13 Oct 2022 09:57:18 +0100 Subject: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay In-Reply-To: References: <1a54c921-5321-9c74-e95b-74f968b1e4f9@opensips.org> <494bb0cb-41b6-0ec0-166d-7cac07fa6a9f@opensips.org> Message-ID: Bogdan-Andrei Iancu wrote: >Sorry, my wireshark is not able to open that pcap :(, complains on a >unknown command or so :(. Try exportting the pcap as SIP text only. HI Bogdam-Andrei, I think newer versions of libpcap appear to use some backwards-incompatible fields. The trace was captured with tcpdump version 4.99.0, using libpcap version 1.10.0. I have attached the same trace with only the UDP payload exported as text, using: tshark -r opensips-any.pcap -T fields -e udp.payload | while read payload; do echo $payload | xxd -r -p; echo ===; done John in the other sub-thread seems to be onto something: the SIPp UAS does not appear to send RR headers with its responses, which might be the cause of these problems. Thanks, Thomas -------------- next part -------------- INVITE sip:5678 at 10.30.8.201:5060 SIP/2.0 Via: SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: sip:sipp at 10.30.8.204:5060 Max-Forwards: 70 Subject: Performance Test Content-Type: application/sdp Content-Length: 188 v=0 o=user1 53655765 2353687637 IN IP4 10.30.8.204 s=- c=IN IP4 10.30.8.204 t=0 0 m=audio 6000 RTP/AVP 8 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-11,16 === SIP/2.0 100 Giving it a try Via: SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 To: sut From: sipp ;tag=1 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Server: OpenSIPS (3.3.1 (x86_64/linux)) Content-Length: 0 === INVITE sip:5678 at 10.30.8.201:5060 SIP/2.0 Record-Route: Record-Route: Via: SIP/2.0/UDP 10.30.9.10:5060;branch=z9hG4bK659a.b3ed2224.0 Via: SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: sip:sipp at 10.30.8.204:5060 Max-Forwards: 69 Subject: Performance Test Content-Type: application/sdp Content-Length: 205 v=0 o=user1 53655765 2353687637 IN IP4 10.30.9.10 s=- c=IN IP4 10.30.9.10 t=0 0 m=audio 42160 RTP/AVP 8 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-11,16 a=nortpproxy:yes === SIP/2.0 180 Ringing Via: SIP/2.0/UDP 10.30.9.10:5060;branch=z9hG4bK659a.b3ed2224.0, SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: Content-Length: 0 === SIP/2.0 180 Ringing Via: SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: Content-Length: 0 === SIP/2.0 200 OK Via: SIP/2.0/UDP 10.30.9.10:5060;branch=z9hG4bK659a.b3ed2224.0, SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: Content-Type: application/sdp Content-Length: 170 v=0 o=user1 53655765 2353687637 IN IP4 10.30.9.11 s=- c=IN IP4 10.30.9.11 t=0 0 m=audio 1222 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 === SIP/2.0 200 OK Via: SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: Content-Type: application/sdp Content-Length: 191 v=0 o=user1 53655765 2353687637 IN IP4 10.30.8.201 s=- c=IN IP4 10.30.8.201 t=0 0 m=audio 42464 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=nortpproxy:yes === ACK sip:5678 at 10.30.8.201:5060 SIP/2.0 Via: SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-4 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 ACK Contact: sip:sipp at 10.30.8.204:5060 Max-Forwards: 70 Subject: Performance Test Content-Length: 0 === SIP/2.0 200 OK Via: SIP/2.0/UDP 10.30.9.10:5060;branch=z9hG4bK659a.b3ed2224.0, SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: Content-Type: application/sdp Content-Length: 170 v=0 o=user1 53655765 2353687637 IN IP4 10.30.9.11 s=- c=IN IP4 10.30.9.11 t=0 0 m=audio 1222 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 === SIP/2.0 200 OK Via: SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: Content-Type: application/sdp Content-Length: 191 v=0 o=user1 53655765 2353687637 IN IP4 10.30.8.201 s=- c=IN IP4 10.30.8.201 t=0 0 m=audio 42464 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=nortpproxy:yes === ACK sip:5678 at 10.30.8.201:5060 SIP/2.0 Via: SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-4 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 ACK Contact: sip:sipp at 10.30.8.204:5060 Max-Forwards: 70 Subject: Performance Test Content-Length: 0 === SIP/2.0 200 OK Via: SIP/2.0/UDP 10.30.9.10:5060;branch=z9hG4bK659a.b3ed2224.0, SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: Content-Type: application/sdp Content-Length: 170 v=0 o=user1 53655765 2353687637 IN IP4 10.30.9.11 s=- c=IN IP4 10.30.9.11 t=0 0 m=audio 1222 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 === SIP/2.0 200 OK Via: SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: Content-Type: application/sdp Content-Length: 191 v=0 o=user1 53655765 2353687637 IN IP4 10.30.8.201 s=- c=IN IP4 10.30.8.201 t=0 0 m=audio 42464 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=nortpproxy:yes === ACK sip:5678 at 10.30.8.201:5060 SIP/2.0 Via: SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-4 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 ACK Contact: sip:sipp at 10.30.8.204:5060 Max-Forwards: 70 Subject: Performance Test Content-Length: 0 === SIP/2.0 200 OK Via: SIP/2.0/UDP 10.30.9.10:5060;branch=z9hG4bK659a.b3ed2224.0, SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: Content-Type: application/sdp Content-Length: 170 v=0 o=user1 53655765 2353687637 IN IP4 10.30.9.11 s=- c=IN IP4 10.30.9.11 t=0 0 m=audio 1222 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 === SIP/2.0 200 OK Via: SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: Content-Type: application/sdp Content-Length: 191 v=0 o=user1 53655765 2353687637 IN IP4 10.30.8.201 s=- c=IN IP4 10.30.8.201 t=0 0 m=audio 42464 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=nortpproxy:yes === ACK sip:5678 at 10.30.8.201:5060 SIP/2.0 Via: SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-4 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 ACK Contact: sip:sipp at 10.30.8.204:5060 Max-Forwards: 70 Subject: Performance Test Content-Length: 0 === SIP/2.0 200 OK Via: SIP/2.0/UDP 10.30.9.10:5060;branch=z9hG4bK659a.b3ed2224.0, SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: Content-Type: application/sdp Content-Length: 170 v=0 o=user1 53655765 2353687637 IN IP4 10.30.9.11 s=- c=IN IP4 10.30.9.11 t=0 0 m=audio 1222 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 === BYE sip:5678 at 10.30.8.201:5060 SIP/2.0 Via: SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-9 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 2 BYE Contact: sip:sipp at 10.30.8.204:5060 Max-Forwards: 70 Subject: Performance Test Content-Length: 0 === SIP/2.0 404 Not here Via: SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-9 To: sut ;tag=5014SIPpTag0111 From: sipp ;tag=1 Call-ID: 1-8000 at 10.30.8.204 CSeq: 2 BYE Server: OpenSIPS (3.3.1 (x86_64/linux)) Content-Length: 0 === BYE sip:5678 at 10.30.8.201:5060 SIP/2.0 Via: SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1--1 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 3 BYE Max-Forwards: 70 Contact: Content-Length: 0 === SIP/2.0 404 Not here Via: SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1--1 To: sut ;tag=5014SIPpTag0111 From: sipp ;tag=1 Call-ID: 1-8000 at 10.30.8.204 CSeq: 3 BYE Server: OpenSIPS (3.3.1 (x86_64/linux)) Content-Length: 0 === SIP/2.0 200 OK Via: SIP/2.0/UDP 10.30.9.10:5060;branch=z9hG4bK659a.b3ed2224.0, SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: Content-Type: application/sdp Content-Length: 170 v=0 o=user1 53655765 2353687637 IN IP4 10.30.9.11 s=- c=IN IP4 10.30.9.11 t=0 0 m=audio 1222 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 === SIP/2.0 200 OK Via: SIP/2.0/UDP 10.30.9.10:5060;branch=z9hG4bK659a.b3ed2224.0, SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: Content-Type: application/sdp Content-Length: 170 v=0 o=user1 53655765 2353687637 IN IP4 10.30.9.11 s=- c=IN IP4 10.30.9.11 t=0 0 m=audio 1222 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 === SIP/2.0 200 OK Via: SIP/2.0/UDP 10.30.9.10:5060;branch=z9hG4bK659a.b3ed2224.0, SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: Content-Type: application/sdp Content-Length: 170 v=0 o=user1 53655765 2353687637 IN IP4 10.30.9.11 s=- c=IN IP4 10.30.9.11 t=0 0 m=audio 1222 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 === SIP/2.0 200 OK Via: SIP/2.0/UDP 10.30.9.10:5060;branch=z9hG4bK659a.b3ed2224.0, SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: Content-Type: application/sdp Content-Length: 170 v=0 o=user1 53655765 2353687637 IN IP4 10.30.9.11 s=- c=IN IP4 10.30.9.11 t=0 0 m=audio 1222 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 === SIP/2.0 200 OK Via: SIP/2.0/UDP 10.30.9.10:5060;branch=z9hG4bK659a.b3ed2224.0, SIP/2.0/UDP 10.30.8.204:5060;branch=z9hG4bK-8000-1-0 From: sipp ;tag=1 To: sut ;tag=5014SIPpTag0111 Call-ID: 1-8000 at 10.30.8.204 CSeq: 1 INVITE Contact: Content-Type: application/sdp Content-Length: 170 v=0 o=user1 53655765 2353687637 IN IP4 10.30.9.11 s=- c=IN IP4 10.30.9.11 t=0 0 m=audio 1222 RTP/AVP 8 101 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 === From Ben.Newlin at genesys.com Thu Oct 13 13:11:07 2022 From: Ben.Newlin at genesys.com (Ben Newlin) Date: Thu, 13 Oct 2022 13:11:07 +0000 Subject: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay In-Reply-To: References: <000601d8de57$d0e047b0$72a0d710$@smartvox.co.uk> Message-ID: Our servers also use double Record-Route headers and we have always used SIPp in our testing with no issues. There are no inherent faults in the most recent version of SIPp with Record-Route/Route handling as far as I know. As long as you are properly setting “rrs=true” on the received INVITE, and including the “” variable in your replies it all works perfectly. https://sipp.sourceforge.net/doc/reference.html#Actions Ben Newlin From: Users on behalf of Thomas Pircher via Users Date: Thursday, October 13, 2022 at 4:26 AM To: users at lists.opensips.org Cc: John Quick Subject: Re: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay EXTERNAL EMAIL - Please use caution with links and attachments John Quick wrote: >The UAS at 10.30.9.11 has failed to process the two Record-Route headers >sent in the INVITE. It should send the Route Set back as part of the >Response - i.e. within the 200 OK. But it hasn't. It has just absorbed the >Record-Route headers and ignored them. I would say that is faulty UAS >behaviour, but maybe Bogdan could confirm. Hi John, thanks for the reply. Your explanation makes sense to me; I can see that in the packet capture file, in the replies from the UAS in packets 4 and 6. Also, your article explains why OpenSIPS adds two RR headers in this scenario. >Consequently, the ACK has no Route headers. That means OpenSIPS is treated >as the final destination - it doesn't know that it is meant to relay the ACK >to 10.30.9.11 Now I have the right keywords to search for some more information; it looks like there was an attempt to fix this in 2006: https://sourceforge.net/p/sipp/mailman/sipp-users/thread/200606071744.k57HiPJ4002550%40mail.zserv.tuwien.ac.at/#msg9012298 But then there is http://yuminstallgit.blogspot.com/2011/03/record-route-and-route-fun-in-sipp.html and the comment from 2021 at the end suggests others have seen the same issue relatively recently. >If you can't fix the UAS, you could try using the Topology hiding module in >OpenSIPS. That would probably overcome the problem because Topology hiding >doesn't send Record-Route headers downstream. That gives me a few options; I'll try replacing the SIPp UAS with FreeSWITCH. This may sound a bit over-engineered, as all I need is a machine that automatically answers calls to a bunch of usernames and plays an audio file. But it gives me a scenario that vaguely resembles a real-world setup, to test against. Thanks, Thomas _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From aviator.nitesh.d at gmail.com Thu Oct 13 13:35:26 2022 From: aviator.nitesh.d at gmail.com (Nitesh Divecha) Date: Thu, 13 Oct 2022 09:35:26 -0400 Subject: [OpenSIPS-Users] Configuration In-Reply-To: References: Message-ID: Hey Phil, Have you installed the OpenSIPS Control Panel? It is pretty simple to set up via OpenSIP CP then dealing with a cfg file. Goto https://powerpbx.org/content/opensips-v30-debian-v10-mariadb-apache-v1 and scroll down to Control Panel and install. Once OpenSIPS CP is installed you can add your "Inbound/Outbound trunks" and setup the route. Hope it helps... Cheers, Nitesh On Wed, Oct 12, 2022 at 5:42 PM White, Phil wrote: > Hi Team, > > May I ask for some help please? > I am trying to configure Opensips to proxy calls to & from the PSTN. > Being a complete novice, I'm flying somewhat blind, and things are not > working as I expect. > > Currently, Opensips is working with all of my local sip phones, so I think > I now need to configure (a) incoming calls, and (b) outgoing calls to my > PSTN/SIP provider. > I have included uac_auth in my configuration, together with the appropriate > modparam("uac_auth","credential","username:domain:password") details. > However,currently I am not seeing anything in the debug log to suggest > that this has any effect. > > Can anyone help with pointers on what I need to include in the > configuration file for each direction of call? > > Thanks for your help, > Phil. > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From razvan at opensips.org Thu Oct 13 14:19:05 2022 From: razvan at opensips.org (=?UTF-8?Q?R=c4=83zvan_Crainea?=) Date: Thu, 13 Oct 2022 17:19:05 +0300 Subject: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay In-Reply-To: References: <000601d8de57$d0e047b0$72a0d710$@smartvox.co.uk> Message-ID: <807184f7-d918-b3ac-4f62-42b2de6ee7eb@opensips.org> Hi, Ben! The default uas scenario of sipp does not properly treat Record-Route. If you are using it, you should drop it and write your own scenario that does handle RR, just as Ben suggested. Best regards, Răzvan Crainea OpenSIPS Core Developer http://www.opensips-solutions.com On 10/13/22 16:11, Ben Newlin wrote: > Our servers also use double Record-Route headers and we have always used > SIPp in our testing with no issues. There are no inherent faults in the > most recent version of SIPp with Record-Route/Route handling as far as I > know. > > As long as you are properly setting “rrs=true” on the received INVITE, > and including the “” variable in your replies it all works > perfectly. > > https://sipp.sourceforge.net/doc/reference.html#Actions > > > Ben Newlin > > *From: *Users on behalf of Thomas > Pircher via Users > *Date: *Thursday, October 13, 2022 at 4:26 AM > *To: *users at lists.opensips.org > *Cc: *John Quick > *Subject: *Re: [OpenSIPS-Users] Problem proxying a SIP connection with > t_relay > >  EXTERNAL EMAIL - Please use caution with links and attachments > > John Quick wrote: > >The UAS at 10.30.9.11 has failed to process the two Record-Route headers > >sent in the INVITE. It should send the Route Set back as part of the > >Response - i.e. within the 200 OK. But it hasn't. It has just absorbed the > >Record-Route headers and ignored them. I would say that is faulty UAS > >behaviour, but maybe Bogdan could confirm. > > Hi John, > > thanks for the reply. Your explanation makes sense to me; I can see that > in the packet capture file, in the replies from the UAS in packets 4 and > 6. > Also, your article explains why OpenSIPS adds two RR headers in this > scenario. > > >Consequently, the ACK has no Route headers. That means OpenSIPS is treated > >as the final destination - it doesn't know that it is meant to relay > the ACK > >to 10.30.9.11 > > Now I have the right keywords to search for some more information; it > looks like there was an attempt to fix this in 2006: > https://sourceforge.net/p/sipp/mailman/sipp-users/thread/200606071744.k57HiPJ4002550%40mail.zserv.tuwien.ac.at/#msg9012298 > > But then there is > http://yuminstallgit.blogspot.com/2011/03/record-route-and-route-fun-in-sipp.html > and the comment from 2021 at the end suggests others have seen the same > issue relatively recently. > > >If you can't fix the UAS, you could try using the Topology hiding > module in > >OpenSIPS. That would probably overcome the problem because Topology hiding > >doesn't send Record-Route headers downstream. > > That gives me a few options; I'll try replacing the SIPp UAS with > FreeSWITCH. This may sound a bit over-engineered, as all I need is a > machine that automatically answers calls to a bunch of usernames and > plays an audio file. But it gives me a scenario that vaguely resembles a > real-world setup, to test against. > > Thanks, > Thomas > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From aviator.nitesh.d at gmail.com Thu Oct 13 14:19:19 2022 From: aviator.nitesh.d at gmail.com (Nitesh Divecha) Date: Thu, 13 Oct 2022 10:19:19 -0400 Subject: [OpenSIPS-Users] OpenSIPS Control Panel In-Reply-To: <475406d8-af11-034d-cfbc-430a38c77b63@opensips.org> References: <475406d8-af11-034d-cfbc-430a38c77b63@opensips.org> Message-ID: Bogdan-Andrei, Thanks for your feedback... Yes, the remote SIP server expects FROM HEADER (Calling Identity) in order to authenticate the caller to make outbound calls. Where in cfg do I implement uac_replace_from() ? Is it in Routing Logic or where modules are declared? Also what happens if multiple DID providers are implemented in future? How will it affect the cfg file? Can we just implement via Control Panel? Cheers, Nitesh On Mon, Oct 10, 2022 at 9:42 AM Bogdan-Andrei Iancu wrote: > Hi Nitesh, > > In SIP, registration is done for receiving calls, it does not impact > sending calls. So, define the remote server as GW in Dynamic Route and > simply route the calls to it. Note that maybe the remote server will > expect you to use the as FROM hdr (calling identity) the AOR (SIP address) > you are registering with, so maybe you should be an uac_replace_from() in > cfg when sending to the GW. > > Best regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 10/7/22 9:00 PM, Nitesh Divecha wrote: > > Hello All, > > Anyone using OpenSIPS CP 9.3.2? Need small help! > > I got OpenSIPS 3.3.1 running and I can make calls out to the gateway (SIP > trunk) without any problems. > > My provider issued me a DID with user/pass and I was able to configure > them under "UAC Registrant" and registered to a remote server. > > Question is - how can I route calls to "UAC Registrant"? From the "Dynamic > Routing" menu I can only route calls to Gateway. How can I route calls to > "UAC Registrant"? > > Any suggestions? > > Thank you in advance! > > Cheers, > Nitesh > > _______________________________________________ > Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ideanethelp at gmail.com Fri Oct 14 03:37:31 2022 From: ideanethelp at gmail.com (ideanet help) Date: Fri, 14 Oct 2022 16:37:31 +1300 Subject: [OpenSIPS-Users] Push notification for zoiper ios app Message-ID: Hi, I am running opensips 3.2.6 and trying to test push notifications for my zoiper IOS app. I have enabled pn_enable and added pn_providers "apns, fcm, webpush, acme". I am not sure how to add the contact header with the pn stuff ? Is there any specific parameter with save() to enable it ? I don't have anything in the middle, just a zoiper ios client that is sending REGISTER requests to my opensips. I only want to send PN to specific devices. I did not find any example of how to handle the PN overall. Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: From callum.guy at x-on.co.uk Fri Oct 14 14:02:04 2022 From: callum.guy at x-on.co.uk (Callum Guy) Date: Fri, 14 Oct 2022 15:02:04 +0100 Subject: [OpenSIPS-Users] Check the User-Agent for registered user Message-ID: Hi All, I'm working on a project that requires me to evaluate the user agent of a registered contact before making a decision on a current registration attempt. Is there a method to do this natively? If not, what is the best approach? I haven't found anything yet, the current options i'm evaluating are to: 1. Use mi_script module to allow me to pull the contact record via ul_show_contact 2. Use rest_get to pull this data via a web service Neither is ideal for my requirements but both would do the job, I'm hoping someone in the community has a cleaner solution before I start! Best regards, Callum -- *0333 332 0000  |  x-on.co.uk   |   **      **  |  Coronavirus **  |   Practice Index Reviews * *Our new office address: 22 Riduna Park, Melton IP12 1QT.* *THE COMMS COUNCIL UK AWARDS 2022 AND Best Comms Software are trade marks of the Comms Council UK, used under licence - https://commscouncil.uk/awards * X-on is a trading name of Storacall Technology Ltd a limited company registered in England and Wales. Registered Office : Glebe Farm, Down Street, Dummer, Basingstoke, Hampshire, England RG25 2AD. Company Registration No. 2578478. The information in this e-mail is confidential and for use by the addressee(s) only. If you are not the intended recipient, please notify X-on immediately on +44(0)333 332 0000 and delete the message from your computer. If you are not a named addressee you must not use, disclose, disseminate, distribute, copy, print or reply to this email. Views or opinions expressed by an individual within this email may not necessarily reflect the views of X-on or its associated companies. Although X-on routinely screens for viruses, addressees should scan this email and any attachments for viruses. X-on makes no representation or warranty as to the absence of viruses in this email or any attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aviator.nitesh.d at gmail.com Fri Oct 14 14:55:38 2022 From: aviator.nitesh.d at gmail.com (Nitesh Divecha) Date: Fri, 14 Oct 2022 10:55:38 -0400 Subject: [OpenSIPS-Users] OpenSIPS Control Panel In-Reply-To: References: <475406d8-af11-034d-cfbc-430a38c77b63@opensips.org> Message-ID: Bogdan-Andrei, So I gave it a try and got error: Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] 0. /usr/local/etc/opensips/opensips_residential_2022-10-11.cfg Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] CRITICAL:core:yyerror: parse error in /usr/local/etc/opensips/opensips_residential_2022-10-11.cfg:456:22-23: too few param> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] xlog("new branch at change_from $ru to $avp(furi) Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: "); Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] if ($avp(furi) != NULL) { Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] uac_replace_from("$avp(furi)"); Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] ^~ Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] } Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] } Here is my code: ### uac_registrant module loadmodule "uac.so" modparam("uac","restore_mode", "auto") #auto ####### Routing Logic ######## # main request routing logic route{ if (dp_translate(10 ,$rU ,$rU) ) { $avp(furi) = "sip:1xxxxxxxxxx at gothamcity.com"; #strip(1); if (!do_routing(0)) { send_reply(500,"No PSTN Route found"); exit; } t_on_branch("change_from"); route(relay); exit; } } branch_route[change_from] { xlog("new branch at change_from $ru to $avp(furi)\n"); if ($avp(furi) != NULL) { uac_replace_from("$avp(furi)"); } } NOTE: This is my first time playing with C-style code... Trying to learn what branches do/return, etc... Rest of the code is default residential cfg. Cheers, Nitesh On Thu, Oct 13, 2022 at 10:19 AM Nitesh Divecha wrote: > Bogdan-Andrei, > > Thanks for your feedback... > > Yes, the remote SIP server expects FROM HEADER (Calling Identity) in order > to authenticate the caller to make outbound calls. > > Where in cfg do I implement uac_replace_from() ? Is it in Routing Logic > or where modules are declared? > > Also what happens if multiple DID providers are implemented in future? How > will it affect the cfg file? Can we just implement via Control Panel? > > Cheers, > Nitesh > > > > > > On Mon, Oct 10, 2022 at 9:42 AM Bogdan-Andrei Iancu > wrote: > >> Hi Nitesh, >> >> In SIP, registration is done for receiving calls, it does not impact >> sending calls. So, define the remote server as GW in Dynamic Route and >> simply route the calls to it. Note that maybe the remote server will >> expect you to use the as FROM hdr (calling identity) the AOR (SIP address) >> you are registering with, so maybe you should be an uac_replace_from() in >> cfg when sending to the GW. >> >> Best regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Summit 27-30 Sept 2022, Athens >> https://www.opensips.org/events/Summit-2022Athens/ >> >> On 10/7/22 9:00 PM, Nitesh Divecha wrote: >> >> Hello All, >> >> Anyone using OpenSIPS CP 9.3.2? Need small help! >> >> I got OpenSIPS 3.3.1 running and I can make calls out to the gateway (SIP >> trunk) without any problems. >> >> My provider issued me a DID with user/pass and I was able to configure >> them under "UAC Registrant" and registered to a remote server. >> >> Question is - how can I route calls to "UAC Registrant"? From the >> "Dynamic Routing" menu I can only route calls to Gateway. How can I route >> calls to "UAC Registrant"? >> >> Any suggestions? >> >> Thank you in advance! >> >> Cheers, >> Nitesh >> >> _______________________________________________ >> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From vladpaiu at opensips.org Sat Oct 15 08:52:52 2022 From: vladpaiu at opensips.org (Vlad Paiu) Date: Sat, 15 Oct 2022 11:52:52 +0300 Subject: [OpenSIPS-Users] Check the User-Agent for registered user In-Reply-To: References: Message-ID: <97d691b6-871b-e352-0178-a5ae8ef23e08@opensips.org> Hello, At registration time you could save the User Agent in the attributes per registration [1] and at INVITE time you can check that in branch_route and make your decision there. [1] https://opensips.org/html/docs/modules/3.2.x/registrar.html#param_attr_avp Regards, Vlad On 14.10.2022 17:02, Callum Guy wrote: > Hi All, > > I'm working on a project that requires me to evaluate the user agent > of a registered contact before making a decision on a current > registration attempt. > > Is there a method to do this natively? If not, what is the best approach? > > I haven't found anything yet, the current options i'm evaluating are to: > > 1. Use mi_script module to allow me to pull the contact record > via ul_show_contact > 2. Use rest_get to pull this data via a web service > > Neither is ideal for my requirements but both would do the job, I'm > hoping someone in the community has a cleaner solution before I start! > > Best regards, > > Callum > > > > *^0333 332 0000  | x-on.co.uk   | > _**_^ > **^  | > Coronavirus > **^  > | Practice Index Reviews * > > *Our new office address: 22 Riduna Park, Melton IP12 1QT.* > > /THE COMMS COUNCIL UK AWARDS 2022 AND Best Comms Software are trade > marks of the Comms Council UK, used under licence - > https://commscouncil.uk/awards/ > > X-on is a trading name of Storacall Technology Ltd a limited company > registered in England and Wales. > Registered Office : Glebe Farm, Down Street, Dummer, Basingstoke, > Hampshire, England RG25 2AD. Company Registration No. 2578478. > The information in this e-mail is confidential and for use by the > addressee(s) only. If you are not the intended recipient, please > notify X-on immediately on +44(0)333 332 0000 and delete the > message from your computer. If you are not a named addressee you must > not use, disclose, disseminate, distribute, copy, print or reply to > this email. Views or opinions expressed by an individual > within this email may not necessarily reflect the views of X-on or its > associated companies. Although X-on routinely screens for viruses, > addressees should scan this email and any attachments > for viruses. X-on makes no representation or warranty as to the > absence of viruses in this email or any attachments. > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From achinthau at gmail.com Fri Oct 14 06:23:03 2022 From: achinthau at gmail.com (Achintha) Date: Fri, 14 Oct 2022 11:53:03 +0530 Subject: [OpenSIPS-Users] can hear one side after unhold the call Message-ID: Dear All We configured VOIP solution using opensips, freeswitch and rtpengine as bellow, [image: Diagram.jpg] We are using jssip as an agent phone When a consumer calls an agent, the call will connect and the customer will be able to speak. Then the consumer was placed on hold, and he could hear the hold music. When unhold the call Customer can hear the agent, but the agent cannot hear the customer. Please advise me to solve this issue. [image: Capture.jpg] Opensips.conf: https://pastebin.com/R9qtWzJr Best Regards.. Achintha Udukumbura -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Diagram.jpg Type: image/jpeg Size: 100815 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Capture.jpg Type: image/jpeg Size: 271553 bytes Desc: not available URL: From bogdan at opensips.org Mon Oct 17 06:37:50 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 17 Oct 2022 09:37:50 +0300 Subject: [OpenSIPS-Users] early dialog termination In-Reply-To: References: <0907245b-2b56-5a0c-cdaf-aca2d8853405@opensips.org> Message-ID: Hi Ryzhik, Right, the transaction must be forced to stay until you are done with a final reply. Unfortunately there is no clear way to do this from script (this may be subject of further small improvements), but you can try taking advantage of the `t_write_req` [1] for this purpose, even if you do not have to actually write anything to outer world - just fake it. [1] https://opensips.org/html/docs/modules/3.2.x/tm.html#func_t_write_req Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/13/22 2:45 PM, Ryzhik Ivan wrote: > Hi. > One more question. > Everything works fine except the transaction was deleted after 15 > sec after the initial route was finished. > on INVITE i last do t_reply_with_body(183, "Session progress", ...) > and than exit; > > on end route log : > > 2022-10-13T10:58:01.994598+00:00  DBG:tm:_reply_light: reply sent out. > buf=0x7f558a087d98: SIP/2.0 1..., shmem=0x7f5549797470: SIP/2.0 1 > 2022-10-13T10:58:01.994676+00:00  DBG:tm:_reply_light: finished > > 2022-10-13T10:58:01.995835+00:00  DBG:tm:do_t_cleanup: transaction > 0x7f5549793b18 already updated! Skipping update! > 2022-10-13T10:58:01.996020+00:00  DBG:tm:cleanup_uac_timers: RETR/FR > timers reset > 2022-10-13T10:58:01.996202+00:00 *DBG:tm:insert_timer_unsafe: [2]: > 0x7f5549793b98 (12)* > 2022-10-13T10:58:01.996317+00:00 * DBG:tm:t_unref: UNREF_UNSAFE: > [0x7f5549793b18] after is 0* > 2022-10-13T10:58:01.996488+00:00  DBG:core:destroy_avp_list: > destroying list (nil) > 2022-10-13T10:58:01.996673+00:00  DBG:core:receive_msg: cleaning up > > 2022-10-13T10:58:07.651091+00:00* DBG:tm:timer_routine: timer > routine:2,tl=0x7f5549793b98 next=(nil), timeout=12* > 2022-10-13T10:58:07.651332+00:00  DBG:tm:wait_handler: removing > 0x7f5549793b18 from table > 2022-10-13T10:58:07.651425+00:00  DBG:tm:delete_ce*ll: delete > transaction 0x7f5549793b18* > 2022-10-13T10:58:07.651513+00:00  DBG:tm:wait_handler: done > > Can you tell me how I can i fix this? Transaction marked safe for > deletion... > Regards, Ivan > > ср, 12 окт. 2022 г. в 13:11, Bogdan-Andrei Iancu >: > > Perfect !!! > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 10/12/22 1:09 PM, Ryzhik Ivan wrote: >> I found a solution. hex strings are reversed). >> Thank you very much! >> >> ср, 12 окт. 2022 г. в 12:59, Ryzhik Ivan > >: >> >> and one more research: $T_id returns hex encoded label.hashid >> but my attempts failed: >> got $T_id = 6545e285.3fe4 >> Send: {"jsonrpc": "2.0", "method": "t_reply", "id": 1, >> "params": {"code": "487", "reason": "Terminating", >> "trans_id": "16356:1699078789", "to_tag": ""}} >> Got: >> b'{"jsonrpc":"2.0","error":{"code":404,"message":"Transaction >> not found"},"id":1}' >> >> >> ср, 12 окт. 2022 г. в 11:13, Ryzhik Ivan >> >: >> >> Thank you, Bogdan. >> I got stuck with tm documentation. >>   1) MI t_reply command has named parameters, ok, no >> problem. >>   2) trans_id - transaction identifier (has the >> hash_entry:label format)  - what is this? if i use $T_id >> i got reply "Invalid trans_id". >>   3) Where can I get to_tag from script level on initial >> invite? >>       ... >>       t_reply_with_body(183, "Session progress", >> $(var(body){re.subst,$var(re)}) ); >>       avp_db_query("insert into moh (callid, timeout, >> tid,totag) values ('$ci', $var(wait_time), '$T_id', >> '??????')"); >>       ... >> >> Regards, Ivan. >> >> вт, 11 окт. 2022 г. в 12:35, Bogdan-Andrei Iancu >> >: >> >> Hi Ivan, >> >> you can use timer_route, but as there is no way to >> send a reply for a particular transaction from script >> level (only to the currently processed request), you >> will have to trigger the MI cmds from the timer >> route, which is a bit hackish .... >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Summit 27-30 Sept 2022, Athens >> https://www.opensips.org/events/Summit-2022Athens/ >> >> On 10/11/22 11:47 AM, Ryzhik Ivan wrote: >>> Hi, Bogdan! >>> What d' you think, can we use timer_route instead of >>> an external script? >>> Regards, Ivan. >>> >>> пн, 10 окт. 2022 г. в 17:04, Bogdan-Andrei Iancu >>> >: >>> >>> Hi Ryzhik, >>> >>> Without a t_relay() it makes not much sense to >>> have an dialog structure at all - the dialog >>> module in opensips is actually design for >>> proxied calls, not for UAC calls. >>> >>> IMO, you should keep it a transaction level, by >>> sending replies back only. When getting the >>> INVITE, put its call-id into a DB table (to keep >>> only the "active" session) together with a >>> lifetime / expiration time. When getting a >>> CANCEL, update the table (set lifetime to 0), to >>> know it is terminated. And use an simple >>> external script that keeps scanning the DB for >>> (1) sending 487 Terminated via MI if the record >>> has 0 lifetime or (2) send a 408 Timeout via MI >>> if the lifetime exceeded. >>> In a similar way you can handle the BYE - send >>> back 200OK for the BYE and set 0 in lifetime, to >>> send a 487 canceled back >>> >>> Regards, >>> >>> Bogdan-Andrei Iancu >>> >>> OpenSIPS Founder and Developer >>> https://www.opensips-solutions.com >>> OpenSIPS Summit 27-30 Sept 2022, Athens >>> https://www.opensips.org/events/Summit-2022Athens/ >>> >>> On 10/10/22 4:33 PM, Ryzhik Ivan wrote: >>>> Hello! >>>> My opensips version is 3.1 with tm,dialog and >>>> rtpengine modules. >>>> On incoming INVITE i'm creating an early dialog >>>> with 183 replies and i'm playing audio to >>>> caller with rtpengine, no t_relay() on this >>>> step, OS is acting as UAS endpoint. >>>> If the caller cancels the invite with a CANCEL >>>> message - all works great. >>>> But some users terminate dialog with BYE message. >>>> 1) on BYE with to-tag OS can't find dialog with >>>> match_dialog(), because to-tag presents. >>>> 2) if i use load_dialog_ctx($ci) -  it is >>>> possible to handle BYE. >>>> 3) in early dialog termination with BYE we also >>>> need to send final response to the INVITE >>>> transaction. >>>> >>>> Maybe I did something wrong, but I can't handle >>>> the final response to INVITE in this case. >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users at lists.opensips.org >>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Oct 17 06:42:10 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 17 Oct 2022 09:42:10 +0300 Subject: [OpenSIPS-Users] OpenSIPS 3.2.7 tracer module for sip dialogs leads to an endless loop In-Reply-To: References: <074b0305-ade4-c50b-484a-a464b311cf55@opensips.org> Message-ID: <00fc1d2f-c0f4-8a57-672d-d514a351b62d@opensips.org> Hi Pavel, try removing the SIP tid (the second one) - as you see that tid forces the tracer module to resend the copy of the message back to opensips itself (172.16.34.91:5060 is opensips listener, afaiu). Just remove it and see if it works ok. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/12/22 7:23 PM, Pavel Ekshin wrote: > Hi Bogdan! > > Thanks for the answer! I tried this one: > > #### TRACE module > loadmodule "tracer.so" > modparam("tracer", "trace_on", 1) > modparam("tracer", > "trace_id","[tid]uri=mysql://XXXXX:XXXXXXX at localhost/opensips;table=sip_trace;") > modparam("tracer", "trace_id","[tid]uri=sip:172.16.34.91:5060 > ") > modparam("tracer", "trace_local_ip", "172.16.34.91") > > I use the constant string "tid" inside the trace(), no specific variable. > > route{ >         script_trace( 1, "$rm from $si, ruri=$ru, contact=$ct", > "script_trace"); >         #trace("tid", "d", "sip"); >         #xlog("here_trace"); > >         #if (!has_totag()) { >         #       if(is_method("INVITE") ) { >         #       # We need to use the dialog module to have the > outgoing ACK traced >         #       # trace("tid", "d", "sip"); >         #} >         #} >         #else { >         #       match_dialog(); >         #} > >         #if (!is_method("INVITE,ACK,BYE,PRACK")) { >         # Requests that are not part of an established dialog will be > transaction base traced >         #       trace("tid", "t", "sip"); >         #       xlog("Message not in dialog - $rm\n"); >         #} >         #trace("tid", "t", "sip"); > .. > > BR, Pavel > > вт, 11 окт. 2022 г. в 14:58, Bogdan-Andrei Iancu >: > > Hi PAvel, > > How do you define the tid you use for tracing ? > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 9/21/22 7:45 PM, Pavel Ekshin wrote: >> Hi Bogdan, >> >> Thanks for the answer. >> I tried this module, but nothing weird was found. On reply ACK >> messages in sngrep capture I see the correct "To/Contact'' >> header, but in log the "To" header looks different, but it's not >> lead to any loop. >> >> Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script >> Trace][/etc/opensips/opensips_residential.cfg:430][script_trace][core >> if] -> (INVITE from 172.18.53.131, >> ruri=sip:4002 at 172.16.34.173:5060 >> , >> contact=> >) >> Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script >> Trace][/etc/opensips/opensips_residential.cfg:427][script_trace][module >> t_relay] -> (INVITE from 172.18.53.131, >> ruri=sip:4002 at 172.16.34.173:5060 >> , >> contact=> >) >> Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script >> Trace][/etc/opensips/opensips_residential.cfg:430][script_trace][core >> exit] -> (INVITE from 172.18.53.131, >> ruri=sip:4002 at 172.16.34.173:5060 >> , >> contact=> >) >> Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script >> Trace][/etc/opensips/opensips_residential.cfg:221][script_trace][core >> if] -> (ACK from 172.18.53.131, >> ruri=sip:172.16.34.173:5060;transport=udp, >> contact=> >) >> Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script >> Trace][/etc/opensips/opensips_residential.cfg:214][script_trace][module >> mf_process_maxfwd_header] -> (ACK from 172.18.53.131, >> ruri=sip:172.16.34.173:5060;transport=udp, >> contact=> >) >> Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script >> Trace][/etc/opensips/opensips_residential.cfg:258][script_trace][core >> if] -> (ACK from 172.18.53.131, >> ruri=sip:172.16.34.173:5060;transport=udp, >> contact=> >) >> Sep 20 16:51:55 openSIPS /usr/sbin/opensips[15619]: [Script >> Trace][/etc/opensips/opensips_residential.cfg:221][script_trace][module >> has_totag] -> (ACK from 172.18.53.131, >> ruri=sip:172.16.34.173:5060;transport=udp, >> contact=> >) >> >> ________________________________________________________________________________________________________________________ >> ____________172.18.53.131:5060___________172.16.34.91:5060______________172.16.34.173:5060___________172.16.34.173:64087 >> >> __________qqqqqqqqqqwqqqqqqqqq__________qqqqqqqqqqwqqqqqqqqq__________qqqqqqqqqqwqqqqqqqqq__________qqqqqqqqqqwqqqqqqqqqx >> __16:06:48.772459___x________INVITE_(SDP)_________x_____________________________x_____________________________x_________ >> ________+0.001900___x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_____________________________x_________ >> __16:06:48.774359___x__407_Proxy_Authentication_R_x_____________________________x_____________________________x_________ >> ________+0.014197___x_> __16:06:48.788556___x_____________ACK_____________x_____________________________x_____________________________x________ >> ________+0.000103___x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_____________________________x_________ >> __16:06:48.788659___x________INVITE_(SDP)_________x_____________________________x_____________________________x_________ >> ________+0.005221___x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_____________________________x_________ >> __16:06:48.793880___x_____100_Giving_it_a_try_____x_____________________________x_____________________________x_________ >> ________+0.000664___x_> __16:06:48.794544___x_____________________________x________INVITE_(SDP)_________x_____________________________x_________ >> ________+0.004555___x_____________________________x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_________ >> __16:06:48.799099___x_____________________________x________________________100_Trying_________________________x_________ >> ________+0.039449___x_____________________________x_> __16:06:48.838548___x_____________________________x_______________________200_Ok_(SDP)________________________x_________ >> ________+0.000493___x_____________________________x_> __16:06:48.839041___x________200_Ok_(SDP)_________x_____________________________x_____________________________x_________ >> ________+0.012395___x_> __16:06:48.851436___x_____________ACK_____________x_____________________________x_____________________________x_________ >> ________+0.000488___x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_____________________________x_________ >> __16:06:48.851924___x_____________________________x_____________ACK_____________x_____________________________x_________ >> ________+8.768408___x_____________________________x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_________ >> __16:06:57.620332___x_____________BYE_____________x_____________________________x_____________________________x_________ >> ________+0.000966___x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x_____________________________x_________ >> __16:06:57.621298___x_____________________________x_____________BYE_____________x_____________________________x_________ >> ________+0.003895___x_____________________________x_qqqqqqqqqqqqqqqqqqqqqqqqqq>_x_____________________________x________ >> __16:06:57.625193___x_____________________________x__________________________200_Ok___________________________x_________ >> ________+0.000271___x_____________________________x_> __16:06:57.625464___x___________200_Ok____________x_____________________________x_____________________________x_________ >> ____________________x_> ____________________x_____________________________x_____________________________x_____________________________x_________ >> ____________________x_____________________________x_____________________________x_____________________________x_________ >> >> If I disable trace("tid", "d/t/m", "sip") module at route level, >> I never faced with loop.I also found that trace("tid", "m", >> "sip") is worked for specific messages, f.e INVITE, and not >> looped too. >> If I have something wrong with the route, it should also be >> looped without enabled trace(), but it's not happen. I think it's >> around the rules of trace() module and rules there this module >> may be enabled. Maybe you have an example for enabling the >> trace() module globally? >> >> BR, Pavel >> >> вт, 6 сент. 2022 г. в 11:53, Bogdan-Andrei Iancu >> >: >> >> Hi Pavel, >> >> The tracing part has nothing to do with the routing on the >> SIP side. And >> usually you end up with SIP loops if, without changing the >> RURI, you >> send the SIP request out, making OpenSIPS to send the request >> back to >> itself (as the destination in RURI still points to OpenSIPS). >> >> I advice you to try to understand the execution flow via your >> script by >> using the script_trace[1] function and logging the RURI (as $ru) >> >> [1] >> https://www.opensips.org/Documentation/Script-CoreFunctions-3-2#script_trace >> >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> >> OpenSIPS Summit 27-30 Sept 2022, Athens >> https://www.opensips.org/events/Summit-2022Athens/ >> >> >> On 8/30/22 9:31 PM, Pavel Ekshin wrote: >> > Hi there, >> > I try very basic scenario with tracing sip dialogs in >> OpenSIPS 3.2.7, >> > and this scenario leads in an endless loop inside Opensips >> for SIP >> > messages. >> > Maybe someone is similarly affected or can point to the >> error on the >> > route scenario? I use out of box residential configuration. >> I read the >> > tracer module doc >> (https://opensips.org/docs/modules/devel/tracer.html >> >> > > >), but >> dialog >> > examples from doc also lead to loops. >> > I also tried with transactions, but they are looped too. >> Trace for >> > messages works fine.  I think I miss some points. >> > >> > MariaDB [opensips]> select method,COUNT(*) from sip_trace >> group by method; >> > +--------+----------+ >> > | method | COUNT(*) | >> > +--------+----------+ >> > | ACK    |     2625 | >> > | BYE    |     2270 | >> > | INVITE |      219 | >> > +--------+----------+ >> > >> > Below my config: >> [...] >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Oct 17 06:43:21 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 17 Oct 2022 09:43:21 +0300 Subject: [OpenSIPS-Users] Failed to trigger pkg stats in logs In-Reply-To: References: <1fd56384-e60f-a6ab-356e-6d5267ea07ca@opensips.org> <83a340e1-1692-6048-bf49-eb6c6015dbaa@opensips.org> <9f131343-6611-f6f7-1312-613ad5b1d4e5@opensips.org> Message-ID: <827f9be9-3eed-9c47-bcc1-ea7df1985d90@opensips.org> Hi Yury, OK, let me check a bit the related code, to see if I can spot anything bogus there. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/13/22 9:59 AM, Yury Kirsanov wrote: > Hi Bogdan, > Can't say for sure at the moment but I believe this was happening > during the scale-down procedure. Currently that server is running > without an autoscaler as it's a production one, unfortunately. > > Regards, > Yury. > > On Thu, Oct 13, 2022 at 5:56 PM Bogdan-Andrei Iancu > > wrote: > > Hi Yury, > > OK, but could you try to see the relation between the pkg status > and errors, like such errors appear after: >     * simple scaling up ? >     * simple scaling down ? >     * scaling up and down ? > > Thanks, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 10/12/22 1:34 AM, Yury Kirsanov wrote: >> Hi Bogdan, >> No, after I removed all the autoscaling I'm not getting any >> 'core:signal_pkg_status' errors. >> >> Regards, >> Yury. >> >> On Tue, Oct 11, 2022 at 10:56 PM Bogdan-Andrei Iancu >> > wrote: >> >> Hi Yury, >> >> trying to recap here - after completely removing the >> auto-scaling, do you still have issues with fetching the pkg >> stats? >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Summit 27-30 Sept 2022, Athens >> https://www.opensips.org/events/Summit-2022Athens/ >> >> On 9/22/22 5:39 PM, Yury Kirsanov wrote: >>> Hi Bogdan, >>> Sorry, I just realized that I haven't turned off the >>> auto-scaler for UDP processes so you're right - that error >>> is for them. I've switched TCP auto-scaling off due to all >>> my previous issues that I wasn't able to overcome. >>> >>> auto_scaling_profile = PROFILE_UDP >>>      scale up to 32 on 80% for 4 cycles within 5 >>>      scale down to 2 on 10% for 5 cycles >>> >>> udp_workers=1 use_auto_scaling_profile PROFILE_UDP >>> >>> socket=udp:10.x.x.x:5060 >>> socket=udp:103.x.x.x:7060 >>> >>> In regards to pkg memory - I only have 32MB as -M parameter, >>> maybe that's not enough? I'm not sure how to do 'pkg dump' - >>> never tried to do that before, is this what you're asking about? >>> >>> Sep 21 18:52:09 ERROR:core:signal_pkg_status: failed to >>> trigger pkg stats for process 45 >>>  opensips-cli -x mi ps >>> { >>>     "Processes": [ >>> ... >>>         { >>>   "ID": 45, >>>             "PID": 310115, >>>             "Type": "SIP receiver udp:103.x.x.x:7060" >>>         } >>>     ] >>> } >>> root at osgw1:~# opensips-cli -x mi mem_pkg_dump 310115 >>> ERROR: command 'mem_pkg_dump' returned: 500: Internal error >>> >>> Best regards, >>> Yury. >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Oct 17 06:53:10 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 17 Oct 2022 09:53:10 +0300 Subject: [OpenSIPS-Users] OpenSIPS Control Panel In-Reply-To: References: <475406d8-af11-034d-cfbc-430a38c77b63@opensips.org> Message-ID: <321e1065-273b-7f65-1d8c-b68b0092957c@opensips.org> Hi Nitesh, Do uac_replace_from( , "$avp(furi)"); Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/14/22 5:55 PM, Nitesh Divecha wrote: > Bogdan-Andrei, > > So I gave it a try and got error: > > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 > [61003]  0. /usr/local/etc/opensips/opensips_residential_2022-10-11.cfg > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 > [61003] CRITICAL:core:yyerror: parse error in > /usr/local/etc/opensips/opensips_residential_2022-10-11.cfg:456:22-23: > too few param> > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 > [61003]         xlog("new branch at change_from $ru to $avp(furi) > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: "); > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 > [61003]         if ($avp(furi) != NULL) { > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 > [61003]                 uac_replace_from("$avp(furi)"); > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 > [61003]                 ^~ > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 > [61003]         } > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 > [61003] } > > > Here is my code: > > ### uac_registrant module > loadmodule "uac.so" > modparam("uac","restore_mode", "auto")  #auto > > > ####### Routing Logic ######## > # main request routing logic > route{ > if (dp_translate(10 ,$rU ,$rU) ) { >                 $avp(furi) = "sip:1xxxxxxxxxx at gothamcity.com > "; >                 #strip(1); > >                 if (!do_routing(0)) { >                         send_reply(500,"No PSTN Route found"); >                         exit; >                 } > >                 t_on_branch("change_from"); >                 route(relay); >                 exit; >         } > } > > branch_route[change_from] { >         xlog("new branch at change_from $ru to $avp(furi)\n"); >         if ($avp(furi) != NULL) { >                 uac_replace_from("$avp(furi)"); >         } > } > > > NOTE: This is my first time playing with C-style code... Trying to > learn what branches do/return, etc... > > Rest of the code is default residential cfg. > > Cheers, > Nitesh > > > > > On Thu, Oct 13, 2022 at 10:19 AM Nitesh Divecha > > wrote: > > Bogdan-Andrei, > > Thanks for your feedback... > > Yes, the remote SIP server expects FROM HEADER (Calling Identity) > in order to authenticate the caller to make outbound calls. > > Where in cfg do I implement uac_replace_from() ? Is it in Routing > Logic or where modules are declared? > > Also what happens if multiple DID providers are implemented in > future? How will it affect the cfg file? Can we just implement via > Control Panel? > > Cheers, > Nitesh > > > > > > On Mon, Oct 10, 2022 at 9:42 AM Bogdan-Andrei Iancu > > wrote: > > Hi Nitesh, > > In SIP, registration is done for receiving calls, it does not > impact sending calls. So, define the remote server as GW in > Dynamic Route and simply route the calls to it.  Note that > maybe the remote server will expect you to use the as FROM hdr > (calling identity) the AOR (SIP address) you are registering > with, so maybe you should be an uac_replace_from() in cfg when > sending to the GW. > > Best regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 10/7/22 9:00 PM, Nitesh Divecha wrote: >> Hello All, >> >> Anyone using OpenSIPS CP 9.3.2? Need small help! >> >> I got OpenSIPS 3.3.1 running and I can make calls out to the >> gateway (SIP trunk) without any problems. >> >> My provider issued me a DID with user/pass and I was able to >> configure them under "UAC Registrant" and registered to a >> remote server. >> >> Question is - how can I route calls to "UAC Registrant"? From >> the "Dynamic Routing" menu I can only route calls to Gateway. >> How can I route calls to "UAC Registrant"? >> >> Any suggestions? >> >> Thank you in advance! >> >> Cheers, >> Nitesh >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Oct 17 06:39:56 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 17 Oct 2022 09:39:56 +0300 Subject: [OpenSIPS-Users] Autoscaler in 3.2.x In-Reply-To: References: <051e4ba9-58ba-cd75-020a-ea22065b72b5@opensips.org> <395af355-d840-dd38-ee66-52085fae1538@opensips.org> <3db755a7-292a-8c03-0a1e-90b9661ec3e1@opensips.org> <14fa673d-c26e-b7ef-0d10-b2b166af9cbe@opensips.org> <9476c8c0-6ad4-3521-987b-465372706d1a@opensips.org> <38698f0f-4ab4-0530-6cf4-03ba761961b6@opensips.org> <99a44696-1d5e-22c4-54fc-0ea5c6f09157@opensips.org> <9cc83511-2afe-4f3b-8cea-de651aeba87c@opensips.org> Message-ID: <8584f24e-fce7-d9b5-4347-ed20fd5a757a@opensips.org> Hi, So even with the auto-scaling disabled, after a bit of a time you still get the TCP related issues? Do you use TLS in asyc mode? if yes, try to turn that off. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/12/22 1:36 AM, Yury Kirsanov wrote: > Hi Bogdan, > Yes, if I enable the autoscaler I immediately run into all sorts of > issues with TCP. When it's off I'm just getting this issue from time > to time and I have to restart OpenSIPS in that case, even though it's > still working - part of the processes lock up and consume 100% CPU, > but overall the system continues to service requests. > > https://github.com/OpenSIPS/opensips/issues/2921 > > > Best regards, > Yury. > > On Tue, Oct 11, 2022 at 10:59 PM Bogdan-Andrei Iancu > > wrote: > > Hi Yury, > > Is this still an issue ? > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 9/15/22 5:26 PM, Yury Kirsanov wrote: >> Hi Bogdan, >> Looks like I'm running into some issues with TCP and autoscaling >> again...Now after a good start and within about 5-10 minutes >> after OpenSIPS restart, even if rate-limiter is enabled in >> iptables I'm getting a lot of these errors: >> >> Sep 16 00:20:56 ERROR:core:send_fd: sendmsg would block on 683: >> Resource temporarily unavailable >> Sep 16 00:20:56 ERROR:core:send2worker: send_fd failed >> Sep 16 00:20:56 ERROR:core:handle_new_connect: no TCP workers >> available >> >> And the number of registered users starts to drop. >> >> I've tried to change my autoscaler profile to be a bit more >> aggressive: >> >> auto_scaling_profile = PROFILE_TCP >>      scale up to 32 on 20% for 4 cycles within 5 >>      scale down to 4 on 10% for 10 cycles >> >> But that didn't help. Current TCP settings: >> >> tcp_accept_aliases=0 >> tcp_keepalive=1 >> tcp_connect_timeout=1500 >> tcp_keepinterval = 10 >> tcp_keepidle = 10 >> tcp_max_msg_time = 10 >> tcp_workers = 4 use_auto_scaling_profile PROFILE_TCP >> tcp_max_connections = 4096 >> >> # Proto TCP >> loadmodule "proto_tcp.so" >> modparam("proto_tcp", "tcp_async", 1) >> modparam("proto_tcp", "tcp_send_timeout", 1000) >> modparam("proto_tcp", "tcp_async_local_connect_timeout", 500) >> modparam("proto_tcp", "tcp_async_local_write_timeout", 500) >> modparam("proto_tcp", "tcp_max_msg_chunks", 16) >> modparam("proto_tcp", "tcp_parallel_handling", 1) >> >> I'm also setting TCP persistent flag before mid_register_save >> (not sure which one to use - setflag or setbflag so doing both): >> >> modparam("mid_registrar", "tcp_persistent_flag", >> "TCP_PERSIST_REGISTRATIONS") >> >>         if (is_method("REGISTER")) >>             if ($socket_in(proto)!="udp") >>             { >>                 setflag("TCP_PERSIST_REGISTRATIONS"); >>                 setbflag("TCP_PERSIST_REGISTRATIONS"); >>             } >> >> That didn't help. So I had to manually set tcp_workers=32 and now >> it works fine. Not sure what's going on here... >> >> Thanks and best regards, >> Yury. >> >> >> On Thu, Sep 15, 2022 at 4:02 PM Bogdan-Andrei Iancu >> > wrote: >> >> I'm glad it helped. keep me posted please if the auto-scaling >> fix holds. >> >> Best regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Summit 27-30 Sept 2022, Athens >> https://www.opensips.org/events/Summit-2022Athens/ >> >> On 9/14/22 10:10 PM, Yury Kirsanov wrote: >>> Hi Bogdan, >>> Sorry to email directly to you again, but just wanted to say >>> a huge thank you for all your great work in supporting >>> OpenSIPS and its users! >>> >>> After adjusting TCP parameters my OpenSIPS server can handle >>> restarts easily without any issues, even though I'm >>> currently dropping all the caches and dialogs and everything >>> and not using any rate-limit iptables rules. >>> >>> Also, I've enabled the autoscaler and it seem to work great >>> this far, please see this screenshot, you can see 79 >>> processes before the restart, then a restart and number of >>> processes immediately dropped to a very low number even >>> though it now keeps some load on active processes: >>> >>> image.png >>> >>> All the SIP devices were able to reconnect successfully and >>> seem to be stable at this stage! No more memory leaks! >>> Thanks again! >>> >>> Best regards, >>> Yury. >>> >>> On Wed, Sep 14, 2022 at 10:58 PM Bogdan-Andrei Iancu >>> > wrote: >>> >>> Hi Yury, >>> >>> You need to check the TCP setting and to be sure your >>> OpenSIPS will (1) not try to perform TCP connect against >>> destination known not to be able to accept (like TCP/WS >>> end points behind NAT) - see the tcp_no_new_conn_bflag >>> [1] - or (2) not block for long time while attempting a >>> connect - see the tcp_connect_timeout [2] or consider >>> enabling async [3]. >>> >>> [1] >>> https://www.opensips.org/Documentation/Script-CoreParameters-3-2#tcp_no_new_conn_bflag >>> >>> [2] >>> https://www.opensips.org/Documentation/Script-CoreParameters-3-2#tcp_connect_timeout >>> >>> [3] >>> https://opensips.org/html/docs/modules/3.2.x/proto_tcp.html#idp168992 >>> >>> >>> Regards, >>> >>> Bogdan-Andrei Iancu >>> >>> OpenSIPS Founder and Developer >>> https://www.opensips-solutions.com >>> OpenSIPS Summit 27-30 Sept 2022, Athens >>> https://www.opensips.org/events/Summit-2022Athens/ >>> >>> On 9/13/22 12:01 PM, Yury Kirsanov wrote: >>>> Hi Bogdan, >>>> Thanks for this update, but it looks like I can't check >>>> autoscaler because of this first issue with blocking >>>> TCP connect. Is there a way to resolve it? Am I doing >>>> something wrong? Or is that something to do with >>>> OpenSIPS code? As yes, you're right, as soon as I >>>> restart OpenSIPS having a lot of SIP devices trying to >>>> connect to it - it goes crazy, starts to consume memory >>>> and stops to forward packets sitting there at 100% load >>>> until it runs out of memory and segfaults. Sometimes I >>>> can't even restart it to come to normal state to make >>>> it work, it just loops into same crash whatever I try >>>> to do. >>>> >>>> I've compiled OpenSIPS 3.3.1 with your patch and was >>>> able to start it but not sure, maybe I was just lucky >>>> this time. >>>> >>>> What should I do? Thanks! >>>> >>>> Best regards, >>>> Yury. >>>> >>>> On Tue, 13 Sept 2022, 18:56 Bogdan-Andrei Iancu, >>>> > wrote: >>>> >>>> Hi Yury, >>>> >>>> it looks like you some multiple issues, overlapping >>>> here. The traps you sent here have nothing to do >>>> with the auto-scaling, but with a blocking TCP >>>> connect for SIP - most of the procs get blocked >>>> into a sync TCP connect. >>>> >>>> Regards, >>>> >>>> Bogdan-Andrei Iancu >>>> >>>> OpenSIPS Founder and Developer >>>> https://www.opensips-solutions.com >>>> OpenSIPS Summit 27-30 Sept 2022, Athens >>>> https://www.opensips.org/events/Summit-2022Athens/ >>>> >>>> On 9/12/22 4:39 PM, Yury Kirsanov wrote: >>>>> Hi Bogdan, >>>>> I've applied the patch (had to find where to apply >>>>> it manually for 3.2.8 downloaded from Web page, >>>>> line 1568 instead of 1652) and restarted the >>>>> server with only about 300-350 SIP devices and >>>>> immediately got into same issue. I'm attaching two >>>>> GDB dumps made within several minutes from each >>>>> other. Autoscale was now OFF, please see my >>>>> previous message as currently for some reason I'm >>>>> experiencing lockups even when it's off :( >>>> >>>>> Best regards, >>>>> Yury. >>>>> >>>>> On Mon, Sep 12, 2022 at 7:48 PM Bogdan-Andrei >>>>> Iancu >>>> > wrote: >>>>> >>>>> Hi Yuri, >>>>> >>>>> Could you give this patch a try? it should fix >>>>> the blocking you experience (it should apply >>>>> on 3.2 too). >>>>> >>>>> Best regards, >>>>> >>>>> Bogdan-Andrei Iancu >>>>> >>>>> OpenSIPS Founder and Developer >>>>> https://www.opensips-solutions.com >>>>> OpenSIPS Summit 27-30 Sept 2022, Athens >>>>> https://www.opensips.org/events/Summit-2022Athens/ >>>>> >>>>> On 9/7/22 2:54 PM, Bogdan-Andrei Iancu wrote: >>>>>> Hi Yury, >>>>>> >>>>>> Thanks for the details info here - let me do >>>>>> a review of some code and run some tests, as >>>>>> at this point I have a good idea on the >>>>>> direction to dig into. >>>>>> >>>>>> I will update here. >>>>>> >>>>>> Best regards, >>>>>> Bogdan-Andrei Iancu >>>>>> >>>>>> OpenSIPS Founder and Developer >>>>>> https://www.opensips-solutions.com >>>>>> OpenSIPS Summit 27-30 Sept 2022, Athens >>>>>> https://www.opensips.org/events/Summit-2022Athens/ >>>>>> On 9/6/22 11:24 AM, Yury Kirsanov wrote: >>>>>>> Hi Bogdan, >>>>>>> Yes, I'm listening on all types of sockets >>>>>>> including UDP, TCP and TLS on the outside >>>>>>> public interface and then forward traffic >>>>>>> into internal LAN via UDP only. >>>>>>> >>>>>>> Previously it was getting stuck quite >>>>>>> easily, now I had to wait for a while before >>>>>>> this actually happened. I've routed part of >>>>>>> my customers to this server to obtain this >>>>>>> result so I will have to do that again. >>>>>>> >>>>>>> As soon as I see one of the processes stuck >>>>>>> I'll dot the trap command and send you all >>>>>>> the details including processes load, ps >>>>>>> output and so on. >>>>>>> >>>>>>> For now I had to switch autoscaling off and >>>>>>> just create many listeners. Do I understand >>>>>>> correctly that I need to restart OpenSIPS in >>>>>>> order to apply autoscaling profiles and >>>>>>> reload-routes is not sufficient? >>>>>>> >>>>>>> Also, do I need separate UDP profiles for >>>>>>> public and private interfaces? And do I need >>>>>>> to apply autoscaling profile just to a >>>>>>> socket or I need to specify udp or >>>>>>> tcp_workers with autoscaler too? >>>>>>> >>>>>>> Thanks and best regards, >>>>>>> Yury. >>>>>>> >>>>>>> On Tue, 6 Sept 2022, 18:18 Bogdan-Andrei >>>>>>> Iancu, >>>>>> > wrote: >>>>>>> >>>>>>> Hi Yury, >>>>>>> >>>>>>> Thanks for the info. I see that the >>>>>>> stuck process (24) is an auto-scalled >>>>>>> one (based on its id). Do you have SIP >>>>>>> traffic from UDP to TCP or doing some >>>>>>> HEP capturing for SIP ? I saw a recent >>>>>>> similar report where a UDP auto-scalled >>>>>>> worked got stuck when trying to do some >>>>>>> communication with the TCP main/manager >>>>>>> process (in order to handle a TCP >>>>>>> operation). >>>>>>> >>>>>>> BTW, any chance to do a "opensips-cli -x >>>>>>> trap" when you have that stuck process, >>>>>>> just to see where is it stuck? and is it >>>>>>> hard to reproduce? as I may ask you to >>>>>>> extract some information from the >>>>>>> running process.... >>>>>>> >>>>>>> Regards, >>>>>>> >>>>>>> Bogdan-Andrei Iancu >>>>>>> >>>>>>> OpenSIPS Founder and Developer >>>>>>> https://www.opensips-solutions.com >>>>>>> OpenSIPS Summit 27-30 Sept 2022, Athens >>>>>>> https://www.opensips.org/events/Summit-2022Athens/ >>>>>>> >>>>>>> On 9/3/22 6:54 PM, Yury Kirsanov wrote: >>>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Users mailing list >>>>>> Users at lists.opensips.org >>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 103945 bytes Desc: not available URL: From bogdan at opensips.org Mon Oct 17 06:58:39 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 17 Oct 2022 09:58:39 +0300 Subject: [OpenSIPS-Users] can hear one side after unhold the call In-Reply-To: References: Message-ID: <75c03ab3-333f-fdcf-17aa-2f3cc4b8017b@opensips.org> Hi, Just check your SIP flow and be sure the SDP, at re-INVITE time, after un-holding, is properly modified (for rtpengine insertion) on both direction (re-INVITE and 200 OK). Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 27-30 Sept 2022, Athens https://www.opensips.org/events/Summit-2022Athens/ On 10/14/22 9:23 AM, Achintha wrote: > > Dear All > > We configured VOIP solution using opensips, freeswitch and rtpengine > as bellow, > > [...] > We are using jssip as an agent phone > > When a consumer calls an agent, the call will connect and the customer > will be able to speak. Then the consumer was placed on hold, and he > could hear the hold music. When unhold the call Customer can hear the > agent, but the agent cannot hear the customer. > > Please advise me to solve this issue. > > [...] > > Opensips.conf: https://pastebin.com/R9qtWzJr > > > > Best Regards.. > Achintha Udukumbura > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From callum.guy at x-on.co.uk Mon Oct 17 07:10:17 2022 From: callum.guy at x-on.co.uk (Callum Guy) Date: Mon, 17 Oct 2022 08:10:17 +0100 Subject: [OpenSIPS-Users] Check the User-Agent for registered user In-Reply-To: <97d691b6-871b-e352-0178-a5ae8ef23e08@opensips.org> References: <97d691b6-871b-e352-0178-a5ae8ef23e08@opensips.org> Message-ID: Hi Vlad, Thank you for your recommendation, I can't use branch routes for my implementation as I'm making the decision at registration time - "User-Agent A" captures registrations from "User-Agent B", but not the other way around. It looks like attr_avp should get populated when using is_registered so that will work well for me - I'm only expecting a single active registration per AoR so this should be a good fit. Many thanks for your help, I'll let you know if I run into any issues! Callum On Sat, 15 Oct 2022 at 09:54, Vlad Paiu wrote: > Hello, > > At registration time you could save the User Agent in the attributes per > registration [1] and at INVITE time you can check that in branch_route and > make your decision there. > > [1] > https://opensips.org/html/docs/modules/3.2.x/registrar.html#param_attr_avp > > > Regards, > Vlad > On 14.10.2022 17:02, Callum Guy wrote: > > Hi All, > > I'm working on a project that requires me to evaluate the user agent of a > registered contact before making a decision on a current registration > attempt. > > Is there a method to do this natively? If not, what is the best approach? > > I haven't found anything yet, the current options i'm evaluating are to: > > 1. Use mi_script module to allow me to pull the contact record > via ul_show_contact > 2. Use rest_get to pull this data via a web service > > Neither is ideal for my requirements but both would do the job, I'm hoping > someone in the community has a cleaner solution before I start! > > Best regards, > > Callum > > > > *0333 332 0000 | x-on.co.uk | ** > > ** | Coronavirus > ** > | Practice Index Reviews * > > *Our new office address: 22 Riduna Park, Melton IP12 1QT.* > > *THE COMMS COUNCIL UK AWARDS 2022 AND Best Comms Software are trade marks > of the Comms Council UK, used under licence - > https://commscouncil.uk/awards * > > X-on is a trading name of Storacall Technology Ltd a limited company > registered in England and Wales. > Registered Office : Glebe Farm, Down Street, Dummer, Basingstoke, > Hampshire, England RG25 2AD. Company Registration No. 2578478. > The information in this e-mail is confidential and for use by the > addressee(s) only. If you are not the intended recipient, please notify > X-on immediately on +44(0)333 332 0000 and delete the > message from your computer. If you are not a named addressee you must not > use, disclose, disseminate, distribute, copy, print or reply to this email. Views > or opinions expressed by an individual > within this email may not necessarily reflect the views of X-on or its > associated companies. Although X-on routinely screens for viruses, > addressees should scan this email and any attachments > for viruses. X-on makes no representation or warranty as to the absence of > viruses in this email or any attachments. > > > _______________________________________________ > Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- *0333 332 0000  |  x-on.co.uk   |   **      **  |  Coronavirus **  |   Practice Index Reviews * *Our new office address: 22 Riduna Park, Melton IP12 1QT.* *THE COMMS COUNCIL UK AWARDS 2022 AND Best Comms Software are trade marks of the Comms Council UK, used under licence - https://commscouncil.uk/awards * X-on is a trading name of Storacall Technology Ltd a limited company registered in England and Wales. Registered Office : Glebe Farm, Down Street, Dummer, Basingstoke, Hampshire, England RG25 2AD. Company Registration No. 2578478. The information in this e-mail is confidential and for use by the addressee(s) only. If you are not the intended recipient, please notify X-on immediately on +44(0)333 332 0000 and delete the message from your computer. If you are not a named addressee you must not use, disclose, disseminate, distribute, copy, print or reply to this email. Views or opinions expressed by an individual within this email may not necessarily reflect the views of X-on or its associated companies. Although X-on routinely screens for viruses, addressees should scan this email and any attachments for viruses. X-on makes no representation or warranty as to the absence of viruses in this email or any attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: From apsaras at microbase.gr Mon Oct 17 07:36:59 2022 From: apsaras at microbase.gr (Antonis Psaras) Date: Mon, 17 Oct 2022 10:36:59 +0300 Subject: [OpenSIPS-Users] Load a DB Table to hash with MI control Message-ID: <0d1901d8e1fb$3da7aef0$b8f70cd0$@microbase.gr> Dear all I am looking to implement a functionality similar to htable module were I will have a db table with some key values which will be loaded during service start and will expire every x sec or forced to be reloaded by MI. Using OpenSIPs 2.4 Any suggestion? Best regards Antonis Psaras -------------- next part -------------- An HTML attachment was scrubbed... URL: From vladpaiu at opensips.org Mon Oct 17 07:54:46 2022 From: vladpaiu at opensips.org (Vlad Paiu) Date: Mon, 17 Oct 2022 10:54:46 +0300 Subject: [OpenSIPS-Users] Load a DB Table to hash with MI control In-Reply-To: <0d1901d8e1fb$3da7aef0$b8f70cd0$@microbase.gr> References: <0d1901d8e1fb$3da7aef0$b8f70cd0$@microbase.gr> Message-ID: <9ea9218d-38e6-e839-fac6-6d422f680ed6@opensips.org> Hello, Check out the sql_cacher [1] module. [1] https://opensips.org/html/docs/modules/2.4.x/sql_cacher.html Regards, Vlad On 17.10.2022 10:36, Antonis Psaras wrote: > > Dear all > > I am looking to implement a functionality similar to htable module > were I will have a db table with some key values which will be loaded > during service start and will expire every x sec or forced to be > reloaded by MI. Using OpenSIPs 2.4 > > Any suggestion? > > Best regards > > *Antonis Psaras* > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From apsaras at microbase.gr Mon Oct 17 08:01:37 2022 From: apsaras at microbase.gr (Antonis Psaras) Date: Mon, 17 Oct 2022 11:01:37 +0300 Subject: [OpenSIPS-Users] Load a DB Table to hash with MI control In-Reply-To: <9ea9218d-38e6-e839-fac6-6d422f680ed6@opensips.org> References: <0d1901d8e1fb$3da7aef0$b8f70cd0$@microbase.gr> <9ea9218d-38e6-e839-fac6-6d422f680ed6@opensips.org> Message-ID: <0db401d8e1fe$aedf6b50$0c9e41f0$@microbase.gr> How did I missed that 😊 Thank you Vlad Antonis Psaras From: Vlad Paiu Sent: Δευτέρα, 17 Οκτωβρίου 2022 10:55 To: apsaras at microbase.gr; OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Load a DB Table to hash with MI control Hello, Check out the sql_cacher [1] module. [1] https://opensips.org/html/docs/modules/2.4.x/sql_cacher.html Regards, Vlad On 17.10.2022 10:36, Antonis Psaras wrote: Dear all I am looking to implement a functionality similar to htable module were I will have a db table with some key values which will be loaded during service start and will expire every x sec or forced to be reloaded by MI. Using OpenSIPs 2.4 Any suggestion? Best regards Antonis Psaras _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From kingsley at dns99.co.uk Mon Oct 17 12:18:56 2022 From: kingsley at dns99.co.uk (Kingsley Tart) Date: Mon, 17 Oct 2022 13:18:56 +0100 Subject: [OpenSIPS-Users] turn off syslog logging with OpenSIPS 3.2 ? Message-ID: <0a1abad1c42047a9f3383d77ca5c15ba6557da2b.camel@dns99.co.uk> Hi, is there a way in OpenSIPS 3.2 of logging to /var/log/opensips.log but not copy these logs into syslog? I have these log settings: log_level=3 xlog_level=1 log_stderror=no log_facility=LOG_LOCAL0 What I'm seeing is opensips logs in /var/log/opensips.log but every entry in there is duplicated in /var/log/syslog; I don't want them in there. Is there a way in OpenSIPS to configure this, or should I instead tell OpenSIPS to log using LOG_DAEMON and configure syslog to split opensips logs out itself? I've tried googling and looking at the OpenSIPS docs but can't find the answer. Cheers, Kingsley. From bogdan at opensips.org Mon Oct 17 12:42:52 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 17 Oct 2022 15:42:52 +0300 Subject: [OpenSIPS-Users] The next OpenSIPS Bootcamp online training Message-ID: 5th -16th December 2022, online, worldwide *OpenSIPS Bootcamp* Take advantage of the *OpenSIPS Bootcamp* and improve your OpenSIPS skills - an in-cloud training, a ten days, 4 hours per day (40 hours) intensive and practical training, covering installation, configuration and administration on OpenSIPS. All the knowledge transferred to the students will be strongly backed up by practice sessions where you will get hands-on experience in handling OpenSIPS. The training is structured to be offer 50% / 50% between the theoretical and practical sessions. Check Syllabus *Early Birds open* The Early Bird 10% discount is available for registrations before /*1st of November 2022*/, so do not miss the opportunity. The number of seats is limited, so be sure and book a seat now. Keep in mind that a 10% group discount is also available - grab your work mate and start learning more OpenSIPS together . Register Now *Certified training saves time and money* OpenSIPS mistakes are easily avoided if you get proper training! Companies that use OpenSIPS waste time and money when they don't have a trained engineer on staff. Searching on Google, waiting on IRC, even the latency in mailing list replies takes it's toll over time. Take this rare opportunity to train your employees with the project members themselves. Any questions? do not hesitate to contact us ! ------------------------------------------------------------------------ You received this email as part of your relationship with the OpenSIPS Project. If you do not want to receive any more news, please email to unsubscribe . -- Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From osas at voipembedded.com Mon Oct 17 16:08:38 2022 From: osas at voipembedded.com (Ovidiu Sas) Date: Mon, 17 Oct 2022 12:08:38 -0400 Subject: [OpenSIPS-Users] turn off syslog logging with OpenSIPS 3.2 ? In-Reply-To: <0a1abad1c42047a9f3383d77ca5c15ba6557da2b.camel@dns99.co.uk> References: <0a1abad1c42047a9f3383d77ca5c15ba6557da2b.camel@dns99.co.uk> Message-ID: Hello Kingsley, You need to disable logging from local0 into /var/log/syslog. Check you (r)syslog.conf file (whatever that is on you OS) and add "local0.none" for /var/log/syslog Example: *.*;auth,authpriv,\ local0,local1.none -/var/log/syslog Hope this helps, -ovidiu On Mon, Oct 17, 2022 at 8:19 AM Kingsley Tart wrote: > > Hi, > > is there a way in OpenSIPS 3.2 of logging to /var/log/opensips.log but > not copy these logs into syslog? > > I have these log settings: > > log_level=3 > xlog_level=1 > log_stderror=no > log_facility=LOG_LOCAL0 > > What I'm seeing is opensips logs in /var/log/opensips.log but every > entry in there is duplicated in /var/log/syslog; I don't want them in > there. > > Is there a way in OpenSIPS to configure this, or should I instead tell > OpenSIPS to log using LOG_DAEMON and configure syslog to split opensips > logs out itself? > > I've tried googling and looking at the OpenSIPS docs but can't find the > answer. > > Cheers, > Kingsley. > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- VoIP Embedded, Inc. http://www.voipembedded.com From kingsley at dns99.co.uk Mon Oct 17 16:20:45 2022 From: kingsley at dns99.co.uk (Kingsley Tart) Date: Mon, 17 Oct 2022 17:20:45 +0100 Subject: [OpenSIPS-Users] turn off syslog logging with OpenSIPS 3.2 ? In-Reply-To: References: <0a1abad1c42047a9f3383d77ca5c15ba6557da2b.camel@dns99.co.uk> Message-ID: Hi, Thanks. I presume from your answer that OpenSIPS will always talk to syslog regardless of what logging settings I configure within OpenSIPS. Did I read that right? If that's the case, I'm probably better off not telling OpenSIPS to log to a local file itself and split it out within syslog's config. I expect that would be more efficient than OpenSIPS writing the log to two places and then have one of those places (syslog) ignore what it's being given. There's stuff I need to learn about how to configure syslog but at least your answer has given me some pointers, thanks. Cheers, Kingsley. On Mon, 2022-10-17 at 12:08 -0400, Ovidiu Sas wrote: > Hello Kingsley, > > You need to disable logging from local0 into /var/log/syslog. > Check you (r)syslog.conf file (whatever that is on you OS) and add > "local0.none" for /var/log/syslog > > Example: > *.*;auth,authpriv,\ > local0,local1.none -/var/log/syslog > > Hope this helps, > -ovidiu > > On Mon, Oct 17, 2022 at 8:19 AM Kingsley Tart > wrote: > > > > Hi, > > > > is there a way in OpenSIPS 3.2 of logging to /var/log/opensips.log > > but > > not copy these logs into syslog? > > > > I have these log settings: > > > > log_level=3 > > xlog_level=1 > > log_stderror=no > > log_facility=LOG_LOCAL0 > > > > What I'm seeing is opensips logs in /var/log/opensips.log but every > > entry in there is duplicated in /var/log/syslog; I don't want them > > in > > there. > > > > Is there a way in OpenSIPS to configure this, or should I instead > > tell > > OpenSIPS to log using LOG_DAEMON and configure syslog to split > > opensips > > logs out itself? > > > > I've tried googling and looking at the OpenSIPS docs but can't find > > the > > answer. > > > > Cheers, > > Kingsley. > > > > > > _______________________________________________ > > Users mailing list > > Users at lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > From osas at voipembedded.com Mon Oct 17 16:39:26 2022 From: osas at voipembedded.com (Ovidiu Sas) Date: Mon, 17 Oct 2022 12:39:26 -0400 Subject: [OpenSIPS-Users] turn off syslog logging with OpenSIPS 3.2 ? In-Reply-To: References: <0a1abad1c42047a9f3383d77ca5c15ba6557da2b.camel@dns99.co.uk> Message-ID: Yes, OpenSIPS will log to syslog unless you are asking to redirect all logs to stderr. Just send all the logs to syslog and then filter them based on severity. The pattern is: If you use severity none, then that particular facility will be disabled. -ovidiu On Mon, Oct 17, 2022 at 12:21 PM Kingsley Tart wrote: > > Hi, > > Thanks. I presume from your answer that OpenSIPS will always talk to > syslog regardless of what logging settings I configure within OpenSIPS. > Did I read that right? > > If that's the case, I'm probably better off not telling OpenSIPS to log > to a local file itself and split it out within syslog's config. I > expect that would be more efficient than OpenSIPS writing the log to > two places and then have one of those places (syslog) ignore what it's > being given. > > There's stuff I need to learn about how to configure syslog but at > least your answer has given me some pointers, thanks. > > Cheers, > Kingsley. > > On Mon, 2022-10-17 at 12:08 -0400, Ovidiu Sas wrote: > > Hello Kingsley, > > > > You need to disable logging from local0 into /var/log/syslog. > > Check you (r)syslog.conf file (whatever that is on you OS) and add > > "local0.none" for /var/log/syslog > > > > Example: > > *.*;auth,authpriv,\ > > local0,local1.none -/var/log/syslog > > > > Hope this helps, > > -ovidiu > > > > On Mon, Oct 17, 2022 at 8:19 AM Kingsley Tart > > wrote: > > > > > > Hi, > > > > > > is there a way in OpenSIPS 3.2 of logging to /var/log/opensips.log > > > but > > > not copy these logs into syslog? > > > > > > I have these log settings: > > > > > > log_level=3 > > > xlog_level=1 > > > log_stderror=no > > > log_facility=LOG_LOCAL0 > > > > > > What I'm seeing is opensips logs in /var/log/opensips.log but every > > > entry in there is duplicated in /var/log/syslog; I don't want them > > > in > > > there. > > > > > > Is there a way in OpenSIPS to configure this, or should I instead > > > tell > > > OpenSIPS to log using LOG_DAEMON and configure syslog to split > > > opensips > > > logs out itself? > > > > > > I've tried googling and looking at the OpenSIPS docs but can't find > > > the > > > answer. > > > > > > Cheers, > > > Kingsley. > > > > > > > > > _______________________________________________ > > > Users mailing list > > > Users at lists.opensips.org > > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- VoIP Embedded, Inc. http://www.voipembedded.com From bogdan at opensips.org Tue Oct 18 11:42:22 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Tue, 18 Oct 2022 14:42:22 +0300 Subject: [OpenSIPS-Users] early dialog termination In-Reply-To: References: <0907245b-2b56-5a0c-cdaf-aca2d8853405@opensips.org> Message-ID: <6746fcc4-e376-0c98-9340-eebfb70c2a65@opensips.org> Hi, yes, call it before ending the REQUEST route. I'm 100% the transaction is not deleted before the end of the route. And try to use the unix sock flavor for the function, not the fifo one. DO NOT use the sleep, you will block your whole opensips. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/17/22 11:56 AM, Ryzhik Ivan wrote: > Hi, did you mean that i must call t_write_req once before > REQUEST_ROUTE is finished? In this case the transaction was removed. > "even if you do not have to actually write anything to outer world - > just fake it." - i must use fifo and i must read data from it, in else > we got: > ERROR:tm:write_to_fifo: nobody listening on [/tmp/moh.fifo] fifo for > reading! > ERROR:tm:t_write_req: write_to_fifo failed > And last question is may I use sleep(20) at the end of route to keep > transaction? or can i use modparam("tm", "wt_timer", 20)? > Regards, Ivan > > пн, 17 окт. 2022 г. в 09:38, Bogdan-Andrei Iancu >: > > Hi Ryzhik, > > Right, the transaction must be forced to stay until you are done > with a final reply. Unfortunately there is no clear way to do this > from script (this may be subject of further small improvements), > but you can try taking advantage of the `t_write_req` [1] for this > purpose, even if you do not have to actually write anything to > outer world - just fake it. > > > [1] > https://opensips.org/html/docs/modules/3.2.x/tm.html#func_t_write_req > > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 10/13/22 2:45 PM, Ryzhik Ivan wrote: >> Hi. >> One more question. >> Everything works fine except the transaction was deleted after 15 >> sec after the initial route was finished. >> on INVITE i last do t_reply_with_body(183, "Session progress", >> ...) and than exit; >> >> on end route log : >> >> 2022-10-13T10:58:01.994598+00:00  DBG:tm:_reply_light: reply sent >> out. buf=0x7f558a087d98: SIP/2.0 1..., shmem=0x7f5549797470: >> SIP/2.0 1 >> 2022-10-13T10:58:01.994676+00:00  DBG:tm:_reply_light: finished >> >> 2022-10-13T10:58:01.995835+00:00  DBG:tm:do_t_cleanup: >> transaction 0x7f5549793b18 already updated! Skipping update! >> 2022-10-13T10:58:01.996020+00:00  DBG:tm:cleanup_uac_timers: >> RETR/FR timers reset >> 2022-10-13T10:58:01.996202+00:00 *DBG:tm:insert_timer_unsafe: >> [2]: 0x7f5549793b98 (12)* >> 2022-10-13T10:58:01.996317+00:00 * DBG:tm:t_unref: UNREF_UNSAFE: >> [0x7f5549793b18] after is 0* >> 2022-10-13T10:58:01.996488+00:00  DBG:core:destroy_avp_list: >> destroying list (nil) >> 2022-10-13T10:58:01.996673+00:00  DBG:core:receive_msg: cleaning up >> >> 2022-10-13T10:58:07.651091+00:00* DBG:tm:timer_routine: timer >> routine:2,tl=0x7f5549793b98 next=(nil), timeout=12* >> 2022-10-13T10:58:07.651332+00:00  DBG:tm:wait_handler: removing >> 0x7f5549793b18 from table >> 2022-10-13T10:58:07.651425+00:00  DBG:tm:delete_ce*ll: delete >> transaction 0x7f5549793b18* >> 2022-10-13T10:58:07.651513+00:00  DBG:tm:wait_handler: done >> >> Can you tell me how I can i fix this? Transaction marked safe for >> deletion... >> Regards, Ivan >> >> ср, 12 окт. 2022 г. в 13:11, Bogdan-Andrei Iancu >> >: >> >> Perfect !!! >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Summit 27-30 Sept 2022, Athens >> https://www.opensips.org/events/Summit-2022Athens/ >> >> On 10/12/22 1:09 PM, Ryzhik Ivan wrote: >>> I found a solution. hex strings are reversed). >>> Thank you very much! >>> >>> ср, 12 окт. 2022 г. в 12:59, Ryzhik Ivan >>> >: >>> >>> and one more research: $T_id returns hex encoded >>> label.hashid >>> but my attempts failed: >>> got $T_id = 6545e285.3fe4 >>> Send: {"jsonrpc": "2.0", "method": "t_reply", "id": 1, >>> "params": {"code": "487", "reason": "Terminating", >>> "trans_id": "16356:1699078789", "to_tag": ""}} >>> Got: >>> b'{"jsonrpc":"2.0","error":{"code":404,"message":"Transaction >>> not found"},"id":1}' >>> >>> >>> ср, 12 окт. 2022 г. в 11:13, Ryzhik Ivan >>> >: >>> >>> Thank you, Bogdan. >>> I got stuck with tm documentation. >>>   1) MI t_reply command has named parameters, ok, no >>> problem. >>>   2) trans_id - transaction identifier (has the >>> hash_entry:label format)  - what is this? if i use >>> $T_id i got reply "Invalid trans_id". >>>   3) Where can I get to_tag from script level on >>> initial invite? >>>       ... >>>       t_reply_with_body(183, "Session progress", >>> $(var(body){re.subst,$var(re)}) ); >>>       avp_db_query("insert into moh (callid, >>> timeout, tid,totag) values ('$ci', $var(wait_time), >>> '$T_id', '??????')"); >>>       ... >>> >>> Regards, Ivan. >>> >>> вт, 11 окт. 2022 г. в 12:35, Bogdan-Andrei Iancu >>> >: >>> >>> Hi Ivan, >>> >>> you can use timer_route, but as there is no way >>> to send a reply for a particular transaction >>> from script level (only to the currently >>> processed request), you will have to trigger the >>> MI cmds from the timer route, which is a bit >>> hackish .... >>> >>> Regards, >>> >>> Bogdan-Andrei Iancu >>> >>> OpenSIPS Founder and Developer >>> https://www.opensips-solutions.com >>> OpenSIPS Summit 27-30 Sept 2022, Athens >>> https://www.opensips.org/events/Summit-2022Athens/ >>> >>> On 10/11/22 11:47 AM, Ryzhik Ivan wrote: >>>> Hi, Bogdan! >>>> What d' you think, can we use timer_route >>>> instead of an external script? >>>> Regards, Ivan. >>>> >>>> пн, 10 окт. 2022 г. в 17:04, Bogdan-Andrei >>>> Iancu >>> >: >>>> >>>> Hi Ryzhik, >>>> >>>> Without a t_relay() it makes not much sense >>>> to have an dialog structure at all - the >>>> dialog module in opensips is actually >>>> design for proxied calls, not for UAC calls. >>>> >>>> IMO, you should keep it a transaction >>>> level, by sending replies back only. When >>>> getting the INVITE, put its call-id into a >>>> DB table (to keep only the "active" >>>> session) together with a lifetime / >>>> expiration time. When getting a CANCEL, >>>> update the table (set lifetime to 0), to >>>> know it is terminated. And use an simple >>>> external script that keeps scanning the DB >>>> for (1) sending 487 Terminated via MI if >>>> the record has 0 lifetime or (2) send a 408 >>>> Timeout via MI if the lifetime exceeded. >>>> In a similar way you can handle the BYE - >>>> send back 200OK for the BYE and set 0 in >>>> lifetime, to send a 487 canceled back >>>> >>>> Regards, >>>> >>>> Bogdan-Andrei Iancu >>>> >>>> OpenSIPS Founder and Developer >>>> https://www.opensips-solutions.com >>>> OpenSIPS Summit 27-30 Sept 2022, Athens >>>> https://www.opensips.org/events/Summit-2022Athens/ >>>> >>>> On 10/10/22 4:33 PM, Ryzhik Ivan wrote: >>>>> Hello! >>>>> My opensips version is 3.1 with tm,dialog >>>>> and rtpengine modules. >>>>> On incoming INVITE i'm creating an early >>>>> dialog with 183 replies and i'm playing >>>>> audio to caller with rtpengine, no >>>>> t_relay() on this step, OS is acting as >>>>> UAS endpoint. >>>>> If the caller cancels the invite with a >>>>> CANCEL message - all works great. >>>>> But some users terminate dialog with BYE >>>>> message. >>>>> 1) on BYE with to-tag OS can't find dialog >>>>> with match_dialog(), because to-tag presents. >>>>> 2) if i use load_dialog_ctx($ci) -  it is >>>>> possible to handle BYE. >>>>> 3) in early dialog termination with BYE we >>>>> also need to send final response to the >>>>> INVITE transaction. >>>>> >>>>> Maybe I did something wrong, but I can't >>>>> handle the final response to INVITE in >>>>> this case. >>>>> >>>>> _______________________________________________ >>>>> Users mailing list >>>>> Users at lists.opensips.org >>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aviator.nitesh.d at gmail.com Tue Oct 18 13:02:50 2022 From: aviator.nitesh.d at gmail.com (Nitesh Divecha) Date: Tue, 18 Oct 2022 09:02:50 -0400 Subject: [OpenSIPS-Users] OpenSIPS Control Panel In-Reply-To: <321e1065-273b-7f65-1d8c-b68b0092957c@opensips.org> References: <475406d8-af11-034d-cfbc-430a38c77b63@opensips.org> <321e1065-273b-7f65-1d8c-b68b0092957c@opensips.org> Message-ID: Bogdan-Andrei, Got it working! Much appreciated... By any chance can you guide me to any kind of OpenSIPS documentation explaining the "Routing Logic"? How does the "branch_route" work and what does it mean? Is this like a C/Python function/method which returns the value? Any guidance will be greatly appreciated. Cheers, Nitesh On Mon, Oct 17, 2022 at 2:53 AM Bogdan-Andrei Iancu wrote: > Hi Nitesh, > > Do uac_replace_from( , "$avp(furi)"); > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 10/14/22 5:55 PM, Nitesh Divecha wrote: > > Bogdan-Andrei, > > So I gave it a try and got error: > > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] > 0. /usr/local/etc/opensips/opensips_residential_2022-10-11.cfg > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] > CRITICAL:core:yyerror: parse error in > /usr/local/etc/opensips/opensips_residential_2022-10-11.cfg:456:22-23: too > few param> > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] > xlog("new branch at change_from $ru to $avp(furi) > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: "); > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] > if ($avp(furi) != NULL) { > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] > uac_replace_from("$avp(furi)"); > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] > ^~ > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] > } > Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] } > > > Here is my code: > > ### uac_registrant module > loadmodule "uac.so" > modparam("uac","restore_mode", "auto") #auto > > > ####### Routing Logic ######## > # main request routing logic > route{ > if (dp_translate(10 ,$rU ,$rU) ) { > $avp(furi) = "sip:1xxxxxxxxxx at gothamcity.com"; > #strip(1); > > if (!do_routing(0)) { > send_reply(500,"No PSTN Route found"); > exit; > } > > t_on_branch("change_from"); > route(relay); > exit; > } > } > > branch_route[change_from] { > xlog("new branch at change_from $ru to $avp(furi)\n"); > if ($avp(furi) != NULL) { > uac_replace_from("$avp(furi)"); > } > } > > > NOTE: This is my first time playing with C-style code... Trying to learn > what branches do/return, etc... > > Rest of the code is default residential cfg. > > Cheers, > Nitesh > > > > > On Thu, Oct 13, 2022 at 10:19 AM Nitesh Divecha < > aviator.nitesh.d at gmail.com> wrote: > >> Bogdan-Andrei, >> >> Thanks for your feedback... >> >> Yes, the remote SIP server expects FROM HEADER (Calling Identity) in >> order to authenticate the caller to make outbound calls. >> >> Where in cfg do I implement uac_replace_from() ? Is it in Routing Logic >> or where modules are declared? >> >> Also what happens if multiple DID providers are implemented in future? >> How will it affect the cfg file? Can we just implement via Control Panel? >> >> Cheers, >> Nitesh >> >> >> >> >> >> On Mon, Oct 10, 2022 at 9:42 AM Bogdan-Andrei Iancu >> wrote: >> >>> Hi Nitesh, >>> >>> In SIP, registration is done for receiving calls, it does not impact >>> sending calls. So, define the remote server as GW in Dynamic Route and >>> simply route the calls to it. Note that maybe the remote server will >>> expect you to use the as FROM hdr (calling identity) the AOR (SIP address) >>> you are registering with, so maybe you should be an uac_replace_from() in >>> cfg when sending to the GW. >>> >>> Best regards, >>> >>> Bogdan-Andrei Iancu >>> >>> OpenSIPS Founder and Developer >>> https://www.opensips-solutions.com >>> OpenSIPS Summit 27-30 Sept 2022, Athens >>> https://www.opensips.org/events/Summit-2022Athens/ >>> >>> On 10/7/22 9:00 PM, Nitesh Divecha wrote: >>> >>> Hello All, >>> >>> Anyone using OpenSIPS CP 9.3.2? Need small help! >>> >>> I got OpenSIPS 3.3.1 running and I can make calls out to the gateway >>> (SIP trunk) without any problems. >>> >>> My provider issued me a DID with user/pass and I was able to configure >>> them under "UAC Registrant" and registered to a remote server. >>> >>> Question is - how can I route calls to "UAC Registrant"? From the >>> "Dynamic Routing" menu I can only route calls to Gateway. How can I route >>> calls to "UAC Registrant"? >>> >>> Any suggestions? >>> >>> Thank you in advance! >>> >>> Cheers, >>> Nitesh >>> >>> _______________________________________________ >>> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aviator.nitesh.d at gmail.com Tue Oct 18 15:23:15 2022 From: aviator.nitesh.d at gmail.com (Nitesh Divecha) Date: Tue, 18 Oct 2022 11:23:15 -0400 Subject: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info Message-ID: Hello All, This is my first OpenSIPS project so I'm a newbie! After going back and forth with "uac_replace_from()", I was successfully able to make a call from my ATA -> OpenSIPS -> Outbound Provider -> CellPhone. All worked fine with two-way audio except few issues: 1) Outbound Provider was able to see my ATA (Originator's IP/User-Agent/etc) in SIP INVITE (SDP) which kinda raised some eyebrows with Outbound provider. How can I block or strip all the Originator's contact info in SIP INVITE (SDP) and only send OpenSIPS info? Meaning I want to protect my Originators and don't want to show anything to the Outbound Provider. Outbound providers should only communicate to the OpenSIPS server. 2) When the call was up I failed to capture any media/RTP on the OpenSIPS server. I want to involve OpenSIPS in media/RTP between ATA and outbound providers. How can I force media/RTP to pass-thru OpenSIPS IP so I'm not exposing Originator's IP. Any insights will be highly appreciated. Cheers, Nitesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From hobe69 at hotmail.com Tue Oct 18 22:09:30 2022 From: hobe69 at hotmail.com (Bela H) Date: Tue, 18 Oct 2022 22:09:30 +0000 Subject: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info In-Reply-To: References: Message-ID: Hi Nitesh, 1. Check the topology hiding function: https://opensips.org/docs/modules/3.2.x/topology_hiding.html 2. Use e.g. rtpproxy: https://opensips.org/docs/modules/3.2.x/rtpproxy.html#func_rtpproxy_offer http://opensips.com.br/wiki/index.php?title=Oopensips_Nat_script_with_RTPPROXY_-_English https://github.com/sippy/rtpproxy I hope these help! Cheers, Bela From: Nitesh Divecha Sent: Wednesday, 19 October 2022 04:26 To: OpenSIPS users mailling list Subject: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info Hello All, This is my first OpenSIPS project so I'm a newbie! After going back and forth with "uac_replace_from()", I was successfully able to make a call from my ATA -> OpenSIPS -> Outbound Provider -> CellPhone. All worked fine with two-way audio except few issues: 1) Outbound Provider was able to see my ATA (Originator's IP/User-Agent/etc) in SIP INVITE (SDP) which kinda raised some eyebrows with Outbound provider. How can I block or strip all the Originator's contact info in SIP INVITE (SDP) and only send OpenSIPS info? Meaning I want to protect my Originators and don't want to show anything to the Outbound Provider. Outbound providers should only communicate to the OpenSIPS server. 2) When the call was up I failed to capture any media/RTP on the OpenSIPS server. I want to involve OpenSIPS in media/RTP between ATA and outbound providers. How can I force media/RTP to pass-thru OpenSIPS IP so I'm not exposing Originator's IP. Any insights will be highly appreciated. Cheers, Nitesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From basit.engg at gmail.com Tue Oct 18 22:23:46 2022 From: basit.engg at gmail.com (Abdul Basit) Date: Wed, 19 Oct 2022 03:23:46 +0500 Subject: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info In-Reply-To: References: Message-ID: Nitesh, You need a B2BUA function with the help of a topo-hiding module with opensips as Bela shared in his email. Also, install the RTP proxy on the same opensips box (not necessary if you need separate signaling and media boxes). Far end party will not be able to see the A-party information. https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2 I hope this will help. -- regards, abdul basit On Wed, 19 Oct 2022 at 03:14, Bela H wrote: > Hi Nitesh, > > > > 1. Check the topology hiding function: > https://opensips.org/docs/modules/3.2.x/topology_hiding.html > 2. Use e.g. rtpproxy: > > https://opensips.org/docs/modules/3.2.x/rtpproxy.html#func_rtpproxy_offer > > > http://opensips.com.br/wiki/index.php?title=Oopensips_Nat_script_with_RTPPROXY_-_English > > https://github.com/sippy/rtpproxy > > > > I hope these help! > > > > Cheers, > > Bela > > > > *From: *Nitesh Divecha > *Sent: *Wednesday, 19 October 2022 04:26 > *To: *OpenSIPS users mailling list > *Subject: *[OpenSIPS-Users] - INVITE (SDP) includes Originators IP info > > > > Hello All, > > > > This is my first OpenSIPS project so I'm a newbie! > > > > After going back and forth with "uac_replace_from()", I was successfully > able to make a call from my ATA -> OpenSIPS -> Outbound Provider -> > CellPhone. All worked fine with two-way audio except few issues: > > > > 1) Outbound Provider was able to see my ATA (Originator's > IP/User-Agent/etc) in SIP INVITE (SDP) which kinda raised some eyebrows > with Outbound provider. How can I block or strip all the Originator's > contact info in SIP INVITE (SDP) and only send OpenSIPS info? Meaning I > want to protect my Originators and don't want to show anything to the > Outbound Provider. Outbound providers should only communicate to the > OpenSIPS server. > > > > 2) When the call was up I failed to capture any media/RTP on the OpenSIPS > server. I want to involve OpenSIPS in media/RTP between ATA and outbound > providers. How can I force media/RTP to pass-thru OpenSIPS IP so I'm not > exposing Originator's IP. > > > > Any insights will be highly appreciated. > > > > Cheers, > > Nitesh > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Wed Oct 19 06:20:18 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Wed, 19 Oct 2022 09:20:18 +0300 Subject: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info In-Reply-To: References: Message-ID: <0bf8224b-18b3-e30c-9767-7dd5e8a4ea9b@opensips.org> Hi there, Actually you do not need the B2B, you can achieve the same kind of privacy (at SIP level) with dialog module and topology_hiding module together. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/19/22 1:23 AM, Abdul Basit wrote: > Nitesh, > > You need a B2BUA function >  with > the help of a topo-hiding module with opensips as Bela shared in his > email. > Also, install the RTP proxy on the same opensips box (not necessary if > you need separate signaling and media boxes). > > Far end party will not be able to see the A-party information. > https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2 > > > I hope this will help. > > -- > regards, > > abdul basit > > On Wed, 19 Oct 2022 at 03:14, Bela H > wrote: > > Hi Nitesh, > > 1. Check the topology hiding function: > https://opensips.org/docs/modules/3.2.x/topology_hiding.html > > 2. Use e.g. rtpproxy: > > https://opensips.org/docs/modules/3.2.x/rtpproxy.html#func_rtpproxy_offer > > > http://opensips.com.br/wiki/index.php?title=Oopensips_Nat_script_with_RTPPROXY_-_English > > > https://github.com/sippy/rtpproxy > > I hope these help! > > Cheers, > > Bela > > *From: *Nitesh Divecha > *Sent: *Wednesday, 19 October 2022 04:26 > *To: *OpenSIPS users mailling list > *Subject: *[OpenSIPS-Users] - INVITE (SDP) includes Originators IP > info > > Hello All, > > This is my first OpenSIPS project so I'm a newbie! > > After going back and forth with "uac_replace_from()", I was > successfully able to make a call from my ATA -> OpenSIPS -> > Outbound Provider -> CellPhone. All worked fine with two-way audio > except few issues: > > 1) Outbound Provider was able to see my ATA (Originator's > IP/User-Agent/etc) in SIP INVITE (SDP) which kinda raised some > eyebrows with Outbound provider. How can I block or strip all the > Originator's contact info in SIP INVITE (SDP) and only send > OpenSIPS info? Meaning I want to protect my Originators and don't > want to show anything to the Outbound Provider. Outbound providers > should only communicate to the OpenSIPS server. > > 2) When the call was up I failed to capture any media/RTP on the > OpenSIPS server. I want to involve OpenSIPS in media/RTP between > ATA and outbound providers. How can I force media/RTP to pass-thru > OpenSIPS IP so I'm not exposing Originator's IP. > > Any insights will be highly appreciated. > > Cheers, > > Nitesh > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Wed Oct 19 06:21:29 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Wed, 19 Oct 2022 09:21:29 +0300 Subject: [OpenSIPS-Users] OpenSIPS Control Panel In-Reply-To: References: <475406d8-af11-034d-cfbc-430a38c77b63@opensips.org> <321e1065-273b-7f65-1d8c-b68b0092957c@opensips.org> Message-ID: <6b41a3e4-0136-843f-d494-51c2cc0d8297@opensips.org> Hi Nitesh, Take a look at https://www.opensips.org/Documentation/Script-Routes-3-2 Best regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/18/22 4:02 PM, Nitesh Divecha wrote: > Bogdan-Andrei, > > Got it working! Much appreciated... > > By any chance can you guide me to any kind of OpenSIPS documentation > explaining the "Routing Logic"? How does the "branch_route" work and > what does it mean? Is this like a C/Python function/method which > returns the value? > > Any guidance will be greatly appreciated. > > Cheers, > Nitesh > > > > On Mon, Oct 17, 2022 at 2:53 AM Bogdan-Andrei Iancu > > wrote: > > Hi Nitesh, > > Do uac_replace_from( , "$avp(furi)"); > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Summit 27-30 Sept 2022, Athens > https://www.opensips.org/events/Summit-2022Athens/ > > On 10/14/22 5:55 PM, Nitesh Divecha wrote: >> Bogdan-Andrei, >> >> So I gave it a try and got error: >> >> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 >> [61003]  0. >> /usr/local/etc/opensips/opensips_residential_2022-10-11.cfg >> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 >> [61003] CRITICAL:core:yyerror: parse error in >> /usr/local/etc/opensips/opensips_residential_2022-10-11.cfg:456:22-23: >> too few param> >> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 >> [61003]         xlog("new branch at change_from $ru to $avp(furi) >> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: "); >> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 >> [61003]         if ($avp(furi) != NULL) { >> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 >> [61003] uac_replace_from("$avp(furi)"); >> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 >> [61003]                 ^~ >> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 >> [61003]         } >> Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 >> [61003] } >> >> >> Here is my code: >> >> ### uac_registrant module >> loadmodule "uac.so" >> modparam("uac","restore_mode", "auto")  #auto >> >> >> ####### Routing Logic ######## >> # main request routing logic >> route{ >> if (dp_translate(10 ,$rU ,$rU) ) { >>                 $avp(furi) = "sip:1xxxxxxxxxx at gothamcity.com >> "; >>                 #strip(1); >> >>                 if (!do_routing(0)) { >>                         send_reply(500,"No PSTN Route found"); >>                         exit; >>                 } >> >>                 t_on_branch("change_from"); >>                 route(relay); >>                 exit; >>         } >> } >> >> branch_route[change_from] { >>         xlog("new branch at change_from $ru to $avp(furi)\n"); >>         if ($avp(furi) != NULL) { >>                 uac_replace_from("$avp(furi)"); >>         } >> } >> >> >> NOTE: This is my first time playing with C-style code... Trying >> to learn what branches do/return, etc... >> >> Rest of the code is default residential cfg. >> >> Cheers, >> Nitesh >> >> >> >> >> On Thu, Oct 13, 2022 at 10:19 AM Nitesh Divecha >> > >> wrote: >> >> Bogdan-Andrei, >> >> Thanks for your feedback... >> >> Yes, the remote SIP server expects FROM HEADER (Calling >> Identity) in order to authenticate the caller to >> make outbound calls. >> >> Where in cfg do I implement uac_replace_from() ? Is it in >> Routing Logic or where modules are declared? >> >> Also what happens if multiple DID providers are implemented >> in future? How will it affect the cfg file? Can we just >> implement via Control Panel? >> >> Cheers, >> Nitesh >> >> >> >> >> >> On Mon, Oct 10, 2022 at 9:42 AM Bogdan-Andrei Iancu >> > wrote: >> >> Hi Nitesh, >> >> In SIP, registration is done for receiving calls, it does >> not impact sending calls. So, define the remote server as >> GW in Dynamic Route and simply route the calls to it.  >> Note that maybe the remote server will expect you to use >> the as FROM hdr (calling identity) the AOR (SIP address) >> you are registering with, so maybe you should be an >> uac_replace_from() in cfg when sending to the GW. >> >> Best regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Summit 27-30 Sept 2022, Athens >> https://www.opensips.org/events/Summit-2022Athens/ >> >> On 10/7/22 9:00 PM, Nitesh Divecha wrote: >>> Hello All, >>> >>> Anyone using OpenSIPS CP 9.3.2? Need small help! >>> >>> I got OpenSIPS 3.3.1 running and I can make calls out to >>> the gateway (SIP trunk) without any problems. >>> >>> My provider issued me a DID with user/pass and I was >>> able to configure them under "UAC Registrant" and >>> registered to a remote server. >>> >>> Question is - how can I route calls to "UAC Registrant"? >>> From the "Dynamic Routing" menu I can only route calls >>> to Gateway. How can I route calls to "UAC Registrant"? >>> >>> Any suggestions? >>> >>> Thank you in advance! >>> >>> Cheers, >>> Nitesh >>> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ideanethelp at gmail.com Wed Oct 19 06:32:52 2022 From: ideanethelp at gmail.com (ideanet help) Date: Wed, 19 Oct 2022 19:32:52 +1300 Subject: [OpenSIPS-Users] SIP user statuses to websocket Message-ID: Hi all, I am looking for a way to use WebSocket with opensips. Basically, I want to show my all sip users statuses/activity on a web page. I am currently using an API, which is called after a few seconds so this is a bit slow. I am looking for a way that opensips sends event to the socket and on the other hand, my webpage will be connected to a WebSocket server. This way I can show all the events instantly. For example, If a user receives a call I will have it on the web page straight away. if a user gets unregistered i will see on my page that users sent Expiry 0 something like that. Will it be possible with the proto_wss module. any pointers will help. I saw what proto_wss can do but I did not understand it properly. it will send traces to a server i don't need. I just need it if a user is busy or idle. or he gets unregistered that's all. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryzhik.ivan at gmail.com Wed Oct 19 07:21:57 2022 From: ryzhik.ivan at gmail.com (Ryzhik Ivan) Date: Wed, 19 Oct 2022 10:21:57 +0300 Subject: [OpenSIPS-Users] early dialog termination In-Reply-To: <6746fcc4-e376-0c98-9340-eebfb70c2a65@opensips.org> References: <0907245b-2b56-5a0c-cdaf-aca2d8853405@opensips.org> <6746fcc4-e376-0c98-9340-eebfb70c2a65@opensips.org> Message-ID: Sorry, I mean no sleep, i mean async( sleep($var(wait_time)), after_sleep ); Regards, Ivan. вт, 18 окт. 2022 г. в 14:42, Bogdan-Andrei Iancu : > Hi, > > yes, call it before ending the REQUEST route. I'm 100% the transaction is > not deleted before the end of the route. And try to use the unix sock > flavor for the function, not the fifo one. > > DO NOT use the sleep, you will block your whole opensips. > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 5-16 Dec 2022, online > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/17/22 11:56 AM, Ryzhik Ivan wrote: > > Hi, did you mean that i must call t_write_req once before REQUEST_ROUTE > is finished? In this case the transaction was removed. > "even if you do not have to actually write anything to outer world - just > fake it." - i must use fifo and i must read data from it, in else we got: > ERROR:tm:write_to_fifo: nobody listening on [/tmp/moh.fifo] fifo for > reading! > ERROR:tm:t_write_req: write_to_fifo failed > And last question is may I use sleep(20) at the end of route to keep > transaction? or can i use modparam("tm", "wt_timer", 20)? > Regards, Ivan > > пн, 17 окт. 2022 г. в 09:38, Bogdan-Andrei Iancu : > >> Hi Ryzhik, >> >> Right, the transaction must be forced to stay until you are done with a >> final reply. Unfortunately there is no clear way to do this from script >> (this may be subject of further small improvements), but you can try taking >> advantage of the `t_write_req` [1] for this purpose, even if you do not >> have to actually write anything to outer world - just fake it. >> >> >> [1] https://opensips.org/html/docs/modules/3.2.x/tm.html#func_t_write_req >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Summit 27-30 Sept 2022, Athens >> https://www.opensips.org/events/Summit-2022Athens/ >> >> On 10/13/22 2:45 PM, Ryzhik Ivan wrote: >> >> Hi. >> One more question. >> Everything works fine except the transaction was deleted after 15 >> sec after the initial route was finished. >> on INVITE i last do t_reply_with_body(183, "Session progress", ...) and >> than exit; >> >> on end route log : >> >> 2022-10-13T10:58:01.994598+00:00 DBG:tm:_reply_light: reply sent out. >> buf=0x7f558a087d98: SIP/2.0 1..., shmem=0x7f5549797470: SIP/2.0 1 >> 2022-10-13T10:58:01.994676+00:00 DBG:tm:_reply_light: finished >> >> 2022-10-13T10:58:01.995835+00:00 DBG:tm:do_t_cleanup: transaction >> 0x7f5549793b18 already updated! Skipping update! >> 2022-10-13T10:58:01.996020+00:00 DBG:tm:cleanup_uac_timers: RETR/FR >> timers reset >> 2022-10-13T10:58:01.996202+00:00 *DBG:tm:insert_timer_unsafe: [2]: >> 0x7f5549793b98 (12)* >> 2022-10-13T10:58:01.996317+00:00 * DBG:tm:t_unref: UNREF_UNSAFE: >> [0x7f5549793b18] after is 0* >> 2022-10-13T10:58:01.996488+00:00 DBG:core:destroy_avp_list: destroying >> list (nil) >> 2022-10-13T10:58:01.996673+00:00 DBG:core:receive_msg: cleaning up >> >> 2022-10-13T10:58:07.651091+00:00* DBG:tm:timer_routine: timer >> routine:2,tl=0x7f5549793b98 next=(nil), timeout=12* >> 2022-10-13T10:58:07.651332+00:00 DBG:tm:wait_handler: removing >> 0x7f5549793b18 from table >> 2022-10-13T10:58:07.651425+00:00 DBG:tm:delete_ce*ll: delete >> transaction 0x7f5549793b18* >> 2022-10-13T10:58:07.651513+00:00 DBG:tm:wait_handler: done >> >> Can you tell me how I can i fix this? Transaction marked safe for >> deletion... >> Regards, Ivan >> >> ср, 12 окт. 2022 г. в 13:11, Bogdan-Andrei Iancu : >> >>> Perfect !!! >>> >>> Bogdan-Andrei Iancu >>> >>> OpenSIPS Founder and Developer >>> https://www.opensips-solutions.com >>> OpenSIPS Summit 27-30 Sept 2022, Athens >>> https://www.opensips.org/events/Summit-2022Athens/ >>> >>> On 10/12/22 1:09 PM, Ryzhik Ivan wrote: >>> >>> I found a solution. hex strings are reversed). >>> Thank you very much! >>> >>> ср, 12 окт. 2022 г. в 12:59, Ryzhik Ivan : >>> >>>> and one more research: $T_id returns hex encoded label.hashid >>>> but my attempts failed: >>>> got $T_id = 6545e285.3fe4 >>>> Send: {"jsonrpc": "2.0", "method": "t_reply", "id": 1, "params": >>>> {"code": "487", "reason": "Terminating", "trans_id": "16356:1699078789", >>>> "to_tag": ""}} >>>> Got: b'{"jsonrpc":"2.0","error":{"code":404,"message":"Transaction not >>>> found"},"id":1}' >>>> >>>> >>>> ср, 12 окт. 2022 г. в 11:13, Ryzhik Ivan : >>>> >>>>> Thank you, Bogdan. >>>>> I got stuck with tm documentation. >>>>> 1) MI t_reply command has named parameters, ok, no problem. >>>>> 2) trans_id - transaction identifier (has the hash_entry:label >>>>> format) - what is this? if i use $T_id i got reply "Invalid trans_id". >>>>> 3) Where can I get to_tag from script level on initial invite? >>>>> ... >>>>> t_reply_with_body(183, "Session progress", >>>>> $(var(body){re.subst,$var(re)}) ); >>>>> avp_db_query("insert into moh (callid, timeout, tid,totag) >>>>> values ('$ci', $var(wait_time), '$T_id', '??????')"); >>>>> ... >>>>> >>>>> Regards, Ivan. >>>>> >>>>> вт, 11 окт. 2022 г. в 12:35, Bogdan-Andrei Iancu >>>> >: >>>>> >>>>>> Hi Ivan, >>>>>> >>>>>> you can use timer_route, but as there is no way to send a reply for a >>>>>> particular transaction from script level (only to the currently processed >>>>>> request), you will have to trigger the MI cmds from the timer route, which >>>>>> is a bit hackish .... >>>>>> >>>>>> Regards, >>>>>> >>>>>> Bogdan-Andrei Iancu >>>>>> >>>>>> OpenSIPS Founder and Developer >>>>>> https://www.opensips-solutions.com >>>>>> OpenSIPS Summit 27-30 Sept 2022, Athens >>>>>> https://www.opensips.org/events/Summit-2022Athens/ >>>>>> >>>>>> On 10/11/22 11:47 AM, Ryzhik Ivan wrote: >>>>>> >>>>>> Hi, Bogdan! >>>>>> What d' you think, can we use timer_route instead of an external >>>>>> script? >>>>>> Regards, Ivan. >>>>>> >>>>>> пн, 10 окт. 2022 г. в 17:04, Bogdan-Andrei Iancu >>>>> >: >>>>>> >>>>>>> Hi Ryzhik, >>>>>>> >>>>>>> Without a t_relay() it makes not much sense to have an dialog >>>>>>> structure at all - the dialog module in opensips is actually design for >>>>>>> proxied calls, not for UAC calls. >>>>>>> >>>>>>> IMO, you should keep it a transaction level, by sending replies back >>>>>>> only. When getting the INVITE, put its call-id into a DB table (to keep >>>>>>> only the "active" session) together with a lifetime / expiration time. When >>>>>>> getting a CANCEL, update the table (set lifetime to 0), to know it is >>>>>>> terminated. And use an simple external script that keeps scanning the DB >>>>>>> for (1) sending 487 Terminated via MI if the record has 0 lifetime or (2) >>>>>>> send a 408 Timeout via MI if the lifetime exceeded. >>>>>>> In a similar way you can handle the BYE - send back 200OK for the >>>>>>> BYE and set 0 in lifetime, to send a 487 canceled back >>>>>>> >>>>>>> Regards, >>>>>>> >>>>>>> Bogdan-Andrei Iancu >>>>>>> >>>>>>> OpenSIPS Founder and Developer >>>>>>> https://www.opensips-solutions.com >>>>>>> OpenSIPS Summit 27-30 Sept 2022, Athens >>>>>>> https://www.opensips.org/events/Summit-2022Athens/ >>>>>>> >>>>>>> On 10/10/22 4:33 PM, Ryzhik Ivan wrote: >>>>>>> >>>>>>> Hello! >>>>>>> My opensips version is 3.1 with tm,dialog and rtpengine modules. >>>>>>> On incoming INVITE i'm creating an early dialog with 183 replies and >>>>>>> i'm playing audio to caller with rtpengine, no t_relay() on this step, OS >>>>>>> is acting as UAS endpoint. >>>>>>> If the caller cancels the invite with a CANCEL message - all works >>>>>>> great. >>>>>>> But some users terminate dialog with BYE message. >>>>>>> 1) on BYE with to-tag OS can't find dialog with match_dialog(), >>>>>>> because to-tag presents. >>>>>>> 2) if i use load_dialog_ctx($ci) - it is possible to handle BYE. >>>>>>> 3) in early dialog termination with BYE we also need to send final >>>>>>> response to the INVITE transaction. >>>>>>> >>>>>>> Maybe I did something wrong, but I can't handle the final response >>>>>>> to INVITE in this case. >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users >>>>>>> >>>>>>> >>>>>>> >>>>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thp.opensips at p5r.uk Wed Oct 19 09:59:35 2022 From: thp.opensips at p5r.uk (Thomas Pircher) Date: Wed, 19 Oct 2022 10:59:35 +0100 Subject: [OpenSIPS-Users] Problem proxying a SIP connection with t_relay In-Reply-To: <807184f7-d918-b3ac-4f62-42b2de6ee7eb@opensips.org> References: <000601d8de57$d0e047b0$72a0d710$@smartvox.co.uk> <807184f7-d918-b3ac-4f62-42b2de6ee7eb@opensips.org> Message-ID: Răzvan Crainea wrote: >The default uas scenario of sipp does not properly treat Record-Route. >If you are using it, you should drop it and write your own scenario >that does handle RR, just as Ben suggested. Thanks everyone for helping on this thread! I have replaced the SIPp UAS with FreeSWITCH () and that works now well; no config change in OpenSIPS necessary. And it gives me a bit more flexibility for future extensions. Thomas From liviu at opensips.org Wed Oct 19 12:53:10 2022 From: liviu at opensips.org (Liviu Chircu) Date: Wed, 19 Oct 2022 07:53:10 -0500 Subject: [OpenSIPS-Users] [OpenSIPS-Devel] [Release] OpenSIPS 3.3.2, 3.2.9 and 3.1.12 minor releases In-Reply-To: References: Message-ID: <98b7c588-0f4e-16ea-9b72-32f7ed547795@opensips.org> Hi, all! The OpenSIPS 3.3.2, 3.2.9 and 3.1.12 minor releases have just been tagged, packing essential fixes done in the past two months. Detailed changelogs are available on the website^[1][2][3] . Packaging to be available starting tomorrow as part of the daily builds. [1]: https://opensips.org/pub/opensips/3.1.12/ChangeLog [2]: https://opensips.org/pub/opensips/3.2.9/ChangeLog [3]: https://opensips.org/pub/opensips/3.3.2/ChangeLog Happy Hacking! -- Liviu Chircu OpenSIPS Developer http://www.opensips-solutions.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From aviator.nitesh.d at gmail.com Wed Oct 19 14:17:05 2022 From: aviator.nitesh.d at gmail.com (Nitesh Divecha) Date: Wed, 19 Oct 2022 10:17:05 -0400 Subject: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info In-Reply-To: <0bf8224b-18b3-e30c-9767-7dd5e8a4ea9b@opensips.org> References: <0bf8224b-18b3-e30c-9767-7dd5e8a4ea9b@opensips.org> Message-ID: Hello, Thank y'all for the input... I will try to read the documentation and work on implementing these modules. By any chance do either of you have any working examples which I can refer to? I'm a work in progress and every time I change something I break OpenSIPS and it takes me hours to troubleshoot! :-) Thanking in advance... Cheers, Nitesh On Wed, Oct 19, 2022 at 2:20 AM Bogdan-Andrei Iancu wrote: > Hi there, > > Actually you do not need the B2B, you can achieve the same kind of privacy > (at SIP level) with dialog module and topology_hiding module together. > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 5-16 Dec 2022, online > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/19/22 1:23 AM, Abdul Basit wrote: > > Nitesh, > > You need a B2BUA function > with > the help of a topo-hiding module with opensips as Bela shared in his email. > Also, install the RTP proxy on the same opensips box (not necessary if you > need separate signaling and media boxes). > > Far end party will not be able to see the A-party information. > > https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2 > > I hope this will help. > > -- > regards, > > abdul basit > > On Wed, 19 Oct 2022 at 03:14, Bela H wrote: > >> Hi Nitesh, >> >> >> >> 1. Check the topology hiding function: >> https://opensips.org/docs/modules/3.2.x/topology_hiding.html >> 2. Use e.g. rtpproxy: >> >> https://opensips.org/docs/modules/3.2.x/rtpproxy.html#func_rtpproxy_offer >> >> >> http://opensips.com.br/wiki/index.php?title=Oopensips_Nat_script_with_RTPPROXY_-_English >> >> https://github.com/sippy/rtpproxy >> >> >> >> I hope these help! >> >> >> >> Cheers, >> >> Bela >> >> >> >> *From: *Nitesh Divecha >> *Sent: *Wednesday, 19 October 2022 04:26 >> *To: *OpenSIPS users mailling list >> *Subject: *[OpenSIPS-Users] - INVITE (SDP) includes Originators IP info >> >> >> >> Hello All, >> >> >> >> This is my first OpenSIPS project so I'm a newbie! >> >> >> >> After going back and forth with "uac_replace_from()", I was successfully >> able to make a call from my ATA -> OpenSIPS -> Outbound Provider -> >> CellPhone. All worked fine with two-way audio except few issues: >> >> >> >> 1) Outbound Provider was able to see my ATA (Originator's >> IP/User-Agent/etc) in SIP INVITE (SDP) which kinda raised some eyebrows >> with Outbound provider. How can I block or strip all the Originator's >> contact info in SIP INVITE (SDP) and only send OpenSIPS info? Meaning I >> want to protect my Originators and don't want to show anything to the >> Outbound Provider. Outbound providers should only communicate to the >> OpenSIPS server. >> >> >> >> 2) When the call was up I failed to capture any media/RTP on the OpenSIPS >> server. I want to involve OpenSIPS in media/RTP between ATA and outbound >> providers. How can I force media/RTP to pass-thru OpenSIPS IP so I'm not >> exposing Originator's IP. >> >> >> >> Any insights will be highly appreciated. >> >> >> >> Cheers, >> >> Nitesh >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > > _______________________________________________ > Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alberto.rinaudo at gmail.com Wed Oct 19 15:20:21 2022 From: alberto.rinaudo at gmail.com (Alberto) Date: Wed, 19 Oct 2022 16:20:21 +0100 Subject: [OpenSIPS-Users] Dispatcher module and partition Message-ID: Hi, I'm using opensips 3.3.1 and I have a question about the dispatcher module. Can I set different ds_ping_from, ds_ping_method, ds_probing_mode, and ds_ping_interval per partition? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From aviator.nitesh.d at gmail.com Wed Oct 19 21:06:07 2022 From: aviator.nitesh.d at gmail.com (Nitesh Divecha) Date: Wed, 19 Oct 2022 17:06:07 -0400 Subject: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info In-Reply-To: References: <0bf8224b-18b3-e30c-9767-7dd5e8a4ea9b@opensips.org> Message-ID: Hello All, So I had some success using topology_hiding and rtpproxy but found few problems. After implementing topology_hiding(), SIP INVITE was much better but still showing following: INVITE sip:aaabbbcccc at outboundprovider.com:5060 SIP/2.0 Call-ID: 4ed41738da10faa5 at 172.16.16.250 *<<<-- showing originators Device LAN IP —>>>* Content-Length: 329 CSeq: 8002 INVITE From: ;tag=SP39b79130abfb7487f Max-Forwards: 69 To: Via: SIP/2.0/UDP 3.xxx.xxx.49:5060;branch=z9hG4bK1dcb.5bb78035.0 User-Agent: OBIHAI/OBi302-3.2.2.6259 *<<<-- showing originators User-Agent —>>>* Contact: Expires: 60 Supported: replaces Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PRACK,REFER,UPDATE Content-Type: application/sdp === 1) How can I remove IP from Call-ID and rewrite Originators User-Agent to local OpenSIPS User-Agent? === Now issue with rtpproxy - I'm running this OpenSIPS on AWS cloud... AWS cloud does natting by default, so my Public IP is 3.xxx.xxx.49 and actual VM IP is *172.31.29.47. * After implement rtpproxy (https://www.rtpproxy.org/), it is running on local IP: └─183589 /usr/local/bin/rtpproxy -s udp:172.31.29.47 22222 -u rtpproxy rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -l 172.31.29.47 -m 1000 -M 2000 -d INFO LOG_LOCAL5 As it shows from SIP INVITE and due to that no audio or RTP because IP is not reachable... v=0 o=- 16210664 1 IN IP4 *172.31.29.47 <<<-- OpenSIPS NAT IP —>>>* s=- c=IN IP4 *172.31.29.47 <<<-- OpenSIPS NAT IP —>>>* t=0 0 m=audio 1958 RTP/AVP 0 8 18 104 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:18 G729/8000 a=rtpmap:104 G726-32/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv a=ptime:20 a=xg726bitorder:big-endian a=nortpproxy:yes === 2. How can I configure rtpproxy with Public IP? Or do I start rtpproxy with Public IP 3.xxx.xxx.49 and reconfigure OpenSIPS with Public IP? modparam("rtpproxy", "rtpproxy_sock", "udp:172.31.29.47:22222") Thanking in advance... Cheers, Nitesh On Wed, Oct 19, 2022 at 10:17 AM Nitesh Divecha wrote: > Hello, > > Thank y'all for the input... I will try to read the documentation and work > on implementing these modules. > > By any chance do either of you have any working examples which I can refer > to? I'm a work in progress and every time I change something I break > OpenSIPS and it takes me hours to troubleshoot! :-) > > Thanking in advance... > > Cheers, > Nitesh > > > > On Wed, Oct 19, 2022 at 2:20 AM Bogdan-Andrei Iancu > wrote: > >> Hi there, >> >> Actually you do not need the B2B, you can achieve the same kind of >> privacy (at SIP level) with dialog module and topology_hiding module >> together. >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Bootcamp 5-16 Dec 2022, online >> https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ >> >> On 10/19/22 1:23 AM, Abdul Basit wrote: >> >> Nitesh, >> >> You need a B2BUA function >> with >> the help of a topo-hiding module with opensips as Bela shared in his email. >> Also, install the RTP proxy on the same opensips box (not necessary if >> you need separate signaling and media boxes). >> >> Far end party will not be able to see the A-party information. >> >> https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2 >> >> I hope this will help. >> >> -- >> regards, >> >> abdul basit >> >> On Wed, 19 Oct 2022 at 03:14, Bela H wrote: >> >>> Hi Nitesh, >>> >>> >>> >>> 1. Check the topology hiding function: >>> https://opensips.org/docs/modules/3.2.x/topology_hiding.html >>> 2. Use e.g. rtpproxy: >>> >>> https://opensips.org/docs/modules/3.2.x/rtpproxy.html#func_rtpproxy_offer >>> >>> >>> http://opensips.com.br/wiki/index.php?title=Oopensips_Nat_script_with_RTPPROXY_-_English >>> >>> https://github.com/sippy/rtpproxy >>> >>> >>> >>> I hope these help! >>> >>> >>> >>> Cheers, >>> >>> Bela >>> >>> >>> >>> *From: *Nitesh Divecha >>> *Sent: *Wednesday, 19 October 2022 04:26 >>> *To: *OpenSIPS users mailling list >>> *Subject: *[OpenSIPS-Users] - INVITE (SDP) includes Originators IP info >>> >>> >>> >>> Hello All, >>> >>> >>> >>> This is my first OpenSIPS project so I'm a newbie! >>> >>> >>> >>> After going back and forth with "uac_replace_from()", I was successfully >>> able to make a call from my ATA -> OpenSIPS -> Outbound Provider -> >>> CellPhone. All worked fine with two-way audio except few issues: >>> >>> >>> >>> 1) Outbound Provider was able to see my ATA (Originator's >>> IP/User-Agent/etc) in SIP INVITE (SDP) which kinda raised some eyebrows >>> with Outbound provider. How can I block or strip all the Originator's >>> contact info in SIP INVITE (SDP) and only send OpenSIPS info? Meaning I >>> want to protect my Originators and don't want to show anything to the >>> Outbound Provider. Outbound providers should only communicate to the >>> OpenSIPS server. >>> >>> >>> >>> 2) When the call was up I failed to capture any media/RTP on the >>> OpenSIPS server. I want to involve OpenSIPS in media/RTP between ATA and >>> outbound providers. How can I force media/RTP to pass-thru OpenSIPS IP so >>> I'm not exposing Originator's IP. >>> >>> >>> >>> Any insights will be highly appreciated. >>> >>> >>> >>> Cheers, >>> >>> Nitesh >>> >>> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >> >> _______________________________________________ >> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From hobe69 at hotmail.com Wed Oct 19 21:33:09 2022 From: hobe69 at hotmail.com (Bela H) Date: Wed, 19 Oct 2022 21:33:09 +0000 Subject: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info In-Reply-To: References: <0bf8224b-18b3-e30c-9767-7dd5e8a4ea9b@opensips.org> Message-ID: For the first problem check this: C - Encode the callid header Note: Changing the callid of the call using the "C" flag is only available when doing topology_hiding with dialog support. Using this flag without dialog support will not change the callid at all!. From: Nitesh Divecha Sent: Thursday, 20 October 2022 10:09 To: Bogdan-Andrei Iancu Cc: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info Hello All, So I had some success using topology_hiding and rtpproxy but found few problems. After implementing topology_hiding(), SIP INVITE was much better but still showing following: INVITE sip:aaabbbcccc at outboundprovider.com:5060 SIP/2.0 Call-ID: 4ed41738da10faa5 at 172.16.16.250 <<<-- showing originators Device LAN IP —>>> Content-Length: 329 CSeq: 8002 INVITE From: >;tag=SP39b79130abfb7487f Max-Forwards: 69 To: Via: SIP/2.0/UDP 3.xxx.xxx.49:5060;branch=z9hG4bK1dcb.5bb78035.0 User-Agent: OBIHAI/OBi302-3.2.2.6259 <<<-- showing originators User-Agent —>>> Contact: Expires: 60 Supported: replaces Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PRACK,REFER,UPDATE Content-Type: application/sdp === 1) How can I remove IP from Call-ID and rewrite Originators User-Agent to local OpenSIPS User-Agent? === Now issue with rtpproxy - I'm running this OpenSIPS on AWS cloud... AWS cloud does natting by default, so my Public IP is 3.xxx.xxx.49 and actual VM IP is 172.31.29.47. After implement rtpproxy (https://www.rtpproxy.org/), it is running on local IP: └─183589 /usr/local/bin/rtpproxy -s udp:172.31.29.47 22222 -u rtpproxy rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -l 172.31.29.47 -m 1000 -M 2000 -d INFO LOG_LOCAL5 As it shows from SIP INVITE and due to that no audio or RTP because IP is not reachable... v=0 o=- 16210664 1 IN IP4 172.31.29.47 <<<-- OpenSIPS NAT IP —>>> s=- c=IN IP4 172.31.29.47 <<<-- OpenSIPS NAT IP —>>> t=0 0 m=audio 1958 RTP/AVP 0 8 18 104 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:18 G729/8000 a=rtpmap:104 G726-32/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv a=ptime:20 a=xg726bitorder:big-endian a=nortpproxy:yes === 2. How can I configure rtpproxy with Public IP? Or do I start rtpproxy with Public IP 3.xxx.xxx.49 and reconfigure OpenSIPS with Public IP? modparam("rtpproxy", "rtpproxy_sock", "udp:172.31.29.47:22222") Thanking in advance... Cheers, Nitesh On Wed, Oct 19, 2022 at 10:17 AM Nitesh Divecha > wrote: Hello, Thank y'all for the input... I will try to read the documentation and work on implementing these modules. By any chance do either of you have any working examples which I can refer to? I'm a work in progress and every time I change something I break OpenSIPS and it takes me hours to troubleshoot! :-) Thanking in advance... Cheers, Nitesh On Wed, Oct 19, 2022 at 2:20 AM Bogdan-Andrei Iancu > wrote: Hi there, Actually you do not need the B2B, you can achieve the same kind of privacy (at SIP level) with dialog module and topology_hiding module together. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/19/22 1:23 AM, Abdul Basit wrote: Nitesh, You need a B2BUA function with the help of a topo-hiding module with opensips as Bela shared in his email. Also, install the RTP proxy on the same opensips box (not necessary if you need separate signaling and media boxes). Far end party will not be able to see the A-party information. https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2 I hope this will help. -- regards, abdul basit On Wed, 19 Oct 2022 at 03:14, Bela H > wrote: Hi Nitesh, 1. Check the topology hiding function: https://opensips.org/docs/modules/3.2.x/topology_hiding.html 2. Use e.g. rtpproxy: https://opensips.org/docs/modules/3.2.x/rtpproxy.html#func_rtpproxy_offer http://opensips.com.br/wiki/index.php?title=Oopensips_Nat_script_with_RTPPROXY_-_English https://github.com/sippy/rtpproxy I hope these help! Cheers, Bela From: Nitesh Divecha Sent: Wednesday, 19 October 2022 04:26 To: OpenSIPS users mailling list Subject: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info Hello All, This is my first OpenSIPS project so I'm a newbie! After going back and forth with "uac_replace_from()", I was successfully able to make a call from my ATA -> OpenSIPS -> Outbound Provider -> CellPhone. All worked fine with two-way audio except few issues: 1) Outbound Provider was able to see my ATA (Originator's IP/User-Agent/etc) in SIP INVITE (SDP) which kinda raised some eyebrows with Outbound provider. How can I block or strip all the Originator's contact info in SIP INVITE (SDP) and only send OpenSIPS info? Meaning I want to protect my Originators and don't want to show anything to the Outbound Provider. Outbound providers should only communicate to the OpenSIPS server. 2) When the call was up I failed to capture any media/RTP on the OpenSIPS server. I want to involve OpenSIPS in media/RTP between ATA and outbound providers. How can I force media/RTP to pass-thru OpenSIPS IP so I'm not exposing Originator's IP. Any insights will be highly appreciated. Cheers, Nitesh _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From aviator.nitesh.d at gmail.com Wed Oct 19 23:26:57 2022 From: aviator.nitesh.d at gmail.com (Nitesh Divecha) Date: Wed, 19 Oct 2022 19:26:57 -0400 Subject: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info In-Reply-To: References: <0bf8224b-18b3-e30c-9767-7dd5e8a4ea9b@opensips.org> Message-ID: Bela, Much appreciated! Changing topolgy_hiding("C"); fixed the Call-ID issue. Call-ID shows clean Call-ID: *DLGCH_W0xtTFgVXWleUV1fVgFvEiVSRVdabgccAltXbUFf* Now gotta figure out how to stop sending Originator User-Agent to outbound provider and how to configure rtpproxy behind NAT. Cheers, Nitesh On Wed, Oct 19, 2022 at 5:35 PM Bela H wrote: > > > For the first problem check this: > > *C* - Encode the callid header > > *Note:* Changing the callid of the call using the "C" flag is only > available when doing topology_hiding with *dialog support*. Using this > flag without dialog support will not change the callid at all!. > > > > *From: *Nitesh Divecha > *Sent: *Thursday, 20 October 2022 10:09 > *To: *Bogdan-Andrei Iancu > *Cc: *OpenSIPS users mailling list > *Subject: *Re: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP > info > > > > Hello All, > > > > So I had some success using topology_hiding and rtpproxy but found few > problems. > > > > After implementing topology_hiding(), SIP INVITE was much better but still > showing following: > > > > INVITE sip:aaabbbcccc at outboundprovider.com:5060 SIP/2.0 > > Call-ID: 4ed41738da10faa5 at 172.16.16.250 *<<<-- showing originators Device > LAN IP —>>>* > > Content-Length: 329 > CSeq: 8002 INVITE > From: ;tag=SP39b79130abfb7487f > Max-Forwards: 69 > To: > Via: SIP/2.0/UDP 3.xxx.xxx.49:5060;branch=z9hG4bK1dcb.5bb78035.0 > User-Agent: OBIHAI/OBi302-3.2.2.6259 *<<<-- showing originators > User-Agent —>>>* > Contact: > Expires: 60 > Supported: replaces > Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PRACK,REFER,UPDATE > Content-Type: application/sdp > > === > > 1) How can I remove IP from Call-ID and rewrite Originators User-Agent to > local OpenSIPS User-Agent? > > === > > > > > > Now issue with rtpproxy - I'm running this OpenSIPS on AWS cloud... AWS > cloud does natting by default, so my Public IP is 3.xxx.xxx.49 and actual > VM IP is *172.31.29.47. * > > > > After implement rtpproxy (https://www.rtpproxy.org/), it is running on > local IP: > > └─183589 /usr/local/bin/rtpproxy -s udp:172.31.29.47 22222 -u rtpproxy > rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -l 172.31.29.47 -m 1000 -M 2000 > -d INFO LOG_LOCAL5 > > As it shows from SIP INVITE and due to that no audio or RTP because IP is > not reachable... > > > > v=0 > o=- 16210664 1 IN IP4 *172.31.29.47 <<<-- OpenSIPS NAT IP —>>>* > s=- > c=IN IP4 *172.31.29.47 <<<-- OpenSIPS NAT IP —>>>* > t=0 0 > m=audio 1958 RTP/AVP 0 8 18 104 101 > a=rtpmap:0 PCMU/8000 > a=rtpmap:8 PCMA/8000 > a=rtpmap:18 G729/8000 > a=rtpmap:104 G726-32/8000 > a=rtpmap:101 telephone-event/8000 > a=fmtp:101 0-15 > a=sendrecv > a=ptime:20 > a=xg726bitorder:big-endian > a=nortpproxy:yes > > > > === > > 2. How can I configure rtpproxy with Public IP? Or do I start rtpproxy > with Public IP 3.xxx.xxx.49 and reconfigure OpenSIPS with Public IP? > > modparam("rtpproxy", "rtpproxy_sock", "udp:172.31.29.47:22222") > > > > Thanking in advance... > > > > Cheers, > > Nitesh > > > > > > > > > > > > On Wed, Oct 19, 2022 at 10:17 AM Nitesh Divecha < > aviator.nitesh.d at gmail.com> wrote: > > Hello, > > > > Thank y'all for the input... I will try to read the documentation and work > on implementing these modules. > > > > By any chance do either of you have any working examples which I can refer > to? I'm a work in progress and every time I change something I break > OpenSIPS and it takes me hours to troubleshoot! :-) > > > > Thanking in advance... > > > > Cheers, > > Nitesh > > > > > > > > On Wed, Oct 19, 2022 at 2:20 AM Bogdan-Andrei Iancu > wrote: > > Hi there, > > Actually you do not need the B2B, you can achieve the same kind of privacy > (at SIP level) with dialog module and topology_hiding module together. > > Regards, > > Bogdan-Andrei Iancu > > > > OpenSIPS Founder and Developer > > https://www.opensips-solutions.com > > OpenSIPS Bootcamp 5-16 Dec 2022, online > > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/19/22 1:23 AM, Abdul Basit wrote: > > Nitesh, > > > > You need a B2BUA function > with > the help of a topo-hiding module with opensips as Bela shared in his email. > > Also, install the RTP proxy on the same opensips box (not necessary if you > need separate signaling and media boxes). > > > > Far end party will not be able to see the A-party information. > > > > https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2 > > > > I hope this will help. > > > -- > regards, > > > abdul basit > > > > On Wed, 19 Oct 2022 at 03:14, Bela H wrote: > > Hi Nitesh, > > > > 1. Check the topology hiding function: > https://opensips.org/docs/modules/3.2.x/topology_hiding.html > 2. Use e.g. rtpproxy: > > https://opensips.org/docs/modules/3.2.x/rtpproxy.html#func_rtpproxy_offer > > > http://opensips.com.br/wiki/index.php?title=Oopensips_Nat_script_with_RTPPROXY_-_English > > https://github.com/sippy/rtpproxy > > > > I hope these help! > > > > Cheers, > > Bela > > > > *From: *Nitesh Divecha > *Sent: *Wednesday, 19 October 2022 04:26 > *To: *OpenSIPS users mailling list > *Subject: *[OpenSIPS-Users] - INVITE (SDP) includes Originators IP info > > > > Hello All, > > > > This is my first OpenSIPS project so I'm a newbie! > > > > After going back and forth with "uac_replace_from()", I was successfully > able to make a call from my ATA -> OpenSIPS -> Outbound Provider -> > CellPhone. All worked fine with two-way audio except few issues: > > > > 1) Outbound Provider was able to see my ATA (Originator's > IP/User-Agent/etc) in SIP INVITE (SDP) which kinda raised some eyebrows > with Outbound provider. How can I block or strip all the Originator's > contact info in SIP INVITE (SDP) and only send OpenSIPS info? Meaning I > want to protect my Originators and don't want to show anything to the > Outbound Provider. Outbound providers should only communicate to the > OpenSIPS server. > > > > 2) When the call was up I failed to capture any media/RTP on the OpenSIPS > server. I want to involve OpenSIPS in media/RTP between ATA and outbound > providers. How can I force media/RTP to pass-thru OpenSIPS IP so I'm not > exposing Originator's IP. > > > > Any insights will be highly appreciated. > > > > Cheers, > > Nitesh > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > _______________________________________________ > > Users mailing list > > Users at lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hobe69 at hotmail.com Thu Oct 20 00:00:08 2022 From: hobe69 at hotmail.com (Bela H) Date: Thu, 20 Oct 2022 00:00:08 +0000 Subject: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info In-Reply-To: References: <0bf8224b-18b3-e30c-9767-7dd5e8a4ea9b@opensips.org> Message-ID: I hope this helps: https://opensips.org/docs/modules/3.2.x/sipmsgops.html#func_remove_hf From: Nitesh Divecha Sent: Thursday, 20 October 2022 12:29 To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info Bela, Much appreciated! Changing topolgy_hiding("C"); fixed the Call-ID issue. Call-ID shows clean Call-ID: DLGCH_W0xtTFgVXWleUV1fVgFvEiVSRVdabgccAltXbUFf Now gotta figure out how to stop sending Originator User-Agent to outbound provider and how to configure rtpproxy behind NAT. Cheers, Nitesh On Wed, Oct 19, 2022 at 5:35 PM Bela H > wrote: For the first problem check this: C - Encode the callid header Note: Changing the callid of the call using the "C" flag is only available when doing topology_hiding with dialog support. Using this flag without dialog support will not change the callid at all!. From: Nitesh Divecha Sent: Thursday, 20 October 2022 10:09 To: Bogdan-Andrei Iancu Cc: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info Hello All, So I had some success using topology_hiding and rtpproxy but found few problems. After implementing topology_hiding(), SIP INVITE was much better but still showing following: INVITE sip:aaabbbcccc at outboundprovider.com:5060 SIP/2.0 Call-ID: 4ed41738da10faa5 at 172.16.16.250 <<<-- showing originators Device LAN IP —>>> Content-Length: 329 CSeq: 8002 INVITE From: >;tag=SP39b79130abfb7487f Max-Forwards: 69 To: Via: SIP/2.0/UDP 3.xxx.xxx.49:5060;branch=z9hG4bK1dcb.5bb78035.0 User-Agent: OBIHAI/OBi302-3.2.2.6259 <<<-- showing originators User-Agent —>>> Contact: Expires: 60 Supported: replaces Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PRACK,REFER,UPDATE Content-Type: application/sdp === 1) How can I remove IP from Call-ID and rewrite Originators User-Agent to local OpenSIPS User-Agent? === Now issue with rtpproxy - I'm running this OpenSIPS on AWS cloud... AWS cloud does natting by default, so my Public IP is 3.xxx.xxx.49 and actual VM IP is 172.31.29.47. After implement rtpproxy (https://www.rtpproxy.org/), it is running on local IP: └─183589 /usr/local/bin/rtpproxy -s udp:172.31.29.47 22222 -u rtpproxy rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -l 172.31.29.47 -m 1000 -M 2000 -d INFO LOG_LOCAL5 As it shows from SIP INVITE and due to that no audio or RTP because IP is not reachable... v=0 o=- 16210664 1 IN IP4 172.31.29.47 <<<-- OpenSIPS NAT IP —>>> s=- c=IN IP4 172.31.29.47 <<<-- OpenSIPS NAT IP —>>> t=0 0 m=audio 1958 RTP/AVP 0 8 18 104 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:18 G729/8000 a=rtpmap:104 G726-32/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv a=ptime:20 a=xg726bitorder:big-endian a=nortpproxy:yes === 2. How can I configure rtpproxy with Public IP? Or do I start rtpproxy with Public IP 3.xxx.xxx.49 and reconfigure OpenSIPS with Public IP? modparam("rtpproxy", "rtpproxy_sock", "udp:172.31.29.47:22222") Thanking in advance... Cheers, Nitesh On Wed, Oct 19, 2022 at 10:17 AM Nitesh Divecha > wrote: Hello, Thank y'all for the input... I will try to read the documentation and work on implementing these modules. By any chance do either of you have any working examples which I can refer to? I'm a work in progress and every time I change something I break OpenSIPS and it takes me hours to troubleshoot! :-) Thanking in advance... Cheers, Nitesh On Wed, Oct 19, 2022 at 2:20 AM Bogdan-Andrei Iancu > wrote: Hi there, Actually you do not need the B2B, you can achieve the same kind of privacy (at SIP level) with dialog module and topology_hiding module together. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/19/22 1:23 AM, Abdul Basit wrote: Nitesh, You need a B2BUA function with the help of a topo-hiding module with opensips as Bela shared in his email. Also, install the RTP proxy on the same opensips box (not necessary if you need separate signaling and media boxes). Far end party will not be able to see the A-party information. https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2 I hope this will help. -- regards, abdul basit On Wed, 19 Oct 2022 at 03:14, Bela H > wrote: Hi Nitesh, 1. Check the topology hiding function: https://opensips.org/docs/modules/3.2.x/topology_hiding.html 2. Use e.g. rtpproxy: https://opensips.org/docs/modules/3.2.x/rtpproxy.html#func_rtpproxy_offer http://opensips.com.br/wiki/index.php?title=Oopensips_Nat_script_with_RTPPROXY_-_English https://github.com/sippy/rtpproxy I hope these help! Cheers, Bela From: Nitesh Divecha Sent: Wednesday, 19 October 2022 04:26 To: OpenSIPS users mailling list Subject: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info Hello All, This is my first OpenSIPS project so I'm a newbie! After going back and forth with "uac_replace_from()", I was successfully able to make a call from my ATA -> OpenSIPS -> Outbound Provider -> CellPhone. All worked fine with two-way audio except few issues: 1) Outbound Provider was able to see my ATA (Originator's IP/User-Agent/etc) in SIP INVITE (SDP) which kinda raised some eyebrows with Outbound provider. How can I block or strip all the Originator's contact info in SIP INVITE (SDP) and only send OpenSIPS info? Meaning I want to protect my Originators and don't want to show anything to the Outbound Provider. Outbound providers should only communicate to the OpenSIPS server. 2) When the call was up I failed to capture any media/RTP on the OpenSIPS server. I want to involve OpenSIPS in media/RTP between ATA and outbound providers. How can I force media/RTP to pass-thru OpenSIPS IP so I'm not exposing Originator's IP. Any insights will be highly appreciated. Cheers, Nitesh _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Thu Oct 20 07:01:06 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Thu, 20 Oct 2022 10:01:06 +0300 Subject: [OpenSIPS-Users] early dialog termination In-Reply-To: References: <0907245b-2b56-5a0c-cdaf-aca2d8853405@opensips.org> <6746fcc4-e376-0c98-9340-eebfb70c2a65@opensips.org> Message-ID: <94658a76-9fb0-1bc7-22f7-25b1cf3faf8d@opensips.org> Ivan, Actually a simpler approach will be to use t_wait_for_new_branches() instead of that t_write function, it should do the same trick (postponing the deletion of the transaction), but without any side effects. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/19/22 10:21 AM, Ryzhik Ivan wrote: > Sorry, I mean no sleep, i mean async( sleep($var(wait_time)), > after_sleep ); > Regards, Ivan. > > вт, 18 окт. 2022 г. в 14:42, Bogdan-Andrei Iancu >: > > Hi, > > yes, call it before ending the REQUEST route. I'm 100% the > transaction is not deleted before the end of the route. And try to > use the unix sock flavor for the function, not the fifo one. > > DO NOT use the sleep, you will block your whole opensips. > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 5-16 Dec 2022, online > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/17/22 11:56 AM, Ryzhik Ivan wrote: >> Hi, did you mean that i must call t_write_req once before >> REQUEST_ROUTE is finished? In this case the transaction was removed. >> "even if you do not have to actually write anything to outer >> world - just fake it." - i must use fifo and i must read data >> from it, in else we got: >> ERROR:tm:write_to_fifo: nobody listening on [/tmp/moh.fifo] fifo >> for reading! >> ERROR:tm:t_write_req: write_to_fifo failed >> And last question is may I use sleep(20) at the end of route to >> keep transaction? or can i use modparam("tm", "wt_timer", 20)? >> Regards, Ivan >> >> пн, 17 окт. 2022 г. в 09:38, Bogdan-Andrei Iancu >> >: >> >> Hi Ryzhik, >> >> Right, the transaction must be forced to stay until you are >> done with a final reply. Unfortunately there is no clear way >> to do this from script (this may be subject of further small >> improvements), but you can try taking advantage of the >> `t_write_req` [1] for this purpose, even if you do not have >> to actually write anything to outer world - just fake it. >> >> >> [1] >> https://opensips.org/html/docs/modules/3.2.x/tm.html#func_t_write_req >> >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Summit 27-30 Sept 2022, Athens >> https://www.opensips.org/events/Summit-2022Athens/ >> >> On 10/13/22 2:45 PM, Ryzhik Ivan wrote: >>> Hi. >>> One more question. >>> Everything works fine except the transaction was deleted >>> after 15 sec after the initial route was finished. >>> on INVITE i last do t_reply_with_body(183, "Session >>> progress", ...) and than exit; >>> >>> on end route log : >>> >>> 2022-10-13T10:58:01.994598+00:00  DBG:tm:_reply_light: reply >>> sent out. buf=0x7f558a087d98: SIP/2.0 1..., >>> shmem=0x7f5549797470: SIP/2.0 1 >>> 2022-10-13T10:58:01.994676+00:00  DBG:tm:_reply_light: finished >>> >>> 2022-10-13T10:58:01.995835+00:00  DBG:tm:do_t_cleanup: >>> transaction 0x7f5549793b18 already updated! Skipping update! >>> 2022-10-13T10:58:01.996020+00:00  DBG:tm:cleanup_uac_timers: >>> RETR/FR timers reset >>> 2022-10-13T10:58:01.996202+00:00 >>> *DBG:tm:insert_timer_unsafe: [2]: 0x7f5549793b98 (12)* >>> 2022-10-13T10:58:01.996317+00:00 * DBG:tm:t_unref: >>> UNREF_UNSAFE: [0x7f5549793b18] after is 0* >>> 2022-10-13T10:58:01.996488+00:00  DBG:core:destroy_avp_list: >>> destroying list (nil) >>> 2022-10-13T10:58:01.996673+00:00  DBG:core:receive_msg: >>> cleaning up >>> >>> 2022-10-13T10:58:07.651091+00:00* DBG:tm:timer_routine: >>> timer routine:2,tl=0x7f5549793b98 next=(nil), timeout=12* >>> 2022-10-13T10:58:07.651332+00:00  DBG:tm:wait_handler: >>> removing 0x7f5549793b18 from table >>> 2022-10-13T10:58:07.651425+00:00  DBG:tm:delete_ce*ll: >>> delete transaction 0x7f5549793b18* >>> 2022-10-13T10:58:07.651513+00:00  DBG:tm:wait_handler: done >>> >>> Can you tell me how I can i fix this? Transaction marked >>> safe for deletion... >>> Regards, Ivan >>> >>> ср, 12 окт. 2022 г. в 13:11, Bogdan-Andrei Iancu >>> >: >>> >>> Perfect !!! >>> >>> Bogdan-Andrei Iancu >>> >>> OpenSIPS Founder and Developer >>> https://www.opensips-solutions.com >>> OpenSIPS Summit 27-30 Sept 2022, Athens >>> https://www.opensips.org/events/Summit-2022Athens/ >>> >>> On 10/12/22 1:09 PM, Ryzhik Ivan wrote: >>>> I found a solution. hex strings are reversed). >>>> Thank you very much! >>>> >>>> ср, 12 окт. 2022 г. в 12:59, Ryzhik Ivan >>>> >: >>>> >>>> and one more research: $T_id returns hex encoded >>>> label.hashid >>>> but my attempts failed: >>>> got $T_id = 6545e285.3fe4 >>>> Send: {"jsonrpc": "2.0", "method": "t_reply", "id": >>>> 1, "params": {"code": "487", "reason": >>>> "Terminating", "trans_id": "16356:1699078789", >>>> "to_tag": ""}} >>>> Got: >>>> b'{"jsonrpc":"2.0","error":{"code":404,"message":"Transaction >>>> not found"},"id":1}' >>>> >>>> >>>> ср, 12 окт. 2022 г. в 11:13, Ryzhik Ivan >>>> >: >>>> >>>> Thank you, Bogdan. >>>> I got stuck with tm documentation. >>>>   1) MI t_reply command has named parameters, >>>> ok, no problem. >>>>   2) trans_id - transaction identifier (has the >>>> hash_entry:label format)  - what is this? if i >>>> use $T_id i got reply "Invalid trans_id". >>>>   3) Where can I get to_tag from script level >>>> on initial invite? >>>>       ... >>>> t_reply_with_body(183, "Session progress", >>>> $(var(body){re.subst,$var(re)}) ); >>>>       avp_db_query("insert into moh (callid, >>>> timeout, tid,totag) values ('$ci', >>>> $var(wait_time), '$T_id', '??????')"); >>>>       ... >>>> >>>> Regards, Ivan. >>>> >>>> вт, 11 окт. 2022 г. в 12:35, Bogdan-Andrei >>>> Iancu >>> >: >>>> >>>> Hi Ivan, >>>> >>>> you can use timer_route, but as there is no >>>> way to send a reply for a particular >>>> transaction from script level (only to the >>>> currently processed request), you will have >>>> to trigger the MI cmds from the timer >>>> route, which is a bit hackish .... >>>> >>>> Regards, >>>> >>>> Bogdan-Andrei Iancu >>>> >>>> OpenSIPS Founder and Developer >>>> https://www.opensips-solutions.com >>>> OpenSIPS Summit 27-30 Sept 2022, Athens >>>> https://www.opensips.org/events/Summit-2022Athens/ >>>> >>>> On 10/11/22 11:47 AM, Ryzhik Ivan wrote: >>>>> Hi, Bogdan! >>>>> What d' you think, can we use timer_route >>>>> instead of an external script? >>>>> Regards, Ivan. >>>>> >>>>> пн, 10 окт. 2022 г. в 17:04, Bogdan-Andrei >>>>> Iancu >>>> >: >>>>> >>>>> Hi Ryzhik, >>>>> >>>>> Without a t_relay() it makes not much >>>>> sense to have an dialog structure at >>>>> all - the dialog module in opensips is >>>>> actually design for proxied calls, not >>>>> for UAC calls. >>>>> >>>>> IMO, you should keep it a transaction >>>>> level, by sending replies back only. >>>>> When getting the INVITE, put its >>>>> call-id into a DB table (to keep only >>>>> the "active" session) together with a >>>>> lifetime / expiration time. When >>>>> getting a CANCEL, update the table >>>>> (set lifetime to 0), to know it is >>>>> terminated. And use an simple external >>>>> script that keeps scanning the DB for >>>>> (1) sending 487 Terminated via MI if >>>>> the record has 0 lifetime or (2) send >>>>> a 408 Timeout via MI if the lifetime >>>>> exceeded. >>>>> In a similar way you can handle the >>>>> BYE - send back 200OK for the BYE and >>>>> set 0 in lifetime, to send a 487 >>>>> canceled back >>>>> >>>>> Regards, >>>>> >>>>> Bogdan-Andrei Iancu >>>>> >>>>> OpenSIPS Founder and Developer >>>>> https://www.opensips-solutions.com >>>>> OpenSIPS Summit 27-30 Sept 2022, Athens >>>>> https://www.opensips.org/events/Summit-2022Athens/ >>>>> >>>>> On 10/10/22 4:33 PM, Ryzhik Ivan wrote: >>>>>> Hello! >>>>>> My opensips version is 3.1 with >>>>>> tm,dialog and rtpengine modules. >>>>>> On incoming INVITE i'm creating an >>>>>> early dialog with 183 replies and i'm >>>>>> playing audio to caller with >>>>>> rtpengine, no t_relay() on this step, >>>>>> OS is acting as UAS endpoint. >>>>>> If the caller cancels the invite with >>>>>> a CANCEL message - all works great. >>>>>> But some users terminate dialog with >>>>>> BYE message. >>>>>> 1) on BYE with to-tag OS can't find >>>>>> dialog with match_dialog(), because >>>>>> to-tag presents. >>>>>> 2) if i use load_dialog_ctx($ci) - >>>>>>  it is possible to handle BYE. >>>>>> 3) in early dialog termination with >>>>>> BYE we also need to send final >>>>>> response to the INVITE transaction. >>>>>> >>>>>> Maybe I did something wrong, but I >>>>>> can't handle the final response to >>>>>> INVITE in this case. >>>>>> >>>>>> _______________________________________________ >>>>>> Users mailing list >>>>>> Users at lists.opensips.org >>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kingsley at dns99.co.uk Thu Oct 20 11:08:22 2022 From: kingsley at dns99.co.uk (Kingsley Tart) Date: Thu, 20 Oct 2022 12:08:22 +0100 Subject: [OpenSIPS-Users] append body to reply? Message-ID: <86c12e25197bda45c04603fd464fcbda3740fcd5.camel@dns99.co.uk> Hi, Is it possible with OpenSIPS to append a body to a reply? If so, is there also an equivalent of $ml for how long the outbound reply would be? (I appreciate that until send_reply() is called, the exact size would be impossible to calculate). I'm finding it useful to use custom INFO calls to share metadata with some of our other hosts. I could add the info in headers, but the message body in some cases seems more appropriate. Cheers, Kingsley. From bogdan at opensips.org Thu Oct 20 12:41:02 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Thu, 20 Oct 2022 15:41:02 +0300 Subject: [OpenSIPS-Users] append body to reply? In-Reply-To: <86c12e25197bda45c04603fd464fcbda3740fcd5.camel@dns99.co.uk> References: <86c12e25197bda45c04603fd464fcbda3740fcd5.camel@dns99.co.uk> Message-ID: Hi Kingsley, Docs are your best friend: https://opensips.org/html/docs/modules/3.2.x/tm.html#func_t_reply_with_body Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/20/22 2:08 PM, Kingsley Tart wrote: > Hi, > > Is it possible with OpenSIPS to append a body to a reply? If so, is > there also an equivalent of $ml for how long the outbound reply would > be? (I appreciate that until send_reply() is called, the exact size > would be impossible to calculate). > > I'm finding it useful to use custom INFO calls to share metadata with > some of our other hosts. I could add the info in headers, but the > message body in some cases seems more appropriate. > > Cheers, > Kingsley. > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From bogdan at opensips.org Thu Oct 20 12:42:09 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Thu, 20 Oct 2022 15:42:09 +0300 Subject: [OpenSIPS-Users] Dispatcher module and partition In-Reply-To: References: Message-ID: Hi Alberto, Unfortunately all the mentioned settings are global, equally impacting all the partitions. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/19/22 6:20 PM, Alberto wrote: > Hi, > > I'm using opensips 3.3.1 and I have a question about the dispatcher > module. > > Can I set different ds_ping_from, ds_ping_method, ds_probing_mode, and > ds_ping_interval per partition? > > Thanks > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Thu Oct 20 12:47:29 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Thu, 20 Oct 2022 15:47:29 +0300 Subject: [OpenSIPS-Users] SIP user statuses to websocket In-Reply-To: References: Message-ID: <89de9cbd-07e2-0855-a1ad-a4425f9f7fe3@opensips.org> Hi Anonymous, Check the events interface in OpenSIPS [1]. Different modules (see their documentation) may raise different events, like when a user is registered, when a call is placed, etc. [1] https://www.opensips.org/Documentation/Interface-Events-3-2 Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/19/22 9:32 AM, ideanet help wrote: > Hi all, > > I am looking for a way to use WebSocket with opensips. Basically, I > want to show my all sip users statuses/activity on a web page. I am > currently using an API, which is called after a few seconds so this is > a bit slow. I am looking for a way that opensips sends event to the > socket and on the other hand, my webpage will be connected to a > WebSocket server. This way I can show all the events instantly. > For example, If a user receives a call I will have it on the web page > straight away. if a user gets unregistered i will see on my page that > users sent Expiry 0 something like that. > > Will it be possible with the proto_wss module. any pointers will help. > I saw what proto_wss can do but I did not understand it properly. it > will send traces to a server i don't need. I just need it if a user is > busy or idle. or he gets unregistered that's all. > > Thanks > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From kingsley at dns99.co.uk Thu Oct 20 12:58:42 2022 From: kingsley at dns99.co.uk (Kingsley Tart) Date: Thu, 20 Oct 2022 13:58:42 +0100 Subject: [OpenSIPS-Users] append body to reply? In-Reply-To: References: <86c12e25197bda45c04603fd464fcbda3740fcd5.camel@dns99.co.uk> Message-ID: <59d1eb1c004b8d92b9158532ac4f428269136c7a.camel@dns99.co.uk> Hi, thanks - I hunted through docs and googled for several hours but didn't find that, though I did figure out that sipmsgops wasn't the answer. Cheers, Kingsley. On Thu, 2022-10-20 at 15:41 +0300, Bogdan-Andrei Iancu wrote: > Hi Kingsley, > > Docs are your best friend: > https://opensips.org/html/docs/modules/3.2.x/tm.html#func_t_reply_with_body > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 5-16 Dec 2022, online > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/20/22 2:08 PM, Kingsley Tart wrote: > > Hi, > > > > Is it possible with OpenSIPS to append a body to a reply? If so, is > > there also an equivalent of $ml for how long the outbound reply > > would > > be? (I appreciate that until send_reply() is called, the exact size > > would be impossible to calculate). > > > > I'm finding it useful to use custom INFO calls to share metadata > > with > > some of our other hosts. I could add the info in headers, but the > > message body in some cases seems more appropriate. > > > > Cheers, > > Kingsley. > > > > > > _______________________________________________ > > Users mailing list > > Users at lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > From aviator.nitesh.d at gmail.com Thu Oct 20 15:31:32 2022 From: aviator.nitesh.d at gmail.com (Nitesh Divecha) Date: Thu, 20 Oct 2022 11:31:32 -0400 Subject: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info In-Reply-To: References: <0bf8224b-18b3-e30c-9767-7dd5e8a4ea9b@opensips.org> Message-ID: Bela Much appreciated! That fixed the "User-Agent" problem. Cheers, Nitesh On Wed, Oct 19, 2022 at 8:03 PM Bela H wrote: > I hope this helps: > > https://opensips.org/docs/modules/3.2.x/sipmsgops.html#func_remove_hf > > > > > > *From: *Nitesh Divecha > *Sent: *Thursday, 20 October 2022 12:29 > *To: *OpenSIPS users mailling list > *Subject: *Re: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP > info > > > > Bela, > > > > Much appreciated! > > > > Changing topolgy_hiding("C"); fixed the Call-ID issue. > > > > Call-ID shows clean Call-ID: > *DLGCH_W0xtTFgVXWleUV1fVgFvEiVSRVdabgccAltXbUFf* > > > > Now gotta figure out how to stop sending Originator User-Agent to outbound > provider and how to configure rtpproxy behind NAT. > > > > Cheers, > > Nitesh > > > > > > > > On Wed, Oct 19, 2022 at 5:35 PM Bela H wrote: > > > > For the first problem check this: > > *C* - Encode the callid header > > *Note:* Changing the callid of the call using the "C" flag is only > available when doing topology_hiding with *dialog support*. Using this > flag without dialog support will not change the callid at all!. > > > > *From: *Nitesh Divecha > *Sent: *Thursday, 20 October 2022 10:09 > *To: *Bogdan-Andrei Iancu > *Cc: *OpenSIPS users mailling list > *Subject: *Re: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP > info > > > > Hello All, > > > > So I had some success using topology_hiding and rtpproxy but found few > problems. > > > > After implementing topology_hiding(), SIP INVITE was much better but still > showing following: > > > > INVITE sip:aaabbbcccc at outboundprovider.com:5060 SIP/2.0 > > Call-ID: 4ed41738da10faa5 at 172.16.16.250 *<<<-- showing originators Device > LAN IP —>>>* > > Content-Length: 329 > CSeq: 8002 INVITE > From: ;tag=SP39b79130abfb7487f > Max-Forwards: 69 > To: > Via: SIP/2.0/UDP 3.xxx.xxx.49:5060;branch=z9hG4bK1dcb.5bb78035.0 > User-Agent: OBIHAI/OBi302-3.2.2.6259 *<<<-- showing originators > User-Agent —>>>* > Contact: > Expires: 60 > Supported: replaces > Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PRACK,REFER,UPDATE > Content-Type: application/sdp > > === > > 1) How can I remove IP from Call-ID and rewrite Originators User-Agent to > local OpenSIPS User-Agent? > > === > > > > > > Now issue with rtpproxy - I'm running this OpenSIPS on AWS cloud... AWS > cloud does natting by default, so my Public IP is 3.xxx.xxx.49 and actual > VM IP is *172.31.29.47. * > > > > After implement rtpproxy (https://www.rtpproxy.org/), it is running on > local IP: > > └─183589 /usr/local/bin/rtpproxy -s udp:172.31.29.47 22222 -u rtpproxy > rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -l 172.31.29.47 -m 1000 -M 2000 > -d INFO LOG_LOCAL5 > > As it shows from SIP INVITE and due to that no audio or RTP because IP is > not reachable... > > > > v=0 > o=- 16210664 1 IN IP4 *172.31.29.47 <<<-- OpenSIPS NAT IP —>>>* > s=- > c=IN IP4 *172.31.29.47 <<<-- OpenSIPS NAT IP —>>>* > t=0 0 > m=audio 1958 RTP/AVP 0 8 18 104 101 > a=rtpmap:0 PCMU/8000 > a=rtpmap:8 PCMA/8000 > a=rtpmap:18 G729/8000 > a=rtpmap:104 G726-32/8000 > a=rtpmap:101 telephone-event/8000 > a=fmtp:101 0-15 > a=sendrecv > a=ptime:20 > a=xg726bitorder:big-endian > a=nortpproxy:yes > > > > === > > 2. How can I configure rtpproxy with Public IP? Or do I start rtpproxy > with Public IP 3.xxx.xxx.49 and reconfigure OpenSIPS with Public IP? > > modparam("rtpproxy", "rtpproxy_sock", "udp:172.31.29.47:22222") > > > > Thanking in advance... > > > > Cheers, > > Nitesh > > > > > > > > > > > > On Wed, Oct 19, 2022 at 10:17 AM Nitesh Divecha < > aviator.nitesh.d at gmail.com> wrote: > > Hello, > > > > Thank y'all for the input... I will try to read the documentation and work > on implementing these modules. > > > > By any chance do either of you have any working examples which I can refer > to? I'm a work in progress and every time I change something I break > OpenSIPS and it takes me hours to troubleshoot! :-) > > > > Thanking in advance... > > > > Cheers, > > Nitesh > > > > > > > > On Wed, Oct 19, 2022 at 2:20 AM Bogdan-Andrei Iancu > wrote: > > Hi there, > > Actually you do not need the B2B, you can achieve the same kind of privacy > (at SIP level) with dialog module and topology_hiding module together. > > Regards, > > Bogdan-Andrei Iancu > > > > OpenSIPS Founder and Developer > > https://www.opensips-solutions.com > > OpenSIPS Bootcamp 5-16 Dec 2022, online > > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/19/22 1:23 AM, Abdul Basit wrote: > > Nitesh, > > > > You need a B2BUA function > with > the help of a topo-hiding module with opensips as Bela shared in his email. > > Also, install the RTP proxy on the same opensips box (not necessary if you > need separate signaling and media boxes). > > > > Far end party will not be able to see the A-party information. > > > > https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2 > > > > I hope this will help. > > > -- > regards, > > > abdul basit > > > > On Wed, 19 Oct 2022 at 03:14, Bela H wrote: > > Hi Nitesh, > > > > 1. Check the topology hiding function: > https://opensips.org/docs/modules/3.2.x/topology_hiding.html > 2. Use e.g. rtpproxy: > > https://opensips.org/docs/modules/3.2.x/rtpproxy.html#func_rtpproxy_offer > > > http://opensips.com.br/wiki/index.php?title=Oopensips_Nat_script_with_RTPPROXY_-_English > > https://github.com/sippy/rtpproxy > > > > I hope these help! > > > > Cheers, > > Bela > > > > *From: *Nitesh Divecha > *Sent: *Wednesday, 19 October 2022 04:26 > *To: *OpenSIPS users mailling list > *Subject: *[OpenSIPS-Users] - INVITE (SDP) includes Originators IP info > > > > Hello All, > > > > This is my first OpenSIPS project so I'm a newbie! > > > > After going back and forth with "uac_replace_from()", I was successfully > able to make a call from my ATA -> OpenSIPS -> Outbound Provider -> > CellPhone. All worked fine with two-way audio except few issues: > > > > 1) Outbound Provider was able to see my ATA (Originator's > IP/User-Agent/etc) in SIP INVITE (SDP) which kinda raised some eyebrows > with Outbound provider. How can I block or strip all the Originator's > contact info in SIP INVITE (SDP) and only send OpenSIPS info? Meaning I > want to protect my Originators and don't want to show anything to the > Outbound Provider. Outbound providers should only communicate to the > OpenSIPS server. > > > > 2) When the call was up I failed to capture any media/RTP on the OpenSIPS > server. I want to involve OpenSIPS in media/RTP between ATA and outbound > providers. How can I force media/RTP to pass-thru OpenSIPS IP so I'm not > exposing Originator's IP. > > > > Any insights will be highly appreciated. > > > > Cheers, > > Nitesh > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > _______________________________________________ > > Users mailing list > > Users at lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aviator.nitesh.d at gmail.com Thu Oct 20 15:38:49 2022 From: aviator.nitesh.d at gmail.com (Nitesh Divecha) Date: Thu, 20 Oct 2022 11:38:49 -0400 Subject: [OpenSIPS-Users] - INVITE (SDP) includes Originators IP info In-Reply-To: References: <0bf8224b-18b3-e30c-9767-7dd5e8a4ea9b@opensips.org> Message-ID: Hello, After reading the rtpproxy documentation again, I was able to resolve the rtpproxy NAT issue. -A *advaddr1[/advaddr2]* Set advertised address of rtpproxy. Useful if the rtpproxy is behind a NAT firewall. (Amazon EC2) When the rtpproxy receives a session request from a SIP controller it will return the IP address(es) specified by the -A option. CGroup: /system.slice/rtpproxy.service └─247521 /usr/local/bin/rtpproxy -s udp:172.31.29.47 22222 -u rtpproxy rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -A 3.xxx.xxx.49 -l 172.31.29.47 -m 1000 -M 2000 -d INFO LOG_LOCAL5 ==== Just for my understanding... What is the difference between rtpproxy and Mediaproxy Module in OpenSIPS? Do I need both or can I achieve the same with Mediaproxy? I have to monitor two services now (rtpproxy and OpenSIPS). Cheers, Nitesh On Wed, Oct 19, 2022 at 5:06 PM Nitesh Divecha wrote: > Hello All, > > So I had some success using topology_hiding and rtpproxy but found few > problems. > > After implementing topology_hiding(), SIP INVITE was much better but still > showing following: > > INVITE sip:aaabbbcccc at outboundprovider.com:5060 SIP/2.0 > Call-ID: 4ed41738da10faa5 at 172.16.16.250 *<<<-- showing originators Device > LAN IP —>>>* > Content-Length: 329 > CSeq: 8002 INVITE > From: ;tag=SP39b79130abfb7487f > Max-Forwards: 69 > To: > Via: SIP/2.0/UDP 3.xxx.xxx.49:5060;branch=z9hG4bK1dcb.5bb78035.0 > User-Agent: OBIHAI/OBi302-3.2.2.6259 *<<<-- showing originators > User-Agent —>>>* > Contact: > Expires: 60 > Supported: replaces > Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PRACK,REFER,UPDATE > Content-Type: application/sdp > > === > 1) How can I remove IP from Call-ID and rewrite Originators User-Agent to > local OpenSIPS User-Agent? > === > > > Now issue with rtpproxy - I'm running this OpenSIPS on AWS cloud... AWS > cloud does natting by default, so my Public IP is 3.xxx.xxx.49 and actual > VM IP is *172.31.29.47. * > > After implement rtpproxy (https://www.rtpproxy.org/), it is running on > local IP: > └─183589 /usr/local/bin/rtpproxy -s udp:172.31.29.47 22222 -u rtpproxy > rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -l 172.31.29.47 -m 1000 -M 2000 > -d INFO LOG_LOCAL5 > > As it shows from SIP INVITE and due to that no audio or RTP because IP is > not reachable... > > v=0 > o=- 16210664 1 IN IP4 *172.31.29.47 <<<-- OpenSIPS NAT IP —>>>* > s=- > c=IN IP4 *172.31.29.47 <<<-- OpenSIPS NAT IP —>>>* > t=0 0 > m=audio 1958 RTP/AVP 0 8 18 104 101 > a=rtpmap:0 PCMU/8000 > a=rtpmap:8 PCMA/8000 > a=rtpmap:18 G729/8000 > a=rtpmap:104 G726-32/8000 > a=rtpmap:101 telephone-event/8000 > a=fmtp:101 0-15 > a=sendrecv > a=ptime:20 > a=xg726bitorder:big-endian > a=nortpproxy:yes > > === > 2. How can I configure rtpproxy with Public IP? Or do I start rtpproxy > with Public IP 3.xxx.xxx.49 and reconfigure OpenSIPS with Public IP? > modparam("rtpproxy", "rtpproxy_sock", "udp:172.31.29.47:22222") > > Thanking in advance... > > Cheers, > Nitesh > > > > > > On Wed, Oct 19, 2022 at 10:17 AM Nitesh Divecha < > aviator.nitesh.d at gmail.com> wrote: > >> Hello, >> >> Thank y'all for the input... I will try to read the documentation and >> work on implementing these modules. >> >> By any chance do either of you have any working examples which I can >> refer to? I'm a work in progress and every time I change something I break >> OpenSIPS and it takes me hours to troubleshoot! :-) >> >> Thanking in advance... >> >> Cheers, >> Nitesh >> >> >> >> On Wed, Oct 19, 2022 at 2:20 AM Bogdan-Andrei Iancu >> wrote: >> >>> Hi there, >>> >>> Actually you do not need the B2B, you can achieve the same kind of >>> privacy (at SIP level) with dialog module and topology_hiding module >>> together. >>> >>> Regards, >>> >>> Bogdan-Andrei Iancu >>> >>> OpenSIPS Founder and Developer >>> https://www.opensips-solutions.com >>> OpenSIPS Bootcamp 5-16 Dec 2022, online >>> https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ >>> >>> On 10/19/22 1:23 AM, Abdul Basit wrote: >>> >>> Nitesh, >>> >>> You need a B2BUA function >>> with >>> the help of a topo-hiding module with opensips as Bela shared in his email. >>> Also, install the RTP proxy on the same opensips box (not necessary if >>> you need separate signaling and media boxes). >>> >>> Far end party will not be able to see the A-party information. >>> >>> https://www.opensips.org/Documentation/Tutorials-B2BUA-3-2 >>> >>> I hope this will help. >>> >>> -- >>> regards, >>> >>> abdul basit >>> >>> On Wed, 19 Oct 2022 at 03:14, Bela H wrote: >>> >>>> Hi Nitesh, >>>> >>>> >>>> >>>> 1. Check the topology hiding function: >>>> https://opensips.org/docs/modules/3.2.x/topology_hiding.html >>>> 2. Use e.g. rtpproxy: >>>> >>>> >>>> https://opensips.org/docs/modules/3.2.x/rtpproxy.html#func_rtpproxy_offer >>>> >>>> >>>> http://opensips.com.br/wiki/index.php?title=Oopensips_Nat_script_with_RTPPROXY_-_English >>>> >>>> https://github.com/sippy/rtpproxy >>>> >>>> >>>> >>>> I hope these help! >>>> >>>> >>>> >>>> Cheers, >>>> >>>> Bela >>>> >>>> >>>> >>>> *From: *Nitesh Divecha >>>> *Sent: *Wednesday, 19 October 2022 04:26 >>>> *To: *OpenSIPS users mailling list >>>> *Subject: *[OpenSIPS-Users] - INVITE (SDP) includes Originators IP info >>>> >>>> >>>> >>>> Hello All, >>>> >>>> >>>> >>>> This is my first OpenSIPS project so I'm a newbie! >>>> >>>> >>>> >>>> After going back and forth with "uac_replace_from()", I was >>>> successfully able to make a call from my ATA -> OpenSIPS -> Outbound >>>> Provider -> CellPhone. All worked fine with two-way audio except few >>>> issues: >>>> >>>> >>>> >>>> 1) Outbound Provider was able to see my ATA (Originator's >>>> IP/User-Agent/etc) in SIP INVITE (SDP) which kinda raised some eyebrows >>>> with Outbound provider. How can I block or strip all the Originator's >>>> contact info in SIP INVITE (SDP) and only send OpenSIPS info? Meaning I >>>> want to protect my Originators and don't want to show anything to the >>>> Outbound Provider. Outbound providers should only communicate to the >>>> OpenSIPS server. >>>> >>>> >>>> >>>> 2) When the call was up I failed to capture any media/RTP on the >>>> OpenSIPS server. I want to involve OpenSIPS in media/RTP between ATA and >>>> outbound providers. How can I force media/RTP to pass-thru OpenSIPS IP so >>>> I'm not exposing Originator's IP. >>>> >>>> >>>> >>>> Any insights will be highly appreciated. >>>> >>>> >>>> >>>> Cheers, >>>> >>>> Nitesh >>>> >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users at lists.opensips.org >>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>>> >>> >>> _______________________________________________ >>> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >>> >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From ideanethelp at gmail.com Fri Oct 21 01:39:47 2022 From: ideanethelp at gmail.com (ideanet help) Date: Fri, 21 Oct 2022 14:39:47 +1300 Subject: [OpenSIPS-Users] SIP user statuses to websocket In-Reply-To: <89de9cbd-07e2-0855-a1ad-a4425f9f7fe3@opensips.org> References: <89de9cbd-07e2-0855-a1ad-a4425f9f7fe3@opensips.org> Message-ID: Hi Bogdan, Thank you so much for the guidance. I have gone through the link and added some custom events. I am able to subscribe and send them to an interface. The document for jsonrpc event is broken. If you go to Transport Protocols and click on event_jsonrpc it says Not Found. can someone fix this link, please? I just want to look at the json rpc events. Thank you. Regards, Jazzi On Fri, Oct 21, 2022 at 1:47 AM Bogdan-Andrei Iancu wrote: > Hi Anonymous, > > Check the events interface in OpenSIPS [1]. Different modules (see their > documentation) may raise different events, like when a user is registered, > when a call is placed, etc. > > [1] https://www.opensips.org/Documentation/Interface-Events-3-2 > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 5-16 Dec 2022, online > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/19/22 9:32 AM, ideanet help wrote: > > Hi all, > > I am looking for a way to use WebSocket with opensips. Basically, I want > to show my all sip users statuses/activity on a web page. I am currently > using an API, which is called after a few seconds so this is a bit slow. I > am looking for a way that opensips sends event to the socket and on the > other hand, my webpage will be connected to a WebSocket server. This way I > can show all the events instantly. > For example, If a user receives a call I will have it on the web page > straight away. if a user gets unregistered i will see on my page that users > sent Expiry 0 something like that. > > Will it be possible with the proto_wss module. any pointers will help. I > saw what proto_wss can do but I did not understand it properly. it will > send traces to a server i don't need. I just need it if a user is busy or > idle. or he gets unregistered that's all. > > Thanks > > _______________________________________________ > Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 365186991 at qq.com Fri Oct 21 02:44:21 2022 From: 365186991 at qq.com (=?gb18030?B?zt7D+w==?=) Date: Fri, 21 Oct 2022 10:44:21 +0800 Subject: [OpenSIPS-Users] can several SIP phones with same SIP account ring together and hang up asynchronous Message-ID: for example, phone A/B configured with the same SIP account.  when phone C call the sip account , phone A/B will ring at the same time. At the ringing state, when A hang up the call, C will be terminated by opensips. is there a way to let B still calling instead of terminated? -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Fri Oct 21 07:11:04 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Fri, 21 Oct 2022 10:11:04 +0300 Subject: [OpenSIPS-Users] SIP user statuses to websocket In-Reply-To: References: <89de9cbd-07e2-0855-a1ad-a4425f9f7fe3@opensips.org> Message-ID: <6012cc5e-95ed-5500-6e79-e3c9c9e2f870@opensips.org> Fixed ! Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/21/22 4:39 AM, ideanet help wrote: > Hi Bogdan, > > Thank you so much for the guidance. I have gone through the link and > added some custom events. I am able to subscribe and send them to an > interface. > The document for jsonrpc event is broken. If you go to Transport > Protocols and click on event_jsonrpc > it says > Not Found. can someone fix this link, please? I just want to look at > the json rpc events. Thank you. > > Regards, > Jazzi > > > > > On Fri, Oct 21, 2022 at 1:47 AM Bogdan-Andrei Iancu > > wrote: > > Hi Anonymous, > > Check the events interface in OpenSIPS [1]. Different modules (see > their documentation) may raise different events, like when a user > is registered, when a call is placed, etc. > > [1] https://www.opensips.org/Documentation/Interface-Events-3-2 > > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 5-16 Dec 2022, online > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/19/22 9:32 AM, ideanet help wrote: >> Hi all, >> >> I am looking for a way to use WebSocket with opensips. Basically, >> I want to show my all sip users statuses/activity on a web page. >> I am currently using an API, which is called after a few seconds >> so this is a bit slow. I am looking for a way that opensips sends >> event to the socket and on the other hand, my webpage will be >> connected to a WebSocket server. This way I can show all the >> events instantly. >> For example, If a user receives a call I will have it on the web >> page straight away. if a user gets unregistered i will see on my >> page that users sent Expiry 0 something like that. >> >> Will it be possible with the proto_wss module. any pointers will >> help. I saw what proto_wss can do but I did not understand it >> properly. it will send traces to a server i don't need. I just >> need it if a user is busy or idle. or he gets unregistered that's >> all. >> >> Thanks >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alberto.rinaudo at gmail.com Fri Oct 21 13:18:34 2022 From: alberto.rinaudo at gmail.com (Alberto) Date: Fri, 21 Oct 2022 14:18:34 +0100 Subject: [OpenSIPS-Users] rtpengine session-name Message-ID: Hi, I'm using opensips 3.3.1 with rtpengine, but I don't see replace-session-name. Is this flag implemented? Thanks A -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Fri Oct 21 13:26:45 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Fri, 21 Oct 2022 16:26:45 +0300 Subject: [OpenSIPS-Users] can several SIP phones with same SIP account ring together and hang up asynchronous In-Reply-To: References: Message-ID: <567db48b-8558-8453-bdc9-c2d70b29e647@opensips.org> So C calls to SIP account of A and B, A and B are ringing. If A declines the call, B will still ring. This is how the standard parallel forking works in SIP and OpenSIPS. Just test it by yourself. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/21/22 5:44 AM, 无名 via Users wrote: > for example, phone A/B configured with the same SIP account. when > phone C call the sip account , phone A/B will ring at the same time. > At the ringing state, when A hang up the call, C will be terminated by > opensips. is there a way to let B still calling instead of terminated? > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From aviator.nitesh.d at gmail.com Fri Oct 21 14:08:04 2022 From: aviator.nitesh.d at gmail.com (Nitesh Divecha) Date: Fri, 21 Oct 2022 10:08:04 -0400 Subject: [OpenSIPS-Users] - Not sending ACK back! In-Reply-To: References: Message-ID: Hello All, I have been scratching my head for a few days now... Just to recap: I'm a newbie with OpenSIPS so bear with me... I got OpenSIPS 3.3.1 (residential) running on Debian 11 with OpenSIPS Control Panel 9.3.2 and MySQL. My goal is to: 1) Make two ATA's register and call each other (locally)... *Stopped working, I think routing logic is missing.* 2) Make ATA to call PSTN via an outbound SIP trunk or DID provider... *No ACK sent to Outbound provider.* 3) Receive inbound calls from PSTN or SIP trunk and forward it to registered ATA... *Getting rejected.* 4) Able to send and receive faxes from and to PSTN... *Haven't even touched.* Fast forward... I did achieve a few of my goals but they stopped working... You fix one thing and you break others... My current issue is OpenSIPS is not sending ACK back to the Outbound provider when I make calls to PSTN thus calls are getting dropped from the Outbound provider due to no ACK. This issue started when I implemented topology_hiding('C"), rtpproxy_offer("ro"), uac_replace_from( , "$avp(furi)"). Here is my code snippet: ####### Routing Logic ######## # main request routing logic route{ #if ($rU=~"^\+[1-9][0-9]+$") { if (dp_translate(10 ,$rU ,$rU) ) { xlog("*** 2. Dial plan translate from source $avp(src) to $rU ***\n"); $avp(furi) = "sip:aaabbbcccc at gothamcity.com"; uac_replace_from( , "$avp(furi)"); #strip(1); if (!do_routing(0)) { send_reply(500,"No PSTN Route found"); exit; } # t_on_branch("change_from"); route(relay); exit; } route[relay] { xlog("*** 3. Entering route relay ***\n"); # for INVITEs enable some additional helper routes if (is_method("INVITE")) { topology_hiding("C"); if(remove_hf("User-Agent")){ xlog("*** 4. User-Agent found and removed. ***\n"); } if (isflagset("NAT") && has_body("application/sdp")) { rtpproxy_offer("ro"); #rtpproxy_offer(); } t_on_branch("per_branch_ops"); t_on_reply("handle_nat"); t_on_failure("missed_call"); } if (isflagset("NAT")) { add_rr_param(";nat=yes"); } if (!t_relay()) { send_reply(500,"Internal Error"); } exit; } Any thoughts or suggestions on what to check for ACK? Cheers, Nitesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From daniel.zanutti at gmail.com Fri Oct 21 17:23:48 2022 From: daniel.zanutti at gmail.com (Daniel Zanutti) Date: Fri, 21 Oct 2022 14:23:48 -0300 Subject: [OpenSIPS-Users] - Not sending ACK back! In-Reply-To: References: Message-ID: Hi Nitesh As you already know, opensips is a low level software. You have to understand several aspects of SIP, network, RTP, DNS that when you use Asterisk, most you don't need to understand deep. Trying to help you, your script is way simple for you achievements. You need: 1) Check NAT on all request + all replies. This is to fix your SIP messages. 2) Check if you need to apply RTPPROXY on the call. You can use the "engage" function on INVITE then forget about it OR you can use manual way with "offer" function and handle all scenarios manually. For example, call the "answer" function on the 200 OK. Then delete on BYE. 3) Routing local calls (ATA to ATA) you need to handle the Register first with "save" function, then later handle the INVITE with the "lookup" function, both of Registrar module. 4) PSTN can be used as a direct route or some dynamic routing solution. Make it work first with direct routing. Need to check how authenticate works on your carrier. If IP based will be fine, if user/pass you need to make your opensips authenticate, it's a little harder. 5) DID - You have to create some specific INBOUND rules. Calls will be anonymous or authenticated? 6) Fax - Better solve other issues first. Hope this gives you some direction. Look for some tutorials. Regards On Fri, Oct 21, 2022 at 11:11 AM Nitesh Divecha wrote: > Hello All, > > I have been scratching my head for a few days now... Just to recap: > > I'm a newbie with OpenSIPS so bear with me... I got OpenSIPS 3.3.1 > (residential) running on Debian 11 with OpenSIPS Control Panel 9.3.2 and > MySQL. > > My goal is to: > 1) Make two ATA's register and call each other (locally)... *Stopped > working, I think routing logic is missing.* > 2) Make ATA to call PSTN via an outbound SIP trunk or DID provider... *No > ACK sent to Outbound provider.* > 3) Receive inbound calls from PSTN or SIP trunk and forward it to > registered ATA... *Getting rejected.* > 4) Able to send and receive faxes from and to PSTN... *Haven't even > touched.* > > Fast forward... I did achieve a few of my goals but they stopped > working... You fix one thing and you break others... > > My current issue is OpenSIPS is not sending ACK back to the Outbound > provider when I make calls to PSTN thus calls are getting dropped from the > Outbound provider due to no ACK. This issue started when I implemented > topology_hiding('C"), rtpproxy_offer("ro"), uac_replace_from( , > "$avp(furi)"). > > Here is my code snippet: > > ####### Routing Logic ######## > > > # main request routing logic > > > route{ > > > #if ($rU=~"^\+[1-9][0-9]+$") { > > if (dp_translate(10 ,$rU ,$rU) ) { > > xlog("*** 2. Dial plan translate from source $avp(src) to > $rU ***\n"); > > > $avp(furi) = "sip:aaabbbcccc at gothamcity.com"; > > uac_replace_from( , "$avp(furi)"); > > #strip(1); > > if (!do_routing(0)) { > > send_reply(500,"No PSTN Route found"); > > exit; > > } > > # t_on_branch("change_from"); > > route(relay); > > exit; > > } > > > > route[relay] { > > xlog("*** 3. Entering route relay ***\n"); > > # for INVITEs enable some additional helper routes > > if (is_method("INVITE")) { > > topology_hiding("C"); > > if(remove_hf("User-Agent")){ > > xlog("*** 4. User-Agent found and removed. > ***\n"); > > } > > > if (isflagset("NAT") && has_body("application/sdp")) { > > rtpproxy_offer("ro"); > > #rtpproxy_offer(); > > } > > > t_on_branch("per_branch_ops"); > > t_on_reply("handle_nat"); > > t_on_failure("missed_call"); > > } > > > if (isflagset("NAT")) { > > add_rr_param(";nat=yes"); > > } > > > if (!t_relay()) { > > send_reply(500,"Internal Error"); > > } > > exit; > > } > > Any thoughts or suggestions on what to check for ACK? > > Cheers, > Nitesh > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aviator.nitesh.d at gmail.com Fri Oct 21 18:01:26 2022 From: aviator.nitesh.d at gmail.com (Nitesh Divecha) Date: Fri, 21 Oct 2022 14:01:26 -0400 Subject: [OpenSIPS-Users] - Not sending ACK back! In-Reply-To: References: Message-ID: Daniel, Thanks for your detailed email. Much appreciated! Yes I totally understand about OpenSIPS and I'm going over all the documentations and tutorials I can find! My background is from Asterisk, so with that mentality I'm tackling OpenSIPS. Asterisk (Context) vs OpenSIPS (C-style script), it is a huge challenge but getting the hang of it! Lets pick option (3) Routing local calls (ATA to ATA)... Do you have any examples I can follow and set up a local route? I set up two extensions (8883456 and 7773456) via OpenSIPS Control Panel and I was able to register two ATA's. I do have the Registrar module loaded... How can I call each other? #### REGISTRAR module loadmodule "registrar.so" modparam("registrar", "default_expires", 3600) modparam("registrar", "min_expires", 60) modparam("registrar", "max_expires", 120) # modparam("registrar", "tcp_persistent_flag", "TCP_PERSISTENT") # modparam("registrar", "received_avp", "$avp(received_nh)")/* uncomment the next line not to allow more than 10 contacts per AOR */ modparam("registrar", "max_contacts", 10) modparam("registrar", "received_avp", "$avp(rcv)") modparam("registrar", "retry_after", 30) Regarding option (4) - I have both options. IP to IP and User/Pass authentication provider. Using User/Pass I was able to register OpenSIPS as UAC to a remote server and I was able to make outbound calls but call keeps on dropping due to no ACK. Cheers, Nitesh On Fri, Oct 21, 2022 at 1:26 PM Daniel Zanutti wrote: > Hi Nitesh > > As you already know, opensips is a low level software. You have to > understand several aspects of SIP, network, RTP, DNS that when you use > Asterisk, most you don't need to understand deep. > > Trying to help you, your script is way simple for you achievements. You > need: > 1) Check NAT on all request + all replies. This is to fix your SIP > messages. > > 2) Check if you need to apply RTPPROXY on the call. You can use the > "engage" function on INVITE then forget about it OR you can use manual way > with "offer" function and handle all scenarios manually. For example, call > the "answer" function on the 200 OK. Then delete on BYE. > > 3) Routing local calls (ATA to ATA) you need to handle the Register first > with "save" function, then later handle the INVITE with the "lookup" > function, both of Registrar module. > > 4) PSTN can be used as a direct route or some dynamic routing solution. > Make it work first with direct routing. Need to check how authenticate > works on your carrier. If IP based will be fine, if user/pass you need to > make your opensips authenticate, it's a little harder. > > 5) DID - You have to create some specific INBOUND rules. Calls will be > anonymous or authenticated? > > 6) Fax - Better solve other issues first. > > Hope this gives you some direction. Look for some tutorials. > > Regards > > On Fri, Oct 21, 2022 at 11:11 AM Nitesh Divecha < > aviator.nitesh.d at gmail.com> wrote: > >> Hello All, >> >> I have been scratching my head for a few days now... Just to recap: >> >> I'm a newbie with OpenSIPS so bear with me... I got OpenSIPS 3.3.1 >> (residential) running on Debian 11 with OpenSIPS Control Panel 9.3.2 and >> MySQL. >> >> My goal is to: >> 1) Make two ATA's register and call each other (locally)... *Stopped >> working, I think routing logic is missing.* >> 2) Make ATA to call PSTN via an outbound SIP trunk or DID provider... *No >> ACK sent to Outbound provider.* >> 3) Receive inbound calls from PSTN or SIP trunk and forward it to >> registered ATA... *Getting rejected.* >> 4) Able to send and receive faxes from and to PSTN... *Haven't even >> touched.* >> >> Fast forward... I did achieve a few of my goals but they stopped >> working... You fix one thing and you break others... >> >> My current issue is OpenSIPS is not sending ACK back to the Outbound >> provider when I make calls to PSTN thus calls are getting dropped from the >> Outbound provider due to no ACK. This issue started when I implemented >> topology_hiding('C"), rtpproxy_offer("ro"), uac_replace_from( , >> "$avp(furi)"). >> >> Here is my code snippet: >> >> ####### Routing Logic ######## >> >> >> # main request routing logic >> >> >> route{ >> >> >> #if ($rU=~"^\+[1-9][0-9]+$") { >> >> if (dp_translate(10 ,$rU ,$rU) ) { >> >> xlog("*** 2. Dial plan translate from source $avp(src) >> to $rU ***\n"); >> >> >> $avp(furi) = "sip:aaabbbcccc at gothamcity.com"; >> >> uac_replace_from( , "$avp(furi)"); >> >> #strip(1); >> >> if (!do_routing(0)) { >> >> send_reply(500,"No PSTN Route found"); >> >> exit; >> >> } >> >> # t_on_branch("change_from"); >> >> route(relay); >> >> exit; >> >> } >> >> >> >> route[relay] { >> >> xlog("*** 3. Entering route relay ***\n"); >> >> # for INVITEs enable some additional helper routes >> >> if (is_method("INVITE")) { >> >> topology_hiding("C"); >> >> if(remove_hf("User-Agent")){ >> >> xlog("*** 4. User-Agent found and removed. >> ***\n"); >> >> } >> >> >> if (isflagset("NAT") && has_body("application/sdp")) { >> >> rtpproxy_offer("ro"); >> >> #rtpproxy_offer(); >> >> } >> >> >> t_on_branch("per_branch_ops"); >> >> t_on_reply("handle_nat"); >> >> t_on_failure("missed_call"); >> >> } >> >> >> if (isflagset("NAT")) { >> >> add_rr_param(";nat=yes"); >> >> } >> >> >> if (!t_relay()) { >> >> send_reply(500,"Internal Error"); >> >> } >> >> exit; >> >> } >> >> Any thoughts or suggestions on what to check for ACK? >> >> Cheers, >> Nitesh >> >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kennedy4260 at gmail.com Fri Oct 21 19:28:57 2022 From: kennedy4260 at gmail.com (Kevin Kennedy) Date: Fri, 21 Oct 2022 12:28:57 -0700 Subject: [OpenSIPS-Users] Loadbalancer for Registrations and calls In-Reply-To: References: Message-ID: I believe I have mid_registrar somewhat working with dispatcher, but I seem to have a coulple issues. 1) When I receive the 401 request the second authentication INVITE is sending to another $ru host in the dispatcher instead of the initial one it sent to. 2) How do I send an outbound INVITE matching the registration cache to the same $ru that it is Registered to. mid_registrar_lookup uses the AOR instead of contact so it is only allowing the Incoming INVITEs to reach the client. Thank ou. Thank you. On Fri, Aug 19, 2022 at 8:46 AM Alex wrote: > Hello, > > setup mid registrar easy with this instruction. > https://www.opensips.org/Documentation/Tutorials-MidRegistrar > There is link to config > > But It relays every Registration request every 60sec on my server. Please > let me know if you could set up like on picture in instruction. > > > > > > чт, 18 авг. 2022 г. в 18:37, Kevin Kennedy : > >> I am looking for a configuration to be able to front end multiple SBC's >> to load balance Registrations and keep track of them to send INVITE's to >> the corresponding SBC. >> >> I am thinking of using a combination of Dispatcher and midregister, but >> not sure how to set this up correctly. >> >> Any thoughts? >> >> Thank you. >> >> Kevin >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > > > -- > С уважением, > Якимкин Алексей > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mayamatakeshi at gmail.com Sat Oct 22 09:53:24 2022 From: mayamatakeshi at gmail.com (mayamatakeshi) Date: Sat, 22 Oct 2022 18:53:24 +0900 Subject: [OpenSIPS-Users] early dialog termination In-Reply-To: <94658a76-9fb0-1bc7-22f7-25b1cf3faf8d@opensips.org> References: <0907245b-2b56-5a0c-cdaf-aca2d8853405@opensips.org> <6746fcc4-e376-0c98-9340-eebfb70c2a65@opensips.org> <94658a76-9fb0-1bc7-22f7-25b1cf3faf8d@opensips.org> Message-ID: Hi, I've been following this discussion as I have a similar use case. I have created a PR offering a new function t_reply_by_callid for the module tm to simplify this: https://github.com/OpenSIPS/opensips/pull/2937 Regards, Takeshi On Thu, Oct 20, 2022 at 4:04 PM Bogdan-Andrei Iancu wrote: > Ivan, > > Actually a simpler approach will be to use t_wait_for_new_branches() > instead of that t_write function, it should do the same trick (postponing > the deletion of the transaction), but without any side effects. > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 5-16 Dec 2022, online > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/19/22 10:21 AM, Ryzhik Ivan wrote: > > Sorry, I mean no sleep, i mean async( sleep($var(wait_time)), after_sleep > ); > Regards, Ivan. > > вт, 18 окт. 2022 г. в 14:42, Bogdan-Andrei Iancu : > >> Hi, >> >> yes, call it before ending the REQUEST route. I'm 100% the transaction is >> not deleted before the end of the route. And try to use the unix sock >> flavor for the function, not the fifo one. >> >> DO NOT use the sleep, you will block your whole opensips. >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Bootcamp 5-16 Dec 2022, online >> https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ >> >> On 10/17/22 11:56 AM, Ryzhik Ivan wrote: >> >> Hi, did you mean that i must call t_write_req once before REQUEST_ROUTE >> is finished? In this case the transaction was removed. >> "even if you do not have to actually write anything to outer world - >> just fake it." - i must use fifo and i must read data from it, in else >> we got: >> ERROR:tm:write_to_fifo: nobody listening on [/tmp/moh.fifo] fifo for >> reading! >> ERROR:tm:t_write_req: write_to_fifo failed >> And last question is may I use sleep(20) at the end of route to keep >> transaction? or can i use modparam("tm", "wt_timer", 20)? >> Regards, Ivan >> >> пн, 17 окт. 2022 г. в 09:38, Bogdan-Andrei Iancu : >> >>> Hi Ryzhik, >>> >>> Right, the transaction must be forced to stay until you are done with a >>> final reply. Unfortunately there is no clear way to do this from script >>> (this may be subject of further small improvements), but you can try taking >>> advantage of the `t_write_req` [1] for this purpose, even if you do not >>> have to actually write anything to outer world - just fake it. >>> >>> >>> [1] >>> https://opensips.org/html/docs/modules/3.2.x/tm.html#func_t_write_req >>> >>> Regards, >>> >>> Bogdan-Andrei Iancu >>> >>> OpenSIPS Founder and Developer >>> https://www.opensips-solutions.com >>> OpenSIPS Summit 27-30 Sept 2022, Athens >>> https://www.opensips.org/events/Summit-2022Athens/ >>> >>> On 10/13/22 2:45 PM, Ryzhik Ivan wrote: >>> >>> Hi. >>> One more question. >>> Everything works fine except the transaction was deleted after 15 >>> sec after the initial route was finished. >>> on INVITE i last do t_reply_with_body(183, "Session progress", ...) and >>> than exit; >>> >>> on end route log : >>> >>> 2022-10-13T10:58:01.994598+00:00 DBG:tm:_reply_light: reply sent out. >>> buf=0x7f558a087d98: SIP/2.0 1..., shmem=0x7f5549797470: SIP/2.0 1 >>> 2022-10-13T10:58:01.994676+00:00 DBG:tm:_reply_light: finished >>> >>> 2022-10-13T10:58:01.995835+00:00 DBG:tm:do_t_cleanup: transaction >>> 0x7f5549793b18 already updated! Skipping update! >>> 2022-10-13T10:58:01.996020+00:00 DBG:tm:cleanup_uac_timers: RETR/FR >>> timers reset >>> 2022-10-13T10:58:01.996202+00:00 *DBG:tm:insert_timer_unsafe: [2]: >>> 0x7f5549793b98 (12)* >>> 2022-10-13T10:58:01.996317+00:00 * DBG:tm:t_unref: UNREF_UNSAFE: >>> [0x7f5549793b18] after is 0* >>> 2022-10-13T10:58:01.996488+00:00 DBG:core:destroy_avp_list: destroying >>> list (nil) >>> 2022-10-13T10:58:01.996673+00:00 DBG:core:receive_msg: cleaning up >>> >>> 2022-10-13T10:58:07.651091+00:00* DBG:tm:timer_routine: timer >>> routine:2,tl=0x7f5549793b98 next=(nil), timeout=12* >>> 2022-10-13T10:58:07.651332+00:00 DBG:tm:wait_handler: removing >>> 0x7f5549793b18 from table >>> 2022-10-13T10:58:07.651425+00:00 DBG:tm:delete_ce*ll: delete >>> transaction 0x7f5549793b18* >>> 2022-10-13T10:58:07.651513+00:00 DBG:tm:wait_handler: done >>> >>> Can you tell me how I can i fix this? Transaction marked safe for >>> deletion... >>> Regards, Ivan >>> >>> ср, 12 окт. 2022 г. в 13:11, Bogdan-Andrei Iancu : >>> >>>> Perfect !!! >>>> >>>> Bogdan-Andrei Iancu >>>> >>>> OpenSIPS Founder and Developer >>>> https://www.opensips-solutions.com >>>> OpenSIPS Summit 27-30 Sept 2022, Athens >>>> https://www.opensips.org/events/Summit-2022Athens/ >>>> >>>> On 10/12/22 1:09 PM, Ryzhik Ivan wrote: >>>> >>>> I found a solution. hex strings are reversed). >>>> Thank you very much! >>>> >>>> ср, 12 окт. 2022 г. в 12:59, Ryzhik Ivan : >>>> >>>>> and one more research: $T_id returns hex encoded label.hashid >>>>> but my attempts failed: >>>>> got $T_id = 6545e285.3fe4 >>>>> Send: {"jsonrpc": "2.0", "method": "t_reply", "id": 1, "params": >>>>> {"code": "487", "reason": "Terminating", "trans_id": "16356:1699078789", >>>>> "to_tag": ""}} >>>>> Got: b'{"jsonrpc":"2.0","error":{"code":404,"message":"Transaction not >>>>> found"},"id":1}' >>>>> >>>>> >>>>> ср, 12 окт. 2022 г. в 11:13, Ryzhik Ivan : >>>>> >>>>>> Thank you, Bogdan. >>>>>> I got stuck with tm documentation. >>>>>> 1) MI t_reply command has named parameters, ok, no problem. >>>>>> 2) trans_id - transaction identifier (has the hash_entry:label >>>>>> format) - what is this? if i use $T_id i got reply "Invalid trans_id". >>>>>> 3) Where can I get to_tag from script level on initial invite? >>>>>> ... >>>>>> t_reply_with_body(183, "Session progress", >>>>>> $(var(body){re.subst,$var(re)}) ); >>>>>> avp_db_query("insert into moh (callid, timeout, tid,totag) >>>>>> values ('$ci', $var(wait_time), '$T_id', '??????')"); >>>>>> ... >>>>>> >>>>>> Regards, Ivan. >>>>>> >>>>>> вт, 11 окт. 2022 г. в 12:35, Bogdan-Andrei Iancu >>>>> >: >>>>>> >>>>>>> Hi Ivan, >>>>>>> >>>>>>> you can use timer_route, but as there is no way to send a reply for >>>>>>> a particular transaction from script level (only to the currently processed >>>>>>> request), you will have to trigger the MI cmds from the timer route, which >>>>>>> is a bit hackish .... >>>>>>> >>>>>>> Regards, >>>>>>> >>>>>>> Bogdan-Andrei Iancu >>>>>>> >>>>>>> OpenSIPS Founder and Developer >>>>>>> https://www.opensips-solutions.com >>>>>>> OpenSIPS Summit 27-30 Sept 2022, Athens >>>>>>> https://www.opensips.org/events/Summit-2022Athens/ >>>>>>> >>>>>>> On 10/11/22 11:47 AM, Ryzhik Ivan wrote: >>>>>>> >>>>>>> Hi, Bogdan! >>>>>>> What d' you think, can we use timer_route instead of an external >>>>>>> script? >>>>>>> Regards, Ivan. >>>>>>> >>>>>>> пн, 10 окт. 2022 г. в 17:04, Bogdan-Andrei Iancu < >>>>>>> bogdan at opensips.org>: >>>>>>> >>>>>>>> Hi Ryzhik, >>>>>>>> >>>>>>>> Without a t_relay() it makes not much sense to have an dialog >>>>>>>> structure at all - the dialog module in opensips is actually design for >>>>>>>> proxied calls, not for UAC calls. >>>>>>>> >>>>>>>> IMO, you should keep it a transaction level, by sending replies >>>>>>>> back only. When getting the INVITE, put its call-id into a DB table (to >>>>>>>> keep only the "active" session) together with a lifetime / expiration time. >>>>>>>> When getting a CANCEL, update the table (set lifetime to 0), to know it is >>>>>>>> terminated. And use an simple external script that keeps scanning the DB >>>>>>>> for (1) sending 487 Terminated via MI if the record has 0 lifetime or (2) >>>>>>>> send a 408 Timeout via MI if the lifetime exceeded. >>>>>>>> In a similar way you can handle the BYE - send back 200OK for the >>>>>>>> BYE and set 0 in lifetime, to send a 487 canceled back >>>>>>>> >>>>>>>> Regards, >>>>>>>> >>>>>>>> Bogdan-Andrei Iancu >>>>>>>> >>>>>>>> OpenSIPS Founder and Developer >>>>>>>> https://www.opensips-solutions.com >>>>>>>> OpenSIPS Summit 27-30 Sept 2022, Athens >>>>>>>> https://www.opensips.org/events/Summit-2022Athens/ >>>>>>>> >>>>>>>> On 10/10/22 4:33 PM, Ryzhik Ivan wrote: >>>>>>>> >>>>>>>> Hello! >>>>>>>> My opensips version is 3.1 with tm,dialog and rtpengine modules. >>>>>>>> On incoming INVITE i'm creating an early dialog with 183 replies >>>>>>>> and i'm playing audio to caller with rtpengine, no t_relay() on this step, >>>>>>>> OS is acting as UAS endpoint. >>>>>>>> If the caller cancels the invite with a CANCEL message - all works >>>>>>>> great. >>>>>>>> But some users terminate dialog with BYE message. >>>>>>>> 1) on BYE with to-tag OS can't find dialog with match_dialog(), >>>>>>>> because to-tag presents. >>>>>>>> 2) if i use load_dialog_ctx($ci) - it is possible to handle BYE. >>>>>>>> 3) in early dialog termination with BYE we also need to send final >>>>>>>> response to the INVITE transaction. >>>>>>>> >>>>>>>> Maybe I did something wrong, but I can't handle the final response >>>>>>>> to INVITE in this case. >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>> >>> >> > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daniel.zanutti at gmail.com Sat Oct 22 22:03:24 2022 From: daniel.zanutti at gmail.com (Daniel Zanutti) Date: Sat, 22 Oct 2022 19:03:24 -0300 Subject: [OpenSIPS-Users] - Not sending ACK back! In-Reply-To: References: Message-ID: Hi Nitesh I think the default OPENSIPS.CFG script has a Registrar Server and the Lookup function. Please take a look there. To call then, you have to use lookup function. The ACK missing feature maybe related to NAT problems. Where is the ACK lost? Did origin sent to Opensips? Did opensips forward to destination? Please take a deep look at default opensips.cfg, I tested it in the past and worked fine. On Fri, Oct 21, 2022 at 3:05 PM Nitesh Divecha wrote: > Daniel, > > Thanks for your detailed email. Much appreciated! > > Yes I totally understand about OpenSIPS and I'm going over all the > documentations and tutorials I can find! My background is from Asterisk, so > with that mentality I'm tackling OpenSIPS. > > Asterisk (Context) vs OpenSIPS (C-style script), it is a huge challenge > but getting the hang of it! > > Lets pick option (3) Routing local calls (ATA to ATA)... Do you have any > examples I can follow and set up a local route? I set up two extensions > (8883456 and 7773456) via OpenSIPS Control Panel and I was able to register > two ATA's. I do have the Registrar module loaded... How can I call each > other? > > #### REGISTRAR module > > loadmodule "registrar.so" > > modparam("registrar", "default_expires", 3600) > > modparam("registrar", "min_expires", 60) > > modparam("registrar", "max_expires", 120) > > # modparam("registrar", "tcp_persistent_flag", "TCP_PERSISTENT") > > # modparam("registrar", "received_avp", "$avp(received_nh)")/* uncomment > the next line not to allow more than 10 contacts per AOR */ > > modparam("registrar", "max_contacts", 10) > > modparam("registrar", "received_avp", "$avp(rcv)") > > modparam("registrar", "retry_after", 30) > > > Regarding option (4) - I have both options. IP to IP and User/Pass > authentication provider. Using User/Pass I was able to register OpenSIPS as > UAC to a remote server and I was able to make outbound calls but call keeps > on dropping due to no ACK. > > Cheers, > Nitesh > > > > > > On Fri, Oct 21, 2022 at 1:26 PM Daniel Zanutti > wrote: > >> Hi Nitesh >> >> As you already know, opensips is a low level software. You have to >> understand several aspects of SIP, network, RTP, DNS that when you use >> Asterisk, most you don't need to understand deep. >> >> Trying to help you, your script is way simple for you achievements. You >> need: >> 1) Check NAT on all request + all replies. This is to fix your SIP >> messages. >> >> 2) Check if you need to apply RTPPROXY on the call. You can use the >> "engage" function on INVITE then forget about it OR you can use manual way >> with "offer" function and handle all scenarios manually. For example, call >> the "answer" function on the 200 OK. Then delete on BYE. >> >> 3) Routing local calls (ATA to ATA) you need to handle the Register first >> with "save" function, then later handle the INVITE with the "lookup" >> function, both of Registrar module. >> >> 4) PSTN can be used as a direct route or some dynamic routing solution. >> Make it work first with direct routing. Need to check how authenticate >> works on your carrier. If IP based will be fine, if user/pass you need to >> make your opensips authenticate, it's a little harder. >> >> 5) DID - You have to create some specific INBOUND rules. Calls will be >> anonymous or authenticated? >> >> 6) Fax - Better solve other issues first. >> >> Hope this gives you some direction. Look for some tutorials. >> >> Regards >> >> On Fri, Oct 21, 2022 at 11:11 AM Nitesh Divecha < >> aviator.nitesh.d at gmail.com> wrote: >> >>> Hello All, >>> >>> I have been scratching my head for a few days now... Just to recap: >>> >>> I'm a newbie with OpenSIPS so bear with me... I got OpenSIPS 3.3.1 >>> (residential) running on Debian 11 with OpenSIPS Control Panel 9.3.2 and >>> MySQL. >>> >>> My goal is to: >>> 1) Make two ATA's register and call each other (locally)... *Stopped >>> working, I think routing logic is missing.* >>> 2) Make ATA to call PSTN via an outbound SIP trunk or DID provider... *No >>> ACK sent to Outbound provider.* >>> 3) Receive inbound calls from PSTN or SIP trunk and forward it to >>> registered ATA... *Getting rejected.* >>> 4) Able to send and receive faxes from and to PSTN... *Haven't even >>> touched.* >>> >>> Fast forward... I did achieve a few of my goals but they stopped >>> working... You fix one thing and you break others... >>> >>> My current issue is OpenSIPS is not sending ACK back to the Outbound >>> provider when I make calls to PSTN thus calls are getting dropped from the >>> Outbound provider due to no ACK. This issue started when I implemented >>> topology_hiding('C"), rtpproxy_offer("ro"), uac_replace_from( , >>> "$avp(furi)"). >>> >>> Here is my code snippet: >>> >>> ####### Routing Logic ######## >>> >>> >>> # main request routing logic >>> >>> >>> route{ >>> >>> >>> #if ($rU=~"^\+[1-9][0-9]+$") { >>> >>> if (dp_translate(10 ,$rU ,$rU) ) { >>> >>> xlog("*** 2. Dial plan translate from source $avp(src) >>> to $rU ***\n"); >>> >>> >>> $avp(furi) = "sip:aaabbbcccc at gothamcity.com"; >>> >>> uac_replace_from( , "$avp(furi)"); >>> >>> #strip(1); >>> >>> if (!do_routing(0)) { >>> >>> send_reply(500,"No PSTN Route found"); >>> >>> exit; >>> >>> } >>> >>> # t_on_branch("change_from"); >>> >>> route(relay); >>> >>> exit; >>> >>> } >>> >>> >>> >>> route[relay] { >>> >>> xlog("*** 3. Entering route relay ***\n"); >>> >>> # for INVITEs enable some additional helper routes >>> >>> if (is_method("INVITE")) { >>> >>> topology_hiding("C"); >>> >>> if(remove_hf("User-Agent")){ >>> >>> xlog("*** 4. User-Agent found and removed. >>> ***\n"); >>> >>> } >>> >>> >>> if (isflagset("NAT") && has_body("application/sdp")) { >>> >>> rtpproxy_offer("ro"); >>> >>> #rtpproxy_offer(); >>> >>> } >>> >>> >>> t_on_branch("per_branch_ops"); >>> >>> t_on_reply("handle_nat"); >>> >>> t_on_failure("missed_call"); >>> >>> } >>> >>> >>> if (isflagset("NAT")) { >>> >>> add_rr_param(";nat=yes"); >>> >>> } >>> >>> >>> if (!t_relay()) { >>> >>> send_reply(500,"Internal Error"); >>> >>> } >>> >>> exit; >>> >>> } >>> >>> Any thoughts or suggestions on what to check for ACK? >>> >>> Cheers, >>> Nitesh >>> >>> >>> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Oct 24 15:50:35 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 24 Oct 2022 18:50:35 +0300 Subject: [OpenSIPS-Users] Loadbalancer for Registrations and calls In-Reply-To: References: Message-ID: <1f2663e6-68c8-8fb1-127e-25e3bfb882f5@opensips.org> Hi Kevin 1) use the call-id based dispatching alg, so the INVITE with credentials will get sent to the same destination 2) yes, mid-register (as register SIP mechanism) is allows the UA to receive calls only, it is not related to handling the outbound calls of the UA. I understand you try to get a call from A to B to be sent to the same dispatcher destination as the registers of B, right ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/21/22 10:28 PM, Kevin Kennedy wrote: > I believe I have mid_registrar somewhat working with dispatcher, but I > seem to have a coulple issues. > > 1) When I receive the 401 request the second authentication INVITE is > sending to another $ru host in the dispatcher instead of the initial > one it sent to. > 2) How do I send an outbound INVITE matching the registration cache  > to the same $ru that it is Registered to. >     mid_registrar_lookup uses the AOR instead of contact so it is only > allowing the Incoming INVITEs to reach the client. > > Thank ou. > > Thank you. > > On Fri, Aug 19, 2022 at 8:46 AM Alex > wrote: > > Hello, > > setup mid registrar easy with this instruction. > https://www.opensips.org/Documentation/Tutorials-MidRegistrar > > There is link to config > > But It relays every Registration request every 60sec on my server. > Please let me know if you could set up like on picture in instruction. > > > > > > чт, 18 авг. 2022 г. в 18:37, Kevin Kennedy >: > > I am looking for a configuration to be able to front end > multiple SBC's to load balance Registrations and keep track of > them to send INVITE's to the corresponding SBC. > > I am thinking of using a combination of Dispatcher and > midregister, but not sure how to set this up correctly. > > Any thoughts? > > Thank you. > > Kevin > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > -- > С уважением, > Якимкин Алексей > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From venefax at gmail.com Mon Oct 24 22:27:56 2022 From: venefax at gmail.com (Saint Michael) Date: Mon, 24 Oct 2022 18:27:56 -0400 Subject: [OpenSIPS-Users] Error Message-ID: any idea what may cause this? [519171] ERROR:core:io_wait_loop_epoll: failed to remove from epoll Bad file descriptor(9) Oct 24 22:23:00 proxy opensips[519171]: Oct 24 22:23:00 [519171] ERROR:core:io_wait_loop_epoll: [UDP_worker] unset/bogus map (idx=367) triggered for 1 by epoll (fd=-1,type=0,flags=0,data=(nil)) -> removing from epoll Philip From ideanethelp at gmail.com Mon Oct 24 23:12:06 2022 From: ideanethelp at gmail.com (ideanet help) Date: Tue, 25 Oct 2022 12:12:06 +1300 Subject: [OpenSIPS-Users] Error In-Reply-To: References: Message-ID: Hi Philip, Which version do you have? Regards, Jazzi On Tue, Oct 25, 2022 at 11:30 AM Saint Michael wrote: > any idea what may cause this? > > [519171] ERROR:core:io_wait_loop_epoll: failed to remove from epoll > Bad file descriptor(9) > Oct 24 22:23:00 proxy opensips[519171]: Oct 24 22:23:00 [519171] > ERROR:core:io_wait_loop_epoll: [UDP_worker] unset/bogus map (idx=367) > triggered for 1 by epoll (fd=-1,type=0,flags=0,data=(nil)) -> removing > from epoll > > > Philip > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From venefax at gmail.com Tue Oct 25 01:18:13 2022 From: venefax at gmail.com (Saint Michael) Date: Mon, 24 Oct 2022 21:18:13 -0400 Subject: [OpenSIPS-Users] Error In-Reply-To: References: Message-ID: opensips -V version: opensips 3.1.11 (x86_64/linux) flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_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: 8cdc3e3f6 main.c compiled on 05:02:26 Oct 14 2022 with gcc 9 On Mon, Oct 24, 2022 at 7:15 PM ideanet help wrote: > > Hi Philip, > Which version do you have? > > Regards, > Jazzi > > On Tue, Oct 25, 2022 at 11:30 AM Saint Michael wrote: >> >> any idea what may cause this? >> >> [519171] ERROR:core:io_wait_loop_epoll: failed to remove from epoll >> Bad file descriptor(9) >> Oct 24 22:23:00 proxy opensips[519171]: Oct 24 22:23:00 [519171] >> ERROR:core:io_wait_loop_epoll: [UDP_worker] unset/bogus map (idx=367) >> triggered for 1 by epoll (fd=-1,type=0,flags=0,data=(nil)) -> removing >> from epoll >> >> >> Philip >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From 365186991 at qq.com Tue Oct 25 08:28:48 2022 From: 365186991 at qq.com (=?ISO-8859-1?B?Y2hlbnl6enp6?=) Date: Tue, 25 Oct 2022 16:28:48 +0800 Subject: [OpenSIPS-Users] can several SIP phones with same SIP account ring together and hang up asynchronous Message-ID: Hi Bogdan-Andrei,thanks for your reply. I had set up a opensips service on my Ubuntu 18.04.6 , and opensips version: opensips 3.2.6 (x86_64/linux). When I test that case, I use two desktop linphone login same sip accout 01010101 (callee A/B). and I use my Android linphone(caller C) invite A/B, A/B rings together which works well. but I hang up the callee A , B also terminated . I use wireshark to capture the packet on server side. it show that : 1. when callee A(192.168.2.123) hand up, it respond 603 to the server(192.168.2.108) 2. server(192.168.2.108) forwards the respond 603 to caller C(192.168.2.115) 3. server(192.168.2.108) create a CANCEL to callee B(192.168.2.127) so, it seems opensips server CANCEL B automatically. My project need to meet the ability that callee A declines but callee B still ring. I am a newbia to opensips, I don't know what is going on . How to enable the ability as you say? Best Regards, Chen -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Mon Oct 24 15:52:26 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Mon, 24 Oct 2022 18:52:26 +0300 Subject: [OpenSIPS-Users] early dialog termination In-Reply-To: References: <0907245b-2b56-5a0c-cdaf-aca2d8853405@opensips.org> <6746fcc4-e376-0c98-9340-eebfb70c2a65@opensips.org> <94658a76-9fb0-1bc7-22f7-25b1cf3faf8d@opensips.org> Message-ID: Hi Takeshi, Thanks for the note here, I will check the PR. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/22/22 12:53 PM, mayamatakeshi wrote: > Hi, > I've been following this discussion as I have a similar use case. > I have created a PR offering a new function t_reply_by_callid for the > module tm to simplify this: > https://github.com/OpenSIPS/opensips/pull/2937 > > > Regards, > Takeshi > > On Thu, Oct 20, 2022 at 4:04 PM Bogdan-Andrei Iancu > > wrote: > > Ivan, > > Actually a simpler approach will be to use > t_wait_for_new_branches() instead of that t_write function, it > should do the same trick (postponing the deletion of the > transaction), but without any side effects. > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 5-16 Dec 2022, online > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/19/22 10:21 AM, Ryzhik Ivan wrote: >> Sorry, I mean no sleep, i mean async( sleep($var(wait_time)), >> after_sleep ); >> Regards, Ivan. >> >> вт, 18 окт. 2022 г. в 14:42, Bogdan-Andrei Iancu >> >: >> >> Hi, >> >> yes, call it before ending the REQUEST route. I'm 100% the >> transaction is not deleted before the end of the route. And >> try to use the unix sock flavor for the function, not the >> fifo one. >> >> DO NOT use the sleep, you will block your whole opensips. >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Bootcamp 5-16 Dec 2022, online >> https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ >> >> On 10/17/22 11:56 AM, Ryzhik Ivan wrote: >>> Hi, did you mean that i must call t_write_req once before >>> REQUEST_ROUTE is finished? In this case the transaction was >>> removed. >>> "even if you do not have to actually write anything to outer >>> world - just fake it." - i must use fifo and i must read >>> data from it, in else we got: >>> ERROR:tm:write_to_fifo: nobody listening on [/tmp/moh.fifo] >>> fifo for reading! >>> ERROR:tm:t_write_req: write_to_fifo failed >>> And last question is may I use sleep(20) at the end of route >>> to keep transaction? or can i use modparam("tm", "wt_timer", >>> 20)? >>> Regards, Ivan >>> >>> пн, 17 окт. 2022 г. в 09:38, Bogdan-Andrei Iancu >>> >: >>> >>> Hi Ryzhik, >>> >>> Right, the transaction must be forced to stay until you >>> are done with a final reply. Unfortunately there is no >>> clear way to do this from script (this may be subject of >>> further small improvements), but you can try taking >>> advantage of the `t_write_req` [1] for this purpose, >>> even if you do not have to actually write anything to >>> outer world - just fake it. >>> >>> >>> [1] >>> https://opensips.org/html/docs/modules/3.2.x/tm.html#func_t_write_req >>> >>> >>> Regards, >>> >>> Bogdan-Andrei Iancu >>> >>> OpenSIPS Founder and Developer >>> https://www.opensips-solutions.com >>> OpenSIPS Summit 27-30 Sept 2022, Athens >>> https://www.opensips.org/events/Summit-2022Athens/ >>> >>> On 10/13/22 2:45 PM, Ryzhik Ivan wrote: >>>> Hi. >>>> One more question. >>>> Everything works fine except the transaction was >>>> deleted after 15 sec after the initial route was finished. >>>> on INVITE i last do t_reply_with_body(183, "Session >>>> progress", ...) and than exit; >>>> >>>> on end route log : >>>> >>>> 2022-10-13T10:58:01.994598+00:00  DBG:tm:_reply_light: >>>> reply sent out. buf=0x7f558a087d98: SIP/2.0 1..., >>>> shmem=0x7f5549797470: SIP/2.0 1 >>>> 2022-10-13T10:58:01.994676+00:00  DBG:tm:_reply_light: >>>> finished >>>> >>>> 2022-10-13T10:58:01.995835+00:00  DBG:tm:do_t_cleanup: >>>> transaction 0x7f5549793b18 already updated! Skipping >>>> update! >>>> 2022-10-13T10:58:01.996020+00:00 >>>>  DBG:tm:cleanup_uac_timers: RETR/FR timers reset >>>> 2022-10-13T10:58:01.996202+00:00 >>>> *DBG:tm:insert_timer_unsafe: [2]: 0x7f5549793b98 (12)* >>>> 2022-10-13T10:58:01.996317+00:00 * DBG:tm:t_unref: >>>> UNREF_UNSAFE: [0x7f5549793b18] after is 0* >>>> 2022-10-13T10:58:01.996488+00:00 >>>>  DBG:core:destroy_avp_list: destroying list (nil) >>>> 2022-10-13T10:58:01.996673+00:00  DBG:core:receive_msg: >>>> cleaning up >>>> >>>> 2022-10-13T10:58:07.651091+00:00* DBG:tm:timer_routine: >>>> timer routine:2,tl=0x7f5549793b98 next=(nil), timeout=12* >>>> 2022-10-13T10:58:07.651332+00:00  DBG:tm:wait_handler: >>>> removing 0x7f5549793b18 from table >>>> 2022-10-13T10:58:07.651425+00:00  DBG:tm:delete_ce*ll: >>>> delete transaction 0x7f5549793b18* >>>> 2022-10-13T10:58:07.651513+00:00  DBG:tm:wait_handler: done >>>> >>>> Can you tell me how I can i fix this? Transaction >>>> marked safe for deletion... >>>> Regards, Ivan >>>> >>>> ср, 12 окт. 2022 г. в 13:11, Bogdan-Andrei Iancu >>>> >: >>>> >>>> Perfect !!! >>>> >>>> Bogdan-Andrei Iancu >>>> >>>> OpenSIPS Founder and Developer >>>> https://www.opensips-solutions.com >>>> OpenSIPS Summit 27-30 Sept 2022, Athens >>>> https://www.opensips.org/events/Summit-2022Athens/ >>>> >>>> On 10/12/22 1:09 PM, Ryzhik Ivan wrote: >>>>> I found a solution. hex strings are reversed). >>>>> Thank you very much! >>>>> >>>>> ср, 12 окт. 2022 г. в 12:59, Ryzhik Ivan >>>>> >>>> >: >>>>> >>>>> and one more research: $T_id returns >>>>> hex encoded label.hashid >>>>> but my attempts failed: >>>>> got $T_id = 6545e285.3fe4 >>>>> Send: {"jsonrpc": "2.0", "method": "t_reply", >>>>> "id": 1, "params": {"code": "487", "reason": >>>>> "Terminating", "trans_id": "16356:1699078789", >>>>> "to_tag": ""}} >>>>> Got: >>>>> b'{"jsonrpc":"2.0","error":{"code":404,"message":"Transaction >>>>> not found"},"id":1}' >>>>> >>>>> >>>>> ср, 12 окт. 2022 г. в 11:13, Ryzhik Ivan >>>>> >>>> >: >>>>> >>>>> Thank you, Bogdan. >>>>> I got stuck with tm documentation. >>>>>   1) MI t_reply command has named >>>>> parameters, ok, no problem. >>>>>   2) trans_id - transaction identifier >>>>> (has the hash_entry:label format)  - what >>>>> is this? if i use $T_id i got reply >>>>> "Invalid trans_id". >>>>>   3) Where can I get to_tag from script >>>>> level on initial invite? >>>>>       ... >>>>> t_reply_with_body(183, "Session progress", >>>>> $(var(body){re.subst,$var(re)}) ); >>>>> avp_db_query("insert into moh (callid, >>>>> timeout, tid,totag) values ('$ci', >>>>> $var(wait_time), '$T_id', '??????')"); >>>>>       ... >>>>> >>>>> Regards, Ivan. >>>>> >>>>> вт, 11 окт. 2022 г. в 12:35, Bogdan-Andrei >>>>> Iancu >>>> >: >>>>> >>>>> Hi Ivan, >>>>> >>>>> you can use timer_route, but as there >>>>> is no way to send a reply for a >>>>> particular transaction from script >>>>> level (only to the currently processed >>>>> request), you will have to trigger the >>>>> MI cmds from the timer route, which is >>>>> a bit hackish .... >>>>> >>>>> Regards, >>>>> >>>>> Bogdan-Andrei Iancu >>>>> >>>>> OpenSIPS Founder and Developer >>>>> https://www.opensips-solutions.com >>>>> OpenSIPS Summit 27-30 Sept 2022, Athens >>>>> https://www.opensips.org/events/Summit-2022Athens/ >>>>> >>>>> On 10/11/22 11:47 AM, Ryzhik Ivan wrote: >>>>>> Hi, Bogdan! >>>>>> What d' you think, can we use >>>>>> timer_route instead of an external >>>>>> script? >>>>>> Regards, Ivan. >>>>>> >>>>>> пн, 10 окт. 2022 г. в 17:04, >>>>>> Bogdan-Andrei Iancu >>>>>> >>>>> >: >>>>>> >>>>>> Hi Ryzhik, >>>>>> >>>>>> Without a t_relay() it makes not >>>>>> much sense to have an dialog >>>>>> structure at all - the dialog >>>>>> module in opensips is actually >>>>>> design for proxied calls, not for >>>>>> UAC calls. >>>>>> >>>>>> IMO, you should keep it a >>>>>> transaction level, by sending >>>>>> replies back only. When getting >>>>>> the INVITE, put its call-id into >>>>>> a DB table (to keep only the >>>>>> "active" session) together with a >>>>>> lifetime / expiration time. When >>>>>> getting a CANCEL, update the >>>>>> table (set lifetime to 0), to >>>>>> know it is terminated. And use an >>>>>> simple external script that keeps >>>>>> scanning the DB for (1) sending >>>>>> 487 Terminated via MI if the >>>>>> record has 0 lifetime or (2) send >>>>>> a 408 Timeout via MI if the >>>>>> lifetime exceeded. >>>>>> In a similar way you can handle >>>>>> the BYE - send back 200OK for the >>>>>> BYE and set 0 in lifetime, to >>>>>> send a 487 canceled back >>>>>> >>>>>> Regards, >>>>>> >>>>>> Bogdan-Andrei Iancu >>>>>> >>>>>> OpenSIPS Founder and Developer >>>>>> https://www.opensips-solutions.com >>>>>> OpenSIPS Summit 27-30 Sept 2022, Athens >>>>>> https://www.opensips.org/events/Summit-2022Athens/ >>>>>> >>>>>> On 10/10/22 4:33 PM, Ryzhik Ivan >>>>>> wrote: >>>>>>> Hello! >>>>>>> My opensips version is 3.1 with >>>>>>> tm,dialog and rtpengine modules. >>>>>>> On incoming INVITE i'm creating >>>>>>> an early dialog with 183 replies >>>>>>> and i'm playing audio to caller >>>>>>> with rtpengine, no t_relay() on >>>>>>> this step, OS is acting as UAS >>>>>>> endpoint. >>>>>>> If the caller cancels the invite >>>>>>> with a CANCEL message - all >>>>>>> works great. >>>>>>> But some users terminate dialog >>>>>>> with BYE message. >>>>>>> 1) on BYE with to-tag OS can't >>>>>>> find dialog with match_dialog(), >>>>>>> because to-tag presents. >>>>>>> 2) if i use load_dialog_ctx($ci) >>>>>>> -  it is possible to handle BYE. >>>>>>> 3) in early dialog termination >>>>>>> with BYE we also need to send >>>>>>> final response to the INVITE >>>>>>> transaction. >>>>>>> >>>>>>> Maybe I did something wrong, but >>>>>>> I can't handle the final >>>>>>> response to INVITE in this case. >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Users mailing list >>>>>>> Users at lists.opensips.org >>>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>>>>> >>>>> >>>> >>> >> > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From venefax at gmail.com Tue Oct 25 11:15:21 2022 From: venefax at gmail.com (Saint Michael) Date: Tue, 25 Oct 2022 07:15:21 -0400 Subject: [OpenSIPS-Users] Orderly shutdown Message-ID: Dear friends is there a command I can send to Opensips 3.1, so all calls are shut down and BYEs are sent to both the caller and the callee? Then of course, opensips closes down. From carsten at ng-voice.com Tue Oct 25 12:30:08 2022 From: carsten at ng-voice.com (Carsten Bock) Date: Tue, 25 Oct 2022 14:30:08 +0200 Subject: [OpenSIPS-Users] can several SIP phones with same SIP account ring together and hang up asynchronous In-Reply-To: References: Message-ID: Hi, this is actually fully SIP/RFC compliant. By definition, any 6xx answer provides the "ultimate, global answer", to put it in simple words: "I cannot reply to the request and I know no one else can". On the contrary as per the definition/RFC, a 5xx answer indicates, that a single endpoint is not able to handle the request (temporarily) due to technical reasons, while others still may be able to answer this. The right answer would be, that the SIP endpoint should respond with a 4xx Answer to indicate that the call was declined on a user-based decision or status (e.g. "busy"). I haven't tried this, but maybe you can check the following parameter: https://opensips.org/docs/modules/3.4.x/tm.html#param_disable_6xx_block This parameter should change the behavior on receiving a 6xx reply - however, I never tried it myself. Thanks, Carsten -- Carsten Bock I CTO & Founder ng-voice GmbH Trostbrücke 1 I 20457 Hamburg I Germany T +49 179 2021244 I www.ng-voice.com Registry Office at Local Court Hamburg, HRB 120189 Managing Directors: Dr. David Bachmann, Carsten Bock Am Di., 25. Okt. 2022 um 10:29 Uhr schrieb chenyzzzz via Users < users at lists.opensips.org>: > Hi Bogdan-Andrei, > > thanks for your reply. I had set up a opensips service on my Ubuntu 18.04.6 , and opensips version: opensips 3.2.6 (x86_64/linux). > > When I test that case, I use two desktop linphone login same sip accout 01010101 (callee A/B). and I use my Android linphone(caller C) invite A/B, A/B rings together which works well. > but I hang up the callee A , B also terminated . > > I use wireshark to capture the packet on server side. it show that : > 1. when callee A(192.168.2.123) hand up, it respond 603 to the server(192.168.2.108) > 2. server(192.168.2.108) forwards the respond 603 to caller C(192.168.2.115) > 3. server(192.168.2.108) create a CANCEL to callee B(192.168.2.127) > so, it seems opensips server CANCEL B automatically. > > > My project need to meet the ability that callee A declines but callee B still ring. I am a newbia to opensips, I don't know what is going on . How to enable the ability as you say? > > Best Regards, > > Chen > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard at rikrobson.co.uk Tue Oct 25 14:22:41 2022 From: richard at rikrobson.co.uk (Richard Robson) Date: Tue, 25 Oct 2022 15:22:41 +0100 Subject: [OpenSIPS-Users] 603 not treated as a failure Message-ID: I am currently testing version 3.3 and I have a scenario where we will receive a 603 to an invite. this needs to be failed over to the next destination. we are using dispatcher for this. While testing I am finding that opensips is treating the 603 a a relpy and not as a failure and its being handled by the reply route and not by the failure route. passing the message back to the UAC.. Is this by design or is there some setting where the 603 can be treated as a failure and be handled by the specified failure route and failed over to the next destination.? Regards, Richard From social at bohboh.info Tue Oct 25 14:33:58 2022 From: social at bohboh.info (Social Boh) Date: Tue, 25 Oct 2022 09:33:58 -0500 Subject: [OpenSIPS-Users] 603 not treated as a failure In-Reply-To: References: Message-ID: <782d5246-6eb2-b978-17a1-3512e73136cd@bohboh.info> maybe: * *modparam("tm", "disable_6xx_block", 1)* to TM module --- I'm SoCIaL, MayBe El 25/10/2022 a las 9:22 a. m., Richard Robson escribió: > I am currently testing version 3.3 and I have a scenario where we will > receive a 603 to an invite. this needs to be failed over to the next > destination. we are using dispatcher for this. > > While testing I am finding that opensips is treating the 603 a a relpy > and not as a failure and its being handled by the reply route and not > by the failure route. passing the message back to the UAC.. > > Is this by design or is there some setting where the 603 can be > treated as a failure and be handled by the specified failure route and > failed over to the next destination.? > > > Regards, > > > Richard > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From johan at democon.be Tue Oct 25 14:51:34 2022 From: johan at democon.be (johan) Date: Tue, 25 Oct 2022 16:51:34 +0200 Subject: [OpenSIPS-Users] 603 not treated as a failure In-Reply-To: <782d5246-6eb2-b978-17a1-3512e73136cd@bohboh.info> References: <782d5246-6eb2-b978-17a1-3512e73136cd@bohboh.info> Message-ID: good catch. On 25/10/2022 16:33, Social Boh wrote: > > maybe: > > * > > *modparam("tm", "disable_6xx_block", 1)* > > to TM module > > --- > I'm SoCIaL, MayBe > El 25/10/2022 a las 9:22 a. m., Richard Robson escribió: >> I am currently testing version 3.3 and I have a scenario where we >> will receive a 603 to an invite. this needs to be failed over to the >> next destination. we are using dispatcher for this. >> >> While testing I am finding that opensips is treating the 603 a a >> relpy and not as a failure and its being handled by the reply route >> and not by the failure route. passing the message back to the UAC.. >> >> Is this by design or is there some setting where the 603 can be >> treated as a failure and be handled by the specified failure route >> and failed over to the next destination.? >> >> >> Regards, >> >> >> Richard >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From venefax at gmail.com Tue Oct 25 14:52:24 2022 From: venefax at gmail.com (Saint Michael) Date: Tue, 25 Oct 2022 10:52:24 -0400 Subject: [OpenSIPS-Users] 603 not treated as a failure In-Reply-To: <782d5246-6eb2-b978-17a1-3512e73136cd@bohboh.info> References: <782d5246-6eb2-b978-17a1-3512e73136cd@bohboh.info> Message-ID: Will that work on version 3.1X On Tue, Oct 25, 2022, 10:36 AM Social Boh wrote: > maybe: > > > - > > *modparam("tm", "disable_6xx_block", 1)* > > to TM module > > --- > I'm SoCIaL, MayBe > > El 25/10/2022 a las 9:22 a. m., Richard Robson escribió: > > I am currently testing version 3.3 and I have a scenario where we will > receive a 603 to an invite. this needs to be failed over to the next > destination. we are using dispatcher for this. > > While testing I am finding that opensips is treating the 603 a a relpy and > not as a failure and its being handled by the reply route and not by the > failure route. passing the message back to the UAC.. > > Is this by design or is there some setting where the 603 can be treated as > a failure and be handled by the specified failure route and failed over to > the next destination.? > > > Regards, > > > Richard > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rob.dyck at telus.net Tue Oct 25 15:03:48 2022 From: rob.dyck at telus.net (Robert Dyck) Date: Tue, 25 Oct 2022 08:03:48 -0700 Subject: [OpenSIPS-Users] can several SIP phones with same SIP account ring together and hang up asynchronous In-Reply-To: References: Message-ID: <2142817.C4sosBPzcN@blacky> This is a Linphone problem. A simple UA has no way of knowing that all the other UAs are unable to take the call. The Linphone developers should be encouraged to change the default response to a rejected call. Perhaps a universal reject could be an option but not the default. On Tuesday, October 25, 2022 1:28:48 A.M. PDT chenyzzzz via Users wrote: > Hi Bogdan-Andrei,thanks for your reply. I had set up a opensips service on > my Ubuntu 18.04.6 , and opensips version: opensips 3.2.6 (x86_64/linux). > When I test that case, I use two desktop linphone login same sip accout > 01010101 (callee A/B). and I use my Android linphone(caller C) invite A/B, > A/B rings together which works well. but I hang up the callee A , B also > terminated . I use wireshark to capture the packet on server side. it > show that : 1. when callee A(192.168.2.123) hand up, it respond 603 to the > server(192.168.2.108) 2. server(192.168.2.108) forwards the respond 603 to > caller C(192.168.2.115) 3. server(192.168.2.108) create a CANCEL to callee > B(192.168.2.127) so, it seems opensips server CANCEL B automatically. My > project need to meet the ability that callee A declines but callee B still > ring. I am a newbia to opensips, I don't know what is going on . How to > enable the ability as you say? Best Regards, > > > Chen From rob.dyck at telus.net Tue Oct 25 15:03:48 2022 From: rob.dyck at telus.net (Robert Dyck) Date: Tue, 25 Oct 2022 08:03:48 -0700 Subject: [OpenSIPS-Users] can several SIP phones with same SIP account ring together and hang up asynchronous In-Reply-To: References: Message-ID: <2142817.C4sosBPzcN@blacky> This is a Linphone problem. A simple UA has no way of knowing that all the other UAs are unable to take the call. The Linphone developers should be encouraged to change the default response to a rejected call. Perhaps a universal reject could be an option but not the default. On Tuesday, October 25, 2022 1:28:48 A.M. PDT chenyzzzz via Users wrote: > Hi Bogdan-Andrei,thanks for your reply. I had set up a opensips service on > my Ubuntu 18.04.6 , and opensips version: opensips 3.2.6 (x86_64/linux). > When I test that case, I use two desktop linphone login same sip accout > 01010101 (callee A/B). and I use my Android linphone(caller C) invite A/B, > A/B rings together which works well. but I hang up the callee A , B also > terminated . I use wireshark to capture the packet on server side. it > show that : 1. when callee A(192.168.2.123) hand up, it respond 603 to the > server(192.168.2.108) 2. server(192.168.2.108) forwards the respond 603 to > caller C(192.168.2.115) 3. server(192.168.2.108) create a CANCEL to callee > B(192.168.2.127) so, it seems opensips server CANCEL B automatically. My > project need to meet the ability that callee A declines but callee B still > ring. I am a newbia to opensips, I don't know what is going on . How to > enable the ability as you say? Best Regards, > > > Chen From ross at rsmck.co.uk Tue Oct 25 16:11:47 2022 From: ross at rsmck.co.uk (Ross McKillop) Date: Tue, 25 Oct 2022 17:11:47 +0100 Subject: [OpenSIPS-Users] socket_in(port) vs socket_in(advertised_port) Message-ID: Hi, Not sure if this is the intended behaviour or I’m just misunderstanding these parameters… Assume a simple config with a few sockets socket=tcp:10.44.30.12:7700 socket=tcp:10.44.30.13:7730 And setting the outbound socket in route[relay] with force_send_socket(“tcp:10.44.30.12:7700”); The relayed SIP message has an ephemeral source port (as you’d expect) e.g. 53235 for this example. The destination UAS replies to that port on the established connection (so the reply comes to port 53235) I would have expected $socket_in(port) to contain the actual port that was used (53235) and $socket_in(advertised_port) to contain the port that is advertised as the listening port for that socket (e.g. 7700) - however $socket_in(port) contains 7700 and $socket_in(advertised_port) is null. Is this the intended behaviour and, if so, is there any way to access the *actual* destination port that was used (even if it’s ephemeral)? Any advice anyone can offer would be much appreciated :) Best, Ross -------------- next part -------------- An HTML attachment was scrubbed... URL: From venefax at gmail.com Tue Oct 25 17:41:05 2022 From: venefax at gmail.com (Saint Michael) Date: Tue, 25 Oct 2022 13:41:05 -0400 Subject: [OpenSIPS-Users] How long can the callID be in SIP Message-ID: I just caught a callID that is 160 characters long. What is the max length that it should be? I am using 128. From jjackson at aninetworks.net Tue Oct 25 20:26:15 2022 From: jjackson at aninetworks.net (Joseph Jackson) Date: Tue, 25 Oct 2022 20:26:15 +0000 Subject: [OpenSIPS-Users] How long can the callID be in SIP In-Reply-To: References: Message-ID: There is no max length in the RFC. I've seen them up to 256. ________________________________ From: Users on behalf of Saint Michael Sent: Tuesday, October 25, 2022 12:41 PM To: OpenSIPS users mailling list Subject: [OpenSIPS-Users] How long can the callID be in SIP I just caught a callID that is 160 characters long. What is the max length that it should be? I am using 128. _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jjackson at aninetworks.net Tue Oct 25 21:44:22 2022 From: jjackson at aninetworks.net (Joseph Jackson) Date: Tue, 25 Oct 2022 21:44:22 +0000 Subject: [OpenSIPS-Users] 603 not treated as a failure In-Reply-To: References: <782d5246-6eb2-b978-17a1-3512e73136cd@bohboh.info> Message-ID: Its listed here - https://opensips.org/html/docs/modules/3.1.x/tm.html#param_disable_6xx_block So yes it should work. ________________________________ From: Users on behalf of Saint Michael Sent: Tuesday, October 25, 2022 9:52 AM To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] 603 not treated as a failure Will that work on version 3.1X On Tue, Oct 25, 2022, 10:36 AM Social Boh > wrote: maybe: * modparam("tm", "disable_6xx_block", 1) to TM module --- I'm SoCIaL, MayBe El 25/10/2022 a las 9:22 a. m., Richard Robson escribió: I am currently testing version 3.3 and I have a scenario where we will receive a 603 to an invite. this needs to be failed over to the next destination. we are using dispatcher for this. While testing I am finding that opensips is treating the 603 a a relpy and not as a failure and its being handled by the reply route and not by the failure route. passing the message back to the UAC.. Is this by design or is there some setting where the 603 can be treated as a failure and be handled by the specified failure route and failed over to the next destination.? Regards, Richard _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From social at bohboh.info Tue Oct 25 21:54:43 2022 From: social at bohboh.info (Social Boh) Date: Tue, 25 Oct 2022 16:54:43 -0500 Subject: [OpenSIPS-Users] 603 not treated as a failure In-Reply-To: References: <782d5246-6eb2-b978-17a1-3512e73136cd@bohboh.info> Message-ID: <69723c55-5e27-de56-3306-807792679075@bohboh.info> in 3.3 too: https://opensips.org/docs/modules/3.3.x/tm.html#param_disable_6xx_block --- I'm SoCIaL, MayBe El 25/10/2022 a las 4:44 p. m., Joseph Jackson escribió: > Its listed here - > https://opensips.org/html/docs/modules/3.1.x/tm.html#param_disable_6xx_block > > So yes it should work. > > > ------------------------------------------------------------------------ > *From:* Users on behalf of Saint > Michael > *Sent:* Tuesday, October 25, 2022 9:52 AM > *To:* OpenSIPS users mailling list > *Subject:* Re: [OpenSIPS-Users] 603 not treated as a failure > Will that work on version 3.1X > > > On Tue, Oct 25, 2022, 10:36 AM Social Boh wrote: > > maybe: > > * > > *modparam("tm", "disable_6xx_block", 1)* > > to TM module > > --- > I'm SoCIaL, MayBe > > El 25/10/2022 a las 9:22 a. m., Richard Robson escribió: >> I am currently testing version 3.3 and I have a scenario where we >> will receive a 603 to an invite. this needs to be failed over to >> the next destination. we are using dispatcher for this. >> >> While testing I am finding that opensips is treating the 603 a a >> relpy and not as a failure and its being handled by the reply >> route and not by the failure route. passing the message back to >> the UAC.. >> >> Is this by design or is there some setting where the 603 can be >> treated as a failure and be handled by the specified failure >> route and failed over to the next destination.? >> >> >> Regards, >> >> >> Richard >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From venefax at gmail.com Wed Oct 26 02:28:55 2022 From: venefax at gmail.com (Saint Michael) Date: Tue, 25 Oct 2022 22:28:55 -0400 Subject: [OpenSIPS-Users] Local Route question Message-ID: Dear Friends local_route { if (is_method("200")) { } } I need to intercept the code at the moment when a call connects, so I may notify that information to the database. What specific code can I use inside a Local Route so the 200 OK corresponds with a real connection and not any other kind of 200? Is this doable? From kwem at gmx.de Wed Oct 26 05:52:01 2022 From: kwem at gmx.de (Karsten Wemheuer) Date: Wed, 26 Oct 2022 07:52:01 +0200 Subject: [OpenSIPS-Users] Local Route question In-Reply-To: References: Message-ID: Hi, Am Dienstag, dem 25.10.2022 um 22:28 -0400 schrieb Saint Michael: > Dear Friends > local_route > { > if (is_method("200")) > { > } > } > > I need to intercept the code at the moment when a call connects, so I > may notify that information to the database. What specific code can I > use inside a Local Route so the 200 OK corresponds with a real > connection and not any other kind of 200? > Is this doable? Yes, I think You can catch the 200 OK, but maybe not in the local_route. From the docs "The local route is executed automatically when a new SIP request is generated by TM, internally (no UAC side)" The 200 OK is a response to some SIP method, so I think You should use a onreply route. But without knowledge of Your routing logic it would be difficult to help in more details. You can distinguish the different 200 OK messages by the presence of the SDP, e.g. with if (has_body("application/sdp")) { HTH, Karsten From bogdan at opensips.org Wed Oct 26 14:49:44 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Wed, 26 Oct 2022 17:49:44 +0300 Subject: [OpenSIPS-Users] Orderly shutdown In-Reply-To: References: Message-ID: <3b84b296-f546-dfd4-78a7-3df2aacc718d@opensips.org> Hi, Sending a sig TERM to the opensips processes will trigger a controlled shutdown of opensips (meaning with flushing data to DB, if needed, cleanup, etc). Nevertheless, the opensips shutdown does not ends the call, as the calls may be continued after restarting opensips. Still, if you want to terminate all ongoing calls before shutting down, better use dialog module and check these MI cmds: https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_dlg_end_dlg https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_profile_end_dlgs Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/25/22 2:15 PM, Saint Michael wrote: > Dear friends > is there a command I can send to Opensips 3.1, so all calls are shut > down and BYEs are sent to both the caller and the callee? Then of > course, opensips closes down. > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From bogdan at opensips.org Wed Oct 26 14:51:32 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Wed, 26 Oct 2022 17:51:32 +0300 Subject: [OpenSIPS-Users] Local Route question In-Reply-To: References: Message-ID: <409f217b-55cb-d68a-53f4-874d011a130d@opensips.org> Hi, please see https://www.opensips.org/Documentation/Script-Routes-3-2#local_route - the local route is triggered only for internally generated (UAC) requests, so you will never have replies over there. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/26/22 5:28 AM, Saint Michael wrote: > Dear Friends > local_route > { > if (is_method("200")) > { > } > } > > I need to intercept the code at the moment when a call connects, so I > may notify that information to the database. What specific code can I > use inside a Local Route so the 200 OK corresponds with a real > connection and not any other kind of 200? > Is this doable? > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From aviator.nitesh.d at gmail.com Wed Oct 26 18:05:52 2022 From: aviator.nitesh.d at gmail.com (Nitesh Divecha) Date: Wed, 26 Oct 2022 14:05:52 -0400 Subject: [OpenSIPS-Users] - topology_hiding and no ACK Message-ID: Hello All, I don't know if this is by design or me not implementing correctly! I'm a newbie to OpenSIPS... So I generated a new opensips_residential.cfg file and only edited it with topology_hiding("UC"); under INVITE. Plus all the extras to make ATA register successfully and SIP trunk. Every time I make a call two INVITE dialogs are created. One from ATA to OpenSIPS and second one from OpenSIPS to Outbound Provider. When a PSTN call is answered, the Outbound Provider sends 200 OK back to OpenSIPS, and OpenSIPS sends back 200 OK to ATA. Then ATA acknowledges with ACK back to OpenSIPS BUT OpenSIPS fails to send ACK to the Outbound Provider. So Outbound Provider sends 200 OK again to OpenSIPS and OpenSIPS sends 200 OK to ATA then ATA acknowledges with ACK back to OpenSIPS BUT OpenSIPS fails to send back ACK... This dance goes on for 30 secs and until Outbound Provider drops the call due to no ACK. On the sngrep it shows that call from ATA to OpenSIPS "COMPLETED" while OpenSIPS to Outbound Provider "CALL SETUP". If I comment out topology_hiding("UC"); then everything works perfectly and sngrep shows only one INVITE dialog from ATA to OpenSIPS to Outbound Provider except the Outbound Provider can see everything that is ATA's IP info, etc... Here is my cfg: route { ... if (dp_translate(10 ,$rU ,$rU) ) { xlog("*** Dial plan translate from source $avp(src) to $rU ***\n"); $avp(furi) = "sip:xxxxxxxxxx at gothamcity.com"; uac_replace_from( , "$avp(furi)"); #strip(1); if (!do_routing(0)) { send_reply(500,"No PSTN Route found"); exit; } # t_on_branch("change_from"); route(relay); exit; } ... } route[relay] { # for INVITEs enable some additional helper routes if (is_method("INVITE")) { # create_dialog(); topology_hiding("UC"); if(remove_hf("User-Agent")){ xlog("*** 4. User-Agent found and removed. ***\n"); } if (isflagset("NAT") && has_body("application/sdp")) { rtpproxy_offer("ro"); } t_on_branch("per_branch_ops"); t_on_reply("handle_nat"); t_on_failure("missed_call"); } if (isflagset("NAT")) { add_rr_param(";nat=yes"); } if (!t_relay()) { send_reply(500,"Internal Error"); } exit; } My eyes are sore and my head is spinning... Any help will be highly appreciated... Thanks! Cheers, Nitesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From venefax at gmail.com Wed Oct 26 20:21:41 2022 From: venefax at gmail.com (Saint Michael) Date: Wed, 26 Oct 2022 16:21:41 -0400 Subject: [OpenSIPS-Users] Local Route question In-Reply-To: <409f217b-55cb-d68a-53f4-874d011a130d@opensips.org> References: <409f217b-55cb-d68a-53f4-874d011a130d@opensips.org> Message-ID: Thank you for the clarification. But then how do you intercept the Connect? Where in the code? I need to fire a db query when the call connects. Is this even possible? On Wed, Oct 26, 2022, 10:51 AM Bogdan-Andrei Iancu wrote: > Hi, > > please see > https://www.opensips.org/Documentation/Script-Routes-3-2#local_route - > the local route is triggered only for internally generated (UAC) > requests, so you will never have replies over there. > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 5-16 Dec 2022, online > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/26/22 5:28 AM, Saint Michael wrote: > > Dear Friends > > local_route > > { > > if (is_method("200")) > > { > > } > > } > > > > I need to intercept the code at the moment when a call connects, so I > > may notify that information to the database. What specific code can I > > use inside a Local Route so the 200 OK corresponds with a real > > connection and not any other kind of 200? > > Is this doable? > > > > _______________________________________________ > > Users mailing list > > Users at lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jehanzaib.kiani at gmail.com Wed Oct 26 21:34:37 2022 From: jehanzaib.kiani at gmail.com (Jehanzaib Younis) Date: Thu, 27 Oct 2022 10:34:37 +1300 Subject: [OpenSIPS-Users] Local Route question In-Reply-To: References: <409f217b-55cb-d68a-53f4-874d011a130d@opensips.org> Message-ID: Hi Micheal, You can use t_on_reply and then something like this: if (t_check_status("200")) { ..your db query } Regards, Jehanzaib On Thu, Oct 27, 2022 at 9:22 AM Saint Michael wrote: > Thank you for the clarification. > But then how do you intercept the Connect? > Where in the code? > I need to fire a db query when the call connects. > Is this even possible? > > > > On Wed, Oct 26, 2022, 10:51 AM Bogdan-Andrei Iancu > wrote: > >> Hi, >> >> please see >> https://www.opensips.org/Documentation/Script-Routes-3-2#local_route - >> the local route is triggered only for internally generated (UAC) >> requests, so you will never have replies over there. >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Bootcamp 5-16 Dec 2022, online >> https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ >> >> On 10/26/22 5:28 AM, Saint Michael wrote: >> > Dear Friends >> > local_route >> > { >> > if (is_method("200")) >> > { >> > } >> > } >> > >> > I need to intercept the code at the moment when a call connects, so I >> > may notify that information to the database. What specific code can I >> > use inside a Local Route so the 200 OK corresponds with a real >> > connection and not any other kind of 200? >> > Is this doable? >> > >> > _______________________________________________ >> > Users mailing list >> > Users at lists.opensips.org >> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From venefax at gmail.com Thu Oct 27 04:15:38 2022 From: venefax at gmail.com (Saint Michael) Date: Thu, 27 Oct 2022 00:15:38 -0400 Subject: [OpenSIPS-Users] Orderly shutdown In-Reply-To: <3b84b296-f546-dfd4-78a7-3df2aacc718d@opensips.org> References: <3b84b296-f546-dfd4-78a7-3df2aacc718d@opensips.org> Message-ID: Dear Friends I successfully wrote a script that terminates all open calls in an orderly fashion. The question is, before I execute my script, is there any similar command (like opensips-cli -x mi dlg_end_dlg "${callid}") that would stop taking new calls? Like "reject any call attempts with 503 or 404", because, in a high-pressure environment, 2000 new calls may arrive before I close all calls and shut down Opensips. I use version: opensips -V version: opensips 3.1.12 (x86_64/linux) flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_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: 15ef14a89 main.c compiled on 03:16:12 Oct 25 2022 with gcc 9 On Wed, Oct 26, 2022 at 10:49 AM Bogdan-Andrei Iancu wrote: > > Hi, > > Sending a sig TERM to the opensips processes will trigger a controlled > shutdown of opensips (meaning with flushing data to DB, if needed, > cleanup, etc). Nevertheless, the opensips shutdown does not ends the > call, as the calls may be continued after restarting opensips. > > Still, if you want to terminate all ongoing calls before shutting down, > better use dialog module and check these MI cmds: > https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_dlg_end_dlg > https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_profile_end_dlgs > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 5-16 Dec 2022, online > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/25/22 2:15 PM, Saint Michael wrote: > > Dear friends > > is there a command I can send to Opensips 3.1, so all calls are shut > > down and BYEs are sent to both the caller and the callee? Then of > > course, opensips closes down. > > > > _______________________________________________ > > Users mailing list > > Users at lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > From mayamatakeshi at gmail.com Thu Oct 27 05:05:26 2022 From: mayamatakeshi at gmail.com (mayamatakeshi) Date: Thu, 27 Oct 2022 14:05:26 +0900 Subject: [OpenSIPS-Users] Orderly shutdown In-Reply-To: References: <3b84b296-f546-dfd4-78a7-3df2aacc718d@opensips.org> Message-ID: It can be done with: https://opensips.org/docs/modules/3.1.x/gflags.html On Thu, Oct 27, 2022 at 1:18 PM Saint Michael wrote: > Dear Friends > I successfully wrote a script that terminates all open calls in an > orderly fashion. > The question is, before I execute my script, is there any similar > command (like opensips-cli -x mi dlg_end_dlg "${callid}") that would > stop taking new calls? Like "reject any call attempts with 503 or > 404", because, in a high-pressure environment, 2000 new calls may > arrive before I close all calls and shut down Opensips. > I use version: > opensips -V > version: opensips 3.1.12 (x86_64/linux) > flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, > Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_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: 15ef14a89 > main.c compiled on 03:16:12 Oct 25 2022 with gcc 9 > > On Wed, Oct 26, 2022 at 10:49 AM Bogdan-Andrei Iancu > wrote: > > > > Hi, > > > > Sending a sig TERM to the opensips processes will trigger a controlled > > shutdown of opensips (meaning with flushing data to DB, if needed, > > cleanup, etc). Nevertheless, the opensips shutdown does not ends the > > call, as the calls may be continued after restarting opensips. > > > > Still, if you want to terminate all ongoing calls before shutting down, > > better use dialog module and check these MI cmds: > > https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_dlg_end_dlg > > > https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_profile_end_dlgs > > > > Regards, > > > > Bogdan-Andrei Iancu > > > > OpenSIPS Founder and Developer > > https://www.opensips-solutions.com > > OpenSIPS Bootcamp 5-16 Dec 2022, online > > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > > > On 10/25/22 2:15 PM, Saint Michael wrote: > > > Dear friends > > > is there a command I can send to Opensips 3.1, so all calls are shut > > > down and BYEs are sent to both the caller and the callee? Then of > > > course, opensips closes down. > > > > > > _______________________________________________ > > > Users mailing list > > > Users at lists.opensips.org > > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Thu Oct 27 06:55:44 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Thu, 27 Oct 2022 09:55:44 +0300 Subject: [OpenSIPS-Users] Orderly shutdown In-Reply-To: References: <3b84b296-f546-dfd4-78a7-3df2aacc718d@opensips.org> Message-ID: <11abb602-7924-d2ad-a876-e387186d095b@opensips.org> To be more specific here, use the suggested gflags to test for initial INVITE and reject any new call if the gflag is set - and you can toggle the flag via MI cmds. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/27/22 8:05 AM, mayamatakeshi wrote: > It can be done with: > https://opensips.org/docs/modules/3.1.x/gflags.html > > > > On Thu, Oct 27, 2022 at 1:18 PM Saint Michael > wrote: > > Dear Friends > I successfully wrote a script that terminates all open calls in an > orderly fashion. > The question is, before I execute my script, is there any similar > command (like opensips-cli -x mi dlg_end_dlg "${callid}") that would > stop taking new calls?  Like "reject any call attempts with 503 or > 404", because, in a high-pressure environment, 2000 new calls may > arrive before I close all calls and shut down Opensips. > I use version: > opensips -V > version: opensips 3.1.12 (x86_64/linux) > flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, > Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_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: 15ef14a89 > main.c compiled on 03:16:12 Oct 25 2022 with gcc 9 > > On Wed, Oct 26, 2022 at 10:49 AM Bogdan-Andrei Iancu > > wrote: > > > > Hi, > > > > Sending a sig TERM to the opensips processes will trigger a > controlled > > shutdown of opensips (meaning with flushing data to DB, if needed, > > cleanup, etc). Nevertheless, the opensips shutdown does not ends the > > call, as the calls may be continued after restarting opensips. > > > > Still, if you want to terminate all ongoing calls before > shutting down, > > better use dialog module and check these MI cmds: > > > https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_dlg_end_dlg > > > > https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_profile_end_dlgs > > > > > Regards, > > > > Bogdan-Andrei Iancu > > > > OpenSIPS Founder and Developer > > https://www.opensips-solutions.com > > > OpenSIPS Bootcamp 5-16 Dec 2022, online > > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > > > > On 10/25/22 2:15 PM, Saint Michael wrote: > > > Dear friends > > > is there a command I can send to Opensips 3.1, so all calls > are shut > > > down and BYEs are sent to both the caller and the callee? Then of > > > course, opensips closes down. > > > > > > _______________________________________________ > > > Users mailing list > > > Users at lists.opensips.org > > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bogdan at opensips.org Thu Oct 27 08:02:29 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Thu, 27 Oct 2022 11:02:29 +0300 Subject: [OpenSIPS-Users] - topology_hiding and no ACK In-Reply-To: References: Message-ID: <630b7856-ac97-617d-2db0-52f4e504c283@opensips.org> Hi Nitesh, Do you do topology_hiding_match() for the sequential requests (instead of the typical loose_route()) ?  As it seems you cfg fails to properly handle the in-dialog / sequential requests. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/26/22 9:05 PM, Nitesh Divecha wrote: > Hello All, > > I don't know if this is by design or me not implementing correctly! > I'm a newbie to OpenSIPS... > > So I generated a new opensips_residential.cfg file and only edited it > with topology_hiding("UC"); under INVITE. Plus all the extras to make > ATA register successfully and SIP trunk. > > Every time I make a call two INVITE dialogs are created. One from ATA > to OpenSIPS and second one from OpenSIPS to Outbound Provider. When a > PSTN call is answered, the Outbound Provider sends 200 OK back to > OpenSIPS, and OpenSIPS sends back 200 OK to ATA. Then ATA acknowledges > with ACK back to OpenSIPS BUT OpenSIPS fails to send ACK to the > Outbound Provider. So Outbound Provider sends 200 OK again to OpenSIPS > and OpenSIPS sends 200 OK to ATA then ATA acknowledges with ACK back > to OpenSIPS BUT OpenSIPS fails to send back ACK... This dance goes on > for 30 secs and until Outbound Provider drops the call due to no ACK. > > On the sngrep it shows that call from ATA to OpenSIPS "COMPLETED" > while OpenSIPS to Outbound Provider "CALL SETUP". > > If I comment out topology_hiding("UC"); then everything works > perfectly and sngrep shows only one INVITE dialog from ATA to OpenSIPS > to Outbound Provider except the Outbound Provider can see everything > that is ATA's IP info, etc... > > Here is my cfg: > > route { > ... > if (dp_translate(10 ,$rU ,$rU) ) { >               xlog("*** Dial plan translate from source $avp(src) to > $rU ***\n"); > >               $avp(furi) = "sip:xxxxxxxxxx at gothamcity.com > "; >               uac_replace_from( , "$avp(furi)"); >               #strip(1); >               if (!do_routing(0)) { >                       send_reply(500,"No PSTN Route found"); >                       exit; >               } >               # t_on_branch("change_from"); >               route(relay); >               exit; >       } > ... > } > > route[relay] { >       # for INVITEs enable some additional helper routes >       if (is_method("INVITE")) { >               # create_dialog(); >               topology_hiding("UC"); >               if(remove_hf("User-Agent")){ >                       xlog("*** 4. User-Agent found and removed. ***\n"); >               } > >               if (isflagset("NAT") && has_body("application/sdp")) { >                       rtpproxy_offer("ro"); >               } > >               t_on_branch("per_branch_ops"); >               t_on_reply("handle_nat"); >               t_on_failure("missed_call"); >       } > >       if (isflagset("NAT")) { >               add_rr_param(";nat=yes"); >       } > >       if (!t_relay()) { >               send_reply(500,"Internal Error"); >       } >       exit; > } > > My eyes are sore and my head is spinning... Any help will be highly > appreciated... Thanks! > > Cheers, > Nitesh > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From venefax at gmail.com Thu Oct 27 12:39:17 2022 From: venefax at gmail.com (Saint Michael) Date: Thu, 27 Oct 2022 08:39:17 -0400 Subject: [OpenSIPS-Users] Orderly shutdown In-Reply-To: <11abb602-7924-d2ad-a876-e387186d095b@opensips.org> References: <3b84b296-f546-dfd4-78a7-3df2aacc718d@opensips.org> <11abb602-7924-d2ad-a876-e387186d095b@opensips.org> Message-ID: for testing I added route{ if (is_gflag("1")) { t_relay("udp:10.0.0.1:5060"); } else { t_relay("udp:10.0.0.2:5060"); } but I see these errors Oct 27 12:34:33 proxy opensips[140294]: Aliases: Oct 27 12:34:33 proxy opensips[140296]: Oct 27 12:34:33 [140296] ERROR:core:fix_cmd: Param [1] expected to be an integer or variable Oct 27 12:34:33 proxy opensips[140296]: Oct 27 12:34:33 [140296] ERROR:core:fix_actions: Failed to fix command Oct 27 12:34:33 proxy opensips[140296]: Oct 27 12:34:33 [140296] ERROR:core:fix_actions: fixing failed (code=-6) at /etc/opensips/opensips.cfg:126 Oct 27 12:34:33 proxy opensips[140296]: Oct 27 12:34:33 [140296] CRITICAL:core:fix_expr: fix_actions error Oct 27 12:34:33 proxy opensips[140296]: Oct 27 12:34:33 [140296] ERROR:core:main: failed to fix configuration with err code -6 Oct 27 12:34:33 proxy systemd[1]: opensips.service: Control process exited, code=exited, status=255/EXCEPTION Oct 27 12:34:33 proxy systemd[1]: opensips.service: Failed with result 'exit-code'. at the beginning of the code I added loadmodule "gflags.so" modparam("gflags", "initial", 0) it does load with those two lines, but as soon as I try to use the module, it blows up. On Thu, Oct 27, 2022 at 2:55 AM Bogdan-Andrei Iancu wrote: > > To be more specific here, use the suggested gflags to test for initial INVITE and reject any new call if the gflag is set - and you can toggle the flag via MI cmds. > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 5-16 Dec 2022, online > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/27/22 8:05 AM, mayamatakeshi wrote: > > It can be done with: > https://opensips.org/docs/modules/3.1.x/gflags.html > > > On Thu, Oct 27, 2022 at 1:18 PM Saint Michael wrote: >> >> Dear Friends >> I successfully wrote a script that terminates all open calls in an >> orderly fashion. >> The question is, before I execute my script, is there any similar >> command (like opensips-cli -x mi dlg_end_dlg "${callid}") that would >> stop taking new calls? Like "reject any call attempts with 503 or >> 404", because, in a high-pressure environment, 2000 new calls may >> arrive before I close all calls and shut down Opensips. >> I use version: >> opensips -V >> version: opensips 3.1.12 (x86_64/linux) >> flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, >> Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_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: 15ef14a89 >> main.c compiled on 03:16:12 Oct 25 2022 with gcc 9 >> >> On Wed, Oct 26, 2022 at 10:49 AM Bogdan-Andrei Iancu >> wrote: >> > >> > Hi, >> > >> > Sending a sig TERM to the opensips processes will trigger a controlled >> > shutdown of opensips (meaning with flushing data to DB, if needed, >> > cleanup, etc). Nevertheless, the opensips shutdown does not ends the >> > call, as the calls may be continued after restarting opensips. >> > >> > Still, if you want to terminate all ongoing calls before shutting down, >> > better use dialog module and check these MI cmds: >> > https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_dlg_end_dlg >> > https://opensips.org/html/docs/modules/3.2.x/dialog.html#mi_profile_end_dlgs >> > >> > Regards, >> > >> > Bogdan-Andrei Iancu >> > >> > OpenSIPS Founder and Developer >> > https://www.opensips-solutions.com >> > OpenSIPS Bootcamp 5-16 Dec 2022, online >> > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ >> > >> > On 10/25/22 2:15 PM, Saint Michael wrote: >> > > Dear friends >> > > is there a command I can send to Opensips 3.1, so all calls are shut >> > > down and BYEs are sent to both the caller and the callee? Then of >> > > course, opensips closes down. >> > > >> > > _______________________________________________ >> > > Users mailing list >> > > Users at lists.opensips.org >> > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > From aviator.nitesh.d at gmail.com Thu Oct 27 12:51:39 2022 From: aviator.nitesh.d at gmail.com (Nitesh Divecha) Date: Thu, 27 Oct 2022 08:51:39 -0400 Subject: [OpenSIPS-Users] - topology_hiding and no ACK In-Reply-To: <630b7856-ac97-617d-2db0-52f4e504c283@opensips.org> References: <630b7856-ac97-617d-2db0-52f4e504c283@opensips.org> Message-ID: Hey Bogdan-Andrei, Thanks for your feedback. To be honest - I don't know! I followed some online tutorials and tried to implement "topology_hiding()" after is_method("INVITE") since the first message sent to Outbound Provider is INVITE. I never tried topology_hiding_match(). What is the right way to implement topology_hiding module? My scenario is simple, I'm using the default cfg and making ATA register to OpenSIPS to make Outbound PSTN calls. I guess Bootcamp is the answer :-) Cheers, Nitesh On Thu, Oct 27, 2022 at 4:02 AM Bogdan-Andrei Iancu wrote: > Hi Nitesh, > > Do you do topology_hiding_match() for the sequential requests (instead of > the typical loose_route()) ? As it seems you cfg fails to properly handle > the in-dialog / sequential requests. > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 5-16 Dec 2022, online > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/26/22 9:05 PM, Nitesh Divecha wrote: > > Hello All, > > I don't know if this is by design or me not implementing correctly! I'm a > newbie to OpenSIPS... > > So I generated a new opensips_residential.cfg file and only edited it > with topology_hiding("UC"); under INVITE. Plus all the extras to make ATA > register successfully and SIP trunk. > > Every time I make a call two INVITE dialogs are created. One from ATA to > OpenSIPS and second one from OpenSIPS to Outbound Provider. When a PSTN > call is answered, the Outbound Provider sends 200 OK back to OpenSIPS, and > OpenSIPS sends back 200 OK to ATA. Then ATA acknowledges with ACK back to > OpenSIPS BUT OpenSIPS fails to send ACK to the Outbound Provider. So > Outbound Provider sends 200 OK again to OpenSIPS and OpenSIPS sends 200 OK > to ATA then ATA acknowledges with ACK back to OpenSIPS BUT OpenSIPS fails > to send back ACK... This dance goes on for 30 secs and until Outbound > Provider drops the call due to no ACK. > > On the sngrep it shows that call from ATA to OpenSIPS "COMPLETED" while > OpenSIPS to Outbound Provider "CALL SETUP". > > If I comment out topology_hiding("UC"); then everything works perfectly > and sngrep shows only one INVITE dialog from ATA to OpenSIPS to Outbound > Provider except the Outbound Provider can see everything that is ATA's IP > info, etc... > > Here is my cfg: > > route { > ... > if (dp_translate(10 ,$rU ,$rU) ) { > xlog("*** Dial plan translate from source $avp(src) to $rU > ***\n"); > > $avp(furi) = "sip:xxxxxxxxxx at gothamcity.com"; > uac_replace_from( , "$avp(furi)"); > #strip(1); > if (!do_routing(0)) { > send_reply(500,"No PSTN Route found"); > exit; > } > # t_on_branch("change_from"); > route(relay); > exit; > } > ... > } > > route[relay] { > # for INVITEs enable some additional helper routes > if (is_method("INVITE")) { > # create_dialog(); > topology_hiding("UC"); > if(remove_hf("User-Agent")){ > xlog("*** 4. User-Agent found and removed. ***\n"); > } > > if (isflagset("NAT") && has_body("application/sdp")) { > rtpproxy_offer("ro"); > } > > t_on_branch("per_branch_ops"); > t_on_reply("handle_nat"); > t_on_failure("missed_call"); > } > > if (isflagset("NAT")) { > add_rr_param(";nat=yes"); > } > > if (!t_relay()) { > send_reply(500,"Internal Error"); > } > exit; > } > > My eyes are sore and my head is spinning... Any help will be highly > appreciated... Thanks! > > Cheers, > Nitesh > > > _______________________________________________ > Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kwem at gmx.de Thu Oct 27 13:01:37 2022 From: kwem at gmx.de (Karsten Wemheuer) Date: Thu, 27 Oct 2022 15:01:37 +0200 Subject: [OpenSIPS-Users] Orderly shutdown In-Reply-To: References: <3b84b296-f546-dfd4-78a7-3df2aacc718d@opensips.org> <11abb602-7924-d2ad-a876-e387186d095b@opensips.org> Message-ID: Hi, I am not familiar with the gflags module, but Am Donnerstag, dem 27.10.2022 um 08:39 -0400 schrieb Saint Michael: > for testing I added > route{ > if (is_gflag("1")) { > t_relay("udp:10.0.0.1:5060"); > } else { > t_relay("udp:10.0.0.2:5060"); > } I think, You should remove the quotes around the "1". I think, the example in the docs may be wrong (Your code was from the docs, I think). See section 1.4.3, where if(is_gflag(4)) is written. HTH, Karsten From venefax at gmail.com Thu Oct 27 13:15:43 2022 From: venefax at gmail.com (Saint Michael) Date: Thu, 27 Oct 2022 09:15:43 -0400 Subject: [OpenSIPS-Users] Orderly shutdown In-Reply-To: References: <3b84b296-f546-dfd4-78a7-3df2aacc718d@opensips.org> <11abb602-7924-d2ad-a876-e387186d095b@opensips.org> Message-ID: YES Maybe we should fix the documentation? now the real question is, what goes inside the bracket if the flag value matches, to reject the call: I propose { sl_send_reply(503,"Declined"); exit; } On Thu, Oct 27, 2022 at 9:04 AM Karsten Wemheuer wrote: > > Hi, > > I am not familiar with the gflags module, but > > Am Donnerstag, dem 27.10.2022 um 08:39 -0400 schrieb Saint Michael: > > for testing I added > > route{ > > if (is_gflag("1")) { > > t_relay("udp:10.0.0.1:5060"); > > } else { > > t_relay("udp:10.0.0.2:5060"); > > } > > I think, You should remove the quotes around the "1". > > I think, the example in the docs may be wrong (Your code was from the > docs, I think). See section 1.4.3, where > if(is_gflag(4)) > is written. > > HTH, > > Karsten > > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From venefax at gmail.com Thu Oct 27 14:20:12 2022 From: venefax at gmail.com (Saint Michael) Date: Thu, 27 Oct 2022 10:20:12 -0400 Subject: [OpenSIPS-Users] Problem with gflags Message-ID: Dear friends I set flag to 1, using opensips-cli -x mi set_gflag 1 and it works, in fact: opensips-cli -x mi get_gflags { "hex": "0x1", "dec": "1" } but in the code, this test never works: if (is_gflag(1)) { xlog("$ci Shutting Down\r\n"); } else { xlog("$ci Gflag is not 1\r\n"); } I only get the second xlog() The documentation may be wrong, it asks us to use if (is_gflag("1")) {..} But opensips fails to start. How do I test for gflag=1 inside my route { } From liviu at opensips.org Thu Oct 27 14:48:15 2022 From: liviu at opensips.org (Liviu Chircu) Date: Thu, 27 Oct 2022 17:48:15 +0300 Subject: [OpenSIPS-Users] Problem with gflags In-Reply-To: References: Message-ID: <6553ce1a-a69d-c95a-a5b0-2091820f351d@opensips.org> On 27.10.2022 17:20, Saint Michael wrote: > I only get the second xlog() > > The documentation may be wrong, it asks us to use > if (is_gflag("1")) {..} > But opensips fails to start. > > How do I test for gflag=1 inside my > route Hi SM, The set of functions in "gflags" module is a bit strange, however they are correct.  The script functions work with *bits* (e.g. bit 0, 1, 2, ...), while the MI functions work with *bitmasks* (e.g. 1, 2, 4, ...).  Be careful not to mix the two, and you should get the correct results. I believe the docs are somewhat accurate about the above - if not, let me know and we can make improvements together. Best regards, -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com From venefax at gmail.com Thu Oct 27 14:55:12 2022 From: venefax at gmail.com (Saint Michael) Date: Thu, 27 Oct 2022 10:55:12 -0400 Subject: [OpenSIPS-Users] Problem with gflags In-Reply-To: <6553ce1a-a69d-c95a-a5b0-2091820f351d@opensips.org> References: <6553ce1a-a69d-c95a-a5b0-2091820f351d@opensips.org> Message-ID: I just need to know how to check for the gflag inside the code this: if (is_gflag("1")) {..} does not work, even if the flag is (1), as I wrote this test from the command line works opensips-cli -x mi is_gflag 1 true As you can see, unless you can test for the gflag value inside the code, it cannot be used. The module gflag is of a great importance when managing Opensips, because it allows for an orderly shutdown without losing CDR, that is: money. Many thanks. Thank you! On Thu, Oct 27, 2022 at 10:48 AM Liviu Chircu wrote: > > On 27.10.2022 17:20, Saint Michael wrote: > > I only get the second xlog() > > > > The documentation may be wrong, it asks us to use > > if (is_gflag("1")) {..} > > But opensips fails to start. > > > > How do I test for gflag=1 inside my > > route > > Hi SM, > > The set of functions in "gflags" module is a bit strange, however they > are correct. The script functions work with *bits* (e.g. bit 0, 1, 2, > ...), while the MI functions work with *bitmasks* (e.g. 1, 2, 4, ...). > Be careful not to mix the two, and you should get the correct results. > > I believe the docs are somewhat accurate about the above - if not, let > me know and we can make improvements together. > > Best regards, > > -- > Liviu Chircu > www.twitter.com/liviuchircu | www.opensips-solutions.com > From liviu at opensips.org Thu Oct 27 15:00:29 2022 From: liviu at opensips.org (Liviu Chircu) Date: Thu, 27 Oct 2022 18:00:29 +0300 Subject: [OpenSIPS-Users] Problem with gflags In-Reply-To: References: <6553ce1a-a69d-c95a-a5b0-2091820f351d@opensips.org> Message-ID: <48ef384e-a6a6-f94a-a274-96327ec79856@opensips.org> On 27.10.2022 17:55, Saint Michael wrote: > I just need to know how to check for the gflag inside the code > this: > if (is_gflag("1")) {..} > does not work, even if the flag is (1), as I wrote this test from the > command line works > > opensips-cli -x mi is_gflag 1 > true > > As you can see, unless you can test for the gflag value inside the > code, it cannot be used. The module gflag is of a great importance > when managing Opensips, because it allows for an orderly shutdown > without losing CDR, that is: money. > > Many thanks. Script: is_gflag(0) (is bit "0" set?) MI: is_gflag(1)     (are all bits in bitmask "1" set?) -- Liviu Chircu www.twitter.com/liviuchircu | www.opensips-solutions.com From venefax at gmail.com Thu Oct 27 15:14:27 2022 From: venefax at gmail.com (Saint Michael) Date: Thu, 27 Oct 2022 11:14:27 -0400 Subject: [OpenSIPS-Users] Problem with gflags In-Reply-To: <48ef384e-a6a6-f94a-a274-96327ec79856@opensips.org> References: <6553ce1a-a69d-c95a-a5b0-2091820f351d@opensips.org> <48ef384e-a6a6-f94a-a274-96327ec79856@opensips.org> Message-ID: I am afraid I am not seeing it clearly: from the command line I set opensips-cli -x mi set_gflag 1 "OK" what function will test if this is true inside the code? this does not work if (is_gflag(1)) { xlog("$ci Shutting Down\r\n"); } else { xlog("$ci Gflag is not 1\r\n"); } it is counterintuitive that you set Bit 1 from the command line and then test it inside the code but it fails the test. How can I print the current gflag inside xlog(); On Thu, Oct 27, 2022 at 11:00 AM Liviu Chircu wrote: > > On 27.10.2022 17:55, Saint Michael wrote: > > I just need to know how to check for the gflag inside the code > > this: > > if (is_gflag("1")) {..} > > does not work, even if the flag is (1), as I wrote this test from the > > command line works > > > > opensips-cli -x mi is_gflag 1 > > true > > > > As you can see, unless you can test for the gflag value inside the > > code, it cannot be used. The module gflag is of a great importance > > when managing Opensips, because it allows for an orderly shutdown > > without losing CDR, that is: money. > > > > Many thanks. > > Script: is_gflag(0) (is bit "0" set?) > MI: is_gflag(1) (are all bits in bitmask "1" set?) > > -- > Liviu Chircu > www.twitter.com/liviuchircu | www.opensips-solutions.com > From venefax at gmail.com Thu Oct 27 15:26:40 2022 From: venefax at gmail.com (Saint Michael) Date: Thu, 27 Oct 2022 11:26:40 -0400 Subject: [OpenSIPS-Users] Problem with gflags In-Reply-To: References: <6553ce1a-a69d-c95a-a5b0-2091820f351d@opensips.org> <48ef384e-a6a6-f94a-a274-96327ec79856@opensips.org> Message-ID: this code does not seem to work: the initial value is 15, inside opensips.cfg /usr/local/bin/opensips-cli -x mi set_gflag 1 "OK" /usr/local/bin/opensips-cli -x mi get_gflags { "hex": "0xF", "dec": "15" } Maybe I am not following the whole thing. I apologize. On Thu, Oct 27, 2022 at 11:14 AM Saint Michael wrote: > > I am afraid I am not seeing it clearly: > from the command line I set > opensips-cli -x mi set_gflag 1 > "OK" > what function will test if this is true inside the code? > this does not work > if (is_gflag(1)) { > xlog("$ci Shutting Down\r\n"); > } > else { > xlog("$ci Gflag is not 1\r\n"); > } > > it is counterintuitive that you set Bit 1 from the command line and > then test it inside the code but it fails the test. > How can I print the current gflag inside xlog(); > > > > On Thu, Oct 27, 2022 at 11:00 AM Liviu Chircu wrote: > > > > On 27.10.2022 17:55, Saint Michael wrote: > > > I just need to know how to check for the gflag inside the code > > > this: > > > if (is_gflag("1")) {..} > > > does not work, even if the flag is (1), as I wrote this test from the > > > command line works > > > > > > opensips-cli -x mi is_gflag 1 > > > true > > > > > > As you can see, unless you can test for the gflag value inside the > > > code, it cannot be used. The module gflag is of a great importance > > > when managing Opensips, because it allows for an orderly shutdown > > > without losing CDR, that is: money. > > > > > > Many thanks. > > > > Script: is_gflag(0) (is bit "0" set?) > > MI: is_gflag(1) (are all bits in bitmask "1" set?) > > > > -- > > Liviu Chircu > > www.twitter.com/liviuchircu | www.opensips-solutions.com > > From bogdan at opensips.org Thu Oct 27 15:32:01 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Thu, 27 Oct 2022 18:32:01 +0300 Subject: [OpenSIPS-Users] Orderly shutdown In-Reply-To: References: <3b84b296-f546-dfd4-78a7-3df2aacc718d@opensips.org> <11abb602-7924-d2ad-a876-e387186d095b@opensips.org> Message-ID: Ok, docs fixed, thanks Karsten for spotting the error [0] Michael, that;s right, if the gflag is set, just reject the code with 503 Service Unavailable . You also may consider adding a Retry-After header [1] using the append_to_reply() function. [0] https://github.com/OpenSIPS/opensips/commit/5945746b09b480dd0b7f8ea4b3584e4521bdac3a [1] https://www.ietf.org/rfc/rfc3261.html#section-20.33 [2] https://opensips.org/html/docs/modules/3.2.x/sipmsgops.html#func_append_to_reply Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/27/22 4:15 PM, Saint Michael wrote: > YES > Maybe we should fix the documentation? > now the real question is, what goes inside the bracket if the flag > value matches, to reject the call: > I propose > { > sl_send_reply(503,"Declined"); > exit; > } > > > On Thu, Oct 27, 2022 at 9:04 AM Karsten Wemheuer wrote: >> Hi, >> >> I am not familiar with the gflags module, but >> >> Am Donnerstag, dem 27.10.2022 um 08:39 -0400 schrieb Saint Michael: >>> for testing I added >>> route{ >>> if (is_gflag("1")) { >>> t_relay("udp:10.0.0.1:5060"); >>> } else { >>> t_relay("udp:10.0.0.2:5060"); >>> } >> I think, You should remove the quotes around the "1". >> >> I think, the example in the docs may be wrong (Your code was from the >> docs, I think). See section 1.4.3, where >> if(is_gflag(4)) >> is written. >> >> HTH, >> >> Karsten >> >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users From bogdan at opensips.org Thu Oct 27 15:34:02 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Thu, 27 Oct 2022 18:34:02 +0300 Subject: [OpenSIPS-Users] - topology_hiding and no ACK In-Reply-To: References: <630b7856-ac97-617d-2db0-52f4e504c283@opensips.org> Message-ID: Hi Nitesh, Where you have the loose_route() in your script right now, use topology_hiding_match() https://opensips.org/html/docs/modules/3.2.x/topology_hiding.html#func_topology_hiding_match Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/27/22 3:51 PM, Nitesh Divecha wrote: > Hey Bogdan-Andrei, > > Thanks for your feedback. > > To be honest - I don't know! > > I followed some online tutorials and tried to implement > "topology_hiding()" after is_method("INVITE") since the first message > sent to Outbound Provider is INVITE. > > I never tried topology_hiding_match(). > > What is the right way to implement topology_hiding module? My scenario > is simple, I'm using the default cfg and making ATA register to > OpenSIPS to make Outbound PSTN calls. > > I guess Bootcamp is the answer :-) > > Cheers, > Nitesh > > > On Thu, Oct 27, 2022 at 4:02 AM Bogdan-Andrei Iancu > > wrote: > > Hi Nitesh, > > Do you do topology_hiding_match() for the sequential requests > (instead of the typical loose_route()) ?  As it seems you cfg > fails to properly handle the in-dialog / sequential requests. > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 5-16 Dec 2022, online > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/26/22 9:05 PM, Nitesh Divecha wrote: >> Hello All, >> >> I don't know if this is by design or me not implementing >> correctly! I'm a newbie to OpenSIPS... >> >> So I generated a new opensips_residential.cfg file and only >> edited it with topology_hiding("UC"); under INVITE. Plus all the >> extras to make ATA register successfully and SIP trunk. >> >> Every time I make a call two INVITE dialogs are created. One from >> ATA to OpenSIPS and second one from OpenSIPS to Outbound >> Provider. When a PSTN call is answered, the Outbound Provider >> sends 200 OK back to OpenSIPS, and OpenSIPS sends back 200 OK to >> ATA. Then ATA acknowledges with ACK back to OpenSIPS BUT OpenSIPS >> fails to send ACK to the Outbound Provider. So Outbound Provider >> sends 200 OK again to OpenSIPS and OpenSIPS sends 200 OK to ATA >> then ATA acknowledges with ACK back to OpenSIPS BUT OpenSIPS >> fails to send back ACK... This dance goes on for 30 secs and >> until Outbound Provider drops the call due to no ACK. >> >> On the sngrep it shows that call from ATA to OpenSIPS "COMPLETED" >> while OpenSIPS to Outbound Provider "CALL SETUP". >> >> If I comment out topology_hiding("UC"); then everything works >> perfectly and sngrep shows only one INVITE dialog from ATA to >> OpenSIPS to Outbound Provider except the Outbound Provider can >> see everything that is ATA's IP info, etc... >> >> Here is my cfg: >> >> route { >> ... >> if (dp_translate(10 ,$rU ,$rU) ) { >>               xlog("*** Dial plan translate from source $avp(src) >> to $rU ***\n"); >> >>               $avp(furi) = "sip:xxxxxxxxxx at gothamcity.com >> "; >>               uac_replace_from( , "$avp(furi)"); >>               #strip(1); >>               if (!do_routing(0)) { >>                       send_reply(500,"No PSTN Route found"); >>                       exit; >>               } >>               # t_on_branch("change_from"); >>               route(relay); >>               exit; >>       } >> ... >> } >> >> route[relay] { >>       # for INVITEs enable some additional helper routes >>       if (is_method("INVITE")) { >>               # create_dialog(); >>               topology_hiding("UC"); >>               if(remove_hf("User-Agent")){ >>                       xlog("*** 4. User-Agent found and removed. >> ***\n"); >>               } >> >>               if (isflagset("NAT") && has_body("application/sdp")) { >>                       rtpproxy_offer("ro"); >>               } >> >>               t_on_branch("per_branch_ops"); >>               t_on_reply("handle_nat"); >>               t_on_failure("missed_call"); >>       } >> >>       if (isflagset("NAT")) { >>               add_rr_param(";nat=yes"); >>       } >> >>       if (!t_relay()) { >>               send_reply(500,"Internal Error"); >>       } >>       exit; >> } >> >> My eyes are sore and my head is spinning... Any help will be >> highly appreciated... Thanks! >> >> Cheers, >> Nitesh >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kneeoh at yahoo.com Thu Oct 27 15:51:23 2022 From: kneeoh at yahoo.com (Kneeoh) Date: Thu, 27 Oct 2022 15:51:23 +0000 (UTC) Subject: [OpenSIPS-Users] SIP/2.0 500 Server error occurred (6/SL) References: <1282068435.944206.1666885883215.ref@mail.yahoo.com> Message-ID: <1282068435.944206.1666885883215@mail.yahoo.com> Hi all, i'm trying to track down the root cause of a SIP/2.0 500 Server error occurred (6/SL) response from Opensips and can't find any definition for what type of issue would cause this. It seems to happen after receiving several 503s from downstream endpoints, then this internal error is generated and sent. Any guidance is appreciated, Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From venefax at gmail.com Thu Oct 27 16:05:11 2022 From: venefax at gmail.com (Saint Michael) Date: Thu, 27 Oct 2022 12:05:11 -0400 Subject: [OpenSIPS-Users] Orderly shutdown In-Reply-To: References: <3b84b296-f546-dfd4-78a7-3df2aacc718d@opensips.org> <11abb602-7924-d2ad-a876-e387186d095b@opensips.org> Message-ID: this code does not seem to work: I set the initial value to 15, inside opensips.cfg modparam("gflags", "initial", 15) Then: /usr/local/bin/opensips-cli -x mi set_gflag 1 "OK" /usr/local/bin/opensips-cli -x mi get_gflags { "hex": "0xF", "dec": "15" } Maybe I am not following the whole thing. I apologize. I imagine that we have a 32 bit field, and we set a bit to 1 for bits 0..31. On Thu, Oct 27, 2022 at 11:32 AM Bogdan-Andrei Iancu wrote: > > Ok, docs fixed, thanks Karsten for spotting the error [0] > > Michael, that;s right, if the gflag is set, just reject the code with > 503 Service Unavailable . You also may consider adding a Retry-After > header [1] using the append_to_reply() function. > > [0] > https://github.com/OpenSIPS/opensips/commit/5945746b09b480dd0b7f8ea4b3584e4521bdac3a > [1] https://www.ietf.org/rfc/rfc3261.html#section-20.33 > [2] > https://opensips.org/html/docs/modules/3.2.x/sipmsgops.html#func_append_to_reply > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 5-16 Dec 2022, online > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/27/22 4:15 PM, Saint Michael wrote: > > YES > > Maybe we should fix the documentation? > > now the real question is, what goes inside the bracket if the flag > > value matches, to reject the call: > > I propose > > { > > sl_send_reply(503,"Declined"); > > exit; > > } > > > > > > On Thu, Oct 27, 2022 at 9:04 AM Karsten Wemheuer wrote: > >> Hi, > >> > >> I am not familiar with the gflags module, but > >> > >> Am Donnerstag, dem 27.10.2022 um 08:39 -0400 schrieb Saint Michael: > >>> for testing I added > >>> route{ > >>> if (is_gflag("1")) { > >>> t_relay("udp:10.0.0.1:5060"); > >>> } else { > >>> t_relay("udp:10.0.0.2:5060"); > >>> } > >> I think, You should remove the quotes around the "1". > >> > >> I think, the example in the docs may be wrong (Your code was from the > >> docs, I think). See section 1.4.3, where > >> if(is_gflag(4)) > >> is written. > >> > >> HTH, > >> > >> Karsten > >> > >> > >> > >> _______________________________________________ > >> Users mailing list > >> Users at lists.opensips.org > >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > From bogdan at opensips.org Thu Oct 27 16:21:49 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Thu, 27 Oct 2022 19:21:49 +0300 Subject: [OpenSIPS-Users] Orderly shutdown In-Reply-To: References: <3b84b296-f546-dfd4-78a7-3df2aacc718d@opensips.org> <11abb602-7924-d2ad-a876-e387186d095b@opensips.org> Message-ID: <7d19e3a1-8cd7-7961-d593-f73b991b910b@opensips.org> OK, let's do a "back to school" when comes to binary representation and ops Decimal 15 (what you set for initial) is 1111, so all bits (index 0-3) are set to 1, to true. So, when you set (to value 1) the gflag with idx "1" , nothing will be actually changed as it is already 1 :P Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/27/22 7:05 PM, Saint Michael wrote: > this code does not seem to work: I set the initial value to 15, inside > opensips.cfg > modparam("gflags", "initial", 15) > > Then: > /usr/local/bin/opensips-cli -x mi set_gflag 1 > "OK" > /usr/local/bin/opensips-cli -x mi get_gflags > { > "hex": "0xF", > "dec": "15" > } > > Maybe I am not following the whole thing. I apologize. > I imagine that we have a 32 bit field, and we set a bit to 1 for bits 0..31. > > On Thu, Oct 27, 2022 at 11:32 AM Bogdan-Andrei Iancu > wrote: >> Ok, docs fixed, thanks Karsten for spotting the error [0] >> >> Michael, that;s right, if the gflag is set, just reject the code with >> 503 Service Unavailable . You also may consider adding a Retry-After >> header [1] using the append_to_reply() function. >> >> [0] >> https://github.com/OpenSIPS/opensips/commit/5945746b09b480dd0b7f8ea4b3584e4521bdac3a >> [1] https://www.ietf.org/rfc/rfc3261.html#section-20.33 >> [2] >> https://opensips.org/html/docs/modules/3.2.x/sipmsgops.html#func_append_to_reply >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Bootcamp 5-16 Dec 2022, online >> https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ >> >> On 10/27/22 4:15 PM, Saint Michael wrote: >>> YES >>> Maybe we should fix the documentation? >>> now the real question is, what goes inside the bracket if the flag >>> value matches, to reject the call: >>> I propose >>> { >>> sl_send_reply(503,"Declined"); >>> exit; >>> } >>> >>> >>> On Thu, Oct 27, 2022 at 9:04 AM Karsten Wemheuer wrote: >>>> Hi, >>>> >>>> I am not familiar with the gflags module, but >>>> >>>> Am Donnerstag, dem 27.10.2022 um 08:39 -0400 schrieb Saint Michael: >>>>> for testing I added >>>>> route{ >>>>> if (is_gflag("1")) { >>>>> t_relay("udp:10.0.0.1:5060"); >>>>> } else { >>>>> t_relay("udp:10.0.0.2:5060"); >>>>> } >>>> I think, You should remove the quotes around the "1". >>>> >>>> I think, the example in the docs may be wrong (Your code was from the >>>> docs, I think). See section 1.4.3, where >>>> if(is_gflag(4)) >>>> is written. >>>> >>>> HTH, >>>> >>>> Karsten >>>> >>>> >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users at lists.opensips.org >>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users From bogdan at opensips.org Thu Oct 27 16:27:22 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Thu, 27 Oct 2022 19:27:22 +0300 Subject: [OpenSIPS-Users] SIP/2.0 500 Server error occurred (6/SL) In-Reply-To: <1282068435.944206.1666885883215@mail.yahoo.com> References: <1282068435.944206.1666885883215.ref@mail.yahoo.com> <1282068435.944206.1666885883215@mail.yahoo.com> Message-ID: Hi, Do you see any error logs ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/27/22 6:51 PM, Kneeoh via Users wrote: > Hi all, i'm trying to track down the root cause of a SIP/2.0 500 > Server error occurred (6/SL) response from Opensips and can't find any > definition for what type of issue would cause this. It seems to happen > after receiving several 503s from downstream endpoints, then this > internal error is generated and sent. Any guidance is appreciated, > Thanks in advance. > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From venefax at gmail.com Thu Oct 27 16:52:36 2022 From: venefax at gmail.com (Saint Michael) Date: Thu, 27 Oct 2022 12:52:36 -0400 Subject: [OpenSIPS-Users] Orderly shutdown In-Reply-To: <7d19e3a1-8cd7-7961-d593-f73b991b910b@opensips.org> References: <3b84b296-f546-dfd4-78a7-3df2aacc718d@opensips.org> <11abb602-7924-d2ad-a876-e387186d095b@opensips.org> <7d19e3a1-8cd7-7961-d593-f73b991b910b@opensips.org> Message-ID: Thanks Bogdan-Andrei however, if I try to set the whole flag to 0 (from an initial value of 15), I get /usr/local/bin/opensips-cli -x mi set_gflag 0 ERROR: command 'set_gflag' returned: 400: Bad parameter value if we somehow get through that issue, then the code would be? if (is_gflag(0)) { xlog("$ci Shutting Down\r\n"); sl_send_reply(503,"Temporary Failure"); append_to_reply(503,"Temporary Failure\r\n"); exit; else { xlog("$ci Gflag is not set\r\n"); } Sorry for being so pushy. I am open to pay consultancy fees. It's just that I already lost a lot of money because I killed opensips with 700 open calls and lost the billing. On Thu, Oct 27, 2022 at 12:21 PM Bogdan-Andrei Iancu wrote: > > OK, let's do a "back to school" when comes to binary representation and ops > > Decimal 15 (what you set for initial) is 1111, so all bits (index 0-3) > are set to 1, to true. So, when you set (to value 1) the gflag with idx > "1" , nothing will be actually changed as it is already 1 :P > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 5-16 Dec 2022, online > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/27/22 7:05 PM, Saint Michael wrote: > > this code does not seem to work: I set the initial value to 15, inside > > opensips.cfg > > modparam("gflags", "initial", 15) > > > > Then: > > /usr/local/bin/opensips-cli -x mi set_gflag 1 > > "OK" > > /usr/local/bin/opensips-cli -x mi get_gflags > > { > > "hex": "0xF", > > "dec": "15" > > } > > > > Maybe I am not following the whole thing. I apologize. > > I imagine that we have a 32 bit field, and we set a bit to 1 for bits 0..31. > > > > On Thu, Oct 27, 2022 at 11:32 AM Bogdan-Andrei Iancu > > wrote: > >> Ok, docs fixed, thanks Karsten for spotting the error [0] > >> > >> Michael, that;s right, if the gflag is set, just reject the code with > >> 503 Service Unavailable . You also may consider adding a Retry-After > >> header [1] using the append_to_reply() function. > >> > >> [0] > >> https://github.com/OpenSIPS/opensips/commit/5945746b09b480dd0b7f8ea4b3584e4521bdac3a > >> [1] https://www.ietf.org/rfc/rfc3261.html#section-20.33 > >> [2] > >> https://opensips.org/html/docs/modules/3.2.x/sipmsgops.html#func_append_to_reply > >> > >> Regards, > >> > >> Bogdan-Andrei Iancu > >> > >> OpenSIPS Founder and Developer > >> https://www.opensips-solutions.com > >> OpenSIPS Bootcamp 5-16 Dec 2022, online > >> https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > >> > >> On 10/27/22 4:15 PM, Saint Michael wrote: > >>> YES > >>> Maybe we should fix the documentation? > >>> now the real question is, what goes inside the bracket if the flag > >>> value matches, to reject the call: > >>> I propose > >>> { > >>> sl_send_reply(503,"Declined"); > >>> exit; > >>> } > >>> > >>> > >>> On Thu, Oct 27, 2022 at 9:04 AM Karsten Wemheuer wrote: > >>>> Hi, > >>>> > >>>> I am not familiar with the gflags module, but > >>>> > >>>> Am Donnerstag, dem 27.10.2022 um 08:39 -0400 schrieb Saint Michael: > >>>>> for testing I added > >>>>> route{ > >>>>> if (is_gflag("1")) { > >>>>> t_relay("udp:10.0.0.1:5060"); > >>>>> } else { > >>>>> t_relay("udp:10.0.0.2:5060"); > >>>>> } > >>>> I think, You should remove the quotes around the "1". > >>>> > >>>> I think, the example in the docs may be wrong (Your code was from the > >>>> docs, I think). See section 1.4.3, where > >>>> if(is_gflag(4)) > >>>> is written. > >>>> > >>>> HTH, > >>>> > >>>> Karsten > >>>> > >>>> > >>>> > >>>> _______________________________________________ > >>>> Users mailing list > >>>> Users at lists.opensips.org > >>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > From kneeoh at yahoo.com Thu Oct 27 17:27:37 2022 From: kneeoh at yahoo.com (Kneeoh) Date: Thu, 27 Oct 2022 17:27:37 +0000 (UTC) Subject: [OpenSIPS-Users] SIP/2.0 500 Server error occurred (6/SL) In-Reply-To: References: <1282068435.944206.1666885883215.ref@mail.yahoo.com> <1282068435.944206.1666885883215@mail.yahoo.com> Message-ID: <721278677.1005409.1666891657146@mail.yahoo.com> I think we're running out of branches.. I believe the default is 12. Would this result in an internal 500 6/SL? What would I need to change and recompile to increase this? ERROR:tm:add_uac: maximum number of branches exceeded ERROR:tm:t_forward_nonack: failure to add branches On Thursday, October 27, 2022, 12:29:26 PM EDT, Bogdan-Andrei Iancu wrote: Hi, Do you see any error logs ? Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/27/22 6:51 PM, Kneeoh via Users wrote: Hi all, i'm trying to track down the root cause of a SIP/2.0 500 Server error occurred (6/SL) response from Opensips and can't find any definition for what type of issue would cause this. It seems to happen after receiving several 503s from downstream endpoints, then this internal error is generated and sent. Any guidance is appreciated, Thanks in advance. _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users _______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From venefax at gmail.com Thu Oct 27 18:06:50 2022 From: venefax at gmail.com (Saint Michael) Date: Thu, 27 Oct 2022 14:06:50 -0400 Subject: [OpenSIPS-Users] Orderly shutdown In-Reply-To: References: <3b84b296-f546-dfd4-78a7-3df2aacc718d@opensips.org> <11abb602-7924-d2ad-a876-e387186d095b@opensips.org> <7d19e3a1-8cd7-7961-d593-f73b991b910b@opensips.org> Message-ID: I want to thank everybody. I finished my project with the help of Vlad Paiu. Saint Michael On Thu, Oct 27, 2022 at 12:52 PM Saint Michael wrote: > > Thanks Bogdan-Andrei > > however, if I try to set the whole flag to 0 (from an initial value of > 15), I get > > /usr/local/bin/opensips-cli -x mi set_gflag 0 > ERROR: command 'set_gflag' returned: 400: Bad parameter value > > if we somehow get through that issue, then the code would be? > > if (is_gflag(0)) { > xlog("$ci Shutting Down\r\n"); > sl_send_reply(503,"Temporary Failure"); > append_to_reply(503,"Temporary Failure\r\n"); > exit; > else { > xlog("$ci Gflag is not set\r\n"); > } > > Sorry for being so pushy. I am open to pay consultancy fees. It's just > that I already lost a lot of money because I killed opensips with 700 > open calls and lost the billing. > > > On Thu, Oct 27, 2022 at 12:21 PM Bogdan-Andrei Iancu > wrote: > > > > OK, let's do a "back to school" when comes to binary representation and ops > > > > Decimal 15 (what you set for initial) is 1111, so all bits (index 0-3) > > are set to 1, to true. So, when you set (to value 1) the gflag with idx > > "1" , nothing will be actually changed as it is already 1 :P > > > > Regards, > > > > Bogdan-Andrei Iancu > > > > OpenSIPS Founder and Developer > > https://www.opensips-solutions.com > > OpenSIPS Bootcamp 5-16 Dec 2022, online > > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > > > On 10/27/22 7:05 PM, Saint Michael wrote: > > > this code does not seem to work: I set the initial value to 15, inside > > > opensips.cfg > > > modparam("gflags", "initial", 15) > > > > > > Then: > > > /usr/local/bin/opensips-cli -x mi set_gflag 1 > > > "OK" > > > /usr/local/bin/opensips-cli -x mi get_gflags > > > { > > > "hex": "0xF", > > > "dec": "15" > > > } > > > > > > Maybe I am not following the whole thing. I apologize. > > > I imagine that we have a 32 bit field, and we set a bit to 1 for bits 0..31. > > > > > > On Thu, Oct 27, 2022 at 11:32 AM Bogdan-Andrei Iancu > > > wrote: > > >> Ok, docs fixed, thanks Karsten for spotting the error [0] > > >> > > >> Michael, that;s right, if the gflag is set, just reject the code with > > >> 503 Service Unavailable . You also may consider adding a Retry-After > > >> header [1] using the append_to_reply() function. > > >> > > >> [0] > > >> https://github.com/OpenSIPS/opensips/commit/5945746b09b480dd0b7f8ea4b3584e4521bdac3a > > >> [1] https://www.ietf.org/rfc/rfc3261.html#section-20.33 > > >> [2] > > >> https://opensips.org/html/docs/modules/3.2.x/sipmsgops.html#func_append_to_reply > > >> > > >> Regards, > > >> > > >> Bogdan-Andrei Iancu > > >> > > >> OpenSIPS Founder and Developer > > >> https://www.opensips-solutions.com > > >> OpenSIPS Bootcamp 5-16 Dec 2022, online > > >> https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > >> > > >> On 10/27/22 4:15 PM, Saint Michael wrote: > > >>> YES > > >>> Maybe we should fix the documentation? > > >>> now the real question is, what goes inside the bracket if the flag > > >>> value matches, to reject the call: > > >>> I propose > > >>> { > > >>> sl_send_reply(503,"Declined"); > > >>> exit; > > >>> } > > >>> > > >>> > > >>> On Thu, Oct 27, 2022 at 9:04 AM Karsten Wemheuer wrote: > > >>>> Hi, > > >>>> > > >>>> I am not familiar with the gflags module, but > > >>>> > > >>>> Am Donnerstag, dem 27.10.2022 um 08:39 -0400 schrieb Saint Michael: > > >>>>> for testing I added > > >>>>> route{ > > >>>>> if (is_gflag("1")) { > > >>>>> t_relay("udp:10.0.0.1:5060"); > > >>>>> } else { > > >>>>> t_relay("udp:10.0.0.2:5060"); > > >>>>> } > > >>>> I think, You should remove the quotes around the "1". > > >>>> > > >>>> I think, the example in the docs may be wrong (Your code was from the > > >>>> docs, I think). See section 1.4.3, where > > >>>> if(is_gflag(4)) > > >>>> is written. > > >>>> > > >>>> HTH, > > >>>> > > >>>> Karsten > > >>>> > > >>>> > > >>>> > > >>>> _______________________________________________ > > >>>> Users mailing list > > >>>> Users at lists.opensips.org > > >>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > From bogdan at opensips.org Fri Oct 28 11:03:06 2022 From: bogdan at opensips.org (Bogdan-Andrei Iancu) Date: Fri, 28 Oct 2022 14:03:06 +0300 Subject: [OpenSIPS-Users] Loadbalancer for Registrations and calls In-Reply-To: References: <1f2663e6-68c8-8fb1-127e-25e3bfb882f5@opensips.org> Message-ID: <8d1fc605-88e9-cac6-ebdc-e3b9124cc848@opensips.org> Hi Kevin, You may try for REGISTERs to do hashing over TO uri and for INVITEs over TO or RURI - so they may get to the same box. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Bootcamp 5-16 Dec 2022, online https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ On 10/25/22 1:13 AM, Kevin Kennedy wrote: > Yes that is correct.  Trying to send the INVITE to the same dispatcher > destination that the Registration is at. > > I will check the Call-ID based dispatching algorithm > > Thank you. > Kevin > > On Mon, Oct 24, 2022 at 8:50 AM Bogdan-Andrei Iancu > > wrote: > > Hi Kevin > > 1) use the call-id based dispatching alg, so the INVITE with > credentials will get sent to the same destination > > 2) yes, mid-register (as register SIP mechanism) is allows the UA > to receive calls only, it is not related to handling the outbound > calls of the UA. I understand you try to get a call from A to B to > be sent to the same dispatcher destination as the registers of B, > right ? > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 5-16 Dec 2022, online > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/21/22 10:28 PM, Kevin Kennedy wrote: >> I believe I have mid_registrar somewhat working with dispatcher, >> but I seem to have a coulple issues. >> >> 1) When I receive the 401 request the second authentication >> INVITE is sending to another $ru host in the dispatcher instead >> of the initial one it sent to. >> 2) How do I send an outbound INVITE matching the registration >> cache  to the same $ru that it is Registered to. >>     mid_registrar_lookup uses the AOR instead of contact so it is >> only allowing the Incoming INVITEs to reach the client. >> >> Thank ou. >> >> Thank you. >> >> On Fri, Aug 19, 2022 at 8:46 AM Alex > > wrote: >> >> Hello, >> >> setup mid registrar easy with this instruction. >> https://www.opensips.org/Documentation/Tutorials-MidRegistrar >> >> There is link to config >> >> But It relays every Registration request every 60sec on my >> server. Please let me know if you could set up like on >> picture in instruction. >> >> >> >> >> >> чт, 18 авг. 2022 г. в 18:37, Kevin Kennedy >> >: >> >> I am looking for a configuration to be able to front end >> multiple SBC's to load balance Registrations and keep >> track of them to send INVITE's to the corresponding SBC. >> >> I am thinking of using a combination of Dispatcher and >> midregister, but not sure how to set this up correctly. >> >> Any thoughts? >> >> Thank you. >> >> Kevin >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> >> >> -- >> С уважением, >> Якимкин Алексей >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kennedy4260 at gmail.com Sun Oct 30 05:16:50 2022 From: kennedy4260 at gmail.com (Kevin Kennedy) Date: Sat, 29 Oct 2022 22:16:50 -0700 Subject: [OpenSIPS-Users] Loadbalancer for Registrations and calls In-Reply-To: <8d1fc605-88e9-cac6-ebdc-e3b9124cc848@opensips.org> References: <1f2663e6-68c8-8fb1-127e-25e3bfb882f5@opensips.org> <8d1fc605-88e9-cac6-ebdc-e3b9124cc848@opensips.org> Message-ID: I have set the ds_select_dst used in the mid_registrar part of the script to hash the To URI $ru = (ds_select_dst(1, *2*, , "default", 1)); but I am not seeing exactly how to do this for the INVITE. If I use ds_select_dst for the INVITE, it just chooses a random destination, not performing a match on the Registration destination. Am I missing something with this? Is there a way to pull information out of the usrloc contact kv-store. The information that is needed is in the hop field of the json string. Thank you. On Fri, Oct 28, 2022 at 4:03 AM Bogdan-Andrei Iancu wrote: > Hi Kevin, > > You may try for REGISTERs to do hashing over TO uri and for INVITEs over > TO or RURI - so they may get to the same box. > > Regards, > > Bogdan-Andrei Iancu > > OpenSIPS Founder and Developer > https://www.opensips-solutions.com > OpenSIPS Bootcamp 5-16 Dec 2022, online > https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ > > On 10/25/22 1:13 AM, Kevin Kennedy wrote: > > Yes that is correct. Trying to send the INVITE to the same dispatcher > destination that the Registration is at. > > I will check the Call-ID based dispatching algorithm > > Thank you. > Kevin > > On Mon, Oct 24, 2022 at 8:50 AM Bogdan-Andrei Iancu > wrote: > >> Hi Kevin >> >> 1) use the call-id based dispatching alg, so the INVITE with credentials >> will get sent to the same destination >> >> 2) yes, mid-register (as register SIP mechanism) is allows the UA to >> receive calls only, it is not related to handling the outbound calls of the >> UA. I understand you try to get a call from A to B to be sent to the same >> dispatcher destination as the registers of B, right ? >> >> Regards, >> >> Bogdan-Andrei Iancu >> >> OpenSIPS Founder and Developer >> https://www.opensips-solutions.com >> OpenSIPS Bootcamp 5-16 Dec 2022, online >> https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/ >> >> On 10/21/22 10:28 PM, Kevin Kennedy wrote: >> >> I believe I have mid_registrar somewhat working with dispatcher, but I >> seem to have a coulple issues. >> >> 1) When I receive the 401 request the second authentication INVITE is >> sending to another $ru host in the dispatcher instead of the initial one it >> sent to. >> 2) How do I send an outbound INVITE matching the registration cache to >> the same $ru that it is Registered to. >> mid_registrar_lookup uses the AOR instead of contact so it is only >> allowing the Incoming INVITEs to reach the client. >> >> Thank ou. >> >> Thank you. >> >> On Fri, Aug 19, 2022 at 8:46 AM Alex wrote: >> >>> Hello, >>> >>> setup mid registrar easy with this instruction. >>> https://www.opensips.org/Documentation/Tutorials-MidRegistrar >>> There is link to config >>> >>> But It relays every Registration request every 60sec on my server. >>> Please let me know if you could set up like on picture in instruction. >>> >>> >>> >>> >>> >>> чт, 18 авг. 2022 г. в 18:37, Kevin Kennedy : >>> >>>> I am looking for a configuration to be able to front end multiple SBC's >>>> to load balance Registrations and keep track of them to send INVITE's to >>>> the corresponding SBC. >>>> >>>> I am thinking of using a combination of Dispatcher and midregister, but >>>> not sure how to set this up correctly. >>>> >>>> Any thoughts? >>>> >>>> Thank you. >>>> >>>> Kevin >>>> _______________________________________________ >>>> Users mailing list >>>> Users at lists.opensips.org >>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>>> >>> >>> >>> -- >>> С уважением, >>> Якимкин Алексей >>> _______________________________________________ >>> Users mailing list >>> Users at lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >> >> _______________________________________________ >> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From medeanwz at gmail.com Sun Oct 30 14:44:36 2022 From: medeanwz at gmail.com (M S) Date: Sun, 30 Oct 2022 15:44:36 +0100 Subject: [OpenSIPS-Users] dialog behavior when no ACK is received Message-ID: Hi list, When a dialog is created with initial INVITE, it seems like it is not available to dlg_end_dlg until the call is answered (OK received) and the caller also acknowledges (ACK) to the OK message. So in a scenario where a caller sends an INVITE and then dies, the call goes to callee, gets answered, OK is sent to caller but there is no response, and the dialog stays open until default_timeout and that's when the CDR is generated (if default_timeout is 12 hours then a 12 hour call is in CDR). Anybody has any ideas how we can fix this? If I use PpB for dialog, it never PINGs the callee because apparently the dialog is not fully established on the callee side. If I use rtpengine to detect media timeout, it correctly detects it but when it calls dlg_end_dlg opensips says "dialog not found". Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From venefax at gmail.com Mon Oct 31 00:26:41 2022 From: venefax at gmail.com (Saint Michael) Date: Sun, 30 Oct 2022 20:26:41 -0400 Subject: [OpenSIPS-Users] dialog behavior when no ACK is received In-Reply-To: References: Message-ID: The greatest question I've read so dar. On Sun, Oct 30, 2022 at 10:48 AM M S wrote: > > Hi list, > When a dialog is created with initial INVITE, it seems like it is not available to dlg_end_dlg until the call is answered (OK received) and the caller also acknowledges (ACK) to the OK message. > So in a scenario where a caller sends an INVITE and then dies, the call goes to callee, gets answered, OK is sent to caller but there is no response, and the dialog stays open until default_timeout and that's when the CDR is generated (if default_timeout is 12 hours then a 12 hour call is in CDR). > Anybody has any ideas how we can fix this? If I use PpB for dialog, it never PINGs the callee because apparently the dialog is not fully established on the callee side. If I use rtpengine to detect media timeout, it correctly detects it but when it calls dlg_end_dlg opensips says "dialog not found". > > Thank you! > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From john at voxtelesys.com Mon Oct 31 01:24:10 2022 From: john at voxtelesys.com (John Burke) Date: Sun, 30 Oct 2022 20:24:10 -0500 Subject: [OpenSIPS-Users] dialog behavior when no ACK is received In-Reply-To: References: Message-ID: Hello, One way to handle the ACK timeout scenario that you described is to initially set the dialog timeout to a low value, then increment to the desired value after receiving the ACK.  Here's a minimal example with some notes I have. In this config, your call would hang for 5sec before being auto-closed by the dialog module. route {   if (has_totag()) {     # sequential request logic     ...     if (is_method("ACK"))       $DLG_timeout = 43200; # 12hrs     ...   }   # to handle case of lost ACK, we set low dialog timeout then   # increase once ACK is received; without this the call will stay   # in DLG_STATE=3 until default dialog timeout is met   # NOTE: timer doesn't start until 200 received, so this is essentially   #       an ACK timeout (ie 200 -> ACK)   $DLG_timeout = 5;   ...   # initial request logic } If the code ever changes to start the DLG timer before the 200, then this doesn't work... but I think this is baked into RFC and in any rate my unit tests for this scenario have never failed when migrating versions :) Thanks, John Burke On 10/30/22 9:44 AM, M S wrote: > Hi list, > When a dialog is created with initial INVITE, it seems like it is not > available to dlg_end_dlg until the call is answered (OK received) and > the caller also acknowledges (ACK) to the OK message. > So in a scenario where a caller sends an INVITE and then dies, the > call goes to callee, gets answered, OK is sent to caller but there is > no response, and the dialog stays open until default_timeout and > that's when the CDR is generated (if default_timeout is 12 hours then > a 12 hour call is in CDR). > Anybody has any ideas how we can fix this? If I use PpB for dialog, it > never PINGs the callee because apparently the dialog is not fully > established on the callee side. If I use rtpengine to detect media > timeout, it correctly detects it but when it calls dlg_end_dlg > opensips says "dialog not found". > > Thank you! > > -- > *Please be cautious!* This email was sent from outside of Voxtelesys. > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From medeanwz at gmail.com Mon Oct 31 09:17:40 2022 From: medeanwz at gmail.com (M S) Date: Mon, 31 Oct 2022 10:17:40 +0100 Subject: [OpenSIPS-Users] dialog behavior when no ACK is received In-Reply-To: References: Message-ID: Thanks, this looks like a good idea! changed your code a little to set DLG_timeout=5 right after create_dialog (otherwise even though you set DLG_timeout=12hrs for ACK, outside the if it gets reset to 5 again). I'm testing and will let you know. On Mon, Oct 31, 2022 at 2:27 AM John Burke via Users < users at lists.opensips.org> wrote: > Hello, > > One way to handle the ACK timeout scenario that you described is to > initially set the dialog timeout to a low value, then increment to the > desired value after receiving the ACK. Here's a minimal example with some > notes I have. In this config, your call would hang for 5sec before being > auto-closed by the dialog module. > > route { > if (has_totag()) { > # sequential request logic > ... > if (is_method("ACK")) > $DLG_timeout = 43200; # 12hrs > ... > } > > # to handle case of lost ACK, we set low dialog timeout then > # increase once ACK is received; without this the call will stay > # in DLG_STATE=3 until default dialog timeout is met > # NOTE: timer doesn't start until 200 received, so this is essentially > # an ACK timeout (ie 200 -> ACK) > $DLG_timeout = 5; > > ... > # initial request logic > } > > > If the code ever changes to start the DLG timer before the 200, then this > doesn't work... but I think this is baked into RFC and in any rate my unit > tests for this scenario have never failed when migrating versions :) > > Thanks, > John Burke > > > On 10/30/22 9:44 AM, M S wrote: > > Hi list, > When a dialog is created with initial INVITE, it seems like it is not > available to dlg_end_dlg until the call is answered (OK received) and the > caller also acknowledges (ACK) to the OK message. > So in a scenario where a caller sends an INVITE and then dies, the call > goes to callee, gets answered, OK is sent to caller but there is no > response, and the dialog stays open until default_timeout and that's when > the CDR is generated (if default_timeout is 12 hours then a 12 hour call is > in CDR). > Anybody has any ideas how we can fix this? If I use PpB for dialog, it > never PINGs the callee because apparently the dialog is not fully > established on the callee side. If I use rtpengine to detect media timeout, > it correctly detects it but when it calls dlg_end_dlg opensips says "dialog > not found". > > Thank you! > > -- > > * Please be cautious!* This email was sent from outside of Voxtelesys. > > > _______________________________________________ > Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmaruzz at gmail.com Mon Oct 31 12:49:52 2022 From: gmaruzz at gmail.com (Giovanni Maruzzelli) Date: Mon, 31 Oct 2022 13:49:52 +0100 Subject: [OpenSIPS-Users] Loadbalancer for Registrations and calls In-Reply-To: References: <1f2663e6-68c8-8fb1-127e-25e3bfb882f5@opensips.org> <8d1fc605-88e9-cac6-ebdc-e3b9124cc848@opensips.org> Message-ID: On Sun, Oct 30, 2022 at 6:19 AM Kevin Kennedy wrote: > I have set the ds_select_dst used in the mid_registrar part of the script > to hash the To URI > > $ru = (ds_select_dst(1, *2*, , "default", 1)); > > but I am not seeing exactly how to do this for the INVITE. If I use > ds_select_dst for the INVITE, it just chooses a random destination, > not performing a match on the Registration destination. > > You cannot use ds_select to send INVITE to where the REGISTER was You can make the kv-store visible to MI, and then ul_dump the AOR complete of kv-store Also, you can simply write in a memory hash or in a db table to which destination was the REGISTER going btw, I believe this architecture is fragile, you don't want INVITEs going to a destination related to the one REGISTER was, a lot of bad things can happen if you have such constraints. If you really really really want that, then just go for sharding based on domains or on users ranges, with some fallback schema -giovanni -- Sincerely, Giovanni Maruzzelli OpenTelecom.IT cell: +39 347 266 56 18 -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmaruzz at gmail.com Mon Oct 31 12:59:50 2022 From: gmaruzz at gmail.com (Giovanni Maruzzelli) Date: Mon, 31 Oct 2022 13:59:50 +0100 Subject: [OpenSIPS-Users] Loadbalancer for Registrations and calls In-Reply-To: References: <1f2663e6-68c8-8fb1-127e-25e3bfb882f5@opensips.org> <8d1fc605-88e9-cac6-ebdc-e3b9124cc848@opensips.org> Message-ID: On Mon, Oct 31, 2022 at 1:49 PM Giovanni Maruzzelli wrote: > On Sun, Oct 30, 2022 at 6:19 AM Kevin Kennedy > wrote: > >> I have set the ds_select_dst used in the mid_registrar part of the script >> to hash the To URI >> >> $ru = (ds_select_dst(1, *2*, , "default", 1)); >> >> You cannot use ds_select to send INVITE to where the REGISTER was > You can use the hashing Bogdan proposed, so ds_select will go to the same machine because it gets the same result from hashing the same input. In this case, you must find "something" (eg a cleaned TO for register and a cleaned FROM for INVITE) that is exactly the same in REGISTER and INVITE to use as base for the hashing. The hashing (like an MD5) will then be used to send the method to the same machine (because the "md5" of the hash "base" is the same (and will be the same only if the base is the same), it will go to the same machine. > You can make the kv-store visible to MI, and then ul_dump the AOR complete > of kv-store > > Also, you can simply write in a memory hash or in a db table to which > destination was the REGISTER going > > btw, I believe this architecture is fragile, you don't want INVITEs going > to a destination related to the one REGISTER was, a lot of bad things can > happen if you have such constraints. > If you really really really want that, then just go for sharding based on > domains or on users ranges, with some fallback schema > > -giovanni > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmaruzz at gmail.com Mon Oct 31 13:03:30 2022 From: gmaruzz at gmail.com (Giovanni Maruzzelli) Date: Mon, 31 Oct 2022 14:03:30 +0100 Subject: [OpenSIPS-Users] Loadbalancer for Registrations and calls In-Reply-To: References: <1f2663e6-68c8-8fb1-127e-25e3bfb882f5@opensips.org> <8d1fc605-88e9-cac6-ebdc-e3b9124cc848@opensips.org> Message-ID: On Mon, Oct 31, 2022 at 1:59 PM Giovanni Maruzzelli wrote: > > You can use the hashing Bogdan proposed, so ds_select will go to the same > machine because it gets the same result from hashing the same input. In > this case, you must find "something" (eg a cleaned TO for register and a > cleaned FROM for INVITE) > or cleaned TO and cleaned TO, for inbound calls -giovanni -------------- next part -------------- An HTML attachment was scrubbed... URL: From liviu at opensips.org Mon Oct 31 15:47:12 2022 From: liviu at opensips.org (Liviu Chircu) Date: Mon, 31 Oct 2022 17:47:12 +0200 Subject: [OpenSIPS-Users] [Blog] How To Generate Self-Signed STIR/SHAKEN Certificates Message-ID: Hi all, As STIR/SHAKEN is becoming increasingly popular (and mandatory...) in the North-American continent, you may want to check out this^[1] blog post in order to learn how to generate /free (/as in /beer/)//STIR/SHAKEN certificates on your own and begin proof-testing your up-and-coming STIR/SHAKEN infrastructure. [1]: https://blog.opensips.org/2022/10/31/how-to-generate-self-signed-stir-shaken-certificates/ Best regards, -- Liviu Chircu OpenSIPS Developer http://www.opensips-solutions.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From kennedy4260 at gmail.com Mon Oct 31 19:41:05 2022 From: kennedy4260 at gmail.com (Kevin Kennedy) Date: Mon, 31 Oct 2022 12:41:05 -0700 Subject: [OpenSIPS-Users] Loadbalancer for Registrations and calls In-Reply-To: References: <1f2663e6-68c8-8fb1-127e-25e3bfb882f5@opensips.org> <8d1fc605-88e9-cac6-ebdc-e3b9124cc848@opensips.org> Message-ID: Thank you all for your responses. Maybe I am going about this all wrong. Maybe I can explain it better with a drawing of what I am trying to do. I am trying to front end customers with Opensips to Load balance Registrations to 4 different SBC's. These SBC's will have their own Registration cache and pass the Registration to the Application servers. I need Opensips to send the INVITE/SUBSCRIBE to the SBC that it has sent the Registration to in order to match the Registration cache in that device. The only way I saw to do this was with Mid-Registrar and Dispatcher since Loadbalancer would not handle Registrations/Subscribes, etc. [image: image.png] Hopefully that can explain what I am trying to do better and help you understand what I am trying to accomplish. Thank you Kevin On Mon, Oct 31, 2022 at 6:07 AM Giovanni Maruzzelli wrote: > On Mon, Oct 31, 2022 at 1:59 PM Giovanni Maruzzelli > wrote: > >> >> You can use the hashing Bogdan proposed, so ds_select will go to the same >> machine because it gets the same result from hashing the same input. In >> this case, you must find "something" (eg a cleaned TO for register and a >> cleaned FROM for INVITE) >> > > or cleaned TO and cleaned TO, for inbound calls > > -giovanni > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 42529 bytes Desc: not available URL: From gmaruzz at gmail.com Mon Oct 31 19:44:10 2022 From: gmaruzz at gmail.com (Giovanni Maruzzelli) Date: Mon, 31 Oct 2022 20:44:10 +0100 Subject: [OpenSIPS-Users] Loadbalancer for Registrations and calls In-Reply-To: References: <1f2663e6-68c8-8fb1-127e-25e3bfb882f5@opensips.org> <8d1fc605-88e9-cac6-ebdc-e3b9124cc848@opensips.org> Message-ID: We all understood what you are doing and why It's just that... the answer is inside you! And it's wrong :) (famous quote from an Italian comedian) answered from mobile, please pardon terseness and typos, -giovanni On Mon, Oct 31, 2022, 20:41 Kevin Kennedy wrote: > Thank you all for your responses. Maybe I am going about this all wrong. > Maybe I can explain it better with a drawing of what I am trying to do. I > am trying to front end customers with Opensips to Load balance > Registrations to 4 different SBC's. These SBC's will have their own > Registration cache and pass the Registration to the Application servers. I > need Opensips to send the INVITE/SUBSCRIBE to the SBC that it has sent the > Registration to in order to match the Registration cache in that device. > The only way I saw to do this was with Mid-Registrar and Dispatcher since > Loadbalancer would not handle Registrations/Subscribes, etc. > > [image: image.png] > Hopefully that can explain what I am trying to do better and help you > understand what I am trying to accomplish. > > Thank you > > Kevin > > On Mon, Oct 31, 2022 at 6:07 AM Giovanni Maruzzelli > wrote: > >> On Mon, Oct 31, 2022 at 1:59 PM Giovanni Maruzzelli >> wrote: >> >>> >>> You can use the hashing Bogdan proposed, so ds_select will go to the >>> same machine because it gets the same result from hashing the same input. >>> In this case, you must find "something" (eg a cleaned TO for register and a >>> cleaned FROM for INVITE) >>> >> >> or cleaned TO and cleaned TO, for inbound calls >> >> -giovanni >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 42529 bytes Desc: not available URL: From kennedy4260 at gmail.com Mon Oct 31 20:00:17 2022 From: kennedy4260 at gmail.com (Kevin Kennedy) Date: Mon, 31 Oct 2022 13:00:17 -0700 Subject: [OpenSIPS-Users] Loadbalancer for Registrations and calls In-Reply-To: References: <1f2663e6-68c8-8fb1-127e-25e3bfb882f5@opensips.org> <8d1fc605-88e9-cac6-ebdc-e3b9124cc848@opensips.org> Message-ID: I am pretty new to Opensips, so maybe I am not understanding what you mean by hashing. The only place I see hashing is on the dispatcher module On Mon, Oct 31, 2022 at 12:44 PM Giovanni Maruzzelli wrote: > We all understood what you are doing and why > > It's just that... the answer is inside you! And it's wrong :) (famous > quote from an Italian comedian) > > answered from mobile, please pardon terseness and typos, > -giovanni > > On Mon, Oct 31, 2022, 20:41 Kevin Kennedy wrote: > >> Thank you all for your responses. Maybe I am going about this all >> wrong. Maybe I can explain it better with a drawing of what I am trying to >> do. I am trying to front end customers with Opensips to Load balance >> Registrations to 4 different SBC's. These SBC's will have their own >> Registration cache and pass the Registration to the Application servers. I >> need Opensips to send the INVITE/SUBSCRIBE to the SBC that it has sent the >> Registration to in order to match the Registration cache in that device. >> The only way I saw to do this was with Mid-Registrar and Dispatcher since >> Loadbalancer would not handle Registrations/Subscribes, etc. >> >> [image: image.png] >> Hopefully that can explain what I am trying to do better and help you >> understand what I am trying to accomplish. >> >> Thank you >> >> Kevin >> >> On Mon, Oct 31, 2022 at 6:07 AM Giovanni Maruzzelli >> wrote: >> >>> On Mon, Oct 31, 2022 at 1:59 PM Giovanni Maruzzelli >>> wrote: >>> >>>> >>>> You can use the hashing Bogdan proposed, so ds_select will go to the >>>> same machine because it gets the same result from hashing the same input. >>>> In this case, you must find "something" (eg a cleaned TO for register and a >>>> cleaned FROM for INVITE) >>>> >>> >>> or cleaned TO and cleaned TO, for inbound calls >>> >>> -giovanni >>> >>> _______________________________________________ >>> Users mailing list >>> Users at lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 42529 bytes Desc: not available URL: From kennedy4260 at gmail.com Mon Oct 31 20:02:24 2022 From: kennedy4260 at gmail.com (Kevin Kennedy) Date: Mon, 31 Oct 2022 13:02:24 -0700 Subject: [OpenSIPS-Users] Loadbalancer for Registrations and calls In-Reply-To: References: <1f2663e6-68c8-8fb1-127e-25e3bfb882f5@opensips.org> <8d1fc605-88e9-cac6-ebdc-e3b9124cc848@opensips.org> Message-ID: Sorry, sent by mistake continuation of email. DIspatcher module. Is this what you are referring to? Or are you referring to something else. - *alg* - the algorithm(s) used to select the destination address (variables are accepted). - “0” - hash over callid - “1” - hash over from uri. - “2” - hash over to uri. - “3” - hash over request-uri. - “4” - round-robin (next destination). - “5” - hash over authorization-username (Proxy-Authorization or "normal" authorization). If no username is found, round robin is used. - “6” - random (using rand()). - “7” - hash over the content of PVs string. Note: This works only when the parameter hash_pvar is set. - “8” - the first entry in set is chosen. - “9” - The *pvar_algo_pattern* parameter is used to determine the load on each server. If the parameter is not specified, then the first entry in the set is chosen. - “X” - if the algorithm is not implemented, the first entry in set is chosen. From what we have always seen on the SBC's is the best identifier for looking up the registration cache is the CONTACT header. As this will have the TGRP and Trunk-Context in it. On Mon, Oct 31, 2022 at 1:00 PM Kevin Kennedy wrote: > I am pretty new to Opensips, so maybe I am not understanding what you mean > by hashing. The only place I see hashing is on the dispatcher module > > > On Mon, Oct 31, 2022 at 12:44 PM Giovanni Maruzzelli > wrote: > >> We all understood what you are doing and why >> >> It's just that... the answer is inside you! And it's wrong :) (famous >> quote from an Italian comedian) >> >> answered from mobile, please pardon terseness and typos, >> -giovanni >> >> On Mon, Oct 31, 2022, 20:41 Kevin Kennedy wrote: >> >>> Thank you all for your responses. Maybe I am going about this all >>> wrong. Maybe I can explain it better with a drawing of what I am trying to >>> do. I am trying to front end customers with Opensips to Load balance >>> Registrations to 4 different SBC's. These SBC's will have their own >>> Registration cache and pass the Registration to the Application servers. I >>> need Opensips to send the INVITE/SUBSCRIBE to the SBC that it has sent the >>> Registration to in order to match the Registration cache in that device. >>> The only way I saw to do this was with Mid-Registrar and Dispatcher since >>> Loadbalancer would not handle Registrations/Subscribes, etc. >>> >>> [image: image.png] >>> Hopefully that can explain what I am trying to do better and help you >>> understand what I am trying to accomplish. >>> >>> Thank you >>> >>> Kevin >>> >>> On Mon, Oct 31, 2022 at 6:07 AM Giovanni Maruzzelli >>> wrote: >>> >>>> On Mon, Oct 31, 2022 at 1:59 PM Giovanni Maruzzelli >>>> wrote: >>>> >>>>> >>>>> You can use the hashing Bogdan proposed, so ds_select will go to the >>>>> same machine because it gets the same result from hashing the same input. >>>>> In this case, you must find "something" (eg a cleaned TO for register and a >>>>> cleaned FROM for INVITE) >>>>> >>>> >>>> or cleaned TO and cleaned TO, for inbound calls >>>> >>>> -giovanni >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users at lists.opensips.org >>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>>> >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 42529 bytes Desc: not available URL: