<div dir="ltr"><div>Hi,</div><div>Pls help to resolve below error.</div><div><br></div><div>=ERROR REPORT==== 12-Jun-2014::08:22:05 ===</div><div> <b> why: {diameter_codec,encode,</b></div><div><b> {{encode_failure,undef,'CCR',</b></div>
<div><b> [{diameter_gen_base_rfc6733,avp_header,['Session-Id'],[]},</b></div><div> {rfc4006_cc_Gy,e,2,</div><div> [{file,</div><div> "i:diameter-1.0/include/diameter_gen.hrl"},</div>
<div> {line,105}]},</div><div> {lists,flatmap,2,[{file,"lists.erl"},{line,1184}]},</div><div> {rfc4006_cc_Gy,encode_avps,2,</div><div> [{file,</div>
<div> "i:diameter-1.0/include/diameter_gen.hrl"},</div><div><br></div><div><br></div><div>Sample Code Below:</div><div>client:start().</div><div>client:create_session(No).<br></div><div>
<br></div><div><div>create_session(No) -></div><div><span class="" style="white-space:pre"> </span>SId = diameter:session_id(?L(?SVC_NAME)),</div><div><span class="" style="white-space:pre"> </span>CCR = #rfc4006_cc_Gy_CCR{</div>
<div><span class="" style="white-space:pre"> </span> 'Session-Id' = SId,</div><div><span class="" style="white-space:pre"> </span>'Origin-Host' = ?ORIGIN_HOST,</div><div><span class="" style="white-space:pre"> </span> 'Origin-Realm' = ?ORIGIN_REALM,</div>
<div><span class="" style="white-space:pre"> </span>'Destination-Realm' = ?DEST_REALM,</div><div><span class="" style="white-space:pre"> </span> 'Auth-Application-Id' = 4,</div><div><span class="" style="white-space:pre"> </span>'Service-Context-Id' = ?CONTEXT_ID,</div>
<div><span class="" style="white-space:pre"> </span>'CC-Request-Type' = 4,</div><div><span class="" style="white-space:pre"> </span>'CC-Request-Number' = 0,</div><div><span class="" style="white-space:pre"> </span>%%'Event-Timestamp' = [ erlang:localtime()],</div>
<div><span class="" style="white-space:pre"> </span>'Subscription-Id' = [#'rfc4006_cc_Gy_Subscription-Id' {</div><div><span class="" style="white-space:pre"> </span> 'Subscription-Id-Type' = 0,</div>
<div><span class="" style="white-space:pre"> </span> 'Subscription-Id-Data' = No}],</div><div><span class="" style="white-space:pre"> </span>'Requested-Service-Unit' = [0],</div>
<div><span class="" style="white-space:pre"> </span>'Requested-Action' = 0},<span class="" style="white-space:pre"> </span></div><div><span class="" style="white-space:pre"> </span>io:fwrite("connect ~p~n",[{CCR}]),</div>
<div><span class="" style="white-space:pre"> </span>diameter:call(?SVC_NAME, ?APP_ALIAS, CCR, []).</div></div><div><br></div><div>Br,</div><div>Sanath</div></div>