<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;"><div>Thank you in advance,</div><div><br></div><div>I’m trying to get CNAM working with Opensips version 1.8 and hoping to get a little guidance on this. I’m attempting to use the CIDName.com for CNAM and doing the integration via token, but its not doing 2 things:</div><div><br></div><ol><li>Not pulling the CNAM via curl as suggested by CIDName.com</li><li>Not recording it into the MySQL database, even if it’s null, I would think that it should still record that piece of it.</li></ol><div>Here is the snippet from my opensips.cfg file. Hoping someone will point out whats wrong with it.</div><div><br></div><div>#### ACCounting module</div><div>loadmodule "acc.so"</div><div>loadmodule "avpops.so"</div><div>loadmodule "exec.so"</div><div>loadmodule "uac.so"</div><div>modparam("acc", "cdr_flag", "ACC_CDR")</div><div>#modparam("acc", "failed_transaction_flag", "ACC_FAILED")</div><div>modparam("acc", "db_flag", "ACC_DO")</div><div>modparam("acc", "db_url",</div><div> "mysql://username:password@10.20.121.71/database") # CUSTOMIZE ME</div><div>modparam("acc", "db_extra", "from_uri=$fU; to_uri=$tU") #Extra data</div><div>#modparam("acc", "db_extra", "cnam=$avp") #Extra data </div><div><br></div><div>If I have the "modparam("acc", "db_extra", "cnam=$avp") #Extra data “ uncommented, then I get the following error when reloading opensips:</div><div><br></div><div><div>Nov 23 13:22:43 FSSVG0AA1 /usr/local/opensips_proxy/sbin/opensips[18828]: ERROR:core:pv_parse_spec: pvar "avp" not found</div><div>Nov 23 13:22:43 FSSVG0AA1 /usr/local/opensips_proxy/sbin/opensips[18828]: ERROR:core:pv_parse_spec: wrong char [p/112] in [$avp] at [3 (0)]</div><div>Nov 23 13:22:43 FSSVG0AA1 /usr/local/opensips_proxy/sbin/opensips[18828]: ERROR:acc:parse_acc_extra: parse failed in <cnam=$avp> around position 5</div><div>Nov 23 13:22:43 FSSVG0AA1 /usr/local/opensips_proxy/sbin/opensips[18828]: ERROR:acc:parse_acc_extra: error</div><div>Nov 23 13:22:43 FSSVG0AA1 /usr/local/opensips_proxy/sbin/opensips[18828]: ERROR:acc:mod_init: failed to parse db_extra param</div><div>Nov 23 13:22:43 FSSVG0AA1 /usr/local/opensips_proxy/sbin/opensips[18828]: ERROR:core:init_mod: failed to initialize module acc</div><div>Nov 23 13:22:43 FSSVG0AA1 /usr/local/opensips_proxy/sbin/opensips[18828]: ERROR:core:main: error while initializing modules</div></div><div><br></div><div><br></div><div><div>route{</div><div><br></div><div> if (method == "INVITE") {</div><div> create_dialog();</div><div> setflag(ACC_CDR);</div><div> setflag(ACC_DO); # do accounting ...</div><div> record_route();</div><div> xlog("INBOUND CALL,$dd,$ru,$ci,$fn,$fu");</div><div> exec_avp("timeout -s KILL 2 curl http://dip.cidname.com/$avp(src)?token=XXXXXXXXX-TOKEN-XXXXXXXXXXXXX","$avp(cnam)");</div><div> uac_replace_from("$avp(cnam)","");</div><div> route(10);</div><div> exit;</div><div> }</div></div><div><br></div>The idea behind all of this is the Customer would like to have statistics on where the calls are coming from or more importantly from who. Would like to record this data in the MySQL database and be able to pull it later. I have added a field in the ‘acc’ table called ‘cnam’ in hopes to record the information in there. Any ideas on how to accomplish this, I am all ears.<div><br></div><div>Thanks again,</div><div><br></div><div>Gordon</div></body></html>