can not resolve dns
Why is there no documentation to explain? How are the sip server settings? sip or pjsip or doesn't matter And... After executing the command sudo docker run --restart=always --name=matrix-sip-bridge --env="MX_HOMESERVER=https://mychat.ir" --env="MX_ACCESSTOKE N=syt_cmV6YQ_OWmLylOqABhYikFepuRd_12PuE2" --env="MX_USERID=@reza:mychat.ir" --env="MX_ROOMID=!vuQeHmpLjjSBMzgBWW:mychat.ir" --env="SIP _SERVER=ws://voip.my.com:8088/ws" --env="SIP_URI=sip:[email protected]" --env="SIP_USER=1001" --env="SIP_PASSWORD=1234" --env="DEBUG=*" indeedn otjames/matrix-sip-bridge:edge
The following log was printed for me And the Element client is not calling either
yarn run v1.22.19
$ node --experimental-specifier-resolution=node dist/index.js
(node:29) ExperimentalWarning: The Node.js specifier resolution flag is experimental. It could change or be removed at any time.
(Use node --trace-warnings ... to show where the warning was created)
Fetching new TURN credentials
Getting saved sync token...
Getting push rules...
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | Configuration:
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · allowLegacyNotifications: false
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · authorizationHa1: ""
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · authorizationPassword: NOT SHOWN
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · authorizationUsername: "1001"
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · autoStart: false
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · autoStop: true
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · delegate: {}
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · contactName: ""
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · contactParams: {"transport":"ws"}
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · displayName: ""
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · forceRport: false
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · hackAllowUnregisteredOptionTags: false
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · hackIpInContact: false
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · hackViaTcp: false
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · logBuiltinEnabled: true
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · logConfiguration: true [346/1860]
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · logConnector: undefined
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · logLevel: "log"
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · noAnswerTimeout: 60
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · preloadedRouteSet: []
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · reconnectionAttempts: 0
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · reconnectionDelay: 4
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · sendInitialProvisionalResponse: true
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · sessionDescriptionHandlerFactory: (session, options) => {
// provide a default media stream factory if need be
if (mediaStreamFactory === undefined) {
mediaStreamFactory = defaultMediaStreamFactory();
}
// make sure we allow 0 to be passed in so timeout can be disabled
const iceGatheringTimeout = (options === null || options === void 0 ? void 0 : options.iceGatheringTimeout) !== undefined ? options ===
null || options === void 0 ? void 0 : options.iceGatheringTimeout : 5000;
// merge passed factory options into default session description configuration
const sessionDescriptionHandlerConfiguration = {
iceGatheringTimeout,
peerConnectionConfiguration: Object.assign(Object.assign({}, defaultPeerConnectionConfiguration()), options === null || options ===
void 0 ? void 0 : options.peerConnectionConfiguration)
};
const logger = session.userAgent.getLogger("sip.SessionDescriptionHandler");
return new SessionDescriptionHandler(logger, mediaStreamFactory, sessionDescriptionHandlerConfiguration);
}
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · sessionDescriptionHandlerFactoryOptions: {}
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · sipExtension100rel: "Unsupported"
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · sipExtensionReplaces: "Unsupported"
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · sipExtensionExtraSupported: []
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · sipjsId: "2grht"
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · transportConstructor: Transport
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · transportOptions: {"server":"ws://voip.my.com:8088/ws"}
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · uri: sip:[email protected]
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · userAgentString: "SIP.js/0.20.0"
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | · viaHost: "gie8jc9kf9gb.invalid"
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.SimpleUser | [Anonymous] Connecting UserAgent...
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | Starting sip:[email protected]
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.UserAgent | Transitioned from Stopped to Started
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.Transport | Connecting ws://voip.my.com:8088/ws
Sun Dec 22 2024 04:35:26 GMT+0000 (Coordinated Universal Time) | sip.Transport | Transitioned from Disconnected to Connecting
Got saved sync token
Getting saved sync...
Got reply from saved sync, exists? false
Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Transport | WebSocket opened ws://voip.my.com:8088/ws Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Transport | Transitioned from Connecting to Connected Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.SimpleUser | [Anonymous] Connected Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.SimpleUser | [Anonymous] Registering UserAgent... Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Registerer | Configuration: Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Registerer | · expires: 600 Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Registerer | · extraContactHeaderParams: [] Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Registerer | · extraHeaders: [] Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Registerer | · logConfiguration: true Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Registerer | · instanceId: "" Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Registerer | · params: {} Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Registerer | · regId: 0 Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Registerer | · registrar: sip:voip.my.com Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Registerer | · refreshFrequency: 99 Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Registerer | Waiting toggled to true Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Transport | Sending WebSocket message:
REGISTER sip:voip.my.com SIP/2.0 Via: SIP/2.0/WS gie8jc9kf9gb.invalid;branch=z9hG4bK8696621 To: sip:[email protected] From: sip:[email protected];tag=4s52atmkcl CSeq: 2 REGISTER Call-ID: 2grhtsdt94gme481gd65 Max-Forwards: 70 Contact: sip:[email protected];transport=ws;expires=600 Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER Supported: outbound, path, gruu User-Agent: SIP.js/0.20.0 Content-Length: 0
Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Transport | Received WebSocket text message:
SIP/2.0 401 Unauthorized Via: SIP/2.0/WS gie8jc9kf9gb.invalid;branch=z9hG4bK8696621;received=192.168.1.90 From: sip:[email protected];tag=4s52atmkcl To: sip:[email protected];tag=as199be68c Call-ID: 2grhtsdt94gme481gd65 CSeq: 2 REGISTER Server: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="1e1871a3" Content-Length: 0
Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Transport | Sending WebSocket message:
REGISTER sip:voip.my.com SIP/2.0 Via: SIP/2.0/WS gie8jc9kf9gb.invalid;branch=z9hG4bK9788643 To: sip:[email protected] From: sip:[email protected];tag=4s52atmkcl CSeq: 3 REGISTER Call-ID: 2grhtsdt94gme481gd65 Max-Forwards: 70 Authorization: Digest algorithm=MD5, username="1001", realm="asterisk", nonce="1e1871a3", uri="sip:voip.my.com", response="4b864174e9757f559f6f cff25d2eb4e2" Contact: sip:[email protected];transport=ws;expires=600 Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER Supported: outbound, path, gruu User-Agent: SIP.js/0.20.0 Content-Length: 0
Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Transport | Received WebSocket text message:
OPTIONS sip:[email protected];transport=ws SIP/2.0 Via: SIP/2.0/WS 192.168.1.95:5060;branch=z9hG4bK1b3efe92 Max-Forwards: 70 From: "asterisk" sip:[email protected];tag=as4e9473cb To: sip:[email protected];transport=ws Contact: sip:[email protected]:5060;transport=ws Call-ID: [email protected]:5060 CSeq: 102 OPTIONS User-Agent: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2 Date: Thu, 02 Jan 2025 05:49:44 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Content-Length: 0 Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Transport | Sending WebSocket message:
SIP/2.0 200 OK Via: SIP/2.0/WS 192.168.1.95:5060;branch=z9hG4bK1b3efe92 From: "asterisk" sip:[email protected];tag=as4e9473cb To: sip:[email protected];transport=ws;tag=mpcc8r9nfk CSeq: 102 OPTIONS Call-ID: [email protected]:5060 Supported: outbound User-Agent: SIP.js/0.20.0 Allow: ACK,BYE,CANCEL,INFO,INVITE,MESSAGE,NOTIFY,OPTIONS,PRACK,REFER,REGISTER,SUBSCRIBE Accept: application/sdp,application/dtmf-relay Content-Length: 0
Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Transport | Received WebSocket text message:
SIP/2.0 200 OK Via: SIP/2.0/WS gie8jc9kf9gb.invalid;branch=z9hG4bK9788643;received=192.168.1.90 From: sip:[email protected];tag=4s52atmkcl To: sip:[email protected];tag=as199be68c Call-ID: 2grhtsdt94gme481gd65 CSeq: 3 REGISTER Server: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Expires: 600 Contact: sip:[email protected];transport=ws;expires=600 Date: Thu, 02 Jan 2025 05:49:44 GMT Content-Length: 0
Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Registerer | Registration transitioned to state Registered [184/1860]
Sun Dec 22 2024 04:35:27 GMT+0000 (Coordinated Universal Time) | sip.Registerer | Waiting toggled to false
Waiting for saved sync before retrying push rules...
Getting push rules failed Error: Error parsing server response: SyntaxError: Unexpected token < in JSON at position 0
at /app/node_modules/matrix-js-sdk/lib/http-api.js:792:15
at Request._callback (/app/node_modules/matrix-js-sdk/lib/http-api.js:719:9)
at Request.self.callback (/app/node_modules/request/request.js:185:22)
at Request.emit (node:events:527:28)
at Request.
INVITE sip:[email protected];transport=ws SIP/2.0 Via: SIP/2.0/WS 192.168.1.95:5060;branch=z9hG4bK27e5e9c3;rport Max-Forwards: 70 From: "1002" sip:[email protected];tag=as708bf0da To: sip:[email protected];transport=ws Contact: sip:[email protected]:5060;transport=ws Call-ID: [email protected]:5060 CSeq: 102 INVITE User-Agent: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2 Date: Thu, 02 Jan 2025 05:50:08 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Content-Type: application/sdp Content-Length: 284
v=0 o=root 57603836 57603836 IN IP4 192.168.1.95 s=Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2 c=IN IP4 192.168.1.95 t=0 0 m=audio 18684 RTP/AVP 0 8 105 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:105 telephone-event/8000 a=fmtp:105 0-16 a=maxptime:150 a=sendrecv
Sun Dec 22 2024 04:35:50 GMT+0000 (Coordinated Universal Time) | sip.Transport | Sending WebSocket message:
SIP/2.0 100 Trying Via: SIP/2.0/WS 192.168.1.95:5060;branch=z9hG4bK27e5e9c3;rport From: "1002" sip:[email protected];tag=as708bf0da To: sip:[email protected];transport=ws CSeq: 102 INVITE Call-ID: [email protected]:5060 Supported: outbound User-Agent: SIP.js/0.20.0 Content-Length: 0
Sun Dec 22 2024 04:35:50 GMT+0000 (Coordinated Universal Time) | sip.Invitation | Invitation.progress Sun Dec 22 2024 04:35:50 GMT+0000 (Coordinated Universal Time) | sip.invite-dialog | INVITE dialog [email protected] :5060s6sfpdd5faas708bf0da constructed Sun Dec 22 2024 04:35:50 GMT+0000 (Coordinated Universal Time) | sip.Transport | Sending WebSocket message:
SIP/2.0 180 Ringing Via: SIP/2.0/WS 192.168.1.95:5060;branch=z9hG4bK27e5e9c3;rport From: "1002" sip:[email protected];tag=as708bf0da To: sip:[email protected];transport=ws;tag=s6sfpdd5fa CSeq: 102 INVITE Call-ID: [email protected]:5060 Supported: outbound User-Agent: SIP.js/0.20.0 Contact: sip:[email protected];transport=ws Content-Length: 0
Sun Dec 22 2024 04:35:50 GMT+0000 (Coordinated Universal Time) | sip.SimpleUser | [Anonymous] Received INVITE [96/1860]
Fetching new TURN credentials
Failed to get TURN URIs Error: Error parsing server response: SyntaxError: Unexpected token < in JSON at position 0
at /app/node_modules/matrix-js-sdk/lib/http-api.js:792:15
at Request._callback (/app/node_modules/matrix-js-sdk/lib/http-api.js:719:9)
at Request.self.callback (/app/node_modules/request/request.js:185:22)
at Request.emit (node:events:527:28)
at Request.
at parseErrorResponse (/app/node_modules/matrix-js-sdk/lib/http-api.js:841:11) [10/1860]
at /app/node_modules/matrix-js-sdk/lib/http-api.js:787:17
at Request._callback (/app/node_modules/matrix-js-sdk/lib/http-api.js:719:9)
at Request.self.callback (/app/node_modules/request/request.js:185:22)
at Request.emit (node:events:527:28)
at Request.
And the log it displays in Asterisk My Asterisk version is 18
== Using SIP RTP CoS mark 5 > 0x7f79e0025460 -- Strict RTP learning after remote address set to: 192.168.1.112:7078 -- Executing [1001@internal:1] Dial("SIP/1002-00000043", "SIP/1001") in new stack == Using SIP RTP CoS mark 5 [Dec 31 03:38:02] ERROR[4172][C-00000024]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo("bhcbnisn8gci.invalid", "(null)", ...): Temporary failure in name resolution [Dec 31 03:38:02] WARNING[4172][C-00000024]: chan_sip.c:16937 __set_address_from_contact: Invalid host name in Contact: (can't resolve in DNS) : 'bhcbnisn8gci.invalid' [Dec 31 03:38:02] ERROR[4172][C-00000024]: netsock2.c:96 ast_sockaddr_stringify_fmt: getnameinfo(): ai_family not supported -- Called SIP/1001 -- SIP/1001-00000044 is ringing -- Registered SIP '1002' at 192.168.1.90:45618 > Saved useragent "SIP.js/0.20.0" for peer 1002