smalltalk
/
osmo-st-sip
Archived
1
0
Fork 0

grammar: StatusCode 101 is not part of the spec but used by linphone

The spec says that anything between 101-199 can be used as a response
to a INVITE to create an early dialog.
This commit is contained in:
Holger Hans Peter Freyther 2012-08-05 09:47:52 +02:00
parent 536891d433
commit b5c4ac5631
2 changed files with 12 additions and 1 deletions

View File

@ -1,5 +1,5 @@
"
(C) 2011 by Holger Hans Peter Freyther
(C) 2011-2012 by Holger Hans Peter Freyther
All Rights Reserved
This program is free software: you can redistribute it and/or modify
@ -238,6 +238,7 @@ PP.PPCompositeParser subclass: SIPGrammar [
<category: 'response'>
"Combined into one..."
^ '100' asParser / "Trying"
'101' asParser / "Early Dialog.. of Linphone"
'180' asParser / "Ringing"
'181' asParser / "Call Is Being Forwarded"
'182' asParser / "Queued"

View File

@ -297,4 +297,14 @@ PP.PPCompositeParserTest subclass: SIPGrammarTest [
res := self parse: data asString.
]
testEarlyDialogResponse [
| data res |
"Responses from 101 to 199 on INVITE create an early dialog. Mostly
a statement that someting is in progress.."
data := #(83 73 80 47 50 46 48 32 49 48 49 32 68 105 97 108 111 103 32 69 115 116 97 98 108 105 115 104 101 109 101 110 116 13 10 86 105 97 58 32 83 73 80 47 50 46 48 47 85 68 80 32 48 46 48 46 48 46 48 58 53 48 54 54 59 98 114 97 110 99 104 61 122 57 104 71 52 98 75 77 122 85 121 77 84 89 119 78 84 73 120 78 83 119 120 78 84 99 49 59 114 101 99 101 105 118 101 100 61 49 50 55 46 48 46 48 46 49 13 10 70 114 111 109 58 32 60 115 105 112 58 49 48 48 48 64 115 105 112 46 122 101 99 107 101 46 111 115 109 111 99 111 109 46 111 114 103 62 59 116 97 103 61 77 122 85 121 77 84 89 120 77 106 81 120 78 84 77 52 78 84 103 121 78 68 65 53 78 84 73 95 13 10 84 111 58 32 60 115 105 112 58 49 50 51 52 53 54 64 49 50 55 46 48 46 48 46 49 62 59 116 97 103 61 51 56 54 53 51 48 57 51 52 13 10 67 97 108 108 45 73 68 58 32 77 84 103 121 77 106 107 48 77 68 69 49 79 81 95 95 64 115 97 110 109 105 110 103 122 101 13 10 67 83 101 113 58 32 49 32 73 78 86 73 84 69 13 10 67 111 110 116 97 99 116 58 32 60 115 105 112 58 49 50 51 52 53 54 64 49 57 50 46 49 54 56 46 50 46 50 51 57 58 53 48 54 48 62 13 10 85 115 101 114 45 65 103 101 110 116 58 32 76 105 110 112 104 111 110 101 47 51 46 52 46 51 32 40 101 88 111 115 105 112 50 47 51 46 54 46 48 41 13 10 67 111 110 116 101 110 116 45 76 101 110 103 116 104 58 32 48 13 10 13 10 ) asByteArray.
res := self parse: data asString.
]
]