[OpenSIPS-Users] fixed Re: dp_translate with $avp(s:xyz) not working

Uwe Kastens kiste at kiste.org
Thu May 28 13:32:02 CEST 2009


Hi,

The query for the AVP gives back an VARCHAR. dp_translate seems to
expect an Integer. Could that be?

If so, it would be good to change the documentation for that module
http://www.opensips.org/html/docs/modules/1.5.x/dialplan.html
1.7.1

from
 Will try to translate the src string into dest string according to the
translation rules with dialplan ID equal to id.

Meaning of the parameters is as follows:

    *

      id -the dialplan id of the possible matching rules. This parameter
can have the following types:
          o

            integer- the dialplan id is statically assigned
          o

            avp var -the dialplan id is the value of an existing avp
variable
          o

            script var -the dialplan id is the value of an existing
script variable.







to

Will try to translate the src string into dest string according to the
translation rules with dialplan ID equal to id.

Meaning of the parameters is as follows:

    *

      id -the dialplan id of the possible matching rules. This parameter
can have the following types:
          o

            integer- the dialplan id is statically assigned
          o

            avp var -the dialplan id is the value of an existing avp
variable (have to be an integer)
          o

            script var -the dialplan id is the value of an existing
script variable. (have to be an integer)


BR

Uwe
Uwe Kastens schrieb:
> Hi,
> 
> If I call dp_translate with an integer, everything is working as expected:
> 
> if (!dp_translate("12345", "$fU/$avp(s:service)")) {
> 
> If I try the same with an AVP, I will get the following error:
> 
> xlog (" billingid $avp(s:billing)");
> if (!dp_translate("$avp(s:billing)", "$fU/$avp(s:service)")) {
> 
> May 28 13:20:21 osip /usr/sbin/opensips[13676]:  billingid 12345
> May 28 13:20:21 osip /usr/sbin/opensips[13676]:
> DBG:dialplan:dp_get_ivalue: searching 4
> May 28 13:20:21 osip /usr/sbin/opensips[13676]:
> ERROR:dialplan:dp_get_ivalue: no AVP or SCRIPTVAR found (error in scripts)
> May 28 13:20:21 osip /usr/sbin/opensips[13676]:
> ERROR:dialplan:dp_translate_f: n
> o dpid value
> 
> Any hints?
> 
> BR
> 
> Uwe
> 
> 
> 
	

-- 

kiste lat: 54.322684, lon: 10.13586



More information about the Users mailing list