Hello Everyone,
Can't find how actually return actual value from lua script not 1.
Because my setup is pass through REGISTER to B2BUA, I can't use registrar module. I though insert manually, but location table require ruid entry. I installed small lua script to generate it. Not sure if this good approach for it.
When user send first REGISTER in request do like this
if(is_method("REGISTER")) {
add_path_received();
xlog("L_INFO", "MSILO: New user request saving contact [$ct]\n");
$var(ruid) = lua_dofile("/usr/bin/ruid.lua");
xlog("L_INFO", "AOR: New user Ruid -->[$var(ruid)]\n");
sql_query_async("cb","INSERT INTO location(id, username, expires, contact, user_agent, domain, callid, ruid) VALUES(0, '$au', $TS, '$ct', '$ua', '$fd', '$ci', '$var(ruid)')");
}
Slava.
From: "volga629" <volga629(a)skillsearch.ca>
To: "sr-users" <sr-users(a)lists.sip-router.org>
Sent: Friday, 25 November, 2016 02:14:59
Subject: Re: [SR-Users] msilo
Hello Everyone,
I am trying run small lua script to generate random formatted string, but always get 1. Is script need be set in special way ? That related
to MSILO setup which I am trying to do.
xlog("L_INFO", "MSILO: New user request saving contact [$ct]\n");
$var(ruid) = lua_dofile("/usr/bin/ruid.lua");
xlog("L_INFO", "AOR: New user Ruid -->[$var(ruid)]\n");
Output
Nov 25 01:06:54 cavprx00 /usr/sbin/kamailio[3345]: INFO: <script>: AOR: New user Ruid -->[1]
Actual output
[root@cavprx00 kamailio]# /usr/bin/ruid.lua
uloc-8b7dae10-c17-2
[root@cavprx00 kamailio]# cat /usr/bin/ruid.lua
#!/usr/bin/lua
math.randomseed(os.time())
print(string.format("uloc-%08x-%03x-%x", math.random(0xffffffff), math.random(0xfff), math.random(0xf)))
Slava.
From: "volga629" <volga629(a)skillsearch.ca>
To: "sr-users" <sr-users(a)lists.sip-router.org>
Sent: Thursday, 24 November, 2016 12:15:45
Subject: Re: [SR-Users] msilo
Hello Everyone,
For dump I though do something like this. No sure if possible optimise it. Also how if possible convert inc_time to human readable ?
xlog("L_INFO", "[$rm], Got Register request for <$tU> dumping OFFLINE SMS\n");
while(sql_pvquery("cb","SELECT id FROM silo ORDER BY id ASC","$avp(id)")) {
sql_pvquery("cb", "SELECT dst_addr, src_addr, body, inc_time FROM silo WHERE id = '$avp(id)'","$avp(dst), $avp(src), $avp(body), $avp(time)");
crypto_aes_decrypt("$var(body)", "decryption key", "$avp(decrypted)");
$uac_req(method)="MESSAGE";
$uac_req(furi)=$avp(src);
$uac_req(turi)=$avp(dst);
$uac_req(body)= $avp(decrypted) ;
uac_req_send();
}
Slava.
From: "volga629" <volga629(a)skillsearch.ca>
To: miconda(a)gmail.com, "sr-users" <sr-users(a)lists.sip-router.org>
Sent: Thursday, 24 November, 2016 09:34:18
Subject: Re: [SR-Users] msilo
Hello Daniel,
That good idea, I will need help with sqlops to update information properly. Make sure the query is optimal. I will still can use if(m_store("$tu")), because it maintain offline notification, but I can use something like this. For dump I will put uac.
route[OFFLINE_MESSAGE] {
if(!is_method("MESSAGE")) {
return;
}
if(isflagset(FLAG_FROM_PEER)) {
if(!lookup("location")) {
xlog("L_INFO", "User $tU domain $td offline. Trying store SMS for later delivery\n");
xlog("L_INFO", "SMS received from $fU to $tU domain [$td] --> storing using MSILO\n");
# MSILO - storing as offline message
if(m_store("$tu")) {
xlog("L_INFO", "MSILO: offline message stored\n");
# Encrypt stored offline message
crypto_aes_encrypt("$rb", "mykey", "$avp(encrypted)");
sql_pvquery("cb", "select * from silo ORDER BY id DESC LIMIT 1","$avp(id)");
sql_query_async("cb","UPDATE silo SET body = $avp(encrypted) WHERE id = $avp(id)");
if(is_request()) {
if(!sl_send_reply("202", "Accepted")) {
sl_reply_error();
}
} else {
xlog("L_INFO", "MSILO: offline message NOT stored\n");
#if(!sl_send_reply("503", "Service Unavailable")) {
# sl_reply_error();
#}
}
}
t_on_failure("SMS_FAIL_ROUTE");
exit;
}
}
}
Slava.
From: "Daniel-Constantin Mierla" <miconda(a)gmail.com>
To: "sr-users" <sr-users(a)lists.sip-router.org>
Sent: Thursday, 24 November, 2016 06:45:48
Subject: Re: [SR-Users] msilo
I expect the encryption/decryption can be done with some triggers in mysql server.
In kamailio config you can use crypto module to encrypt a text and store it in a variable:
- https://www.kamailio.org/docs/modules/stable/modules/crypto.html
Then you can use sqlops to insert into the database. The issue comes when dumping stored messages... probably you can just replace msilo with sqlops+uac at the expense of a more complex configuration file.
On the other hand, probably adds some privacy to the local platform operators, which have access only to the mysql, because the key will be in kamailio.cfg. For full privacy, the endpoints should do the encryption/decryption with a key they agreed before, without being known by the server.
Cheers,
Daniel
On 24/11/2016 05:28, Slava Bendersky wrote:
Sent message to mailing list
From: "volga629" <volga629(a)skillsearch.ca>
To: miconda(a)gmail.com
Sent: Thursday, 24 November, 2016 00:25:30
Subject: Re: [SR-Users] msilo
Hello Everyone,
I want to ask about another improvement for MSILO module. If possible encrypt BODY column in database. That will improve some privacy concerns for storing body in plain text.
Slava.
--
Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi. Have strange issue
Calling from kamailio through WS
invite and resposes goes ok but with ACK to WS client has this issue
get_send_socket2(): protocol/port mismatch (forced tls:kamailioIP:4443, to
udp:MyWSClientIP:65451)
Guess kamailio thinks that it is UDP client because
$ru is sip:10002@MyWSClientIP:65451
But can not understand how to fix this...
Hello Everyone,
For dump I though do something like this. No sure if possible optimise it. Also how if possible convert inc_time to human readable ?
xlog("L_INFO", "[$rm], Got Register request for <$tU> dumping OFFLINE SMS\n");
while(sql_pvquery("cb","SELECT id FROM silo ORDER BY id ASC","$avp(id)")) {
sql_pvquery("cb", "SELECT dst_addr, src_addr, body, inc_time FROM silo WHERE id = '$avp(id)'","$avp(dst), $avp(src), $avp(body), $avp(time)");
crypto_aes_decrypt("$var(body)", "decryption key", "$avp(decrypted)");
$uac_req(method)="MESSAGE";
$uac_req(furi)=$avp(src);
$uac_req(turi)=$avp(dst);
$uac_req(body)= $avp(decrypted) ;
uac_req_send();
}
Slava.
From: "volga629" <volga629(a)skillsearch.ca>
To: miconda(a)gmail.com, "sr-users" <sr-users(a)lists.sip-router.org>
Sent: Thursday, 24 November, 2016 09:34:18
Subject: Re: [SR-Users] msilo
Hello Daniel,
That good idea, I will need help with sqlops to update information properly. Make sure the query is optimal. I will still can use if(m_store("$tu")), because it maintain offline notification, but I can use something like this. For dump I will put uac.
route[OFFLINE_MESSAGE] {
if(!is_method("MESSAGE")) {
return;
}
if(isflagset(FLAG_FROM_PEER)) {
if(!lookup("location")) {
xlog("L_INFO", "User $tU domain $td offline. Trying store SMS for later delivery\n");
xlog("L_INFO", "SMS received from $fU to $tU domain [$td] --> storing using MSILO\n");
# MSILO - storing as offline message
if(m_store("$tu")) {
xlog("L_INFO", "MSILO: offline message stored\n");
# Encrypt stored offline message
crypto_aes_encrypt("$rb", "mykey", "$avp(encrypted)");
sql_pvquery("cb", "select * from silo ORDER BY id DESC LIMIT 1","$avp(id)");
sql_query_async("cb","UPDATE silo SET body = $avp(encrypted) WHERE id = $avp(id)");
if(is_request()) {
if(!sl_send_reply("202", "Accepted")) {
sl_reply_error();
}
} else {
xlog("L_INFO", "MSILO: offline message NOT stored\n");
#if(!sl_send_reply("503", "Service Unavailable")) {
# sl_reply_error();
#}
}
}
t_on_failure("SMS_FAIL_ROUTE");
exit;
}
}
}
Slava.
From: "Daniel-Constantin Mierla" <miconda(a)gmail.com>
To: "sr-users" <sr-users(a)lists.sip-router.org>
Sent: Thursday, 24 November, 2016 06:45:48
Subject: Re: [SR-Users] msilo
I expect the encryption/decryption can be done with some triggers in mysql server.
In kamailio config you can use crypto module to encrypt a text and store it in a variable:
- https://www.kamailio.org/docs/modules/stable/modules/crypto.html
Then you can use sqlops to insert into the database. The issue comes when dumping stored messages... probably you can just replace msilo with sqlops+uac at the expense of a more complex configuration file.
On the other hand, probably adds some privacy to the local platform operators, which have access only to the mysql, because the key will be in kamailio.cfg. For full privacy, the endpoints should do the encryption/decryption with a key they agreed before, without being known by the server.
Cheers,
Daniel
On 24/11/2016 05:28, Slava Bendersky wrote:
Sent message to mailing list
From: "volga629" <volga629(a)skillsearch.ca>
To: miconda(a)gmail.com
Sent: Thursday, 24 November, 2016 00:25:30
Subject: Re: [SR-Users] msilo
Hello Everyone,
I want to ask about another improvement for MSILO module. If possible encrypt BODY column in database. That will improve some privacy concerns for storing body in plain text.
Slava.
--
Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello Daniel,
That good idea, I will need help with sqlops to update information properly. Make sure the query is optimal. I will still can use if(m_store("$tu")), because it maintain offline notification, but I can use something like this. For dump I will put uac.
route[OFFLINE_MESSAGE] {
if(!is_method("MESSAGE")) {
return;
}
if(isflagset(FLAG_FROM_PEER)) {
if(!lookup("location")) {
xlog("L_INFO", "User $tU domain $td offline. Trying store SMS for later delivery\n");
xlog("L_INFO", "SMS received from $fU to $tU domain [$td] --> storing using MSILO\n");
# MSILO - storing as offline message
if(m_store("$tu")) {
xlog("L_INFO", "MSILO: offline message stored\n");
# Encrypt stored offline message
crypto_aes_encrypt("$rb", "mykey", "$avp(encrypted)");
sql_pvquery("cb", "select * from silo ORDER BY id DESC LIMIT 1","$avp(id)");
sql_query_async("cb","UPDATE silo SET body = $avp(encrypted) WHERE id = $avp(id)");
if(is_request()) {
if(!sl_send_reply("202", "Accepted")) {
sl_reply_error();
}
} else {
xlog("L_INFO", "MSILO: offline message NOT stored\n");
#if(!sl_send_reply("503", "Service Unavailable")) {
# sl_reply_error();
#}
}
}
t_on_failure("SMS_FAIL_ROUTE");
exit;
}
}
}
Slava.
From: "Daniel-Constantin Mierla" <miconda(a)gmail.com>
To: "sr-users" <sr-users(a)lists.sip-router.org>
Sent: Thursday, 24 November, 2016 06:45:48
Subject: Re: [SR-Users] msilo
I expect the encryption/decryption can be done with some triggers in mysql server.
In kamailio config you can use crypto module to encrypt a text and store it in a variable:
- https://www.kamailio.org/docs/modules/stable/modules/crypto.html
Then you can use sqlops to insert into the database. The issue comes when dumping stored messages... probably you can just replace msilo with sqlops+uac at the expense of a more complex configuration file.
On the other hand, probably adds some privacy to the local platform operators, which have access only to the mysql, because the key will be in kamailio.cfg. For full privacy, the endpoints should do the encryption/decryption with a key they agreed before, without being known by the server.
Cheers,
Daniel
On 24/11/2016 05:28, Slava Bendersky wrote:
Sent message to mailing list
From: "volga629" <volga629(a)skillsearch.ca>
To: miconda(a)gmail.com
Sent: Thursday, 24 November, 2016 00:25:30
Subject: Re: [SR-Users] msilo
Hello Everyone,
I want to ask about another improvement for MSILO module. If possible encrypt BODY column in database. That will improve some privacy concerns for storing body in plain text.
Slava.
--
Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello Everyone,
I am trying run small lua script to generate random formatted string, but always get 1. Is script need be set in special way ? That related
to MSILO setup which I am trying to do.
xlog("L_INFO", "MSILO: New user request saving contact [$ct]\n");
$var(ruid) = lua_dofile("/usr/bin/ruid.lua");
xlog("L_INFO", "AOR: New user Ruid -->[$var(ruid)]\n");
Output
Nov 25 01:06:54 cavprx00 /usr/sbin/kamailio[3345]: INFO: <script>: AOR: New user Ruid -->[1]
Actual output
[root@cavprx00 kamailio]# /usr/bin/ruid.lua
uloc-8b7dae10-c17-2
[root@cavprx00 kamailio]# cat /usr/bin/ruid.lua
#!/usr/bin/lua
math.randomseed(os.time())
print(string.format("uloc-%08x-%03x-%x", math.random(0xffffffff), math.random(0xfff), math.random(0xf)))
Slava.
From: "volga629" <volga629(a)skillsearch.ca>
To: "sr-users" <sr-users(a)lists.sip-router.org>
Sent: Thursday, 24 November, 2016 12:15:45
Subject: Re: [SR-Users] msilo
Hello Everyone,
For dump I though do something like this. No sure if possible optimise it. Also how if possible convert inc_time to human readable ?
xlog("L_INFO", "[$rm], Got Register request for <$tU> dumping OFFLINE SMS\n");
while(sql_pvquery("cb","SELECT id FROM silo ORDER BY id ASC","$avp(id)")) {
sql_pvquery("cb", "SELECT dst_addr, src_addr, body, inc_time FROM silo WHERE id = '$avp(id)'","$avp(dst), $avp(src), $avp(body), $avp(time)");
crypto_aes_decrypt("$var(body)", "decryption key", "$avp(decrypted)");
$uac_req(method)="MESSAGE";
$uac_req(furi)=$avp(src);
$uac_req(turi)=$avp(dst);
$uac_req(body)= $avp(decrypted) ;
uac_req_send();
}
Slava.
From: "volga629" <volga629(a)skillsearch.ca>
To: miconda(a)gmail.com, "sr-users" <sr-users(a)lists.sip-router.org>
Sent: Thursday, 24 November, 2016 09:34:18
Subject: Re: [SR-Users] msilo
Hello Daniel,
That good idea, I will need help with sqlops to update information properly. Make sure the query is optimal. I will still can use if(m_store("$tu")), because it maintain offline notification, but I can use something like this. For dump I will put uac.
route[OFFLINE_MESSAGE] {
if(!is_method("MESSAGE")) {
return;
}
if(isflagset(FLAG_FROM_PEER)) {
if(!lookup("location")) {
xlog("L_INFO", "User $tU domain $td offline. Trying store SMS for later delivery\n");
xlog("L_INFO", "SMS received from $fU to $tU domain [$td] --> storing using MSILO\n");
# MSILO - storing as offline message
if(m_store("$tu")) {
xlog("L_INFO", "MSILO: offline message stored\n");
# Encrypt stored offline message
crypto_aes_encrypt("$rb", "mykey", "$avp(encrypted)");
sql_pvquery("cb", "select * from silo ORDER BY id DESC LIMIT 1","$avp(id)");
sql_query_async("cb","UPDATE silo SET body = $avp(encrypted) WHERE id = $avp(id)");
if(is_request()) {
if(!sl_send_reply("202", "Accepted")) {
sl_reply_error();
}
} else {
xlog("L_INFO", "MSILO: offline message NOT stored\n");
#if(!sl_send_reply("503", "Service Unavailable")) {
# sl_reply_error();
#}
}
}
t_on_failure("SMS_FAIL_ROUTE");
exit;
}
}
}
Slava.
From: "Daniel-Constantin Mierla" <miconda(a)gmail.com>
To: "sr-users" <sr-users(a)lists.sip-router.org>
Sent: Thursday, 24 November, 2016 06:45:48
Subject: Re: [SR-Users] msilo
I expect the encryption/decryption can be done with some triggers in mysql server.
In kamailio config you can use crypto module to encrypt a text and store it in a variable:
- https://www.kamailio.org/docs/modules/stable/modules/crypto.html
Then you can use sqlops to insert into the database. The issue comes when dumping stored messages... probably you can just replace msilo with sqlops+uac at the expense of a more complex configuration file.
On the other hand, probably adds some privacy to the local platform operators, which have access only to the mysql, because the key will be in kamailio.cfg. For full privacy, the endpoints should do the encryption/decryption with a key they agreed before, without being known by the server.
Cheers,
Daniel
On 24/11/2016 05:28, Slava Bendersky wrote:
Sent message to mailing list
From: "volga629" <volga629(a)skillsearch.ca>
To: miconda(a)gmail.com
Sent: Thursday, 24 November, 2016 00:25:30
Subject: Re: [SR-Users] msilo
Hello Everyone,
I want to ask about another improvement for MSILO module. If possible encrypt BODY column in database. That will improve some privacy concerns for storing body in plain text.
Slava.
--
Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Sent message to mailing list
From: "volga629" <volga629(a)skillsearch.ca>
To: miconda(a)gmail.com
Sent: Thursday, 24 November, 2016 00:25:30
Subject: Re: [SR-Users] msilo
Hello Everyone,
I want to ask about another improvement for MSILO module. If possible encrypt BODY column in database. That will improve some privacy concerns for storing body in plain text.
Slava.
From: "volga629" <volga629(a)skillsearch.ca>
To: miconda(a)gmail.com
Sent: Wednesday, 23 November, 2016 21:10:53
Subject: Re: [SR-Users] msilo
Hello Everyone,
Need another set of eyes, can't find how to To: got << in uri.
Nov 23 19:50:55 cavprx00 kamailio: 3(9625) DEBUG: <core> [parser/parse_uri.c:1280]: parse_uri(): parse_uri: bad uri, state 0 parsed: <<sip> (4) / <<sip:4200@client_public_ip:49418>;messagetype=SMS> (47)
Nov 23 19:50:55 cavprx00 kamailio: 3(9625) ERROR: tm [ut.h:254]: uri2dst2(): ERROR: uri2dst: bad_uri: [<sip:4200@ client_public_ip :49418>;messagetype=SMS]
Nov 23 19:50:55 cavprx00 kamailio: 3(9625) ERROR: tm [t_fwd.c:1723]: t_forward_nonack(): ERROR: t_forward_nonack: failure to add branches
route[MESSAGE_FORWARD] {
xlog("L_INFO", "Incoming new SMS [$rm] from $tU --> $td\n");
if(fnmatch("$rs", "202") && fnmatch("$rr", "Accepted") && allow_trusted("$si", "$proto")) {
$sht(b=>from) = $fu;
$sht(b=>oldto) = $tu;
$avp(new_to) = "<" + $sht(b=>oldto) + ">" + ";messagetype=SMS";
xlog("L_INFO", "MESSAGE: B2BUA send --> [$rs] with [$rr] from [$sht(b=>from)] to [$sht(b=>oldto)] -->[$td]\n");
}
if(compare_ips("$td", "10.18.130.27")) {
xlog("L_INFO", "Message from B2BUA contain domain --> $td user --> $(sht(b=>oldto){uri.user}) updating...\n");
sql_pvquery("cb", "select contact from location where username = '$(sht(b=>oldto){uri.user})'","$avp(dst)");
#$avp(new_dst) = $(hdr(Route){param.value,received});
xlog("L_INFO", "New destination --> $avp(dst)\n");
$avp(new_to) = "<" + $(avp(dst){tobody.uri}) + ">" + ";messagetype=SMS";
}
if(fnmatch("$fU", "offline")) {
xlog("L_INFO", "OFFLINE SMS: from [$fU] user --> $fU\n");
$avp(from) = $(sht(b=>oldto){uri.user});
xlog("L_INFO", "OFFLINE SMS: Searching destination user $avp(oexten)\n");
sql_pvquery("cb", "select contact from location where username = '$avp(from)'","$avp(dst)");
xlog("L_INFO", "OFFLINE SMS: set new destination --> $avp(dst)\n");
$avp(new_to) = "<" + $(avp(dst){tobody.uri}) + ">" + ";messagetype=SMS";
}
xlog("L_INFO", "OFFLINE SMS: new AVP DST $avp(new_to)\n");
$sht(a=>to) = $avp(new_to);
remove_hf("To");
insert_hf("To: $sht(a=>to)\r\n", "To");
$du = $sht(a=>to);
xlog("SMS from --> $fU domain $fd\n");
xlog("-------------------------------------\n");
xlog("L_INFO", "FROM --> $avp(from)\n");
xlog("L_INFO", "OLD_TO --> $sht(b=>oldto)\n");
xlog("L_INFO", "NEW_TO --> $avp(new_to)\n");
}
Slava.
From: "Daniel-Constantin Mierla" <miconda(a)gmail.com>
To: "volga629" <volga629(a)skillsearch.ca>, "sr-users" <sr-users(a)lists.sip-router.org>
Sent: Thursday, 17 November, 2016 05:44:22
Subject: Re: [SR-Users] msilo
Hello,
if you want to fetch them for config usage is ok, otherwise m_dump() is still better, because it takes care of removing delivered messages, etc...
Cheers,
Daniel
On 16/11/16 16:08, Slava Bendersky wrote:
Hello Daniel,
Yes that good alternative. I will use sql to fetch or insert staff.
Slava
From: "Daniel-Constantin Mierla" <miconda(a)gmail.com>
To: "sr-users" <sr-users(a)lists.sip-router.org>
Sent: Wednesday, 16 November, 2016 04:37:24
Subject: Re: [SR-Users] msilo
Hello,
as an alternative, I think it should work by using sql_query(...) to insert whatever values one would like to have in msilo table. This might be a quick workaround until someone will code the extension to get the body via a function parameter.
Cheers,
Daniel
On 15/11/16 16:07, Federico Cabiddu wrote:
BQ_BEGIN
Hi Slava,
if I understand correctly your scenario,
you could call t_on_failure before relaying the MESSAGE. In this way you should have access to the original message in the failure route triggered after receiving a final reply and you should be able to store it with the regular msilo functions.
Hope this helps.
Cheers,
Federico
On 15 Nov 2016 3:47 pm, "Slava Bendersky" < volga629(a)skillsearch.ca > wrote:
BQ_BEGIN
Hello Daniel,
I am not programmer, but I want place request if kaamilio devs can complete it .
Thanks
Slava.
From: "Daniel-Constantin Mierla" < miconda(a)gmail.com >
To: "sr-users" < sr-users(a)lists.sip-router.org >
Sent: Tuesday, 15 November, 2016 03:00:19
Subject: Re: [SR-Users] msilo
Hello,
for me it is fine to add a new parameter to m_store() that takes the body content.
Are you asking for more details of how can be done?
Cheers,
Daniel
On 13/11/16 07:08, Slava Bendersky wrote:
BQ_BEGIN
Hello Everyone,
I asking question/request to add improvement for msilo module where will have ability set $avp(i:body) in mod params. That will allow use it in m_store() by specifying body message $avp. In my case registration is on B2BUA so kamailio pass through/proxy to destination. In order to check user status online/offline kamailio wait for reply from B2BUA on MESSAGE status if it return error 503 that mean user offline and m_store(0 should store message in db, but the issue that error 503 is in final stage and MESSAGE body is not available any more. The improvement will allow specify body $var in m_store() so new way will be m_store($tu, $avp(body)).
Any help thank you.
Slava.
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users(a)lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users(a)lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users(a)lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
BQ_END
BQ_END
--
Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
BQ_END
--
Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
Hi there
We are using homer to analyce and monitor traffic.
I did not get a solution to send x-rtp or p-rtp stats to homer.
How can I find infos about jitter, sent/received packages, lost packages, etc.?
Our current infos are based on
Rtpstat provided by kamailio.
At the moment I do
$var(xrtpstat) = $(rtpstat{s.striptail,1});
# Work the stats
$var(octetsent) = $(var(xrtpstat){s.select,1, }); #octetsent / OS
$var(packetsent) = $(var(xrtpstat){s.select,3, }); #PS
$var(octetrcv) = $(var(xrtpstat){s.select,8, }); #OR
$var(packetrcv) = $(var(xrtpstat){s.select,10, }); #PR
$var(errorsent) = $(var(xrtpstat){s.select,5, });
$var(errorrcv) = $(var(xrtpstat){s.select,12, });
if ($var(octetsent) != "" || $var(packetsent) != "")
{
xlog(,"L_INFO", "WITHINDLG PS=$var(rtp0),PR=$var(rtp1),PL=$var(rtp3) \n");
xlog(,"L_INFO", "WITHINDLG xrtpstats=$var(xrtpstat) \r\n");
xlog(,"L_INFO", "WITHINDLG rtpstats=$rtpstat \r\n");
xlog(,"L_INFO", "WITHINDLG X-RTP-Stat: PS=$var(packetsent),OS=$var(octetsent),PR=$var(packetrcv),OR=$var(octetrcv),PL=$var(errorsent) \r\n");
#append_hf("P-RTP-Stat: $rtpstat\r\n");
append_hf("X-RTP-Stat: PS=$var(packetsent);OS=$var(octetsent);PR=$var(packetrcv);OR=$var(octetrcv);PL=$var(errorsent);JI=600;LA=40;\r\n");
}
Other question:
Where has this to be placed? Only on bye messages?
KR,
Oli
Hello,
My sip vendor sends me a 403 error when the caller id (CLI) sent is not
valid.
I would like to set up a failure route to capture that 403 and set up a
default CLI.
I tried to use a uac_replace_from() in a failure route but I get:
"Command cannot be used in the block"
Does anyone know how can I change the CLI in a failure route how how can
achieve the default CLI?
Thank you
Hi all,
I have a issue here on a old OpenSER 1.3 system. We have some clients
that respond to a BYE message with a 481 resulting in a missing radius
accounting record. I have added some code to the failure route to force
accounting even if a 481 response in received:
if (t_check_status("481") && $rm == "BYE")
{
xlog("L_INFO", "INFO: [FAILURE] 481 response detected!! Forcing
accounting! - SRC=$si:$sp R=$ru ID=$ci FU=$fu M=$rm S=$rs\n");
acc_rad_request("BYE with 481 response");
}
Now OpenSER sends a accounting record, but this has the attribute
Acct-Status-Type set to Failed. This gives a problem with our accounting
service and i would like to change it to a normal Stop record.
Is there a way to change this and force OpenSER/Kamailio to send a Stop
record instead of a Failed record?
Thanks,
Jan