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

Change mrcp_server to not store handler on registrar #26

Open
MayamaTakeshi opened this issue Feb 13, 2021 · 1 comment
Open

Change mrcp_server to not store handler on registrar #26

MayamaTakeshi opened this issue Feb 13, 2021 · 1 comment

Comments

@MayamaTakeshi
Copy link
Owner

In the current code, when mrcp_server gets SESSION_CREATED, it instantiates a resource handler and stores it in the call in the registrar.
However, reading:
https://nact.io/en_uk/lesson/javascript/hierarchy
this is not necessary:
we just need to create the resource handler passing the uuid as its name and when an MRCP message with that uuid arrives we can check if there is a children using that name and if yes, relay the message to it.

@MayamaTakeshi
Copy link
Owner Author

I tried to do this change. but ctx.children.has(uuid) is returning false when the handler exists as child of mrcp_server:

new handler
ActorReference {
  path: ActorPath {
    system: 'cnkqt9-169c4g8-1l3rilx-1cwbn3x',
    parts: [ 'mrcp_server', 'cf148e7a-6eda-4077-930f-10d2a3fdbdc9' ]
  },
  name: 'cf148e7a-6eda-4077-930f-10d2a3fdbdc9',
  parent: ActorReference {
    path: ActorPath {
      system: 'cnkqt9-169c4g8-1l3rilx-1cwbn3x',
      parts: [Array]
    },
    name: 'mrcp_server',
    parent: ActorSystemReference {
      path: [ActorPath],
      system: [Object],
      name: 'cnkqt9-169c4g8-1l3rilx-1cwbn3x',
      type: 'system'
    },
    system: { name: 'cnkqt9-169c4g8-1l3rilx-1cwbn3x' },
    type: 'actor'
  },
  system: { name: 'cnkqt9-169c4g8-1l3rilx-1cwbn3x' },
  type: 'actor'
}
2021-02-14 12:13:09.915 error: cf148e7a-6eda-4077-930f-10d2a3fdbdc9 (mrcp_server.js:86) setting handler for speechsynth
2021-02-14 12:13:09.915 info: cf148e7a-6eda-4077-930f-10d2a3fdbdc9 (mrcp_server.js:91) sending SESSION_CREATED_ACK to {"path":{"system":"cnkqt9-169c4g8-1l3rilx-1cwbn3x","parts":["sip_server"]},"name":"sip_server
","parent":{"path":{"system":"cnkqt9-169c4g8-1l3rilx-1cwbn3x","parts":[]},"system":{"name":"cnkqt9-169c4g8-1l3rilx-1cwbn3x"},"name":"cnkqt9-169c4g8-1l3rilx-1cwbn3x","type":"system"},"system":{"name":"cnkqt9-169c
4g8-1l3rilx-1cwbn3x"},"type":"actor"}
2021-02-14 12:13:09.916 info: cf148e7a-6eda-4077-930f-10d2a3fdbdc9 (speechsynther.js:28) got START
2021-02-14 12:13:09.916 info: sip_server (sip_server.js:212) got SESSION_CREATED_ACK
2021-02-14 12:13:09.916 info: cf148e7a-6eda-4077-930f-10d2a3fdbdc9 (sip_server.js:314) INVITE for speechsynth accepted with 200 OK
2021-02-14 12:13:09.921 info: cf148e7a-6eda-4077-930f-10d2a3fdbdc9 (sip_server.js:162) got SIP request ACK
2021-02-14 12:13:09.923 warning: cf148e7a-6eda-4077-930f-10d2a3fdbdc9 (mrcp_server.js:45) got unexpected MRCP message {"type":"request","version":"2.0","method":"SPEAK","request_id":1,"headers":{"channel-identif
ier":"cf148e7a-6eda-4077-930f-10d2a3fdbdc9@speechsynth","content-type":"text/plain","speech-language":"dtmf","voice-name":"dtmf","content-length":"16"},"body":"1234567890abcd*#","uuid":"cf148e7a-6eda-4077-930f-1
0d2a3fdbdc9"} for unknown uuid=cf148e7a-6eda-4077-930f-10d2a3fdbdc9

So I will put this on hold.

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

1 participant