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

Execution can not start , refuse to connect. #7

Open
awadheshkumarconsta opened this issue May 27, 2020 · 11 comments
Open

Execution can not start , refuse to connect. #7

awadheshkumarconsta opened this issue May 27, 2020 · 11 comments

Comments

@awadheshkumarconsta
Copy link

awadheshkumarconsta commented May 27, 2020

drachtio config and rtpengine config | both are running in the same server and when I start to run this program getting error. ERROR, I know this is related to the port issue but I want to know how to solve it because when I change the port in rtpengine and start the service and then run this program it always gives me the same error.
drachtio-rtpengine-webrtcproxy config file

{
  "drachtio": {
    "host": "127.0.0.1",
    "port": 9022,
    "secret": "cymru"
  }, 
  "rtpengine": {
    "host": "127.0.0.1",
    "port": 22222,
    "local-port": 2223
  },
  "credentials": [
    {
      "trunk": "my.voipprovider.com",
      "auth": {
        "username": "<yourusername>",
        "password": "<yourpassword>"  
      }
    }
  ]
}
@davehorton
Copy link
Collaborator

The problem is you moved rtpengine to listen for traffic on port 2223 instead of its default port 22222:

listen-ng = 127.0.0.1:2223

You then configured your node.js application to also try to listen on that same port, which of course fails.

Leave your drachtio config file unchanged, and modify your rtpengine config to listen for ng traffic on port 2222. Again this is the default, and you caused your problems by changing this unnecessarily.

@awadheshkumarconsta
Copy link
Author

Thanks for your feedback.
After moving the ng traffic on 2222, Good to see it's working.
Now I'm facing another issue when I make a call which comes like

{"level":30,"time":1590591154502,"msg":"Error connecting call: Error: failed allocating endpoint from rtpengine: {\"result\":\"error\",\"error-reason\":\"Ran out of ports\"}","pid":11761,"hostname":"ip-172-31-38-128","v":1}

@davehorton
Copy link
Collaborator

rtpengine is saying it ran out of ports, which is strange since it is configured to have a range of 10,000 ports. Look in /var/log/syslog for more logging from rtpengine to see if you can figure out why. Also try restarting rtpengine and running your tests again

@awadheshkumarconsta
Copy link
Author

As you told I did the same, now “ran out of the port issue is solved”, restart the rtpengine, and tried to call. It seems like the call is going but I haven’t rec. any call.

drachtio log
system log
drachtio-rtpengine-webrtcproxy console log1

SIP client console log2

@davehorton
Copy link
Collaborator

turn drachtio server log level to debug, run the node.js app with DEBUG=drachtio:* and re-do your test. Seems like some bit of configuration between the app and the server is off

@awadheshkumarconsta
Copy link
Author

Thank you for responding!
I run the node app as you said and I've gathered some logs:
some of log lines from drachtio log, Can this be causing the issue?

tport_type_ws.c:541 tport_ws_deinit_secondary() 0x7ff74dcdc010 destroy wss transport 0x7ff74dcdc200

processMessageStatelessly - incoming message with call-id kjee9totqi68ttahp297 does not match an existing call leg, processed in thread 140700172697088

--Full Log List--
RTP Engine from syslog:
Drachtio Server Log:
App Console Log1:
App Console Log2:

@davehorton
Copy link
Collaborator

Your problem is with your rtpengine config. Specifically this

interface = 34.200.127.219

I can see from the drachtio logs that that address is not a local address on the server. So then, rtpengine has no ports and gives an error:

rtpengine[940]: ERR: [kjee9g4d8oigfhbt84ed]: Failed to get 2 consecutive ports on interface 34.200.127.219 for media relay (last error: Cannot assign requested address)

That address is a public address assigned to the VM, but is not explictly bound to an interface. Change your rtpengine config to this and it will probably work

interface = 172.31.38.128!34.200.127.219

@awadheshkumarconsta
Copy link
Author

Hi Dave and thanks for responding.
Now outgoing calls are working but I can't hear the one-sided voice in my sip client. eg- A->B is working but B->A voice is not coming. As well as When I make a call to my SIP client, the call can't come in my SIP client.

This is this log file of drachtio.
drachtio.log

@davehorton
Copy link
Collaborator

you should get a network trace and study it to see if you are receiving RTP on the B leg

@awadheshkumarconsta
Copy link
Author

awadheshkumarconsta commented Jun 2, 2020

Hi Dave, I have checked, I think we haven't rec the RTP.

Jun  2 14:43:13 ip-172-31-38-128 rtpengine[18284]: INFO: [nln0314q7p2787d7ming]: Closing call due to timeout
Jun  2 14:43:13 ip-172-31-38-128 rtpengine[18284]: INFO: [nln0314q7p2787d7ming]: Final packet stats:
Jun  2 14:43:13 ip-172-31-38-128 rtpengine[18284]: INFO: [nln0314q7p2787d7ming]: --- Tag 'cqttvb8bch', created 1:51 ago for branch '', in dialogue with 'as4b925c14'
Jun  2 14:43:13 ip-172-31-38-128 rtpengine[18284]: INFO: [nln0314q7p2787d7ming]: ------ Media #1 (audio over UDP/TLS/RTP/SAVPF) using **unknown codec**
Jun  2 14:43:13 ip-172-31-38-128 rtpengine[18284]: INFO: [nln0314q7p2787d7ming]: --------- Port       127.0.0.1:30158 <>    27.62.161.65:4931 , SSRC 0, 0 p, 0 b, 0 e, 111 ts
Jun  2 14:43:13 ip-172-31-38-128 rtpengine[18284]: INFO: [nln0314q7p2787d7ming]: --- Tag 'as4b925c14', created 1:51 ago for branch '', in dialogue with 'cqttvb8bch'
Jun  2 14:43:13 ip-172-31-38-128 rtpengine[18284]: INFO: [nln0314q7p2787d7ming]: ------ Media #1 (audio over RTP/AVP) using **unknown codec**
Jun  2 14:43:13 ip-172-31-38-128 rtpengine[18284]: INFO: [nln0314q7p2787d7ming]: --------- Port       127.0.0.1:30140 <>   74.120.80.132:14922, SSRC 0, 0 p, 0 b, 0 e, 111 ts
Jun  2 14:43:13 ip-172-31-38-128 rtpengine[18284]: INFO: [nln0314q7p2787d7ming]: --------- Port       127.0.0.1:30141 <>   74.120.80.132:14923 (RTCP), SSRC 0, 0 p, 0 b, 0 e, 111 ts

---full system log---
systemlog.txt

and also in drachtio log I have noticed some lines--
These types of things are common or not? basically server automatically sends invite request eg.sip:4001@34.200.127.219 which is not by my side (without using any SIP client) and gives Not Found error.

drachtio:agent tokens: ["ed80abca-67f0-49bc-a5b3-e8b4f09910bc","sip","network","714","udp","37.49.230.93","65033","12:51:40.347547","999df9d3-c648-4714-a457-1a48b0d2af9d","","172.31.38.128","5060",""] +3s
 drachtio:agent DrachtioAgent#_onMsg: meta: {"source":"network","address":"37.49.230.93","port":"65033","protocol":"udp","time":"12:51:40.347547","transactionId":"999df9d3-c648-4714-a457-1a48b0d2af9d","dialogId":""} +0ms
 drachtio:agent Agent#handle: tracking an incoming invite with call-id 390500085-333720936-715520346, currently tracking 1 invites in progress +0ms
 drachtio:srf examining INVITE, dialog id:  +3s
{"level":30,"time":1591102300348,"msg":"received invite from udp/37.49.230.93:sip:011441613941223@34.200.127.219 with request uri sip:011441613941223@34.200.127.219","pid":17323,"hostname":"ip-172-31-38-128","v":1}
rejecting call attempt because it is not to a registered webrtc client
 drachtio:agent agent#sendResponse: {"headers":{"call-id":"390500085-333720936-715520346","cseq":"1 INVITE","from":"<sip:4001@34.200.127.219>;tag=951478149","to":"<sip:011441613941223@34.200.127.219>"},"status":404,"reason":"Not Found"} +0ms
 drachtio:agent sendMessage: SIP/2.0 404 Not Found
 drachtio:agent Call-ID: 390500085-333720936-715520346
 drachtio:agent cseq: 1 INVITE
 drachtio:agent from: <sip:4001@34.200.127.219>;tag=951478149
 drachtio:agent to: <sip:011441613941223@34.200.127.219>
 drachtio:agent Content-Length: 0
 drachtio:agent
 drachtio:agent  +0ms
 drachtio:agent opts: {"stackTxnId":"999df9d3-c648-4714-a457-1a48b0d2af9d"} +0ms
 drachtio:agent Agent#sendResponse: deleted pending invite for call-id 390500085-333720936-715520346, there are now 0 pending invites +0ms
 drachtio:agent wp#send 127.0.0.1:9022 - 269#f270eff5-d0a1-430b-9275-c3751eb3ef7a|sip|999df9d3-c648-4714-a457-1a48b0d2af9d|
 drachtio:agent SIP/2.0 404 Not Found
 drachtio:agent Call-ID: 390500085-333720936-715520346
 drachtio:agent cseq: 1 INVITE
 drachtio:agent from: <sip:4001@34.200.127.219>;tag=951478149

--drachtio log--
drachtio.log

Is this the reason behind it? I haven't heard the one side voice or not rec. incoming call in SIP client?

@awadheshkumarconsta
Copy link
Author

Hi Dave,
I have also checked in homer statistics/log and I observed "SUBSCRIBE" is also not initiate by SIP client to server. as I can see still the same error log in drachtio.

2020-06-06 04:25:42.170496 processMessageStatelessly - incoming message with call-id 1918830187-1076764588-1318441293 does not match an existing call leg, processed in thread 140620675299712
2020-06-06 04:25:42.170521 No connected clients found to handle incoming register request
2020-06-06 04:25:42.170532 processNewRequest - No providers available for REGISTER
2020-06-06 04:25:42.170653 send 288 bytes to udp/[51.178.144.219]:58549 at 04:25:42.170584:
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 51.178.144.219:58549;branch=z9hG4bK1786194429;rport=58549
From: <sip:7914@34.200.127.219>;tag=2095601175
To: <sip:7914@34.200.127.219>;tag=FN3H2930p70gp
Call-ID: 1918830187-1076764588-1318441293
CSeq: 1 REGISTER
Content-Length: 0

--drachtio log--
drachtio.log

Is this the issue to making the call? Like I can not make a call to SIP client after registration (incoming call).

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