fonoster / routr

⚡ The future of programmable SIP servers.
https://routr.io
MIT License
1.42k stars 147 forks source link

Routr is unable to proxy messages to freeswitch #269

Open happytulubi opened 7 months ago

happytulubi commented 7 months ago

I want to use the Routr proxy for freeswitch.I started the service using the following command, and all services were able to start successfully.But when I registered with the SIP phone to 192.168.80.175:5060, connect received the registration message, but simpledata did not receive any information.

npm run start:edgeport

start:edgeport cross-env NODE_ENV=dev LOGS_LEVEL=verbose ./mods/edgeport/edgeport.sh 2024-03-21 17:29:52.003 [info]: (edgeport) GRPCSipListener.java starting edgeport ref = wangpu02 at 0.0.0.0 2024-03-21 17:29:52.010 [info]: (edgeport) GRPCSipListener.java localnets list [127.0.0.1/8] 2024-03-21 17:29:52.010 [info]: (edgeport) GRPCSipListener.java external hosts list [192.168.80.175]

npm run start:dispatcher

start:dispatcher cross-env NODE_ENV=dev LOGS_LEVEL=verbose CONFIG_PATH=$(pwd)/config/dispatcher.yaml nodemon mods/dispatcher/src/runner [nodemon] 3.1.0 [nodemon] to restart at any time, enter rs [nodemon] watching path(s): mods/*/ [nodemon] watching extensions: ts [nodemon] starting ts-node mods/dispatcher/src/runner.ts 2024-03-04 17:30:28.927 [verbose]: (grpc-health-check) /node_modules/@fonoster/grpc-health-check/dist/add-health-to-server.js added healthcheck service {} 2024-03-04 17:30:28.939 [info]: (common) /mods/common/dist/service.js starting routr service {"name":"dispatcher","bindAddr":"0.0.0.0:51901"}

npm run start:connect

start:connect cross-env NODE_ENV=dev PATH_TO_AUTH=$(pwd)/config/auth.yaml API_ADDR=localhost:51907 LOCATION_ADDR=localhost:51902 LOGS_LEVEL=verbose nodemon mods/connect/src/runner [nodemon] 3.1.0 [nodemon] to restart at any time, enter rs [nodemon] watching path(s): mods/*/ [nodemon] watching extensions: ts [nodemon] starting ts-node mods/connect/src/runner.ts 2024-03-04 17:31:17.507 [verbose]: (grpc-health-check) /node_modules/@fonoster/grpc-health-check/dist/add-health-to-server.js added healthcheck service {} 2024-03-04 17:31:17.523 [info]: (common) /mods/common/dist/service.js starting routr service {"name":"connect","bindAddr":"0.0.0.0:51904"}

npm run start:simpledata

start:simpledata cross-env NODE_ENV=dev PATH_TO_RESOURCES=$(pwd)/config/resources LOGS_LEVEL=verbose nodemon mods/simpledata/src/runner

[nodemon] 3.1.0 [nodemon] to restart at any time, enter rs [nodemon] watching path(s): mods/*/ [nodemon] watching extensions: ts [nodemon] starting ts-node mods/simpledata/src/runner.ts 2024-03-04 17:37:34.704 [info]: (simpledata) /mods/simpledata/src/service.ts starting routr service {"bindAddr":"0.0.0.0:51907","name":"simpledata"} 2024-03-04 17:37:34.723 [verbose]: (simpledata) /mods/simpledata/src/utils.ts loaded data resources {"total":2} 2024-03-04 17:37:34.760 [verbose]: (simpledata) /mods/simpledata/src/utils.ts loaded data resources {"total":1} 2024-03-04 17:37:34.767 [verbose]: (simpledata) /mods/simpledata/src/utils.ts loaded data resources {"total":5} 2024-03-04 17:37:34.774 [verbose]: (simpledata) /mods/simpledata/src/utils.ts loaded data resources {"total":1} 2024-03-04 17:37:34.791 [verbose]: (simpledata) /mods/simpledata/src/utils.ts loaded data resources {"total":1} 2024-03-04 17:37:34.804 [verbose]: (simpledata) /mods/simpledata/src/utils.ts loaded data resources {"total":1} 2024-03-04 17:37:34.816 [verbose]: (simpledata) /mods/simpledata/src/utils.ts loaded data resources {"total":1}

npm run start:location

start:location cross-env NODE_ENV=dev LOGS_LEVEL=verbose CONFIG_PATH=$(pwd)/config/location.yaml nodemon mods/location/src/runner

[nodemon] 3.1.0 [nodemon] to restart at any time, enter rs [nodemon] watching path(s): mods/*/ [nodemon] watching extensions: ts [nodemon] starting ts-node mods/location/src/runner.ts 2024-03-04 17:42:32.599 [verbose]: (grpc-health-check) /node_modules/@fonoster/grpc-health-check/dist/add-health-to-server.js added healthcheck service {} 2024-03-04 17:42:32.609 [info]: (location) /mods/location/src/service.ts using memory as cache provider {} 2024-03-04 17:42:32.619 [info]: (common) /mods/common/dist/service.js starting routr service {"name":"location","bindAddr":"localhost:51902"}

----Here is my configuration----

----edgeport.yaml

kind: EdgePort apiVersion: v2beta1 ref: edgeport-01 metadata: region: default spec: unknownMethodAction: Discard processor: addr: 127.0.0.1:51901 externalAddrs:

----dispatcher.yaml

kind: MessageDispatcher apiVersion: v2beta1 ref: message-dispatcher spec: bindAddr: 0.0.0.0:51901 processors:

----location.yaml kind: Location apiVersion: v2beta1 metadata: region: default spec: bindAddr: localhost:51902 cache: provider: memory

--peers.yaml

But when I registered with the SIP phone to 192.168.80.175:5060, connect received the registration message, but simpledata did not receive any information.Why is this? The following is the connect log,

2024-03-04 17:48:34.590 [verbose]: (connect) /mods/connect/src/service.ts connect processor received new request {"ref":"5888a5d5495144599538240ed7f428cf","method":"REGISTER","type":"(request)","edgePort":"wangpu02"} 2024-03-04 17:48:34.960 [verbose]: (connect) /mods/connect/src/service.ts connect processor received new request {"ref":"5888a5d5495144599538240ed7f428cf","method":"REGISTER","type":"(request)","edgePort":"wangpu02"} 2024-03-04 17:48:40.378 [verbose]: (connect) /mods/connect/src/service.ts connect processor received new request {"ref":"9bef0f7454224628b2253f49f9c71c1e","method":"REGISTER","type":"(request)","edgePort":"wangpu02"}