Hi Ethan,

What memcached library are you using with kamailio ?
What version is you kamailio ?
I am sure that the memcached module is working with kamailio 4.0.2 .

Regards,
Dragos


From: Ethan Brooks <ethan.brooks@switchsoft.com>
To: sr-users@lists.sip-router.org
Sent: Friday, April 10, 2015 5:29 AM
Subject: [SR-Users] memcached module trimming the leading 8 char with innodb module

This is very simple Kamailio config and when i access Memcached directly everything seem to be fine but, when accessed via Kamailio he leading 8 char is omitted.

I have included everything needed to test.

kamailio

mpath="/usr/lib/x86_64-linux-gnu/kamailio/modules/"
debug=0
fork=yes

loadmodule "tm.so"
loadmodule "sl.so"
loadmodule "pv.so"
loadmodule "xhttp.so"
loadmodule "memcached.so"
modparam("memcached", "servers", "localhost:11211")

port=80
tcp_accept_no_cl=yes
event_route[xhttp:request] {
$var(number)  = $hu;
$var(number) = $(var(number){s.substr,2,0});
xhttp_reply("200", "OK", "text/html",
        "value: $mct(@@lnp.$var(number))");
}


mysql:
source /usr/share/mysql/innodb_memcached_config.sql
 install plugin daemon_memcached soname "libmemcached.so";
CREATE SCHEMA lnp;
CREATE TABLE `lnp`.`lnp` (   `number` bigint(20) NOT NULL,   `ported` bigint(20) DEFAULT NULL,   PRIMARY KEY (`number`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
insert into lnp.lnp   (number,ported) values   (8055551212,8053214321);

insert into innodb_memcache.containers   (name,db_schema,db_table,key_columns,value_columns,flags,cas_column,   expire_time_column,unique_idx_name_on_key) values   ('lnp','lnp','lnp','number','ported',   0,0,0,'PRIMARY');

url:
http://localhost/?8055551212

reponse:
value: 21

memcached
# nc localhost 11211
get @@lnp.8055551212
VALUE @@lnp.8055551212 0 10
8053214321
END

_______________________________________________
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