From razvan at opensips.org Thu Sep 4 08:39:59 2025 From: razvan at opensips.org (=?UTF-8?Q?R=C4=83zvan_Crainea?=) Date: Thu, 4 Sep 2025 11:39:59 +0300 Subject: [OpenSIPS-Users] Event route for timeout cache In-Reply-To: <25ccf346-f46f-44f7-bf73-3332821f4e87@gmail.com> References: <25ccf346-f46f-44f7-bf73-3332821f4e87@gmail.com> Message-ID: <115044f6-35fb-4ab0-9a11-955acbbb1b6f@opensips.org> Indeed, this is currently not supported, but nice to have :). Please open a PR [1] for this, to keep track of it. [1] https://github.com/OpenSIPS/opensips/issues Best regards, Răzvan Crainea OpenSIPS Core Developer / SIPhub CTO http://www.opensips-solutions.com / https://www.siphub.com On 8/31/25 9:32 AM, Ihor Olkhovskyi wrote: > Eric, > > Quickly looking through a code, especially at > > https://github.com/OpenSIPS/opensips/ > blob/617d3339037f7c20581b2998a6913311cfecd5b5/modules/cachedb_local/ > cachedb_local.c#L818, > > there is no mechanism to raise an event in the code. > > Le 29/08/2025 à 17:15, Eric Dev a écrit : >> Hello all, >> >> I have some experience with kamailio and totally new to opensips. >> >> And for some requirements i need to move to opensips. >> >> I found that opensips use the cache_local to provide kamailio htable >> functionnality but i did not found a way in opensips to get notified >> in an event_route  for exemple when a key expires. >> >> So my general question is , is there a way in opensips to store some >> data somewhere with expiring time and get notified (with key and >> value) when the data expires ? >> >> Is there a way to achieve it in opensips ? >> >> Thanks. >> >> _______________________________________________ >> 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 spce at lard.at Thu Sep 4 16:58:07 2025 From: spce at lard.at (Sipwise Mailinglist) Date: Thu, 4 Sep 2025 18:58:07 +0200 Subject: [OpenSIPS-Users] Variable Manipulation Message-ID: <52e7704e-04dd-40b7-8c85-c656819cfc82@lard.at> Hi guys, I need to add a "Generic number" parameter to an ISUP IAM message. To set the odd/even indicator I need to check the parity of the From number. I would like to check this with an bitwise AND. I cannot use $fU directly for this operation, because it preserves the leading + from the E.164 number. Is there a way to grab the username part without the + or strip the leading + from $fU and write the output to a variable? Thanks in advance, Malte From spce at lard.at Thu Sep 4 17:46:46 2025 From: spce at lard.at (Sipwise Mailinglist) Date: Thu, 4 Sep 2025 19:46:46 +0200 Subject: [OpenSIPS-Users] Variable Manipulation In-Reply-To: <0ccb97d6-7c45-47da-8d1b-59c6895c5f5b@rikrobson.co.uk> References: <52e7704e-04dd-40b7-8c85-c656819cfc82@lard.at> <0ccb97d6-7c45-47da-8d1b-59c6895c5f5b@rikrobson.co.uk> Message-ID: <167617ad-6045-40ab-b032-f6ae3affe0f5@lard.at> Hi Rik, thanks a lot. It works! [ $(fU{s.substr,1,0}{s.int}) & 1 ] Malte On 04/09/2025 19:24, Richard Robson wrote: > Hi, > > Use string manipulation to remove the leading + > > https://www.opensips.org/Documentation/Script-Tran-3-6#toc6 > > Regard, > > Rik > > On 04/09/2025 17:58, Sipwise Mailinglist wrote: >> Hi guys, >> >> I need to add a "Generic number" parameter to an ISUP IAM message. To >> set the odd/even indicator I need to check the parity of the From >> number. >> >> I would like to check this with an bitwise AND. I cannot use $fU >> directly for this operation, because it preserves the leading + from >> the E.164 number. >> >> Is there a way to grab the username part without the + or strip the >> leading + from $fU and write the output to a variable? >> >> >> Thanks in advance, >> >> Malte >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users From medeanwz at gmail.com Sun Sep 7 17:03:53 2025 From: medeanwz at gmail.com (M S) Date: Sun, 7 Sep 2025 19:03:53 +0200 Subject: [OpenSIPS-Users] media_exchange_from_uri Message-ID: Hi list, I am trying to use media_exchange_from_uri to play hold music. I use the sample code from opensips blog: if (has_totag() && is_method("INVITE")) { # catch the on-hold re-invite if(is_audio_on_hold()) { if (media_exchange_from_uri("sip:moh at media.server.ip")) exit; } else { # call has resumed - terminate any ongoing media played media_terminate(); } } But the behaviour is strange. A invite comes to proxy B, rtpproxy is engaged and invite is sent to C A,Aport <=> B,Bport1 - B,Bport2 <=> C,Cport A pressing hold: Invite with a=sendonly is received. With the above configuration, B sends an INVITE (B ip and Bport1) to media.server.ip (D). Media server D responds with 200 OK (D ip and Dport). Opensips B2B sends D,Dport SDP to C (so C expects to receive RTP from D port). While C expects to receive RTP from D directly, D has exchanged SDP with B and therefore sends RTP to B! Why is this happening? Thank you :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From medeanwz at gmail.com Sun Sep 7 18:34:42 2025 From: medeanwz at gmail.com (M S) Date: Sun, 7 Sep 2025 20:34:42 +0200 Subject: [OpenSIPS-Users] media_exchange_from_uri In-Reply-To: References: Message-ID: A(caller) <=> B(opensips) <=> C(callee) B(opensips) <=> D(media server) I tried it with the "callee" leg in media_exchange_from_uri too. technically, the B machine in the middle should send the ip/port of A and D to each other in SDPs to make sure media is direct between A and D - but B to D invite always has the B's ip/port in it. It should be due to something in my script, but what could it be? On Sun, Sep 7, 2025 at 7:03 PM M S wrote: > Hi list, > I am trying to use media_exchange_from_uri to play hold music. I use the > sample code from opensips blog: > > if (has_totag() && is_method("INVITE")) { > # catch the on-hold re-invite > if(is_audio_on_hold()) { > if (media_exchange_from_uri("sip:moh at media.server.ip")) > exit; > } else { > # call has resumed - terminate any ongoing media played > media_terminate(); > } > } > > > But the behaviour is strange. > > A invite comes to proxy B, rtpproxy is engaged and invite is sent to C > > A,Aport <=> B,Bport1 - B,Bport2 <=> C,Cport > > A pressing hold: Invite with a=sendonly is received. With the above configuration, B sends an INVITE (B ip and Bport1) to media.server.ip (D). > > Media server D responds with 200 OK (D ip and Dport). Opensips B2B sends D,Dport SDP to C (so C expects to receive RTP from D port). > > While C expects to receive RTP from D directly, D has exchanged SDP with B and therefore sends RTP to B! > > Why is this happening? > > > Thank you :) > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.santer at rolmail.net Mon Sep 8 09:08:40 2025 From: julian.santer at rolmail.net (Julian Santer) Date: Mon, 8 Sep 2025 11:08:40 +0200 Subject: [OpenSIPS-Users] OpenSips 3.4.12 crashes with segfault randomly Message-ID: <109m6e7$12io$1@ciao.gmane.io> Hello everyone! One of our OpenSIPS instances recently started having issues with restarts after seemingly random segfaults. Before, the server was working without any problems for the longest time. It seems, that some kind of, maybe malformed packet or something, is triggering this. These are the OpenSIPs details: version: opensips 3.4.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: 6440465a9 main.c compiled on with gcc 12 I've followed the "OpenSIPS crashes" part of the documentation and have the Logs and Backtraces. I'll attach them below. If someone has some hints on where to find the issue or maybe had something similar, I would appreciate the help 🙂 ... 2025-09-02T18:10:23.618904+02:00 gw-consumer1 kernel: [8579393.594925] opensips[804304]: segfault at 18 ip 00007f019405091a sp 00007ffc5cfcff10 error 4 in tm.so[7f0194017000+46000] likely on CPU 0 (core 0, socket 0) 2025-09-02T18:10:23.618936+02:00 gw-consumer1 kernel: [8579393.594944] Code: 48 8b 05 81 05 03 00 48 8b 00 f6 40 18 08 0f 85 e9 fb ff ff e9 64 fe ff ff 0f 1f 80 00 00 00 00 48 8b 05 59 05 03 00 48 8b 00 40 18 08 0f 85 c9 fb ff ff e9 44 fe ff ff 0f 1f 80 00 00 00 00 2025-09-02T18:10:23.620397+02:00 gw-consumer1 OpenSIPS[804304]: CRITICAL:core:sig_usr: segfault in process pid: 804304, id: 45 2025-09-02T18:10:23.721130+02:00 gw-consumer1 OpenSIPS[804263]: WARNING:core:utimer_ticker: utimer task already scheduled 100 ms ago (now 56230 ms), delaying execution 2025-09-02T18:10:23.752211+02:00 gw-consumer1 OpenSIPS[804259]: INFO:core:handle_sigs: child process 804304 exited by a signal 11 2025-09-02T18:10:23.752324+02:00 gw-consumer1 OpenSIPS[804259]: INFO:core:handle_sigs: core was generated 2025-09-02T18:10:23.752366+02:00 gw-consumer1 OpenSIPS[804259]: INFO:core:handle_sigs: terminating due to SIGCHLD ... Here the short version of the GDB ... Reading symbols from /usr/sbin/opensips... Reading symbols from /usr/lib/debug/.build-id/02/46eb235cd53dad2b8bc1e57cb2e4057daa0af4.debug... warning: Can't open file /dev/zero (deleted) during file-backed mapping note processing [New LWP 804304] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `/usr/sbin/opensips -P /run/opensips/opensips.pid -f /etc/opensips/opensips.cfg'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f019405091a in retransmission_handler (retr_tl=0x7f0194553ad8) at ./modules/tm/timer.c:313 313 ./modules/tm/timer.c: No such file or directory. ... I tried to look at the source code for Opensips version 3.4.12, but no luck... Here is the full GDB Trace: (gdb) bt full #0 0x00007f019405091a in retransmission_handler (retr_tl=0x7f0194553ad8) at ./modules/tm/timer.c:313 r_buf = 0x7f0194553a90 id = r_buf = id = __FUNCTION__ = "retransmission_handler" __mptr = #1 utimer_routine (uticks=56100000, set=) at ./modules/tm/timer.c:1153 tl = 0x7f0194553ad8 tmp_tl = 0x0 begin = {tv_sec = 1756829423, tv_nsec = 617548290} id = 4 __FUNCTION__ = "utimer_routine" #2 0x0000555ae09ac3a6 in handle_timer_job () at ./timer.c:1006 t = 0x7f01944c9208 l = _ijiffies = 56130000 _ijiffies_extra = 0 __FUNCTION__ = "handle_timer_job" #3 0x0000555ae09ac755 in handle_io (fm=0x7f01981d2538, event_type=1, idx=) at ./timer.c:765 n = -1742920392 __FUNCTION__ = "handle_io" #4 0x0000555ae09ad139 in io_wait_loop_epoll (repeat=, t=, h=) at ./io_wait_loop.h:305 ret = n = r = 1 i = e = ep_event = {events = 2496488960, data = {ptr = 0xe0b17a4c054f8400, fd = 89097216, u32 = 89097216, u64 = 16190856602298844160}} fd = curr_time = error = __FUNCTION__ = "io_wait_loop_epoll" #5 0x0000555ae09ae16d in start_timer_extra_processes (chd_rank=chd_rank at entry=0x555ae0bbd218 ) at ./timer.c:932 i = p_id = ifp_th = {proc_desc = 0x555ae0ad0b8b "Timer handler", flags = 4, type = TYPE_TIMER} __FUNCTION__ = "start_timer_extra_processes" #6 0x0000555ae08fe9e4 in main_loop () at ./main.c:249 startup_done = 0x0 last_check = 0 rc = chd_rank = 41 startup_done = last_check = rc = profiling_handler = {desc = 0x555ae0ab2f98 "_ProfilerStart_child()", on_child_init = 0x555ae0931fb0 <_ProfilerStart_child>, _next = 0x0} __FUNCTION__ = "main_loop" error = #7 main (argc=, argv=) at ./main.c:966 c = r = tmp = 0x7ffc5cfd0e4b "" tmp_len = port = proto = 0 protos_no = options = 0x555ae0ab3260 "f:cCm:M:b:l:n:N:rRvdDFEVhw:t:u:g:p:P:G:W:o:a:k:s:" ret = -1 seed = 1271792197 rfd = procs_no = __FUNCTION__ = "main" Best Regards Benjamin Herbst From benjamin.herbst at konverto.eu Mon Sep 8 06:35:28 2025 From: benjamin.herbst at konverto.eu (Benjamin Herbst) Date: Mon, 8 Sep 2025 08:35:28 +0200 Subject: [OpenSIPS-Users] Segfault after some timer issue Message-ID: <109ltfg$ear$1@ciao.gmane.io> Hello everyone! One of our OpenSIPS instances recently started having issues with restarts after seemingly random segfaults. Before, the server was working without any problems for the longest time. It seems, that some kind of, maybe malformed packet or something, is triggering this. These are the OpenSIPs details: version: opensips 3.4.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: 6440465a9 main.c compiled on with gcc 12 I've followed the "OpenSIPS crashes" part of the documentation and have the Logs and Backtraces. I'll attach them below. If someone has some hints on where to find the issue or maybe had something similar, I would appreciate the help 🙂 ... 2025-09-02T18:10:23.618904+02:00 gw-consumer1 kernel: [8579393.594925] opensips[804304]: segfault at 18 ip 00007f019405091a sp 00007ffc5cfcff10 error 4 in tm.so[7f0194017000+46000] likely on CPU 0 (core 0, socket 0) 2025-09-02T18:10:23.618936+02:00 gw-consumer1 kernel: [8579393.594944] Code: 48 8b 05 81 05 03 00 48 8b 00 f6 40 18 08 0f 85 e9 fb ff ff e9 64 fe ff ff 0f 1f 80 00 00 00 00 48 8b 05 59 05 03 00 48 8b 00 40 18 08 0f 85 c9 fb ff ff e9 44 fe ff ff 0f 1f 80 00 00 00 00 2025-09-02T18:10:23.620397+02:00 gw-consumer1 OpenSIPS[804304]: CRITICAL:core:sig_usr: segfault in process pid: 804304, id: 45 2025-09-02T18:10:23.721130+02:00 gw-consumer1 OpenSIPS[804263]: WARNING:core:utimer_ticker: utimer task already scheduled 100 ms ago (now 56230 ms), delaying execution 2025-09-02T18:10:23.752211+02:00 gw-consumer1 OpenSIPS[804259]: INFO:core:handle_sigs: child process 804304 exited by a signal 11 2025-09-02T18:10:23.752324+02:00 gw-consumer1 OpenSIPS[804259]: INFO:core:handle_sigs: core was generated 2025-09-02T18:10:23.752366+02:00 gw-consumer1 OpenSIPS[804259]: INFO:core:handle_sigs: terminating due to SIGCHLD ... Here the short version of the GDB ... Reading symbols from /usr/sbin/opensips... Reading symbols from /usr/lib/debug/.build-id/02/46eb235cd53dad2b8bc1e57cb2e4057daa0af4.debug... warning: Can't open file /dev/zero (deleted) during file-backed mapping note processing [New LWP 804304] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `/usr/sbin/opensips -P /run/opensips/opensips.pid -f /etc/opensips/opensips.cfg'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f019405091a in retransmission_handler (retr_tl=0x7f0194553ad8) at ./modules/tm/timer.c:313 313 ./modules/tm/timer.c: No such file or directory. ... I tried to look at the source code for Opensips version 3.4.12, but no luck... Here is the full GDB Trace: (gdb) bt full #0 0x00007f019405091a in retransmission_handler (retr_tl=0x7f0194553ad8) at ./modules/tm/timer.c:313 r_buf = 0x7f0194553a90 id = r_buf = id = __FUNCTION__ = "retransmission_handler" __mptr = #1 utimer_routine (uticks=56100000, set=) at ./modules/tm/timer.c:1153 tl = 0x7f0194553ad8 tmp_tl = 0x0 begin = {tv_sec = 1756829423, tv_nsec = 617548290} id = 4 __FUNCTION__ = "utimer_routine" #2 0x0000555ae09ac3a6 in handle_timer_job () at ./timer.c:1006 t = 0x7f01944c9208 l = _ijiffies = 56130000 _ijiffies_extra = 0 __FUNCTION__ = "handle_timer_job" #3 0x0000555ae09ac755 in handle_io (fm=0x7f01981d2538, event_type=1, idx=) at ./timer.c:765 n = -1742920392 __FUNCTION__ = "handle_io" #4 0x0000555ae09ad139 in io_wait_loop_epoll (repeat=, t=, h=) at ./io_wait_loop.h:305 ret = n = r = 1 i = e = ep_event = {events = 2496488960, data = {ptr = 0xe0b17a4c054f8400, fd = 89097216, u32 = 89097216, u64 = 16190856602298844160}} fd = curr_time = error = __FUNCTION__ = "io_wait_loop_epoll" #5 0x0000555ae09ae16d in start_timer_extra_processes (chd_rank=chd_rank at entry=0x555ae0bbd218 ) at ./timer.c:932 i = p_id = ifp_th = {proc_desc = 0x555ae0ad0b8b "Timer handler", flags = 4, type = TYPE_TIMER} __FUNCTION__ = "start_timer_extra_processes" #6 0x0000555ae08fe9e4 in main_loop () at ./main.c:249 startup_done = 0x0 last_check = 0 rc = chd_rank = 41 startup_done = last_check = rc = profiling_handler = {desc = 0x555ae0ab2f98 "_ProfilerStart_child()", on_child_init = 0x555ae0931fb0 <_ProfilerStart_child>, _next = 0x0} __FUNCTION__ = "main_loop" error = #7 main (argc=, argv=) at ./main.c:966 c = r = tmp = 0x7ffc5cfd0e4b "" tmp_len = port = proto = 0 protos_no = options = 0x555ae0ab3260 "f:cCm:M:b:l:n:N:rRvdDFEVhw:t:u:g:p:P:G:W:o:a:k:s:" ret = -1 seed = 1271792197 rfd = procs_no = __FUNCTION__ = "main" Best Regards Benjamin Herbst From julian.santer at rolmail.net Mon Sep 8 10:12:29 2025 From: julian.santer at rolmail.net (Julian Santer) Date: Mon, 8 Sep 2025 12:12:29 +0200 Subject: [OpenSIPS-Users] OpenSips 3.4.12 crashes with segfault randomly In-Reply-To: <109m6e7$12io$1@ciao.gmane.io> References: <109m6e7$12io$1@ciao.gmane.io> Message-ID: <109ma5t$kkk$1@ciao.gmane.io> Hello everyone, this issue is a duble of "Segfault after some timer issue" sent from Benjamin Herbst. Kind regards, Julian Santer Am 08.09.25 um 11:08 schrieb Julian Santer via Users: > Hello everyone! > > One of our OpenSIPS instances recently started having issues with > restarts after seemingly random segfaults. Before, the server was > working without any problems for the longest time. > It seems, that some kind of, maybe malformed packet or something, is > triggering this. > > These are the OpenSIPs details: > > version: opensips 3.4.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: 6440465a9 > main.c compiled on with gcc 12 > > > I've followed the "OpenSIPS crashes" part of the documentation and have > the Logs and Backtraces. I'll attach them below. > > If someone has some hints on where to find the issue or maybe had > something similar, I would appreciate the help 🙂 > > > ... > 2025-09-02T18:10:23.618904+02:00 gw-consumer1 kernel: [8579393.594925] > opensips[804304]: segfault at 18 ip 00007f019405091a sp 00007ffc5cfcff10 > error 4 in tm.so[7f0194017000+46000] likely on CPU 0 (core 0, > socket 0) > 2025-09-02T18:10:23.618936+02:00 gw-consumer1 kernel: [8579393.594944] > Code: 48 8b 05 81 05 03 00 48 8b 00 f6 40 18 08 0f 85 e9 fb ff ff e9 64 > fe ff ff 0f 1f 80 00 00 00 00 48 8b 05 59 05 03 00 48 8b 00 6> 40 18 08 0f 85 c9 fb ff ff e9 44 fe ff ff 0f 1f 80 00 00 00 00 > 2025-09-02T18:10:23.620397+02:00 gw-consumer1 OpenSIPS[804304]: > CRITICAL:core:sig_usr: segfault in process pid: 804304, id: 45 > 2025-09-02T18:10:23.721130+02:00 gw-consumer1 OpenSIPS[804263]: > WARNING:core:utimer_ticker: utimer task already scheduled > 100 ms ago (now 56230 ms), delaying execution > 2025-09-02T18:10:23.752211+02:00 gw-consumer1 OpenSIPS[804259]: > INFO:core:handle_sigs: child process 804304 exited by a signal 11 > 2025-09-02T18:10:23.752324+02:00 gw-consumer1 OpenSIPS[804259]: > INFO:core:handle_sigs: core was generated > 2025-09-02T18:10:23.752366+02:00 gw-consumer1 OpenSIPS[804259]: > INFO:core:handle_sigs: terminating due to SIGCHLD > ... > > > Here the short version of the GDB > > ... > Reading symbols from /usr/sbin/opensips... > Reading symbols from /usr/lib/debug/.build- > id/02/46eb235cd53dad2b8bc1e57cb2e4057daa0af4.debug... > > warning: Can't open file /dev/zero (deleted) during file-backed mapping > note processing > [New LWP 804304] > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". > Core was generated by `/usr/sbin/opensips -P /run/opensips/opensips.pid > -f /etc/opensips/opensips.cfg'. > Program terminated with signal SIGSEGV, Segmentation fault. > #0 0x00007f019405091a in retransmission_handler (retr_tl=0x7f0194553ad8) > at ./modules/tm/timer.c:313 > 313 ./modules/tm/timer.c: No such file or directory. > ... > > I tried to look at the source code for Opensips version 3.4.12, but no > luck... > > > Here is the full GDB Trace: > > > (gdb) bt full > #0 0x00007f019405091a in retransmission_handler (retr_tl=0x7f0194553ad8) > at ./modules/tm/timer.c:313 > r_buf = 0x7f0194553a90 > id = > r_buf = > id = > __FUNCTION__ = "retransmission_handler" > __mptr = > #1 utimer_routine (uticks=56100000, set=) at ./modules/ > tm/timer.c:1153 > tl = 0x7f0194553ad8 > tmp_tl = 0x0 > begin = {tv_sec = 1756829423, tv_nsec = 617548290} > id = 4 > __FUNCTION__ = "utimer_routine" > #2 0x0000555ae09ac3a6 in handle_timer_job () at ./timer.c:1006 > t = 0x7f01944c9208 > l = > _ijiffies = 56130000 > _ijiffies_extra = 0 > __FUNCTION__ = "handle_timer_job" > #3 0x0000555ae09ac755 in handle_io (fm=0x7f01981d2538, event_type=1, > idx=) at ./timer.c:765 > n = -1742920392 > __FUNCTION__ = "handle_io" > #4 0x0000555ae09ad139 in io_wait_loop_epoll (repeat=, > t=, h=) at ./io_wait_loop.h:305 > ret = > n = > r = 1 > i = > e = > ep_event = {events = 2496488960, data = {ptr = 0xe0b17a4c054f8400, fd = > 89097216, u32 = 89097216, u64 = 16190856602298844160}} > fd = > curr_time = > error = > __FUNCTION__ = "io_wait_loop_epoll" > #5 0x0000555ae09ae16d in start_timer_extra_processes > (chd_rank=chd_rank at entry=0x555ae0bbd218 ) at ./timer.c:932 > i = > p_id = > ifp_th = {proc_desc = 0x555ae0ad0b8b "Timer handler", flags = 4, type = > TYPE_TIMER} > __FUNCTION__ = "start_timer_extra_processes" > #6 0x0000555ae08fe9e4 in main_loop () at ./main.c:249 > startup_done = 0x0 > last_check = 0 > rc = > chd_rank = 41 > startup_done = > last_check = > rc = > profiling_handler = {desc = 0x555ae0ab2f98 "_ProfilerStart_child()", > on_child_init = 0x555ae0931fb0 <_ProfilerStart_child>, _next = 0x0} > __FUNCTION__ = "main_loop" > error = > #7 main (argc=, argv=) at ./main.c:966 > c = > r = > tmp = 0x7ffc5cfd0e4b "" > tmp_len = > port = > proto = 0 > protos_no = > options = 0x555ae0ab3260 > "f:cCm:M:b:l:n:N:rRvdDFEVhw:t:u:g:p:P:G:W:o:a:k:s:" > ret = -1 > seed = 1271792197 > rfd = > procs_no = > __FUNCTION__ = "main" > > > Best Regards > Benjamin Herbst > > > _______________________________________________ > Users mailing list > Users at lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users From medeanwz at gmail.com Mon Sep 8 11:02:31 2025 From: medeanwz at gmail.com (M S) Date: Mon, 8 Sep 2025 13:02:31 +0200 Subject: [OpenSIPS-Users] media_exchange_from_uri In-Reply-To: References: Message-ID: For anyone who comes across this post in future - this is a bug in 3.1 and above (probably when topology hiding is used) which seems to have been fixed in 3.4 A workaround is to keep the SDP from caller or callee and send it as the third variable of media_exchange_from_uri function to establish the connection correctly. On Sun, Sep 7, 2025 at 8:34 PM M S wrote: > A(caller) <=> B(opensips) <=> C(callee) > B(opensips) <=> D(media server) > > I tried it with the "callee" leg in media_exchange_from_uri too. > technically, the B machine in the middle should send the ip/port of A and D > to each other in SDPs to make sure media is direct between A and D - but B > to D invite always has the B's ip/port in it. It should be due to something > in my script, but what could it be? > > On Sun, Sep 7, 2025 at 7:03 PM M S wrote: > >> Hi list, >> I am trying to use media_exchange_from_uri to play hold music. I use the >> sample code from opensips blog: >> >> if (has_totag() && is_method("INVITE")) { >> # catch the on-hold re-invite >> if(is_audio_on_hold()) { >> if (media_exchange_from_uri("sip:moh at media.server.ip")) >> exit; >> } else { >> # call has resumed - terminate any ongoing media played >> media_terminate(); >> } >> } >> >> >> But the behaviour is strange. >> >> A invite comes to proxy B, rtpproxy is engaged and invite is sent to C >> >> A,Aport <=> B,Bport1 - B,Bport2 <=> C,Cport >> >> A pressing hold: Invite with a=sendonly is received. With the above configuration, B sends an INVITE (B ip and Bport1) to media.server.ip (D). >> >> Media server D responds with 200 OK (D ip and Dport). Opensips B2B sends D,Dport SDP to C (so C expects to receive RTP from D port). >> >> While C expects to receive RTP from D directly, D has exchanged SDP with B and therefore sends RTP to B! >> >> Why is this happening? >> >> >> Thank you :) >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: