Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for MRCP related parameters #90

Open
MayamaTakeshi opened this issue Feb 21, 2020 · 1 comment
Open

Support for MRCP related parameters #90

MayamaTakeshi opened this issue Feb 21, 2020 · 1 comment

Comments

@MayamaTakeshi
Copy link

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' ?

@hyavari
Copy link

hyavari commented Sep 12, 2023

This has been addressed in this request: #100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants