[SR-Users] weird dp_translate result

Juha Heinanen jh at tutpro.com
Sat Sep 1 07:49:27 CEST 2012


Daniel-Constantin Mierla writes:

> > 0(11244) ERROR: <core> [sr_module.c:572]: ERROR: load_module: could not open module </usr/lib/sip-proxy/modules/dialplan.so>: libkmi.so.1: cannot open shared object file: No such file or directory
> >
> > when the file definitely exists:
> >
> > /usr/lib/sip-proxy/modules# ls -ls dialplan.so
> > 148 -rwxr-xr-x 1 jh jh 151353 Aug 31 22:10 dialplan.so
> The complain seems to be regarding missing of libkmi, can you check that 
> is installed as well?

yes, it is installed in libdir:

# ls -ls /usr/lib/sip-proxy/
 ...
 0 lrwxrwxrwx 1 root root     13 Aug 31 21:30 libkmi.so -> libkmi.so.1.0
  0 lrwxrwxrwx 1 root root     13 Aug 31 21:30 libkmi.so.1 -> libkmi.so.1.0
 52 -rw-r--r-- 1 root root  51673 Aug 31 21:30 libkmi.so.1.0

> Do you have any possibility to test it where it compiles? You can even 
> run from source tree, without a need to install, connecting to the 
> database server where dialplan table is located -- just to avoid hunting 
> ghost issues in the code.

the same problem appears also when i run proxy on the same real host
where i built the debian package.

now i was able to put some LM_INFO statements in dp_update function of
dialplan.c:

set_attr_pvar:

	LM_INFO("trying to set pvar\n");

	if(!attr_pvar) {
	    LM_INFO("attr_pvar is null\n");
	    return 0;
	}

	val.rs = *attrs;
	LM_INFO("setting pvar from attrs <%.*s>\n", val.rs.len, val.rs.s);
	if(attr_pvar->setf(msg, &attr_pvar->pvp, (int)EQ_T, &val)<0)
	{
		LM_ERR("setting attr pseudo-variable failed\n");
		return -1;
	}
	if(attr_pvar->getf(msg, &attr_pvar->pvp, &res)<0)
	{
		LM_ERR("getting attr pseudo-variable failed\n");
		return -1;
	}
	LM_INFO("got <%.*s>\n", res.rs.len, res.rs.s);
	
this is what i get to syslog:

Sep  1 08:38:23 siika /usr/sbin/sip-proxy[15787]: INFO: Translating <+35892345670> based on dpid 4
Sep  1 08:38:23 siika /usr/sbin/sip-proxy[15787]: INFO: dialplan [dialplan.c:280]: entering dp_update
Sep  1 08:38:23 siika /usr/sbin/sip-proxy[15787]: INFO: dialplan [dialplan.c:307]: trying to set pvar
Sep  1 08:38:23 siika /usr/sbin/sip-proxy[15787]: INFO: dialplan [dialplan.c:315]: setting pvar from attrs <fi>
Sep  1 08:38:23 siika /usr/sbin/sip-proxy[15787]: INFO: dialplan [dialplan.c:326]: got <-630238520>

i.e. the value i get from the pv is not the one i put there.

my next guess is that this has something to do with amd64 architecture
of the host.  perhaps the sizes of ints/pointers/etc are not what the
code somewhere expects?

-- juha



More information about the sr-users mailing list