Yep, will do. I’m setting it up this month.
Will keep you posted.

Thanks Daniel

On Wed, 12 May 2021 at 11:37, Daniel-Constantin Mierla <miconda@gmail.com> wrote:

Hello,

ok, good that solved it! Let us know if any other issues pop up when you do testing or works ok, because not many providers deployed it so far and feedback was pretty minimal.

Cheers,
Daniel

On 12.05.21 12:09, David Villasmil wrote:
Thanks Daniel,

I was 100% sure i'd done an "ldconfig", but it seems I did not. That worked:

May 12 10:07:04 ip-10-231-32-169 /usr/local/kamailio5/sbin/kamailio[5030]: DEBUG: <core> [core/sr_module.c:862]: init_mod_child(): idx 1 rank 1: secsipid [udp receiver child=0 sock=0.0.0.0:5060]
May 12 10:07:04 ip-10-231-32-169 /usr/local/kamailio5/sbin/kamailio[5032]: DEBUG: secsipid [secsipid_mod.c:132]: child_init(): trying to load </usr/local/kamailio5/lib64/kamailio/modules/secsipid_proc.so>
May 12 10:07:04 ip-10-231-32-169 /usr/local/kamailio5/sbin/kamailio[5042]: DEBUG: secsipid [secsipid_mod.c:155]: child_init(): bound to proc module: </usr/local/kamailio5/lib64/kamailio/modules/secsipid_proc.so>


Thanks!

David Villasmil
phone: +34669448337


On Wed, May 12, 2021 at 7:53 AM Daniel-Constantin Mierla <miconda@gmail.com> wrote:

Hello,

be sure that /usr/local/lib/ is in your ld library path, then if it is a fresh installation, you may need to rebuild the libraries cache, usually can be done by running:

sudo ldconfig

Cheers,
Daniel

On 12.05.21 02:01, David Villasmil wrote:
So kamailio compiled but on start:

Config:
#!ifdef WITH_STIR
loadmodule "secsipid.so"
#!endif
...
#!ifdef WITH_STIR
modparam("secsipid", "expire", 600)
modparam("secsipid", "timeout", 2)
modparam("secsipid", "cache_dir", "/tmp/kamailio/secsipid")
modparam("secsipid", "cache_expire", 7200)
#!endif

On start i get:
May 11 23:25:35 ip-10-231-32-169 /usr/local/kamailio5/sbin/kamailio[20035]: ERROR: secsipid [secsipid_mod.c:140]: child_init(): could not open module </usr/local/lib64/kamailio/modules/secsipid_proc.so>: libsecsipid.so.1: cannot open shared object file: No such file or directory
May 11 23:25:35 ip-10-231-32-169 /usr/local/kamailio5/sbin/kamailio[20035]: ERROR: <core> [core/sr_module.c:865]: init_mod_child(): error while initializing module secsipid (/usr/local/lib64/kamailio/modules/secsipid.so) (idx: 8 rank: 8 desc: [udp receiver child=7 sock=0.0.0.0:5060])
May 11 23:25:35 ip-10-231-32-169 /usr/local/kamailio5/sbin/kamailio[20035]: ERROR: <core> [core/pt.c:338]: fork_process(): init_child failed for process 8, pid 20035, "udp receiver child=7 sock=0.0.0.0:5060"

but:

# ls -l /usr/local/kamailio5/lib64/kamailio/modules/secsip*
-rwxr-xr-x 1 root root 99312 May 11 23:46 /usr/local/kamailio5/lib64/kamailio/modules/secsipid.so
-rwxr-xr-x 1 root root 47304 May 11 23:46 /usr/local/kamailio5/lib64/kamailio/modules/secsipid_proc.so
#

/usr/local/include/libsecsipid.h
/usr/local/lib/libsecsipid.so.1
/usr/local/lib/libsecsipid.so
/usr/local/lib/libsecsipid.so.1.0.0
/usr/local/lib/libsecsipid.a


Not really sure what's going on here...
Regards,

David Villasmil
phone: +34669448337


On Tue, May 11, 2021 at 3:46 PM David Villasmil <david.villasmil.work@gmail.com> wrote:
So that helped doing:

...
go get https://github.com/asipto/secsipidx
cd $GOPATH/src/github.com/asipto/secsipidx/csecsipid/
make liba
cp secsipid.h libsecsipid.h libsecsipid.a \
    /path/to/kamailio/src/modules/secsipid_proc/

but when compiling:
cd /path/to/kamailio/
make include_modules="secsipid secsipid_proc ..." cfg
make all
make install
make fails because the lib is not installed

The documentation should be:

...
# Get and install the module:

go get https://github.com/asipto/secsipidx
cd $GOPATH/src/github.com/asipto/secsipidx/csecsipid/
make liba
cp secsipid.h libsecsipid.h libsecsipid.a \
    /path/to/kamailio/src/modules/secsipid_proc/

cd $GOPATH/src/github.com/asipto/secsipidx/
make
make install

# make the module

cd /path/to/kamailio/
make include_modules="secsipid secsipid_proc ..." cfg
make all
make install


## or compiling individual modules for use inside source tree
make modules modules=src/modules/secsipid_proc
make modules modules=src/modules/secsipid
...

Now kamailio compiles properly.



Regards,

David Villasmil
phone: +34669448337


On Tue, May 11, 2021 at 3:30 PM David Villasmil <david.villasmil.work@gmail.com> wrote:
Hello Arsen,

Thanks for replying. That was it!
Should that detail be added to the doc? a lot of people wanting to use that are not seasoned Go devs.


Regards,

David Villasmil
phone: +34669448337


On Tue, May 11, 2021 at 2:48 PM Arsen Semenov <arsperger@gmail.com> wrote:
Hi David,

seems you are using Go with Go modules support enabled.
secsipidx does not support go modules, make sure you have environment variable GO111MODULE set to off and then download the module by executing "go get github.com/asipto/secsipidx"

it should be downloaded in your $GOPATH 



On Tue, May 11, 2021 at 6:21 PM David Villasmil <david.villasmil.work@gmail.com> wrote:
Hello guys,



I just installed go on a new vm:

the env is as follows:
# env
GOPATH=/root/go

then:

~#

Then:

~# cd $GOPATH/src/github.com/asipto/secsipidx/csecsipid/
bash: cd: /root/go/src/github.com/asipto/secsipidx/csecsipid/: No such file or directory

it looks like it's not downloaded where the documentation says.
It is however in:

go
|-- bin
`-- pkg
    |-- mod
    |   |-- cache
    |   |   `-- download
    |   |       |-- github.com
    |   |       |   |-- asipto
    |   |       |   |   `-- secsipidx
    |   |       |   |       `-- @v
    |   |       |   `-- google
    |   |       |       `-- uuid
    |   |       |           `-- @v
    |   |       `-- sumdb
    |   |           `-- sum.golang.org
    |   |               |-- lookup
    |   |               |   `-- github.com
    |   |               |       |-- asipto
    |   |               |       `-- google
    |   |               `-- tile
    |   |                   `-- 8
    |   |                       |-- 0
    |   |                       |   |-- x010
    |   |                       |   |-- x011
    |   |                       |   `-- x016
    |   |                       |       `-- 560.p
    |   |                       |-- 1
    |   |                       |   `-- 064.p
    |   |                       `-- 2
    |   |                           `-- 000.p
    |   `-- github.com
    |       |-- asipto
    |       |   `-- secsipidx@v1.0.0
    |       |       |-- csecsipid
    |       |       `-- secsipid
    |       `-- google
    |           `-- uuid@v1.2.0
    `-- sumdb
        `-- sum.golang.org

38 directories

we have:

~/go/pkg/mod/github.com/asipto/secsipidx@v1.0.0/csecsipid# ls -l
total 16
-r--r--r-- 1 root root  231 May 11 13:14 Makefile
-r--r--r-- 1 root root 1778 May 11 13:14 csecsipid.go
-r--r--r-- 1 root root 1988 May 11 13:14 libsecsipid.h
-r--r--r-- 1 root root  120 May 11 13:14 secsipid.h

The Makefile contains the proper liba:

# Makefile to build libraries
#

all: libso

libso:
go build -o libsecsipid.so -buildmode=c-shared csecsipid.go

liba:
go build -o libsecsipid.a -buildmode=c-archive csecsipid.go

clean:
rm -f libsecsipid.so
rm -f linsecsipid.a

But "make liba" returns:

# make liba
go build -o libsecsipid.a -buildmode=c-archive csecsipid.go
csecsipid.go:6:2: no required module provides package github.com/asipto/secsipidx/secsipid: go.mod file not found in current directory or any parent directory; see 'go help modules'
make: *** [Makefile:10: liba] Error 1


Obviously not a "go" guy here.

What am I doing wrong?

Thanks for your help!

David Villasmil
phone: +34669448337
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
Arsen Semenov

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
  * https://www.asipto.com/sw/kamailio-advanced-training-online/
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
  * https://www.asipto.com/sw/kamailio-advanced-training-online/
--
Regards,

David Villasmil
email: david.villasmil.work@gmail.com
phone: +34669448337