Open
Description
Hi,
currently this parser marks MRCP related parameters as invalid:
SDP in SIP INVITE:
$ cat sdp_mrcp_request.js
const sdpTransform = require('sdp-transform');
const sdpStr = "v=0\r\n\
o=FreeSWITCH 5772550679930491611 4608916746797952899 IN IP4 192.168.88.74\r\n\
s=-\r\n\
c=IN IP4 192.168.88.74\r\n\
t=0 0\r\n\
m=application 9 TCP/MRCPv2 1\r\n\
a=setup:active\r\n\
a=connection:new\r\n\
a=resource:speechsynth\r\n\
a=cmid:1\r\n\
m=audio 14238 RTP/AVP 0 8 96\r\n\
a=rtpmap:0 PCMU/8000\r\n\
a=rtpmap:8 PCMA/8000\r\n\
a=rtpmap:96 L16/8000\r\n\
a=recvonly\r\n\
a=mid:1\r\n\
";
const res = sdpTransform.parse(sdpStr);
console.log(res)
console.log("media[0].invalid:")
console.log(res.media[0].invalid)
$ node sdp_mrcp_request.js
{ version: 0,
origin:
{ username: 'FreeSWITCH',
sessionId: '5772550679930491611',
sessionVersion: '4608916746797952899',
netType: 'IN',
ipVer: 4,
address: '192.168.88.74' },
name: '-',
connection: { version: 4, ip: '192.168.88.74' },
timing: { start: 0, stop: 0 },
media:
[ { rtp: [],
fmtp: [],
type: 'application',
port: 9,
protocol: 'TCP/MRCPv2',
payloads: 1,
setup: 'active',
connectionType: 'new',
invalid: [Array] },
{ rtp: [Array],
fmtp: [],
type: 'audio',
port: 14238,
protocol: 'RTP/AVP',
payloads: '0 8 96',
direction: 'recvonly',
mid: 1 } ] }
media[0].invalid:
[ { value: 'resource:speechsynth' }, { value: 'cmid:1' } ]
SDP in SIP Response:
$ cat sdp_mrcp_response.js
const sdpTransform = require('sdp-transform');
const sdpStr = "v=0\r\n\
o=UniMRCPServer 1212606071011504954 4868540303632141964 IN IP4 192.168.88.136\r\n\
s=-\r\n\
c=IN IP4 192.168.88.136\r\n\
t=0 0\r\n\
m=application 1544 TCP/MRCPv2 1\r\n\
a=setup:passive\r\n\
a=connection:new\r\n\
a=channel:1228fd00945a4963@speechsynth\r\n\
a=cmid:1\r\n\
m=audio 5860 RTP/AVP 0\r\n\
a=rtpmap:0 PCMU/8000\r\n\
a=sendonly\r\n\
a=mid:1\r\n\
";
const res = sdpTransform.parse(sdpStr);
console.log(res)
console.log("media[0].invalid:")
console.log(res.media[0].invalid)
$ node sdp_mrcp_response.js
{ version: 0,
origin:
{ username: 'UniMRCPServer',
sessionId: '1212606071011504954',
sessionVersion: '4868540303632141964',
netType: 'IN',
ipVer: 4,
address: '192.168.88.136' },
name: '-',
connection: { version: 4, ip: '192.168.88.136' },
timing: { start: 0, stop: 0 },
media:
[ { rtp: [],
fmtp: [],
type: 'application',
port: 1544,
protocol: 'TCP/MRCPv2',
payloads: 1,
setup: 'passive',
connectionType: 'new',
invalid: [Array] },
{ rtp: [Array],
fmtp: [],
type: 'audio',
port: 5860,
protocol: 'RTP/AVP',
payloads: 0,
direction: 'sendonly',
mid: 1 } ] }
media[0].invalid:
[ { value: 'channel:1228fd00945a4963@speechsynth' },
{ value: 'cmid:1' } ]
Would it be possible to add support for parameters 'resource', 'channel' and 'cmid' ?
Metadata
Metadata
Assignees
Labels
No labels