[sr-dev] [kamailio/kamailio] pv_evalx result in destination pv seems wrong (#1551)
Victor Seva
notifications at github.com
Fri Jun 1 10:54:32 CEST 2018
has something to do with the size of the string
```
#!KAMAILIO
#
####### Global Parameters #########
### LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR
log_stderror=yes
memdbg=5
memlog=5
log_facility=LOG_LOCAL0
log_stderror=yes
fork=no
/* uncomment the next line to disable TCP (default on) */
disable_tcp=yes
/* uncomment the next line to disable the auto discovery of local aliases
* based on reverse DNS on IPs (default on) */
auto_aliases=no
/* add local domain aliases */
#alias="sip.mydomain.com"
/* uncomment and configure the following line if you want Kamailio to
* bind on a specific interface/port/proto (default bind on all available) */
#listen=udp:10.0.0.10:5060
/* port to listen to
* - can be specified more than once if needed to listen on many ports */
port=5060
# life time of TCP connection when there is no traffic
# - a bit higher than registration expires to cope with UA behind NAT
tcp_connection_lifetime=3605
####### Modules Section ########
# set paths to location of modules (to sources or installation folders)
mpath="modules"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "pv.so"
loadmodule "dialog.so"
loadmodule "xlog.so"
loadmodule "debugger.so"
# ----------------- setting module-specific parameters ---------------
modparam("dialog", "dlg_flag", 9)
# ----- debugger params -----
modparam("debugger", "mod_level_mode", 1)
modparam("debugger", "mod_hash_size", 4)
modparam("debugger", "mod_level", "core=3")
modparam("debugger", "mod_level", "xlog=3")
####### Routing Logic ########
# Main SIP request routing logic
# - processing of any incoming SIP request starts with this route
# - note: this is the same as route { ... }
request_route {
$dlg_var(cgrCategory) = "internal";
$dlg_var(cgrReqType) = "cgrReqType";
$dlg_var(tenant) = "tenant";
$dlg_var(cgrAccount) = "cgrAccount";
$dlg_var(cgrDestination) = "cgrDestination";
$dlg_var(profile) = "profile";
$dlg_var(source_user) = "source_user";
$dlg_var(account_code) = "account_code";
$dlg_var(billing_cli) = "billing_cli";
$dlg_var(start_ts) = "start_ts";
$dlg_var(reseller_id) = "reseller_id";
xinfo("Send the call to CGRates ci='$ci'");
$var(tmp) = '"event":"CGR_AUTH_REQUEST",
"cgr_category":"$dlg_var(cgrCategory)",
"cgr_reqtype":"$dlg_var(cgrReqType)",
"cgr_tenant":"$dlg_var(tenant)",
"cgr_account":"$dlg_var(cgrAccount)",
"cgr_destination":"$dlg_var(cgrDestination)",
"direction":"$dlg_var(profile)",
"source_user":"$dlg_var(source_user)",
"recording_url":"",
"account_code":"$dlg_var(account_code)",
"billing_cli":"$dlg_var(billing_cli)",
"cgr_setuptime":"$dlg_var(start_ts)",
"reseller_id":"$dlg_var(reseller_id)"';
pv_evalx("$var(msg)", "$var(tmp)");
xinfo("$$var(tmp):'$var(tmp)'\n");
xinfo("$$var(msg):'$var(msg)'\n");
xinfo("++++\n");
xinfo("Send the call to CGRates ci='$ci'");
$var(tmp) = '"event":"CGR_AUTH_REQUEST",
"cgr_tenant":"$dlg_var(tenant)",
"cgr_account":"$dlg_var(cgrAccount)",
"cgr_destination":"$dlg_var(cgrDestination)",
"direction":"$dlg_var(profile)",
"source_user":"$dlg_var(source_user)",
"recording_url":"",
"account_code":"$dlg_var(account_code)",
"billing_cli":"$dlg_var(billing_cli)",
"cgr_setuptime":"$dlg_var(start_ts)",
"reseller_id":"$dlg_var(reseller_id)"';
pv_evalx("$var(msg)", "$var(tmp)");
xinfo("$$var(tmp):'$var(tmp)'\n");
xinfo("$$var(msg):'$var(msg)'\n");
xinfo("++++2222+++++\n");
}
```
```
| 10(17) DEBUG: <core> [core/pvapi.c:1103]: pv_parse_format(): format parsed OK: [12] items
| 10(17) INFO: <script>: $var(tmp):'"event":"CGR_AUTH_REQUEST",
| "cgr_category":"$dlg_var(cgrCategory)",
| "cgr_reqtype":"$dlg_var(cgrReqType)",
| "cgr_tenant":"$dlg_var(tenant)",
| "cgr_account":"$dlg_var(cgrAccount)",
| "cgr_destination":"$dlg_var(cgrDestination)",
| "direction":"$dlg_var(profile)",
| "source_user":"$dlg_var(source_user)",
| "recording_url":"",
| "account_code":"$dlg_var(account_code)",
| "billing_cli":"$dlg_var(billing_cli)",
| "cgr_setuptime":"$dlg_var(start_ts)",
| "reseller_id":"$dlg_var(reseller_id)"'
| 10(17) INFO: <script>: $var(msg):'start_ts10(17) INFO: <script>: ++++
| 10(17) INFO: <script>: Send the call to CGRates ci='210991253 at 172.19.0.3'10(17) DEBUG: <core> [core/pvapi.c:1056]: pv_parse_format(): parsing ["event":"CGR_AUTH_REQUEST",
| "cgr_tenant":"$dlg_var(tenant)",
| "cgr_account":"$dlg_var(cgrAccount)",
| "cgr_destination":"$dlg_var(cgrDestination)",
| "direction":"$dlg_var(profile)",
| "source_user":"$dlg_var(source_user)",
| "recording_url":"",
| "account_code":"$dlg_var(account_code)",
| "billing_cli":"$dlg_var(billing_cli)",
| "cgr_setuptime":"$dlg_var(start_ts)",
| "reseller_id":"$dlg_var(reseller_id)"]
| 10(17) DEBUG: <core> [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(tenant)] found in cache
| 10(17) DEBUG: <core> [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(cgrAccount)] found in cache
| 10(17) DEBUG: <core> [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(cgrDestination)] found in cache
| 10(17) DEBUG: <core> [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(profile)] found in cache
| 10(17) DEBUG: <core> [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(source_user)] found in cache
| 10(17) DEBUG: <core> [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(account_code)] found in cache
| 10(17) DEBUG: <core> [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(billing_cli)] found in cache
| 10(17) DEBUG: <core> [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(start_ts)] found in cache
| 10(17) DEBUG: <core> [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(reseller_id)] found in cache
| 10(17) DEBUG: <core> [core/pvapi.c:1103]: pv_parse_format(): format parsed OK: [10] items
| 10(17) INFO: <script>: $var(tmp):'"event":"CGR_AUTH_REQUEST",
| "cgr_tenant":"$dlg_var(tenant)",
| "cgr_account":"$dlg_var(cgrAccount)",
| "cgr_destination":"$dlg_var(cgrDestination)",
| "direction":"$dlg_var(profile)",
| "source_user":"$dlg_var(source_user)",
| "recording_url":"",
| "account_code":"$dlg_var(account_code)",
| "billing_cli":"$dlg_var(billing_cli)",
| "cgr_setuptime":"$dlg_var(start_ts)",
| "reseller_id":"$dlg_var(reseller_id)"'
| 10(17) INFO: <script>: $var(msg):'"event":"CGR_AUTH_REQUEST",
| "cgr_tenant":"tenant",
| "cgr_account":"cgrAccount",
| "cgr_destination":"cgrDestination",
| "direction":"profile",
| "source_user":"source_user",
| "recording_url":"",
| "account_code":"account_code",
| "billing_cli":"billing_cli",
| "cgr_setuptime":"start_ts",
| "reseller_id":"reseller_id"'
| 10(17) INFO: <script>: ++++2222+++++
| 10(17) DEBUG: <core> [core/receive.c:275]: receive_msg(): request-route executed in: 13013 usec
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1551#issuecomment-393816300
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20180601/d49c1a65/attachment-0001.html>
More information about the sr-dev
mailing list