Hi,
I am working on opensips 1.4.0 and while running "openser -C" command
I am getting the following errors. Please any one can help me.
Sep 16 21:07:05 localhost opensips[3200]:
ERROR:db_mysql:db_mysql_new_connection: driver error: Access denied for user
'opensips'@'localhost' (using password: YES)
Sep 16 21:07:05 localhost opensips[3200]: ERROR:core:db_do_init: could not
add connection to the pool
Sep 16 21:07:05 localhost opensips[3200]: ERROR:rls:mod_init: while
connecting database
Sep 16 21:07:05 localhost opensips[3200]: ERROR:core:init_mod: failed to
initialize module rls
Sep 16 21:07:05 localhost opensips[3200]: ERROR:core:main: error while
initializing modules
Sep 16 21:07:05 localhost opensips[3200]: NOTICE:presence:destroy: destroy
module ...
Sep 16 21:57:10 localhost yum-updatesd: error getting update info: Cannot
find a valid baseurl for repo: extras
Waiting for your replies.
Thanks & Regards,
Mahesh
i have a simple redirect server working:
Call comes from switch (A) to kamailio redirect server (B)..
(B) runs perl script to determine route
(B) sends Stateless 300 redirect reply to (A).
(A) sends ACK to (B).
Now, I need to add a nested redirect...
call comes from sitch (A) to kamailio redirect server (B)..
(B) then needs to send the call to third party proxy (C)..
(C) will return 302 redirect..
(B) sends ACK to (C)
(B) needs to read the contact header, then run perl script to determine route (using the contact value
returned from (c))
(B) then sends 300 redirect back to (A).
(A) sends ACK back to (B)
so far i have been trying something like this, but the final (A) ACK gets ignored and (B) keeps sending
multiple 300's to (A):
route {
route(1);
}
route[1] {
t_on_reply("1");
t_on_failure("2");
if (!t_relay("proxy.server.c:5060","0x02")) {
sl_reply_error();
}
onreply_route[1] {
if(t_check_status("302")){
$var(lrn_from_bv) = $ct;
}
}
failure_route[2] {
if (t_check_status("3[0-9][0-9]")) {
route(2);
exit;
}
route[2] {
if(perl_exec("callcheck")){
avp_pushto("$ru", "$avp(s:routes)/g");
t_reply("300","Go Here");
exit;
}
}
Hi guys!
Posted this to the dev list, but I'm not sure if that's the right forum.
Looking at the posts there, it's more about patches and dev stuff (hence
the name). Hoped to get some feedback on a crash I had a week ago, now
I'm trying it here. :)
We've been running OpenSER (1.3.0 ntls, compiled for x66_64) for quite a
while now and only had a crash once. We suspected then that this was
caused by hitting the max_while_loops for a while (never happened again
after fixing the max-while-loops). Now I had a crash and the backtrace
looks like the following. Do you guys have any pointers on what is
causing this?
#0 free_hostent (dst=0x6e3fe0) at proxy.c:203
203 for (r=0; dst->h_addr_list[r];r++) {
(gdb) backtrace
#0 free_hostent (dst=0x6e3fe0) at proxy.c:203
#1 0x0000000000436530 in free_proxy (p=0x6e3fc0) at proxy.c:312
#2 0x00002adec6dc01ea in t_relay_to (p_msg=0x6de4a0, proxy=0x6e3fc0,
flags=<value optimized out>) at t_funcs.c:230
#3 0x00002adec6dd1fcd in w_t_relay (p_msg=0x6de4a0, proxy=0x0,
flags=0x0) at tm.c:929
#4 0x000000000040ba9f in do_action (a=0x646e80, msg=0x6de4a0) at
action.c:816
#5 0x000000000040dfac in run_action_list (a=<value optimized out>,
msg=0x6de4a0) at action.c:132
#6 0x000000000040ca06 in do_action (a=0x646fb0, msg=0x6de4a0) at
action.c:689
#7 0x000000000040dfac in run_action_list (a=<value optimized out>,
msg=0x6de4a0) at action.c:132
#8 0x000000000040d780 in do_action (a=0x647460, msg=0x6de4a0) at
action.c:695
#9 0x000000000040dfac in run_action_list (a=<value optimized out>,
msg=0x6de4a0) at action.c:132
#10 0x000000000040ca06 in do_action (a=0x6475a0, msg=0x6de4a0) at
action.c:689
#11 0x000000000040dfac in run_action_list (a=<value optimized out>,
msg=0x6de4a0) at action.c:132
#12 0x000000000040e309 in run_top_route (a=0x643398, msg=0x6de4a0) at
action.c:112
#13 0x000000000044b8bf in receive_msg (
buf=0x625ca0 "ACK sip:013104104@sip-corporate.tele2.se
SIP/2.0\r\nVia: SIP/2.0/UDP
130.244.190.46;branch=z9hG4bK7b7c7b36\r\nVia: SIP/2.0/UDP
130.244.190.46;branch=z9hG4bK7b7c7b36\r\nVia: SIP/2.0/UDP
130.244.190.46;branch"..., len=3703, rcv_info=0x7fffe4d8d840) at
receive.c:156
#14 0x0000000000488154 in udp_rcv_loop () at udp_server.c:438
#15 0x0000000000425081 in main (argc=9, argv=0x7fffe4d8da48) at main.c:834
Hi all,
I need a help to solve some problems in the clearance of a function to
perform a query Mysql....I created a function based on documentation of
asipto / kamailio devel which is very good... But as I did not want to
create a new module I'm trying to use the module domain... whose goal a
proxy SIP receive msg that will should validate the realm comparing with a
table set up in MySQL(trusdomain)... it should be used into config file to
to declare of the table created in the Mysql: modparam ( "domain",
"trusdomain_table," trusdomain)
the version table of the openser has updated with the creation of this new
table (trusdomain) and created a function into file: domain.c / h and a part
was need be exported to config file in domain_mod.c / h....but on the tests
a call..this proxy kills the pid openser ...
Sep 5 06:32:21 notehome openser[7962]: INFO:core:handle_sigs: child process
7964 exited by a signal 11
Sep 5 06:32:21 notehome openser[7962]: INFO:core:handle_sigs: core was
generated
Sep 5 06:32:21 notehome openser[7962]: INFO:core:handle_sigs: terminating
due to SIGCHLD
Sep 5 06:32:21 notehome openser[7967]: INFO:core:sig_usr: signal 15
received
Sep 5 06:32:21 notehome openser[7963]: INFO:core:sig_usr: signal 15
received
Sep 5 06:32:21 notehome openser[7968]: INFO:core:sig_usr: signal 15
received
Sep 5 06:32:21 notehome openser[7966]: INFO:core:sig_usr: signal 15
received
Sep 5 06:32:21 notehome openser[7965]: INFO:core:sig_usr: signal 15
received
The function created in domain.c:
int is_from_trusted(struct sip_msg* _msg, char* _s1, char* _s2)
{
struct sip_uri *puri;
/* struct str* _host; */
/* str table_trus;
str col_id;
str col_dom;
str col_lastmod; */
str* _host = (str*)(&(puri->host));
char* db_url = DEFAULT_RODB_URL;
db_key_t keys[1]; /* Tipo da coluna .. Nome das colunas */
db_val_t vals[1];
db_key_t cols[1];
db_res_t* res = NULL;
if ((puri=parse_from_uri(_msg))==NULL){
LM_ERR("Error while parsing From header\n"); return -2;
}
/* Bind the database module */
if (bind_dbmod(db_url, &domain_dbf )) {
LM_ERR("Cannot bind to database module!\n");
return -1;
}
/* Check for SELECT capability */
if (!DB_CAPABILITY(domain_dbf, DB_CAP_QUERY)){
LM_ERR("Database modules does not provide all functions needed\n");
return -1;
}
/* Connect to DB */
db_handle = domain_dbf.init(db_url);
if (!db_handle){
LM_ERR("failed to connect database\n");
return -1;
}
keys[0]=trusdomain_col.s;
cols[0]=trusdomain_col.s;
LM_INFO(">>domain.c>>-2-IF RES_ROW_N(res)=>%d\n",RES_ROW_N(res));
/* Estrutura dos vls das colunas - arq. db/db_val.h */
VAL_TYPE(vals) = DB_STR;
VAL_NULL(vals) = 0;
VAL_STR(vals).s = _host->s;
VAL_STR(vals).len = _host->len;
/* LM_INFO(">>domain.c>>-1-connector=%d and
tab=%s\n",db_handle,trusdomain_table.s); */
if (domain_dbf.use_table(db_handle, trusdomain_table.s) < 0) {
LM_ERR("Error while trying to use trusdomain table\n");
return -1;
}
if (domain_dbf.query(db_handle, keys, NULL, vals, cols, 1, 1, 0, &res) <
0) {
LM_ERR("Error while querying database\n");
domain_dbf.close(db_handle);
return -1;
}
/* RES_ROW_N(res) Num. de linhas no fetch */
if (RES_ROW_N(res) <= 0 || RES_ROWS(res)[0].values[0].nul != 0){
LM_DBG("no value found\n");
if (res != NULL && domain_dbf.free_result(db_handle, res) < 0)
LM_DBG("failed to free the result\n");
domain_dbf.close(db_handle);
} else if (RES_ROW_N(res) >= 1) {
/* Teste do que estah na tab. trusdomain com o que vem na URI */
LM_DBG("Realm '%.*s' is trusted\n",_host->len, ZSW(_host->s));
}
/* Free the result */
domain_dbf.free_result(db_handle, res);
domain_dbf.close(db_handle);
return 0;
}
And declaration in domain_mod.c :
...
/* by mrg */
#define TRUSDOMAIN_TABLE "trusdomain"
#define TRUSDOMAIN_TABLE_LEN (sizeof(TRUSDOMAIN_TABLE) - 1)
#define TRUSDOMAIN_COL "trusdomain"
#define TRUSDOMAIN_COL_LEN (sizeof(TRUSDOMAIN_COL) - 1)
...
...
str trusdomain_table = {TRUSDOMAIN_TABLE, TRUSDOMAIN_TABLE_LEN}; /* Name of
trusted table */
str trusdomain_col = {TRUSDOMAIN_COL, TRUSDOMAIN_COL_LEN}; /* Name of
trusted column */
...
...
/*
* Exported functions
*/
static cmd_export_t cmds[] = {
.............
{"is_domain_local", w_is_domain_local, 1, parameter_fixup, 0,
REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
{"is_from_trusted", is_from_trusted, 0, 0, 0,
REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
{0, 0, 0, 0, 0, 0}
};
.../*
* Exported parameters
*/
static param_export_t params[] = {
............
{"domain_table", STR_PARAM, &domain_table.s},
{"domain_col", STR_PARAM, &domain_col.s },
{"trusdomain_table", STR_PARAM, &trusdomain_table.s},
{"trusdomain_col", STR_PARAM, &trusdomain_col.s},
{0, 0, 0}
};
...
...
static int mod_init(void)
{
int vertr....;
.....
trusdomain_table.len = strlen(trusdomain_table.s);
trusdomain_col.len = strlen(trusdomain_col.s);
.....
if (db_mode != 0) {
if (domain_db_init(db_url.s)<0) return -1;
/* Check table version */
ver = domain_db_ver(&domain_table);
vertr = domain_db_ver(&trusdomain_table);
if ((ver < 0) && (vertr < 0)) {
LM_ERR("Error while querying table version\n");
goto error;
} else if ((ver < TABLE_VERSION) && (vertr < TABLE_VERSION)) {
LM_ERR("Invalid table version <%d> trustable version <%d>
(should be %d)\n",
ver, vertr, TABLE_VERSION);
goto error;
}
.......
.......
/* Initializing hash tables and hash table variable */
........
domain_db_close();
}
return 0;
error:
domain_db_close();
return -1;
}
So I think that I must be something doing wrong ..... as would be the right
and as I could learn fast to resolve error debugging of pID of Openser that
has been deads...???
thx
Marcio
Hello everybody,
just want to give some updates concerning two main topics. First,
regarding the project name, many expressed the concern that a rename in
short time will create more confusion. As we are not in front of a new
major release, I think it is better to postpone this process for a while
and focus on the second topic, the organization for the project.
For this one, I have to thank personally to many people from the list
that wrote us, giving suggestions and helping finding solutions. As a
result, we are working to create the draft of statute for organization,
but we are also investigating the option to join an existing
organization, dedicated to hosting of open source projects. We will keep
you updated.
Meanwhile, the svn repository got couple of new features as well as
refactoring of some modules. 1.4.1 will be released soon as we got a
bunch of important fixes in the 1.4 branch. Most probably another
release in 1.3 branch will follow.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com
Hello,
I dont really understand, but :
I just need to do in the INVITE :
record_route_preset('$dd:$dp;codec=alaw');
forward();
and for the CANCEL:
if(check_route_param(";codec=alaw")){
route(2);
}
Is it possible?
Thank you
Cordialement
BERGANZ François
http://www.acropolistelecom.net
Hi,
I am able to get authentication setup with Mysql and Freeradius. Just one
simple question, for pure authentication purpose, is it better just to use
the Mysql database for authentication instead of setting up Freeradius? Is
there any advantage of using Freeradius on top of Mysql?
If I use Mysql to serve authentication for Openser, is it possible to
encrypt the password in Mysql?
Is it possible to specify the table and fields to be used for authentication
instead of using the default mysql tables?
Thanks for your help.
Regards,
Mark
Greetings,
Rev. is 1.3.3 on debian_Etch_64
Have a scenarion that always triggers a core dump.
On Calee initiated <bye> and where destination address is a hostname not IP address.
Executing forward() or t_relay() in script triggers the coredump.
dns & rev_dns On/Off with the same result.
---
DBG:core:comp_scriptvar: str 20 : siphost.domain.com
DBG:tm:t_newtran: transaction on entrance=0xffffffffffffffff
DBG:core:parse_headers: flags=ffffffffffffffff
DBG:core:parse_headers: flags=78
DBG:tm:t_lookup_request: start searching: hash=7994, isACK=0
DBG:tm:matching_3261: RFC3261 transaction matching failed
DBG:tm:t_lookup_request: no transaction found
DBG:tm:run_reqin_callbacks: trans=0x2b4e6b2e0f48, callback type 1, id 0 entered
DBG:siptrace:trace_onreq_in: trace off...
DBG:core:mk_proxy: doing DNS lookup...
DBG:core:sip_resolvehost: no port, no proto -> do NAPTR lookup!
DBG:core:filter_and_sort_naptr: found valid SIP+D2U -> _sip._udp.siphost.domain.com
DBG:core:filter_and_sort_naptr: skipping SIPS+D2T -> _sips._tcp.siphost.domain.com
DBG:core:filter_and_sort_naptr: skipping SIP+D2T -> _sip._tcp.siphost.domain.com
Have a workaround that rewrites destination in case of hostName trig. impractical though.
-hints?
//s
__________________________________________________________
Ta semester! - sök efter resor hos Kelkoo.
Jämför pris på flygbiljetter och hotellrum här:
http://www.kelkoo.se/c-169901-resor-biljetter.html?partnerId=96914052
Just finished some documentation on how to install MediaProxy 2.0.3 on
OpenSUSE 11. Due to the length of the post and the init scripts
provided, I won't be re-posting this one in the lists like usual.
Thanks do go out to Ruud Klaver @ AG Projects for a clever Linux
version detection hack for the relay module (hopefully will make it
into the next release of MediaProxy).
Everything can be found on my site at http://www.darrensessions.com.
Cheers!
_____________________________
Darren Sessions
dmsessions(a)gmail.com
http://www.darrensessions.com
_____________________________
Hi all,
I appreciate very much to help solve some problems in the clearance of a
function to perform a query Mysql .... created the function based on
documentation of asipto / kamailio devel which is great ... but I did not
want to create a new module used the module in domain ... whose goal is a
proxy to receive SIP msg should validate the realm with what is in a table
(Trustee) was created through a query ... it should be used for the config
file to declare of the table created in the Mysql: modparam ( "domain",
"trusdomain_table," trusdomain)
the table version updated with the creation of this table (trusdomain) and
create the own function in the file: domain.c / h part to be exported in
domain_mod.c / h....but on the tests a call SIP to proxy kills a openser's
pid ...
Sep 5 06:32:21 notehome openser[7962]: INFO:core:handle_sigs: child process
7964 exited by a signal 11
Sep 5 06:32:21 notehome openser[7962]: INFO:core:handle_sigs: core was
generated
Sep 5 06:32:21 notehome openser[7962]: INFO:core:handle_sigs: terminating
due to SIGCHLD
Sep 5 06:32:21 notehome openser[7967]: INFO:core:sig_usr: signal 15
received
Sep 5 06:32:21 notehome openser[7963]: INFO:core:sig_usr: signal 15
received
Sep 5 06:32:21 notehome openser[7968]: INFO:core:sig_usr: signal 15
received
Sep 5 06:32:21 notehome openser[7966]: INFO:core:sig_usr: signal 15
received
Sep 5 06:32:21 notehome openser[7965]: INFO:core:sig_usr: signal 15
received
*The function created in domain.c:*
int is_from_trusted(struct sip_msg* _msg, char* _s1, char* _s2)
{
struct sip_uri *puri;
/* struct str* _host; */
/* str table_trus;
str col_id;
str col_dom;
str col_lastmod; */
str* _host = (str*)(&(puri->host));
char* db_url = DEFAULT_RODB_URL;
db_key_t keys[1]; /* Tipo da coluna .. Nome das colunas */
db_val_t vals[1];
db_key_t cols[1];
db_res_t* res = NULL;
if ((puri=parse_from_uri(_msg))==NULL){
LM_ERR("Error while parsing From header\n"); return -2;
}
/* Bind the database module */
if (bind_dbmod(db_url, &domain_dbf )) {
LM_ERR("Cannot bind to database module!\n");
return -1;
}
/* Check for SELECT capability */
if (!DB_CAPABILITY(domain_dbf, DB_CAP_QUERY)){
LM_ERR("Database modules does not provide all functions needed\n");
return -1;
}
/* Connect to DB */
db_handle = domain_dbf.init(db_url);
if (!db_handle){
LM_ERR("failed to connect database\n");
return -1;
}
keys[0]=trusdomain_col.s;
cols[0]=trusdomain_col.s;
LM_INFO(">>domain.c>>-2-IF RES_ROW_N(res)=>%d\n",RES_ROW_N(res));
/* Estrutura dos vls das colunas - arq. db/db_val.h */
VAL_TYPE(vals) = DB_STR;
VAL_NULL(vals) = 0;
VAL_STR(vals).s = _host->s;
VAL_STR(vals).len = _host->len;
/* LM_INFO(">>domain.c>>-1-connector=%d and
tab=%s\n",db_handle,trusdomain_table.s); */
if (domain_dbf.use_table(db_handle, trusdomain_table.s) < 0) {
LM_ERR("Error while trying to use trusdomain table\n");
return -1;
}
if (domain_dbf.query(db_handle, keys, NULL, vals, cols, 1, 1, 0, &res) <
0) {
LM_ERR("Error while querying database\n");
domain_dbf.close(db_handle);
return -1;
}
/* RES_ROW_N(res) Num. de linhas no fetch */
if (RES_ROW_N(res) <= 0 || RES_ROWS(res)[0].values[0].nul != 0){
LM_DBG("no value found\n");
if (res != NULL && domain_dbf.free_result(db_handle, res) < 0)
LM_DBG("failed to free the result\n");
domain_dbf.close(db_handle);
} else if (RES_ROW_N(res) >= 1) {
/* Teste do que estah na tab. trusdomain com o que vem na URI */
LM_DBG("Realm '%.*s' is trusted\n",_host->len, ZSW(_host->s));
}
/* Free the result */
domain_dbf.free_result(db_handle, res);
domain_dbf.close(db_handle);
return 0;
}
*And declaration in domain_mod.c :*
...
/* by mrg */
#define TRUSDOMAIN_TABLE "trusdomain"
#define TRUSDOMAIN_TABLE_LEN (sizeof(TRUSDOMAIN_TABLE) - 1)
#define TRUSDOMAIN_COL "trusdomain"
#define TRUSDOMAIN_COL_LEN (sizeof(TRUSDOMAIN_COL) - 1)
...
...
str trusdomain_table = {TRUSDOMAIN_TABLE, TRUSDOMAIN_TABLE_LEN}; /* Name of
trusted table */
str trusdomain_col = {TRUSDOMAIN_COL, TRUSDOMAIN_COL_LEN}; /* Name of
trusted column */
...
...
/*
*
* Exported functions
*/
static cmd_export_t cmds[] = {
{"is_from_local", is_from_local, 0, 0, 0,
REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE},
{"is_uri_host_local", is_uri_host_local, 0, 0, 0,
REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE},
{"is_domain_local", w_is_domain_local, 1, parameter_fixup, 0,
REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
{"is_from_trusted", is_from_trusted, 0, 0, 0,
REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
{0, 0, 0, 0, 0, 0}
};
.../*
* Exported parameters
*/
static param_export_t params[] = {
{"db_url", STR_PARAM, &db_url.s },
{"db_mode", INT_PARAM, &db_mode },
{"domain_table", STR_PARAM, &domain_table.s},
{"domain_col", STR_PARAM, &domain_col.s },
{"trusdomain_table", STR_PARAM, &trusdomain_table.s},
{"trusdomain_col", STR_PARAM, &trusdomain_col.s},
{0, 0, 0}
};
...
...
static int mod_init(void)
{
int vertr....;
.....
trusdomain_table.len = strlen(trusdomain_table.s);
trusdomain_col.len = strlen(trusdomain_col.s);
.....
if (db_mode != 0) {
if (domain_db_init(db_url.s)<0) return -1;
/* Check table version */
ver = domain_db_ver(&domain_table);
vertr = domain_db_ver(&trusdomain_table);
if ((ver < 0) && (vertr < 0)) {
LM_ERR("Error while querying table version\n");
goto error;
} else if ((ver < TABLE_VERSION) && (vertr < TABLE_VERSION)) {
LM_ERR("Invalid table version <%d> trustable version <%d>
(should be %d)\n",
ver, vertr, TABLE_VERSION);
goto error;
}
.......
.......
/* Initializing hash tables and hash table variable */
........
domain_db_close();
}
return 0;
error:
domain_db_close();
return -1;
}
So I think I must be doing everything wrong ..... as would be the right and
as I could learn so fast as this error debugging of pID of Openser is
dead...???
Any help would be greatly appreciated...
thx
Marcio