callagent: Make sure the callagent name is in lowercase
This commit is contained in:
parent
557986c4f2
commit
41b5e63eae
|
@ -104,7 +104,7 @@ MGCPTrunkBase subclass: MGCPVirtualTrunk [
|
|||
]
|
||||
|
||||
endpointName: aNr [
|
||||
^ '%1@mgw' % {(aNr radix: 16) copyFrom: 4}
|
||||
^ '%1@mgw' % {((aNr radix: 16) copyFrom: 4) asLowercase}
|
||||
]
|
||||
]
|
||||
|
||||
|
@ -127,6 +127,6 @@ MGCPTrunkBase subclass: MGCPDSTrunk [
|
|||
]
|
||||
|
||||
endpointName: aNr [
|
||||
^ 'ds/e1-%1/%2@mgw' % {trunk. (aNr radix: 16) copyFrom: 4}
|
||||
^ 'ds/e1-%1/%2@mgw' % {trunk. ((aNr radix: 16) copyFrom: 4) asLowercase}
|
||||
]
|
||||
]
|
||||
|
|
|
@ -58,6 +58,15 @@ TestCase subclass: MGCPCommandTest [
|
|||
self assert: crcx asDatagram = self exampleCRCX.
|
||||
]
|
||||
|
||||
testEndPointName [
|
||||
| trunk |
|
||||
trunk := MGCPDSTrunk createWithDest: '0.0.0.0' trunkNr: 1.
|
||||
|
||||
"I test the endpoint name on hex part.."
|
||||
self assert: (MGCPVirtualTrunk new endpointName: 16rA) = 'a@mgw'.
|
||||
self assert: (trunk endpointName: 16rA) = 'ds/e1-1/a@mgw'.
|
||||
]
|
||||
|
||||
tearDown [
|
||||
self callagent stop.
|
||||
]
|
||||
|
|
Reference in New Issue