TopologyRequest syntax error
Peter-Henry Mander
erlang@REDACTED
Thu Sep 12 13:31:40 CEST 2002
Hi everyone,
I'm using the Megaco stack in Erlang/OTP reusing the simple MGC and
simple MG code, and I'm having a problem with the TopologyRequest issued
from the Gateway Controller. The Erlang code used to add a
TopologyRequest is included below. The Controller issues the
ActionRequest without complaining, but the Gateway at the other end
gives a syntax error, correctly I believe since the Controller issues
a TopologyRequest within a TopologyRequest, and that doesn't look right
to me!
What am I doing wrong?
Pete.
Controller code:
#'ActionRequest'{
contextId = ContextId,
contextRequest = #'ContextRequest'{
topologyReq = [
#'TopologyRequest'{
terminationFrom = #megaco_term_id{
contains_wildcards = false,
id = ["from"]
},
terminationTo = #megaco_term_id{
contains_wildcards = false,
id = ["to"]
},
topologyDirection = bothway
}
]
},
commandRequests = CommandRequestList
}
Trace of outgoing message from the Controller:
DETAIL LEVEL: 60
LABEL: send trans request #2
FROM: controller
TO: mediaproxy
EVENT_TS: 2002-9-12 11.21.11.802772
TRACE_TS: 2002-9-12 11.21.11.802273
CONTENTS:
MESSAGE:
MEGACO/1 controller
Transaction = 2 {
Context = 4 {
Topology {
Topology {
from,
to,
Bothway
}
},
Modify = 2,
Modify = 3
}
}
Trace of syntax error report from the Gateway
DETAIL LEVEL: 60
LABEL: <ERROR> <ERROR> return: syntax error
FROM: MediaProxy@REDACTED
TO: MediaProxy
EVENT_TS: 2002-9-12 11.21.11.803644
TRACE_TS: 2002-9-12 11.21.11.803317
CONTENTS:
CODE: 400 TEXT:
Syntax error on line 4
{return,reply}
ERROR:
[{reason,{4,megaco_text_parser,["syntax error before: ",["'LBRKT'"]]}},
{token,[{'SafeChars',1,"megaco/1"},
{'SEP',1},
{'SafeChars',1,"controller"},
{'SEP',1},
{'TransToken',1,"transaction"},
{'EQUAL',1},
{'SafeChars',1,"2"},
{'LBRKT',1},
{'CtxToken',2,"context"},
{'EQUAL',2},
{'SafeChars',2,"4"},
{'LBRKT',2},
{'TopologyToken',3,"topology"},
{'LBRKT',3},
{'TopologyToken',4,"topology"},
{'LBRKT',4},
{'SafeChars',5,"from"},
{'COMMA',5},
{'TimeOutToken',6,"to"},
{'COMMA',6},
{'BothwayToken',7,"bothway"},
{'RBRKT',7},
{'RBRKT',8},
{'COMMA',8},
{'ModifyToken',9,"modify"},
{'EQUAL',9},
{'SafeChars',9,"2"},
{'COMMA',9},
{'ModifyToken',10,"modify"},
{'EQUAL',10},
{'SafeChars',10,"3"},
{'RBRKT',10},
{'RBRKT',11},
{endOfMessage,11,endOfMessage}]},
{chars, (deleted for clarity) }]
More information about the erlang-questions
mailing list