Hi,
I'm having problems getting started with the app_python module. I'm getting
the following in the logs:
5(8890) : <core> [action.c:785]: BUG: do_action: bad set*() type 14
5(8890) ERROR: <core> [action.c:1568]: run action error at: :0
5(8890) ERROR: app_python [python_msgobj.c:115]: Error in do_action
5(8890) ERROR: app_python [python_support.c:38]: python_exec2: Unhandled
exception in the Python code:
5(8890) ERROR: app_python [python_support.c:78]: RuntimeError: Error in
do_action
My Python module is very basic:
class Router(object):
def child_init(self, child_id):
return 0
def route(self, msg):
msg.rewrite_ruri('sip:1000@1.2.3.4:5060')
return 0
def mod_init():
instance = Router()
return instance
I've tested this in Kamailio 3.2 and 3.3. Can someone point me to what I'm
doing wrong?
Many thanks in advance,
vtone
Hello,
Is there any reason why I couldn't use the existing siptrace() function
in event_route[msrp:frame-in] to relay all MSRP messages to a SIP
Capture node?
Will the SIP Capture node handle receiving these messages?
What will end up in the WebHomer display in these cases?
Regards,
Peter
I am seeing this error lately.
/usr/local/sbin/kamailio[28559]: WARNING: tm [t_lookup.c:1543]: WARNING:
script writer didn't release transaction
What does this mean?
Krish Kura
Hi,
When client connects to server over TCP/TLS and REGISTERs two things that
can happen.
1. Client can disconnect the connection when the App is killed abruptly and
the client did not get a chance to send unregiter.
2. CRLF KA did not arrive due to network failures in the middle.
Is there a way to remove contact from usrloc table.
This can spare server from trying to send message to a client who is no
longer connected to the server.
It would be ideal if this can be done automatically with a module param in
tcp or registrar.
Any suggestion on how to tie TCP connection with usrloc?
Thanks
Krish Kura
I was wondering if simple presence can work over port 5061 or if it always goes over 5060. my client (jitsi) is configured to work over port 5061, xcap is configured to work over port 5061 but I am still seeing some messages flowing over port 5060. any ideas as to what is going on?
ttyl,Dave
he array values that we are modifying and the function that we call
periodically are from our module . to exemplify i have put the
code below .our requirement is that we want to delete the expired
contacts without relying on usrloc module as "we have not used any
DB for contact storage" but developed our own module for storing them
in a file.even we had installed the SIGALRM handler in our module
for decrementing the contacts but the values of array (that stores the
expires) elements were zero. we thought of workaround to store the
expires values to file and decrement them periodically. but frequent
I/O is very consuming. whats the solution for deleting the expired
contacts .
#define DB_PATH "/usr/local/etc/kamailio/dbtext/syntel"
#define DB_PATH1 "/usr/local/etc/kamailio/dbtext/temp"
#define MAX_BUFFER 128
#define MAX_USERS 128
typedef struct
{
int max_bindings;
int syntel_index;
int expires[8];
char ip_addr[8][16];
} Syntel_users;
Syntel_users syntel_database[16]={{0}};
//this is function used for storing the contacts
int
write_to_file (char *uri, char *user, int locator,int expires)
{
int Retval = 0;
int fd;
int bytes;
char ip[13];
strncpy (ip, &uri[9], 12);
ip[12] = '\0';
fd = open (DB_PATH, O_CREAT | O_RDWR | O_APPEND, 0777);
if (syntel_database[locator].max_bindings < 8)
{
strcpy
(syntel_database[locator].ip_addr[syntel_database[locator].max_bindings],
uri);
syntel_database[locator].expires[syntel_database[locator].max_bindings]=expires;
syntel_database[locator].max_bindings++;
bytes = write (fd, uri, strlen (uri));
Retval = 1;
}
return Retval;
}
//AND THIS IS FUNCTION WE CALL FROM kamailio.conf WITH RTIMER MODULE
AFTER INTERVAL OF 1 SECOND.
int syntel_delete (void)
{
int counter;
int j;
for (counter = 0; counter < 16; counter++)
{
for (j = 0; j < syntel_database[counter].max_bindings; j++)
{
if(syntel_database[counter].expires[j]<=0)
{
memset(syntel_database[counter].ip_addr[j],0,strlen(syntel_database[counter].ip_addr[j]));
syntel_database[counter].max_bindings--;
}
else
syntel_database[counter].expires[j]--;
}
}
return 0;
}
BUT WHAT THIS FUNCTION GETS IS ZERO VALUES FOR EXPIRES AND NOT
MODIFIED IN SYNTEL_WRITE_TO_FILE
HOW TO DECREMENT THESE VALUES PERIODICALLY THEN ??
Hello all,
Is there any way to rewrite "tu" in CANCEL message in 3.2.1?
We use remove_hf / insert_hf for INVITE's "tu" modification before
t_relay.
It works fine, but it doesn't work for CANCEL (INVITE re-parsing is
disabled).
Ths,
Hi All,
I am in process of integrating lync 2010 with openfire xmpp server.
Reading some of the blogs on kamailio found that it can be done using
kamailio.
Hence request if some body has done this please your inputs.
Regards,
Vinay