<p>has something to do with the size of the string</p>
<pre><code>#!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");
}
</code></pre>
<pre><code>| 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@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
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1551#issuecomment-393816300">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZeO0Kcuh74ErT8J9b-jdvfVUTmfqks5t4QFIgaJpZM4UVPwv">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZRRKSQBznSv27JnpN8275ULbakv9ks5t4QFIgaJpZM4UVPwv.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","potentialAction":{"@type":"ViewAction","target":"https://github.com/kamailio/kamailio/issues/1551#issuecomment-393816300","url":"https://github.com/kamailio/kamailio/issues/1551#issuecomment-393816300","name":"View Issue"},"description":"View this Issue on GitHub","publisher":{"@type":"Organization","name":"GitHub","url":"https://github.com"}}</script>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@linuxmaniac in #1551: has something to do with the size of the string\r\n```\r\n#!KAMAILIO\r\n#\r\n####### Global Parameters #########\r\n\r\n### LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR\r\nlog_stderror=yes\r\n\r\nmemdbg=5\r\nmemlog=5\r\n\r\nlog_facility=LOG_LOCAL0\r\nlog_stderror=yes\r\nfork=no\r\n\r\n/* uncomment the next line to disable TCP (default on) */\r\ndisable_tcp=yes\r\n\r\n/* uncomment the next line to disable the auto discovery of local aliases\r\n * based on reverse DNS on IPs (default on) */\r\nauto_aliases=no\r\n\r\n/* add local domain aliases */\r\n#alias=\"sip.mydomain.com\"\r\n\r\n/* uncomment and configure the following line if you want Kamailio to\r\n * bind on a specific interface/port/proto (default bind on all available) */\r\n#listen=udp:10.0.0.10:5060\r\n\r\n/* port to listen to\r\n * - can be specified more than once if needed to listen on many ports */\r\nport=5060\r\n\r\n# life time of TCP connection when there is no traffic\r\n# - a bit higher than registration expires to cope with UA behind NAT\r\ntcp_connection_lifetime=3605\r\n\r\n####### Modules Section ########\r\n\r\n# set paths to location of modules (to sources or installation folders)\r\nmpath=\"modules\"\r\n\r\nloadmodule \"tm.so\"\r\nloadmodule \"rr.so\"\r\nloadmodule \"pv.so\"\r\nloadmodule \"dialog.so\"\r\nloadmodule \"xlog.so\"\r\nloadmodule \"debugger.so\"\r\n\r\n# ----------------- setting module-specific parameters ---------------\r\n\r\nmodparam(\"dialog\", \"dlg_flag\", 9)\r\n\r\n# ----- debugger params -----\r\nmodparam(\"debugger\", \"mod_level_mode\", 1)\r\nmodparam(\"debugger\", \"mod_hash_size\", 4)\r\nmodparam(\"debugger\", \"mod_level\", \"core=3\")\r\nmodparam(\"debugger\", \"mod_level\", \"xlog=3\")\r\n\r\n####### Routing Logic ########\r\n\r\n\r\n# Main SIP request routing logic\r\n# - processing of any incoming SIP request starts with this route\r\n# - note: this is the same as route { ... }\r\nrequest_route {\r\n\t$dlg_var(cgrCategory) = \"internal\";\r\n\t$dlg_var(cgrReqType) = \"cgrReqType\";\r\n\t$dlg_var(tenant) = \"tenant\";\r\n\t$dlg_var(cgrAccount) = \"cgrAccount\";\r\n\t$dlg_var(cgrDestination) = \"cgrDestination\";\r\n\t$dlg_var(profile) = \"profile\";\r\n\t$dlg_var(source_user) = \"source_user\";\r\n\t$dlg_var(account_code) = \"account_code\";\r\n\t$dlg_var(billing_cli) = \"billing_cli\";\r\n\t$dlg_var(start_ts) = \"start_ts\";\r\n\t$dlg_var(reseller_id) = \"reseller_id\";\r\n\r\n\txinfo(\"Send the call to CGRates ci='$ci'\");\r\n\t$var(tmp) = '\"event\":\"CGR_AUTH_REQUEST\",\r\n        \"cgr_category\":\"$dlg_var(cgrCategory)\",\r\n        \"cgr_reqtype\":\"$dlg_var(cgrReqType)\",\r\n        \"cgr_tenant\":\"$dlg_var(tenant)\",\r\n        \"cgr_account\":\"$dlg_var(cgrAccount)\",\r\n        \"cgr_destination\":\"$dlg_var(cgrDestination)\",\r\n        \"direction\":\"$dlg_var(profile)\",\r\n        \"source_user\":\"$dlg_var(source_user)\",\r\n        \"recording_url\":\"\",\r\n        \"account_code\":\"$dlg_var(account_code)\",\r\n        \"billing_cli\":\"$dlg_var(billing_cli)\",\r\n        \"cgr_setuptime\":\"$dlg_var(start_ts)\",\r\n        \"reseller_id\":\"$dlg_var(reseller_id)\"';\r\n\tpv_evalx(\"$var(msg)\", \"$var(tmp)\");\r\n\txinfo(\"$$var(tmp):'$var(tmp)'\\n\");\r\n\txinfo(\"$$var(msg):'$var(msg)'\\n\");\r\n\txinfo(\"++++\\n\");\r\n\r\n\txinfo(\"Send the call to CGRates ci='$ci'\");\r\n\t$var(tmp) = '\"event\":\"CGR_AUTH_REQUEST\",\r\n        \"cgr_tenant\":\"$dlg_var(tenant)\",\r\n        \"cgr_account\":\"$dlg_var(cgrAccount)\",\r\n        \"cgr_destination\":\"$dlg_var(cgrDestination)\",\r\n        \"direction\":\"$dlg_var(profile)\",\r\n        \"source_user\":\"$dlg_var(source_user)\",\r\n        \"recording_url\":\"\",\r\n        \"account_code\":\"$dlg_var(account_code)\",\r\n        \"billing_cli\":\"$dlg_var(billing_cli)\",\r\n        \"cgr_setuptime\":\"$dlg_var(start_ts)\",\r\n        \"reseller_id\":\"$dlg_var(reseller_id)\"';\r\n\tpv_evalx(\"$var(msg)\", \"$var(tmp)\");\r\n\txinfo(\"$$var(tmp):'$var(tmp)'\\n\");\r\n\txinfo(\"$$var(msg):'$var(msg)'\\n\");\r\n\txinfo(\"++++2222+++++\\n\");\r\n}\r\n```\r\n\r\n```\r\n| 10(17) DEBUG: \u003ccore\u003e [core/pvapi.c:1103]: pv_parse_format(): format parsed OK: [12] items\r\n| 10(17) INFO: \u003cscript\u003e: $var(tmp):'\"event\":\"CGR_AUTH_REQUEST\",\r\n| \"cgr_category\":\"$dlg_var(cgrCategory)\",\r\n| \"cgr_reqtype\":\"$dlg_var(cgrReqType)\",\r\n| \"cgr_tenant\":\"$dlg_var(tenant)\",\r\n| \"cgr_account\":\"$dlg_var(cgrAccount)\",\r\n| \"cgr_destination\":\"$dlg_var(cgrDestination)\",\r\n| \"direction\":\"$dlg_var(profile)\",\r\n| \"source_user\":\"$dlg_var(source_user)\",\r\n| \"recording_url\":\"\",\r\n| \"account_code\":\"$dlg_var(account_code)\",\r\n| \"billing_cli\":\"$dlg_var(billing_cli)\",\r\n| \"cgr_setuptime\":\"$dlg_var(start_ts)\",\r\n| \"reseller_id\":\"$dlg_var(reseller_id)\"'\r\n| 10(17) INFO: \u003cscript\u003e: $var(msg):'start_ts10(17) INFO: \u003cscript\u003e: ++++\r\n| 10(17) INFO: \u003cscript\u003e: Send the call to CGRates ci='210991253@172.19.0.3'10(17) DEBUG: \u003ccore\u003e [core/pvapi.c:1056]: pv_parse_format(): parsing [\"event\":\"CGR_AUTH_REQUEST\",\r\n| \"cgr_tenant\":\"$dlg_var(tenant)\",\r\n| \"cgr_account\":\"$dlg_var(cgrAccount)\",\r\n| \"cgr_destination\":\"$dlg_var(cgrDestination)\",\r\n| \"direction\":\"$dlg_var(profile)\",\r\n| \"source_user\":\"$dlg_var(source_user)\",\r\n| \"recording_url\":\"\",\r\n| \"account_code\":\"$dlg_var(account_code)\",\r\n| \"billing_cli\":\"$dlg_var(billing_cli)\",\r\n| \"cgr_setuptime\":\"$dlg_var(start_ts)\",\r\n| \"reseller_id\":\"$dlg_var(reseller_id)\"]\r\n| 10(17) DEBUG: \u003ccore\u003e [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(tenant)] found in cache\r\n| 10(17) DEBUG: \u003ccore\u003e [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(cgrAccount)] found in cache\r\n| 10(17) DEBUG: \u003ccore\u003e [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(cgrDestination)] found in cache\r\n| 10(17) DEBUG: \u003ccore\u003e [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(profile)] found in cache\r\n| 10(17) DEBUG: \u003ccore\u003e [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(source_user)] found in cache\r\n| 10(17) DEBUG: \u003ccore\u003e [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(account_code)] found in cache\r\n| 10(17) DEBUG: \u003ccore\u003e [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(billing_cli)] found in cache\r\n| 10(17) DEBUG: \u003ccore\u003e [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(start_ts)] found in cache\r\n| 10(17) DEBUG: \u003ccore\u003e [core/pvapi.c:320]: pv_cache_lookup(): pvar [$dlg_var(reseller_id)] found in cache\r\n| 10(17) DEBUG: \u003ccore\u003e [core/pvapi.c:1103]: pv_parse_format(): format parsed OK: [10] items\r\n| 10(17) INFO: \u003cscript\u003e: $var(tmp):'\"event\":\"CGR_AUTH_REQUEST\",\r\n| \"cgr_tenant\":\"$dlg_var(tenant)\",\r\n| \"cgr_account\":\"$dlg_var(cgrAccount)\",\r\n| \"cgr_destination\":\"$dlg_var(cgrDestination)\",\r\n| \"direction\":\"$dlg_var(profile)\",\r\n| \"source_user\":\"$dlg_var(source_user)\",\r\n| \"recording_url\":\"\",\r\n| \"account_code\":\"$dlg_var(account_code)\",\r\n| \"billing_cli\":\"$dlg_var(billing_cli)\",\r\n| \"cgr_setuptime\":\"$dlg_var(start_ts)\",\r\n| \"reseller_id\":\"$dlg_var(reseller_id)\"'\r\n| 10(17) INFO: \u003cscript\u003e: $var(msg):'\"event\":\"CGR_AUTH_REQUEST\",\r\n| \"cgr_tenant\":\"tenant\",\r\n| \"cgr_account\":\"cgrAccount\",\r\n| \"cgr_destination\":\"cgrDestination\",\r\n| \"direction\":\"profile\",\r\n| \"source_user\":\"source_user\",\r\n| \"recording_url\":\"\",\r\n| \"account_code\":\"account_code\",\r\n| \"billing_cli\":\"billing_cli\",\r\n| \"cgr_setuptime\":\"start_ts\",\r\n| \"reseller_id\":\"reseller_id\"'\r\n| 10(17) INFO: \u003cscript\u003e: ++++2222+++++\r\n| 10(17) DEBUG: \u003ccore\u003e [core/receive.c:275]: receive_msg(): request-route executed in: 13013 usec\r\n```"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1551#issuecomment-393816300"}}}</script>
<script type="application/ld+json">{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "37567f93-e2a7-4e2a-ad37-a9160fc62647",
"title": "Re: [kamailio/kamailio] pv_evalx result in destination pv seems wrong (#1551)",
"sections": [
{
"text": "",
"activityTitle": "**Victor Seva**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@linuxmaniac",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1551,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1551\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/issues/1551#issuecomment-393816300"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 341113903\n}"
}
],
"themeColor": "26292E"
}</script>