mscdex / sipster

A pjsip/pjsua2 binding for node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

strange error

glebpavlov opened this issue · comments

var sipster = require('sipster');
sipster.init();
var transport = new sipster.Transport({ port: 5060 });
var acct = new sipster.Account({
idUri: 'sip:102@192.168.88.173',
regConfig: {
registrarUri: 'sip:192.168.88.173'
,timeoutSec: 300
},
sipConfig: {
authCreds: [{
scheme: 'digest',
realm: '*',
username: '102',
dataType: 0, // plain text password
data: '102'
}]
}
});
sipster.start();
var out_call = acct.makeCall("sip:100@192.168.88.173");

log:

12:25:53.980 os_core_unix.c !pjlib 2.4.5 for POSIX initialized
12:25:53.981 sip_endpoint.c .Creating endpoint instance...
12:25:53.982 pjlib .select() I/O Queue created (0x22d0ab0)
12:25:53.982 sip_endpoint.c .Module "mod-msg-print" registered
12:25:53.982 sip_transport. .Transport manager created.
12:25:53.982 pjsua_core.c .PJSUA state changed: NULL --> CREATED
12:25:53.982 sip_endpoint.c .Module "mod-pjsua-log" registered
12:25:53.982 sip_endpoint.c .Module "mod-tsx-layer" registered
12:25:53.982 sip_endpoint.c .Module "mod-stateful-util" registered
12:25:53.982 sip_endpoint.c .Module "mod-ua" registered
12:25:53.982 sip_endpoint.c .Module "mod-100rel" registered
12:25:53.982 sip_endpoint.c .Module "mod-pjsua" registered
12:25:53.982 sip_endpoint.c .Module "mod-invite" registered
12:25:54.040 pa_dev.c ..PortAudio sound library initialized, status=0
12:25:54.040 pa_dev.c ..PortAudio host api count=2
12:25:54.040 pa_dev.c ..Sound device count=11
12:25:54.041 pjlib ..select() I/O Queue created (0x22fa6a4)
12:25:54.066 sip_endpoint.c .Module "mod-evsub" registered
12:25:54.066 sip_endpoint.c .Module "mod-presence" registered
12:25:54.066 sip_endpoint.c .Module "mod-mwi" registered
12:25:54.066 sip_endpoint.c .Module "mod-refer" registered
12:25:54.066 sip_endpoint.c .Module "mod-pjsua-pres" registered
12:25:54.066 sip_endpoint.c .Module "mod-pjsua-im" registered
12:25:54.066 sip_endpoint.c .Module "mod-pjsua-options" registered
12:25:54.067 pjsua_core.c .1 SIP worker threads created
12:25:54.067 pjsua_core.c .pjsua version 2.4.5 for Linux-4.4.24/armv7l/glibc-2.19 initialized
12:25:54.067 pjsua_core.c .PJSUA state changed: CREATED --> INIT
12:25:54.067 pjsua_aud.c Set sound device: capture=-1, playback=9
12:25:54.067 pjsua_aud.c .Opening sound device PCM@16000/1/20ms
12:25:54.075 ec0x22f8898 ..AEC created, clock_rate=16000, channel=1, samples per frame=320, tail length=200 ms, latency=0 ms
12:25:54.077 pjsua_aud.c Set sound device: capture=9, playback=9
12:25:54.077 pjsua_aud.c ..Closing default sound playback device and Dummy: Dummy PCM (hw:1,0) sound capture device
12:25:54.109 pjsua_aud.c .Opening sound device PCM@16000/1/20ms
12:25:54.122 ec0x230a600 ..AEC created, clock_rate=16000, channel=1, samples per frame=320, tail length=200 ms, latency=0 ms
12:25:54.124 pjsua_core.c SIP UDP socket reachable at 192.168.88.174:5060
12:25:54.124 udp0x2348530 SIP UDP transport started, published address is 192.168.88.174:5060
12:25:54.125 pjsua_acc.c Adding account: id=sip:102@192.168.88.173
12:25:54.125 pjsua_acc.c .Account sip:102@192.168.88.173 added with id 0
12:25:54.126 pjsua_core.c PJSUA state changed: INIT --> STARTING
12:25:54.126 sip_endpoint.c .Module "mod-unsolicited-mwi" registered
12:25:54.126 pjsua_core.c .PJSUA state changed: STARTING --> RUNNING
12:25:54.127 pjsua_call.c Making call with acc #0 to sip:100@192.168.88.173
node: ../src/pjsua-lib/pjsua_core.c:2701: pjsua_init_tpselector: Assertion `tp_id >= 0 && tp_id < (int)(sizeof(pjsua_var.tpdata)/sizeof(pjsua_var.tpdata[0]))' failed.

and

var sipster = require('sipster');
sipster.init();
var transport = new sipster.Transport({ port: 5060 });
var acct = new sipster.Account({
idUri: 'sip:102@192.168.88.173',
regConfig: {
registrarUri: 'sip:192.168.88.173'
,timeoutSec: 300
},
sipConfig: {
authCreds: [{
scheme: 'digest',
realm: '*',
username: '102',
dataType: 0, // plain text password
data: '102'
}]
}
});
sipster.start();
acct.makeCall("sip:100@192.168.88.173");

NOT ERROR

makeCall() isn't really tested at all. The primary motivation behind this module was for UAS (acting as a SIP trunk) scenarios.