[erlang-questions] Diameter Relay Agent

Anders Svensson <>
Mon Aug 15 13:22:58 CEST 2016


The RFC 4006 dictionary presumably doesn't return the relay identifier
from id/0. Even it it did, messages aren't decoded in the same way by
a relay. The only decoding that's done is to split the message into
AVPs, so it's the avps field you want to look in.

Anders


On Mon, Aug 15, 2016 at 10:59 AM, Ehsan Mohammadi <> wrote:
> i need to access username to find dst peer and packet type/attrs for logging
> purpose
> when i pass DIAMETER_DICT_RELAY diameter doesn`t know anything about CCA/CCR
> (it`s obvious)
> and if i pass rfc4006 dict relay won`t work (i don`t know why)
>
> On Mon, Aug 15, 2016 at 12:52 PM Anders Svensson <>
> wrote:
>>
>> If you mean that that you're looking for User-Name in an incoming
>> message then you can find it in the avps field of the diameter_packet
>> record. Just iterate through that list.
>>
>> Anders
>>
>>
>> On Thu, Aug 11, 2016 at 9:43 PM, Ehsan Mohammadi <>
>> wrote:
>> > hi
>> > i`m working on a diameter relay agent app
>> > i need to access User-Name AVP to find destination peer base on
>> > username.
>> > i passed {'Auth-Application-Id', [?DIAMETER_APP_ID_RELAY]} and
>> > {dictionary,
>> > ?DIAMETER_DICT_RELAY} to start_service and my packet is undefined and
>> > can`t
>> > access it`s avp(tried on CCR/CCA).
>> > i had to use bin property of packet and pass it to diameter:decode.
>> > what`s correct solution to overcome this problem?
>> >
>> > _______________________________________________
>> > erlang-questions mailing list
>> > 
>> > http://erlang.org/mailman/listinfo/erlang-questions
>> >


More information about the erlang-questions mailing list