mgcp: Be able to parse the first osmocom vendor extension
This commit is contained in:
parent
3ec703beb5
commit
be46bf5b35
|
@ -127,7 +127,8 @@ PP.PPCompositeParser subclass: MGCPGrammar [
|
|||
($A asParser, $: asParser, #blank asParser star, self wordParser star flatten) /
|
||||
('ES' asParser, $: asParser, #blank asParser star, self wordParser star flatten) /
|
||||
('PL' asParser, $: asParser, #blank asParser star, self wordParser star flatten) /
|
||||
('MD' asParser, $: asParser, #blank asParser star, self wordParser star flatten)
|
||||
('MD' asParser, $: asParser, #blank asParser star, self wordParser star flatten) /
|
||||
('X-Osmo-CP' asParser, $: asParser, #blank asParser star, self wordParser star flatten)
|
||||
]
|
||||
|
||||
MGCPResponse [
|
||||
|
|
|
@ -90,4 +90,13 @@ PP.PPCompositeParserTest subclass: MGCPGrammarTest [
|
|||
self assert: res first first = '200'.
|
||||
self assert: res first third = '433414656'.
|
||||
]
|
||||
|
||||
testDlcxResponse [
|
||||
| res inp |
|
||||
|
||||
inp := #[50 53 48 32 54 56 51 52 53 53 50 52 52 32 79 75 13 10 80 58 32 80 83 61 49 54 57 44 32 79 83 61 55 54 48 53 44 32 80 82 61 48 44 32 79 82 61 48 44 32 80 76 61 48 44 32 74 73 61 48 13 10 88 45 79 115 109 111 45 67 80 58 32 69 67 32 84 73 83 61 48 44 32 84 79 83 61 48 44 32 84 73 82 61 48 44 32 84 79 82 61 48 13 10].
|
||||
|
||||
res := self parse: inp asString.
|
||||
res inspect.
|
||||
]
|
||||
]
|
||||
|
|
Reference in New Issue