Re: [OpenSIPS-Users] shm memory error

2020-10-15 Thread Gregory Massel

This issue has come back again:

Oct 15 11:55:20 proxy /usr/sbin/opensips[21737]: ERROR:core:fm_malloc: 
not enough free shm memory (651730736 bytes left, need 6720), please 
increase the "-m" command line parameter!


Lots of shared memory left, but it's still saying not enough.

Any guidance on how I can debug this would be hugely appreciated.

Thanks
Greg

On 2020-09-14 4:20 pm, Gregory Massel wrote:

Hello

Does anyone know what would cause the following:

Sep 14 15:33:39 proxy /usr/sbin/opensips[30920]: ERROR:core:fm_malloc: 
not enough free shm memory (290427312 bytes left, need 6720), please 
increase the "-m" command line parameter!
Sep 14 15:33:39 proxy /usr/sbin/opensips[30920]: ERROR:core:fm_malloc: 
not enough free shm memory (290416528 bytes left, need 6720), please 
increase the "-m" command line parameter!
Sep 14 15:33:39 proxy /usr/sbin/opensips[30919]: ERROR:core:fm_malloc: 
not enough free shm memory (290401384 bytes left, need 6720), please 
increase the "-m" command line parameter!
Sep 14 15:33:39 proxy /usr/sbin/opensips[30917]: ERROR:core:fm_malloc: 
not enough free shm memory (290388104 bytes left, need 6720), please 
increase the "-m" command line parameter!
Sep 14 15:33:39 proxy /usr/sbin/opensips[30919]: ERROR:core:fm_malloc: 
not enough free shm memory (290373648 bytes left, need 6720), please 
increase the "-m" command line parameter!


Note that it's saying that it needs far less than what is actually 
left, so it doesn't appear to be a case that the shared memory has 
actually run out, despite it reporting that.


This is OpenSIPS 3.0.3.

The weird thing is that, after approximately five minutes, it just 
seemed to come right by itself.


Thanks
Greg



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] segfault at 7f4c471852 ip 00007f4dc4a0ccc0 sp 00007ffc74776350 error 4 in libc-2.23.so[7f4dc49be000+1c0000]

2020-10-15 Thread Răzvan Crainea

Hi, Cory!

This issue as been already fixed in OpenSIPS 3.0.3, commit 3a8f6f13.
Please upgrade your code to the latest 3.0.x to get the latest fixes.

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 10/2/20 4:03 AM, CARTWRIGHT, CORY C wrote:
Although I have not sparked any interest in this so far, I was able to 
get more information with DEBUG turned on.


This looks like it is an issue connecting to mysql, the mysql logs are 
turned on with no additional information shown pertaining to this.  The 
query log shows normal dispatcher updates right up to the crash


Oct  1 20:53:18 [7833] DBG:core:do_workers_auto_scaling: group 1 (with 5 
procs) has average load of 100


Oct  1 20:53:18 [7833] NOTICE:core:do_workers_auto_scaling: score 5/5 -> 
forking new proc in group 1 (with 5 procs)


Oct  1 20:53:18 [7833] DBG:core:internal_fork: forking new process "UDP 
receiver" on slot 13


Oct  1 20:53:18 [8083] DBG:core:io_watch_add: [UDP_worker] io_watch_add 
op (5 on 71) (0xa5b9e0, 5, 1, (nil),1), fd_no=0/1024


Oct  1 20:53:18 [8083] DBG:core:io_watch_add: [UDP_worker] io_watch_add 
op (38 on 71) (0xa5b9e0, 38, 4, (nil),1), fd_no=1/1024


Oct  1 20:53:18 [8083] DBG:core:io_watch_add: [UDP_worker] io_watch_add 
op (7 on 71) (0xa5b9e0, 7, 4, (nil),1), fd_no=2/1024


Oct  1 20:53:18 [8083] DBG:core:io_watch_add: [UDP_worker] io_watch_add 
op (68 on 71) (0xa5b9e0, 68, 17, 0x7f1d8c848f78,1), fd_no=3/1024


Oct  1 20:53:18 [8083] DBG:core:init_mod_child: type=CHILD, rank=1, 
module=event_jsonrpc


Oct  1 20:53:18 [8083] DBG:core:init_mod_child: type=CHILD, rank=1, 
module=tm


Oct  1 20:53:18 [8083] DBG:tm:child_init_callid: callid: 
'089b59c7452bb9fd-8...@xxx.xxx.xxx.xxx’


Oct  1 20:53:18 [8083] DBG:core:init_mod_child: type=CHILD, rank=1, 
module=domain


Oct  1 20:53:18 [8083] DBG:core:init_mod_child: type=CHILD, rank=1, 
module=dispatcher


Oct  1 20:53:18 [8083] CRITICAL:dispatcher:ds_connect_db: BUG - db 
connection found already open


Oct  1 20:53:18 [8083] ERROR:dispatcher:ds_child_init: failed to do DB 
connect


Oct  1 20:53:18 [8083] ERROR:core:init_mod_child: failed to initializing 
module dispatcher, rank 1


Oct  1 20:53:18 [8083] DBG:core:send_status_code: sent code -1 (1 byte)

Oct  1 20:53:18 [8083] ERROR:core:fork_dynamic_udp_process: Initializing 
new process failed, exiting with error


Oct  1 20:53:18 [7833] DBG:core:wait_status_code: read code -1 (1 byte)

Oct  1 20:53:18 [7833] ERROR:core:do_workers_auto_scaling: failed to 
fork new process for group 1 (current 5 procs)


Oct  1 20:53:18 [7833] DBG:core:handle_sigs: OpenSIPS exit status = 139

Oct  1 20:53:18 [7833] INFO:core:handle_sigs: child process 7847 exited 
by a signal 11


Oct  1 20:53:18 [7833] INFO:core:handle_sigs: core was generated

Oct  1 20:53:18 [7833] INFO:core:handle_sigs: terminating due to SIGCHLD

*From:* Users  *On Behalf Of 
*CARTWRIGHT, CORY C

*Sent:* Monday, September 21, 2020 10:53
*To:* users@lists.opensips.org
*Subject:* [OpenSIPS-Users] segfault at 7f4c471852 ip 7f4dc4a0ccc0 
sp 7ffc74776350 error 4 in libc-2.23.so[7f4dc49be000+1c]


Security Advisory:* This Message Originated Outside of AT&T ***
Reference http://cso.att.com/EmailSecurity/IDSP.html for more information.

Hello,   Intermittently opensips is crashing  “segfault at 7f4c471852 ip 
7f4dc4a0ccc0 sp 7ffc74776350 error 4 in 
libc-2.23.so[7f4dc49be000+1c]” showing in the syslog.  I have been 
unable to duplicate in LAB or determine any reason for the crash.


Searched the  archives and was unable to find anything related to 
libc-2.23.so, google has a many hits but all seem to eventually point 
back to the application.


Any help would be greatly appreciated

version: opensips 3.0.2 (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: 7e8167853

main.c compiled on 15:39:14 Jun  2 2020 with gcc 5.4.0

# gcc -v

Using built-in specs.

COLLECT_GCC=gcc

COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper

Target: x86_64-linux-gnu

Configured with: ../src/configure -v --with-pkgversion='Ubuntu 
5.4.0-6ubuntu1~16.04.12' 
--with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs 
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ 
--prefix=/usr --program-suffix=-5 --enable-shared 
--enable-linker-build-id --libexecdir=/usr/lib 
--without-included-gettext --enable-threads=posix --libdir=/usr/lib 
--enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes 
--with-default-libstdcxx-abi=new --enable-gnu-unique-object 
--disable-vtable-verify --enable-libmpx --enable-plugin 
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk 
--enab

Re: [OpenSIPS-Users] Database entries for Trunking script?

2020-10-15 Thread Răzvan Crainea
BTW, I'm seeing an extra 1 in the number you provisioned - 2111234567, 
not 211234567.


Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 10/14/20 9:10 PM, jack krog via Users wrote:

Razvan, Thank you for your response,

I have a gateway setup for both the incoming host (pbxb) and my PBX 
(cust0001)


https://imgur.com/ZXjitEd

I have rules set up, specifically one for 211234567

https://imgur.com/YR7YucB

I even tried adding a group incase I misunderstood you.

https://imgur.com/E6xZngY

and I'm still failing at this step:

# route calls based on prefix
if ( !do_routing(1) ) {
send_reply(404,"No Route found");
exit;
}

How can I dig into what's going on here, I tried starting opensips in 
Debug mode but the output is quite verbose and doesn't mean anything to 
me yet.


Additionally, is there a easier way to reload rules than to kill 
opensips and restart it? I saw reference to a opensipsctl command but my 
install doesn't have it.
On Wednesday, October 14, 2020, 08:20:12 AM MST, Răzvan Crainea 
 wrote:



Hi, Jack!

Rules have to be added in group 1[1].
You need to add a gateway to host 172.18.0.8. Then you need to add a
rule with the prefix (2111234567 in your case) and assign it to group 1.
If you don't have group 1, you can provision it in the settings tab.

[1]
https://github.com/OpenSIPS/opensips/blob/master/menuconfig/configs/opensips_trunking.m4#L268

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 10/12/20 7:18 AM, jack krog via Users wrote:
 > Bump?
 >
 > I still don't understand how drouting needs to be configured for the
 > trunking script to work.
 >
 > Are there videos covering the scripts generated by osipsconfig?
 > On Thursday, October 1, 2020, 10:02:50 AM MST, jack krog via Users
 > mailto:users@lists.opensips.org>> wrote:
 >
 >
 > Hello,
 >
 > I'm new to opensips coming from a asterisk background.
 >
 > I'm trying to learn how things work by using the osipsconfig generated
 > trunking script but I can't find documentation on what database values I
 > need to input to route a call to my PBX.
 >
 > The script appears to get to where it runs dp_translate followed by
 > do_routing and then all my test calls get rejected with a No Route Found
 > response.
 >
 > /What do I need to put in the control panel to route the DDI number
 > 211-123-4567 to the host 172.18.0.8 using the domain cust0001.pbx ? /
 >
 > I've entered my PBX under Dynamic Routing > Gateways but don't know if I
 > need to create a Group?
 >
 > If I want to pass the number through without changing it do I need to
 > use dialplan? Is that where I need to point my DID to my PBX?
 >
 > Thank you for your time.
 > ___
 > Users mailing list
 > Users@lists.opensips.org  
>

 > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 >
 > ___
 > Users mailing list
 > Users@lists.opensips.org 
 > http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 >

___
Users mailing list
Users@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Database entries for Trunking script?

2020-10-15 Thread Răzvan Crainea
What does dr_number_routing MI command [1] for group 1 and the number 
you're using output?


Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 10/14/20 9:10 PM, jack krog via Users wrote:

Razvan, Thank you for your response,

I have a gateway setup for both the incoming host (pbxb) and my PBX 
(cust0001)


https://imgur.com/ZXjitEd

I have rules set up, specifically one for 211234567

https://imgur.com/YR7YucB

I even tried adding a group incase I misunderstood you.

https://imgur.com/E6xZngY

and I'm still failing at this step:

# route calls based on prefix
if ( !do_routing(1) ) {
send_reply(404,"No Route found");
exit;
}

How can I dig into what's going on here, I tried starting opensips in 
Debug mode but the output is quite verbose and doesn't mean anything to 
me yet.


Additionally, is there a easier way to reload rules than to kill 
opensips and restart it? I saw reference to a opensipsctl command but my 
install doesn't have it.
On Wednesday, October 14, 2020, 08:20:12 AM MST, Răzvan Crainea 
 wrote:



Hi, Jack!

Rules have to be added in group 1[1].
You need to add a gateway to host 172.18.0.8. Then you need to add a
rule with the prefix (2111234567 in your case) and assign it to group 1.
If you don't have group 1, you can provision it in the settings tab.

[1]
https://github.com/OpenSIPS/opensips/blob/master/menuconfig/configs/opensips_trunking.m4#L268

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 10/12/20 7:18 AM, jack krog via Users wrote:
 > Bump?
 >
 > I still don't understand how drouting needs to be configured for the
 > trunking script to work.
 >
 > Are there videos covering the scripts generated by osipsconfig?
 > On Thursday, October 1, 2020, 10:02:50 AM MST, jack krog via Users
 > mailto:users@lists.opensips.org>> wrote:
 >
 >
 > Hello,
 >
 > I'm new to opensips coming from a asterisk background.
 >
 > I'm trying to learn how things work by using the osipsconfig generated
 > trunking script but I can't find documentation on what database values I
 > need to input to route a call to my PBX.
 >
 > The script appears to get to where it runs dp_translate followed by
 > do_routing and then all my test calls get rejected with a No Route Found
 > response.
 >
 > /What do I need to put in the control panel to route the DDI number
 > 211-123-4567 to the host 172.18.0.8 using the domain cust0001.pbx ? /
 >
 > I've entered my PBX under Dynamic Routing > Gateways but don't know if I
 > need to create a Group?
 >
 > If I want to pass the number through without changing it do I need to
 > use dialplan? Is that where I need to point my DID to my PBX?
 >
 > Thank you for your time.
 > ___
 > Users mailing list
 > Users@lists.opensips.org  
>

 > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 >
 > ___
 > Users mailing list
 > Users@lists.opensips.org 
 > http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 >

___
Users mailing list
Users@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Dispatcher algorithm 9

2020-10-15 Thread Răzvan Crainea
According to the logs, due to the fact that the uri has a colon in its 
name, it is considered a s a group (load_sip group). You can try to 
define a group explicitly, such as 
update_stat("dispatcher:load_sip:$rd"); and define the dispatcher stat 
as $stat(dispatcher:load_%u).

I haven't tried this, but it might work.

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 9/16/20 8:48 PM, Social Boh wrote:

I think the problem is with the statistics module:

DBG:statistics:pv_parse_name: name 0x7f2a934d5fc0 with name 

DBG:statistics:pv_parse_name: name 0x7f2a934d5fc0, name cloned 
(in=0x7fff6f8b1876, out=0x7f2a934d8fa0)

DBG:statistics:get_stat_name: stat with name 0x7f2a934d5fc0 still not found
DBG:statistics:parse_groupname: group: 'load_sip', name: '1.2.3.4:5060'
DBG:statistics:get_stat_name: stat name 0x7f2a934d5fc0 
(load_sip:1.2.3.4:5060) after lookup is (nil)
DBG:statistics:pv_parse_name: name 0x7f2a934dbe98 with name 

DBG:statistics:pv_parse_name: name 0x7f2a934dbe98, name cloned 
(in=0x7fff6f8b1876, out=0x7f2a934d8ec0)

DBG:statistics:get_stat_name: stat with name 0x7f2a934dbe98 still not found

Regards

---
I'm SoCIaL, MayBe

On 6/09/20 5:10, Social Boh wrote:

hello, I'm usisng 3.1

So i can't use the function or is there other option?

Thank you

Regards

---
I'm SoCIaL, MayBe

On 6/09/20 1:32, Răzvan Crainea wrote:
I think the problem is that the update_stat() does not accept 
variables as parameters - are you using OpenSIPS 2.4?


Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 9/4/20 7:42 PM, Social Boh wrote:

No luck:

if (is_method("BYE")) {
do_accounting("db","cdr|failed");
 if (isflagset("NAT")) {
rtpengine_delete();
        }
        if (ds_is_in_list($si, 
$sp)) {

xlog("L_NOTICE", "BYE comes from Gateway");
update_stat("load_sip:$si", -1);
        } else {
xlog("L_NOTICE", "BYE comes from user");
update_stat("load_sip:$dd", -1);
        }
 }

During a Call the user hang up but the statistics no change. For 
each call grows one unit and always using the same Gateway


Thank you

Regards

---
I'm SoCIaL, MayBe

On 4/09/20 2:44, Răzvan Crainea wrote:
Depending on the BYE's direction, the `$dd` variable may point to 
the gateway or to the caller. If the BYE comes from the gateway, 
you should decrease the statistic based on $si, not $dd.


Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 9/3/20 7:10 PM, Social Boh wrote:

Hello,

I'm trying to using DISPATCHER module with algorithm 9 together 
with STATISTICS module:


My configuration:

 STATISTIC module
loadmodule "statistics.so"
modparam("statistics", "stat_groups", "load_sip")

 DISPATCHER module
loadmodule "dispatcher.so"
modparam("dispatcher", 
"db_url","mysql://opensips:password@localhost/opensips")

modparam("dispatcher", "algo_route", "disproute")
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_ping_from", "sip:proxy@1.2.3.4")
modparam("dispatcher", "ds_ping_interval", 30)
modparam("dispatcher", "ds_probing_threshhold", 2)
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "dst_avp", "$avp(271)")
modparam("dispatcher", "pvar_algo_pattern", "$stat(load_%u)")

script:

on the BYE block:

update_stat("load_sip:$dd", -1)

On the DISPATCHER route:

route[DISP] {
        if(!ds_select_dst(1,9)) {
        send_reply(404, "No destination");
        exit;
        }
 xlog("L_NOTICE", "script: Call to $ru via $du\n");
 update_stat("load_sip:$dd", +1);
 t_on_failure("DISPATCHER_FAILURE");
 t_relay();
 exit;
}

The problem is the when the call terminate, the load stay on 1. If 
I make 6 calls and hangup:


{
 "URI": "sip:5.6.7.8:5060",
 "state": "Active",
 "first_hit_counter": 6
 },

The calls never go to second Gateway and never change the load.

Any help is really appreciate.

Regards



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lis

Re: [OpenSIPS-Users] Need to configure CIDR range on dr_gateways table .

2020-10-15 Thread Răzvan Crainea

Unfortunately you cannot ignore port only for specific gateways.

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 9/16/20 10:32 AM, Sasmita Panda wrote:

Hi , yes I got that latter and that works for me .

Now I am wandring how I will ignore port for some perticular gateway but 
not all gateway .


is_from_gw(3, "n") {
-- do look up ---
}

  This says it will ignore ports of all the gateway . I want to allow 
only one gtaeway ignoring the port by leaving the other as it is .


What should I do next ??

On Wed, Sep 16, 2020, 12:38 Alexey Kazantsev via Users 
mailto:users@lists.opensips.org>> wrote:


Hi Sasmita,
isn’t the ‘n’ option of the function what you need?
https://opensips.org/docs/modules/2.4.x/drouting.html#func_is_from_gw
---
BR, Alexey
http://alexeyka.zantsev.com/
___
Users mailing list
Users@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] segmentation fault

2020-10-15 Thread Răzvan Crainea

Please file a complete report on github[1].

[1] https://github.com/OpenSIPS/opensips/issues

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 9/15/20 9:42 AM, Vic Jolin wrote:

Hello,

Kindly help me to debug, I was trying to do restart persistence on 
restart but when I start opensips it crashes and from the core file 
there is something like this


Program terminated with signal 11, Segmentation fault.
#0  0x0054188e in hp_init_rpm_statistics (hpb=0x55053228) at 
mem/hp_malloc_stats.c:218


I start my opensips with '-m 3000'

and I copied the config in the artice 
https://blog.opensips.org/2019/04/04/no-downtime-for-opensips-3-0-restarts/


restart_persistency_size = 4096
modparam("drouting", "enable_restart_persistency", yes)



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Slack channel

2020-10-15 Thread Răzvan Crainea
We usually invite people in slack when we need to real-time discuss 
about an ongoing investigation, or for example when we needed a quick 
channel for announcements or discussions during the OpenSIPS Summit.
So there is no policy (yet) for inviting people there, it is not an 
exclusive channel, we're just inviting people when needed.


Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 9/14/20 7:05 PM, Michael Vale via Users wrote:

hi,


how does one gain access to the opensips slack channel?


re,

michael.


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] does lua_exec supports async and launch

2020-10-15 Thread Johan De Clercq
yes indeed, that will take a while to make this working.

Op do 15 okt. 2020 om 10:33 schreef Răzvan Crainea :

> No, not fdopen, that will just open a FILE* out of a file descriptor.
> The async mechanism works directly with a file descriptor.
> I've quickly checked the lua API, and I couldn't see any mechanisms that
> you could use - in this case, you should probably "simulate" an external
> process that gets "lua jobs" and executes them asynchronously, and
> returns a file descriptor that can be tracked down to see the whether
> the exec completed. I'll have to admit, this doesn't see easy :(.
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
> On 9/29/20 7:50 PM, johan wrote:
> > You refer to fdopen in Ansi C ?
> >
> > On 28/09/2020 09:43, Răzvan Crainea wrote:
> >> Hi, Johan!
> >>
> >> Unfortunately the lua module does not support asynchronous operations.
> >>
> >> TBH, I'm not that familiar with the module, so I really don't know
> >> exactly how it gets executed, but in order to add async support, we
> >> need the lua mechanism to provide us a file descriptor (or somehting
> >> similar) that get signaled when an operation is completed. Or at least
> >> provide some mechanisms to run scripts asynchronous and provide a
> >> callback that indicates when the script has finished.
> >>
> >> Best regards,
> >>
> >> Răzvan Crainea
> >> OpenSIPS Core Developer
> >> http://www.opensips-solutions.com
> >>
> >> On 9/25/20 11:34 AM, johan wrote:
> >>> does lua_exec supports async calls ?
> >>>
> >>> If no, can you please indicate what needs to be added to have this
> >>> support ?
> >>>
> >>>
> >>> wkr,
> >>>
> >>>
> >>> ___
> >>> Users mailing list
> >>> Users@lists.opensips.org
> >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >>
> >> ___
> >> Users mailing list
> >> Users@lists.opensips.org
> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] does lua_exec supports async and launch

2020-10-15 Thread Răzvan Crainea
No, not fdopen, that will just open a FILE* out of a file descriptor. 
The async mechanism works directly with a file descriptor.
I've quickly checked the lua API, and I couldn't see any mechanisms that 
you could use - in this case, you should probably "simulate" an external 
process that gets "lua jobs" and executes them asynchronously, and 
returns a file descriptor that can be tracked down to see the whether 
the exec completed. I'll have to admit, this doesn't see easy :(.


Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 9/29/20 7:50 PM, johan wrote:

You refer to fdopen in Ansi C ?

On 28/09/2020 09:43, Răzvan Crainea wrote:

Hi, Johan!

Unfortunately the lua module does not support asynchronous operations.

TBH, I'm not that familiar with the module, so I really don't know 
exactly how it gets executed, but in order to add async support, we 
need the lua mechanism to provide us a file descriptor (or somehting 
similar) that get signaled when an operation is completed. Or at least 
provide some mechanisms to run scripts asynchronous and provide a 
callback that indicates when the script has finished.


Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 9/25/20 11:34 AM, johan wrote:

does lua_exec supports async calls ?

If no, can you please indicate what needs to be added to have this 
support ?



wkr,


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users