[erlang-questions] Fwd: Diameter Encoding Problem
Sanath Prasanna
ahe.sanath@REDACTED
Fri Jun 13 02:41:22 CEST 2014
Any help ?
---------- Forwarded message ----------
From: Sanath Prasanna <ahe.sanath@REDACTED>
Date: Thu, Jun 12, 2014 at 8:38 AM
Subject: Diameter Encoding Problem
To: erlang-questions <erlang-questions@REDACTED>
Hi,
Pls help to resolve below error.
=ERROR REPORT==== 12-Jun-2014::08:22:05 ===
* why: {diameter_codec,encode,*
* {{encode_failure,undef,'CCR',*
*
[{diameter_gen_base_rfc6733,avp_header,['Session-Id'],[]},*
{rfc4006_cc_Gy,e,2,
[{file,
"i:diameter-1.0/include/diameter_gen.hrl"},
{line,105}]},
{lists,flatmap,2,[{file,"lists.erl"},{line,1184}]},
{rfc4006_cc_Gy,encode_avps,2,
[{file,
"i:diameter-1.0/include/diameter_gen.hrl"},
Sample Code Below:
client:start().
client:create_session(No).
create_session(No) ->
SId = diameter:session_id(?L(?SVC_NAME)),
CCR = #rfc4006_cc_Gy_CCR{
'Session-Id' = SId,
'Origin-Host' = ?ORIGIN_HOST,
'Origin-Realm' = ?ORIGIN_REALM,
'Destination-Realm' = ?DEST_REALM,
'Auth-Application-Id' = 4,
'Service-Context-Id' = ?CONTEXT_ID,
'CC-Request-Type' = 4,
'CC-Request-Number' = 0,
%%'Event-Timestamp' = [ erlang:localtime()],
'Subscription-Id' = [#'rfc4006_cc_Gy_Subscription-Id' {
'Subscription-Id-Type' = 0,
'Subscription-Id-Data' = No}],
'Requested-Service-Unit' = [0],
'Requested-Action' = 0},
io:fwrite("connect ~p~n",[{CCR}]),
diameter:call(?SVC_NAME, ?APP_ALIAS, CCR, []).
Br,
Sanath
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140613/628efbdf/attachment.htm>
More information about the erlang-questions
mailing list