streamMode variable
Micael Karlberg
micael.karlberg@REDACTED
Tue Oct 28 14:20:30 CET 2003
Hi,
There is a number of errors. 'streams' in 'MediaDescriptor'
and 'descriptors' in 'AmmRequest'.
Below is a corrected addcommand function:
addcommand(Pid, CH) ->
LCD1 = #'LocalControlDescriptor'{streamMode=recvOnly},
SP1 = #'StreamParms'{localControlDescriptor=LCD1},
MEDIA1 = #'MediaDescriptor'{streams={oneStream, SP1}},
ADD1 = #'AmmRequest'{terminationID=[#megaco_term_id{id=?A4444}] ,
descriptors=[{mediaDescriptor, MEDIA1}]},
CR1 = #'CommandRequest'{command={addReq, ADD1}},
AR = #'ActionRequest'{contextId=?megaco_choose, commandRequests=[CR1]},
megaco:call(CH, [AR], []).
I will add a test function in the megaco module so that it's
possible to test the message ([AR]) input to the call/cast
functions (offline).
/BMK
mwilligs@REDACTED writes:
> Hi
> Thaks for the answer.
> my problem is the following:
>
> I wana make an 'add' command:
>
> Context=$
> {
> Add=A4444
> {
> Media
> {
> LocalControl{Mode = SendRecv}
> }
> }
> }
>
> And this is my code:
>
> where
> CH={megaco_conn_handle,{deviceName,"ctrl"},{deviceName,"mg"}}
>
> %%%%
> addcommand(Pid,CH)->
>
> LCD1=#'LocalControlDescriptor'{streamMode=recvOnly},
> SP1=#'StreamParms'{localControlDescriptor=LCD1},
> MEDIA1=#'MediaDescriptor'{streams=SP1},
> ADD1=#'AmmRequest'{terminationID=[#megaco_term_id{id=?A4444}] ,
> descriptors=MEDIA1},
> CR1=#'CommandRequest'{command={addReq, ADD1}},
> AR=#'ActionRequest'{contextId=?megaco_choose, commandRequests=[CR1]},
> megaco:cast(CH, [AR], []).
> %%%%%%
>
>
>
> what's wrong in this code??
>
> How can I make a test to find errors in my megaco packets?
>
> Thanks again
>
> > Hi,
> >
> > LCD1=#'LocalControlDescriptor'{streamMode = recvOnly} is the correct.
> > What kind of problems did you encounter?
> >
> > /BMK
> >
> >
> > mwilligs@REDACTED writes:
> > > In the file megaco_message_v1.hlr the structure LocalControlDescriptor
> > > have the streamMode variable.
> > >
> > > Witch are the posible values of streamMode?
> > > In the RFC 3015 page 91 is defined as follow:
> > > StreamMode ::= ENUMERATED
> > > {
> > > sendOnly(0),
> > > recvOnly(1),
> > > sendRecv(2),
> > > ...
> > > }
> > > The point is: Is it right to write it this way in erlang?:
> > > LCD1=#'LocalControlDescriptor'{streamMode=2}
> > > or shall I write it in this way?:
> > > LCD1=#'LocalControlDescriptor'{streamMode=recvOnly}
> > >
> > > Because, appareantly neither of this ways is correct.
> > >
> > > thanks in advance
> >
> > --
> > Micael Karlberg Ericsson AB, Älvsjö Sweden
> > Tel: +46 8 727 5668 EAB/UHK/KD - OTP Product Development
> > ECN: 851 5668 Mail: micael.karlberg@REDACTED
> > Fax: +46 8 727 5775
> >
--
Micael Karlberg Ericsson AB, Älvsjö Sweden
Tel: +46 8 727 5668 EAB/UHK/KD - OTP Product Development
ECN: 851 5668 Mail: micael.karlberg@REDACTED
Fax: +46 8 727 5775
More information about the erlang-questions
mailing list