错误:在介质服务器上找不到drachtio_mrf sip配置文件

时间:2017-06-13 11:27:32

标签: node.js sip freeswitch

我正在尝试执行drachtio-fsmrf示例,但是向我显示找不到 drachtio_mrf sip配置文件错误。媒体SIP服务器是freeswitch,我测试了一些具有相同错误的代码examples

完整的错误跟踪是下一个:

/home/ubuntu/my-drachtio-example/node_modules/drachtio-fsmrf/lib/mediaserver.js:117
        if( null === results ) { throw new Error('No drachtio_mrf sip profile found on the media server: ' + status);}
                                 ^

Error: No drachtio_mrf sip profile found on the media server:                      Name    Type                                       Data  State
=================================================================================================
            external-ipv6   profile                   sip:mod_sofia@[::1]:5080  RUNNING (0)
            174.31.10.112     alias                                   internal  ALIASED
                 external   profile           sip:mod_sofia@174.31.10.112:5080  RUNNING (0)
    external::example.com   gateway                    sip:joeuser@example.com  NOREG
            internal-ipv6   profile                   sip:mod_sofia@[::1]:5060  RUNNING (0)
                 internal   profile           sip:mod_sofia@174.31.10.112:5060  RUNNING (0)
=================================================================================================
4 profiles 1 alias

    at MediaServer. (/home/ubuntu/my-drachtio-example/node_modules/drachtio-fsmrf/lib/mediaserver.js:117:40)
    at . (/home/ubuntu/my-drachtio-example/node_modules/modesl/lib/esl/Connection.js:141:16)
    at EventEmitter.emit (/home/ubuntu/my-drachtio-example/node_modules/eventemitter2/lib/eventemitter2.js:339:22)
    at Connection._onEvent (/home/ubuntu/my-drachtio-example/node_modules/modesl/lib/esl/Connection.js:805:10)
    at EventEmitter.emit (/home/ubuntu/my-drachtio-example/node_modules/eventemitter2/lib/eventemitter2.js:339:22)
    at Parser._parseEvent (/home/ubuntu/my-drachtio-example/node_modules/modesl/lib/esl/Parser.js:208:10)
    at Parser._parseBody (/home/ubuntu/my-drachtio-example/node_modules/modesl/lib/esl/Parser.js:100:10)
    at Parser._parseHeaders (/home/ubuntu/my-drachtio-example/node_modules/modesl/lib/esl/Parser.js:76:37)
    at Parser._parseHeaders (/home/ubuntu/my-drachtio-example/node_modules/modesl/lib/esl/Parser.js:84:37)
    at Parser._parseHeaders (/home/ubuntu/my-drachtio-example/node_modules/modesl/lib/esl/Parser.js:84:37)

我遵循了存储库中的自述文件说明,我认为错误可能在于将其设置为drachtio-fs-ansimbre项目。我不知道如何做/应用这一步。

应用代码为:

var app = require('drachtio')() ;
var Mrf = require('drachtio-fsmrf') ;
var mrf = new Mrf(app) ;
var Srf = require('drachtio-srf') ;
var srf = new Srf(app) ;

srf.connect({
  host: '127.0.0.1',
  port: 9022,
  secret: 'cymru',
})
.on('connect', (err, hostport) => { console.log(`connected to drachtio listening on ${hostport}`) ;})
.on('error', (err) => { console.error(`Error connecting to drachtio at ${err || err.message}`) ; }) ;


mrf.connect( {
  address: '127.0.0.1',
  port: 8021,
  secret: 'ClueCon'
}, (ms) => {
  console.log(`connected to media server `);
  // save the media server object as in app locals so it can be retrieved from middleware
  srf.locals.ms = ms ;
}) ;

1 个答案:

答案 0 :(得分:1)

错误已在官方项目存储库https://github.com/davehorton/drachtio-fsmrf/issues/3

的此主题中解决