Hello,

On 7/28/11 3:00 PM, Timo Klecker wrote:

Hello Daniel,

 

it works now:

0(22097) DEBUG: <core> [sr_module.c:625]: find_export_record: found <bind_textops> in module textops [/usr/lib/kamailio/modules_k/textops.so]

 

Thanks!

 

 

We are going to add some functionality to the siptrace module concerning distributed logging without writing the data to your local database. When using trace_send_duplicate we loose the information from fromip_column, toip_column and direction_column as well as the exact time. So we need to send this information, too. We have two approaches.

 

First approach:

Instead of writing the data to the local database send all the database fields in one udp paket to another server and write them into database there.

 

Second approach:

Add 4 header fields containing the information to the sip-message and send the SIP message to another Kamailio server using trace_send_duplicate. There remove the 4 Header fields and write into the database.

 

Do you think there is a better way to achieve this?

I know a company that based on db_flatstore, they have a module that instead of writing the db records to a local file, they are pushed via network to other applications.

The second approach is better for our project point of view, it is a feature I would like to see in trunk -- this has the advantage of being able to use kamailio to receive the duplicates. But overall both are ok, so finally it is up to what is more convenient for you.

Cheers,
Daniel

 

Kind regards

Timo Klecker

 

 

 

Von: Daniel-Constantin Mierla [mailto:miconda@gmail.com]
Gesendet: Donnerstag, 28. Juli 2011 13:25
An: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List
Cc: Timo Klecker
Betreff: Re: [SR-Users] Problem using textops API

 

Hello,

probably it was forgotten to export the internal API bind function. I just committed the fix on GIT master branch (devel version):

http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=db188fbcf4d752a2afab2e298a2f081f836d7e92

I couldn't test it for now, so if you can give it a try and report whether it is working ok or not, then I can backport the fix to 3.1.

Thanks,
Daniel

On 7/28/11 12:46 PM, Timo Klecker wrote:

Hi,

 

I’m trying to extend a Kamailio Module and need to add and remove headers in a SIP Message. To do this I want to use the textops module and I am importing the api and trying to bind the textops module.

 

#include "../textops/api.h"

[..]

struct textops_binds tob;

[..]

/* register callbacks to TEXTOPS */

if (load_textops_api(&tob)!=0)

{

                LM_ERR("can't load textops api. Is module textops loaded?\n");

                return -1;

}

 

Later I use tob.append_hf to add a header field.

 

Everything compiles fine but on Kamailio startup there is a Error Message:

 

[..]

0(21782) DEBUG: <core> [route_struct.c:166]: ACTION_#25 #0/2: 9(9)/ (nil)

0(21782) DEBUG: <core> [route_struct.c:166]: ACTION_#25 #1/2: 3(3)/ (nil)

0(21782) DEBUG: <core> [sr_module.c:625]: find_export_record: found <is_method> in module textops [/usr/lib/kamailio/modules_k/textops.so]

0(21782) DEBUG: <core> [route_struct.c:166]: ACTION_#25 #0/2: 9(9)/ (nil)

0(21782) DEBUG: <core> [route_struct.c:166]: ACTION_#25 #1/2: 3(3)/ (nil)

0(21782) DEBUG: <core> [sr_module.c:625]: find_export_record: found <is_method> in module textops [/usr/lib/kamailio/modules_k/textops.so]

0(21782) DEBUG: <core> [route_struct.c:166]: ACTION_#25 #0/2: 9(9)/ (nil)

0(21782) DEBUG: <core> [route_struct.c:166]: ACTION_#25 #1/2: 3(3)/ (nil)

[..]

0(21784) DEBUG: <core> [sr_module.c:625]: find_export_record: found <t_release> in module tm [/usr/lib/kamailio/modules/tm.so]

0(21784) DEBUG: <core> [sr_module.c:631]: find_export_record: <load_textops> not found

0(21784) ERROR: siptrace [../../modules_k/textops/api.h:63]: Failed to import load_textops

0(21784) ERROR: siptrace [siptrace.c:314]: can't load textops api. Is module textops loaded?

0(21784) ERROR: <core> [sr_module.c:875]: init_mod(): Error while initializing module siptrace (/usr/lib/kamailio/modules_k/siptrace.so)

ERROR: error while initializing modules

0(21784) DEBUG: tm [t_funcs.c:122]: DEBUG: tm_shutdown : start

0(21784) DEBUG: tm [t_funcs.c:125]: DEBUG: tm_shutdown : emptying hash table

[..]

 

I am running Kamailio 3.1.4.

 

Is this a bug in Kamailio or am I doing anything wrong in my approach to use textops?

 

Kind regards,

Timo Klecker

 

 

 




_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



-- 
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda