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

482 Loop Detected Response from Flexisip Server Running in Docker on Register #187

Open
shivbuyya opened this issue Jun 18, 2024 · 2 comments

Comments

@shivbuyya
Copy link

shivbuyya commented Jun 18, 2024

Hi,

I am running the Flexisip server in the Docker container, added the port mapping for 5060. But when I try to register from Android application it shows connection failed and in the Flexisip server running in Docker container I can see below logs:

2024-06-18 08:59:05:604 flexisip-debug- tport_wakeup_pri(0x563214b8cf70): events IN
2024-06-18 08:59:05:604 flexisip-debug- tport_recv_event(0x563214b8cf70)
2024-06-18 08:59:05:604 flexisip-debug- tport_recv_iovec(0x563214b8cf70) msg 0x563214b93260 from (udp/172.17.0.4:5060) has 4 bytes, veclen = 1
2024-06-18 08:59:05:604 flexisip-debug- tport_deliver(0x563214b8cf70): bad msg 0x563214b93260 (4 bytes) from udp/192.168.1.9:5060 next=(nil)
2024-06-18 08:59:05:604 flexisip-debug- nta_agent: received garbage from udp/192.168.1.9:5060
2024-06-18 08:59:05:604 flexisip-debug- tport_wakeup_pri(0x563214b8cf70): events IN
2024-06-18 08:59:05:604 flexisip-debug- tport_recv_event(0x563214b8cf70)
2024-06-18 08:59:05:604 flexisip-debug- tport_recv_iovec(0x563214b8cf70) msg 0x563214ba2e10 from (udp/172.17.0.4:5060) has 805 bytes, veclen = 1
2024-06-18 08:59:05:604 flexisip-debug- tport_deliver(0x563214b8cf70): msg 0x563214ba2e10 (805 bytes) from udp/172.17.0.1:5060 next=(nil)
2024-06-18 08:59:05:605 flexisip-debug- nta: received REGISTER sip:192.168.1.15 SIP/2.0 (CSeq 68)
2024-06-18 08:59:05:605 flexisip-debug- nta: Via check: received=172.17.0.1
2024-06-18 08:59:05:605 flexisip-debug- nta: REGISTER (68) to message callback
2024-06-18 08:59:05:605 flexisip-debug- New SipEvent 0x563214b8eb90 - msg 0x563214ba2e10
2024-06-18 08:59:05:605 flexisip-debug- Receiving new Request SIP message REGISTER from sip:[email protected] :

REGISTER sip:192.168.1.15 SIP/2.0
Via: SIP/2.0/UDP 172.17.0.4;rport=43189;branch=z9hG4bK.FU8HFKBycDt5Z5DvmUa3NaUytF;received=172.17.0.1
Via: SIP/2.0/UDP 192.168.1.9:36876;branch=z9hG4bK.Kg2Rud;rport=36876
From: sip:[email protected];tag=vpuUIwhEN
To: sip:[email protected]
CSeq: 68 REGISTER
Call-ID: s07t
4B-kf
Max-Forwards: 69
Supported: replaces, outbound, gruu, path, record-aware
Accept: application/sdp, text/plain, application/vnd.gsma.rcs-ft-http+xml
Contact: sip:[email protected]:36876;+sip.instance="urn:uuid:22e0e8eb-abb4-00a8-af04-67f6c6548d46";+org.linphone.specs="conference/1.0,ephemeral/1.1,groupchat/1.2,lime"
Expires: 3600
User-Agent: LinphoneAndroid/5.2.5 (Galaxy M32 5G) LinphoneSDK/5.3.47 (tags/5.3.47^0)
Path: sip:172.17.0.4:5060;fs-proxy-id=fdc934f109867e89;lr
Content-Length: 0

2024-06-18 08:59:05:605 flexisip-debug- Invoking onRequest() on module DoSProtection
2024-06-18 08:59:05:605 flexisip-debug- Packet count rate (0.022832) for ip/port 172.17.0.1/43189 on protocol udp
2024-06-18 08:59:05:605 flexisip-debug- Invoking onRequest() on module SanityChecker
2024-06-18 08:59:05:605 flexisip-debug- Skipping onRequest() on module GarbageIn
2024-06-18 08:59:05:605 flexisip-debug- Invoking onRequest() on module Capabilities
2024-06-18 08:59:05:605 flexisip-debug- Invoking onRequest() on module NatHelper
2024-06-18 08:59:05:605 flexisip-debug- Skipping onRequest() on module Authentication
2024-06-18 08:59:05:605 flexisip-debug- Skipping onRequest() on module AuthTrustedHosts
2024-06-18 08:59:05:605 flexisip-debug- Skipping onRequest() on module Authorization
2024-06-18 08:59:05:605 flexisip-debug- Skipping onRequest() on module Redirect
2024-06-18 08:59:05:605 flexisip-debug- Skipping onRequest() on module RegEvent
2024-06-18 08:59:05:605 flexisip-debug- Skipping onRequest() on module B2bua
2024-06-18 08:59:05:605 flexisip-debug- Skipping onRequest() on module GatewayAdapter
2024-06-18 08:59:05:606 flexisip-debug- Skipping onRequest() on module Presence
2024-06-18 08:59:05:606 flexisip-debug- Invoking onRequest() on module Registrar
2024-06-18 08:59:05:606 flexisip-debug- Skipping onRequest() on module StatisticsCollector
2024-06-18 08:59:05:606 flexisip-debug- Skipping onRequest() on module ContactRouteInserter
2024-06-18 08:59:05:606 flexisip-debug- Invoking onRequest() on module Router
2024-06-18 08:59:05:606 flexisip-debug- mRelayRegsToDomains=0
2024-06-18 08:59:05:606 flexisip-debug- Skipping onRequest() on module PushNotification
2024-06-18 08:59:05:606 flexisip-debug- Skipping onRequest() on module LoadBalancer
2024-06-18 08:59:05:606 flexisip-debug- Invoking onRequest() on module MediaRelay
2024-06-18 08:59:05:606 flexisip-debug- Skipping onRequest() on module Transcoder
2024-06-18 08:59:05:606 flexisip-debug- Invoking onRequest() on module Forward
2024-06-18 08:59:05:606 flexisip-debug- tport: not found from primary 0x563214b8cf70, trying another one.../192.168.1.15:5060
2024-06-18 08:59:05:606 flexisip-debug- tport: not found from primary 0x563214b8de60, trying another one...
/192.168.1.15:5060
2024-06-18 08:59:05:606 flexisip-debug- Path added to: sip:172.17.0.4:5060;fs-proxy-id=fdc934f109867e89;lr
2024-06-18 08:59:05:606 flexisip-debug- Loop detected: z9hG4bK.FU8HFKBycDt5Z5DvmUa3NaUytF
2024-06-18 08:59:05:606 flexisip-debug- Replying Request SIP message: 482 Loop Detected
2024-06-18 08:59:05:606 flexisip-debug- tport_tsend(0x563214b8cf70) tpn = UDP/172.17.0.1:43189
2024-06-18 08:59:05:606 flexisip-debug- tport_resolve addrinfo = 172.17.0.1:43189
2024-06-18 08:59:05:607 flexisip-debug- tport_by_addrinfo(0x563214b8cf70): not found by name UDP/172.17.0.1:43189
2024-06-18 08:59:05:607 flexisip-debug- tport_vsend returned 420
2024-06-18 08:59:05:607 flexisip-debug- Terminate SipEvent 0x563214b8eb90
2024-06-18 08:59:05:607 flexisip-debug- Destroy SipEvent 0x563214b8eb90
2024-06-18 08:59:05:607 flexisip-debug-

==============================================================================================================

2024-06-18 08:59:05:607 flexisip-debug- tport_wakeup_pri(0x563214b8cf70): events IN
2024-06-18 08:59:05:607 flexisip-debug- tport_recv_event(0x563214b8cf70)
2024-06-18 08:59:05:607 flexisip-debug- tport_recv_iovec(0x563214b8cf70) msg 0x563214b93260 from (udp/172.17.0.4:5060) has 420 bytes, veclen = 1
2024-06-18 08:59:05:607 flexisip-debug- tport_deliver(0x563214b8cf70): msg 0x563214b93260 (420 bytes) from udp/172.17.0.1:5060 next=(nil)
2024-06-18 08:59:05:607 flexisip-debug- nta: received 482 Loop Detected for REGISTER (68)
2024-06-18 08:59:05:607 flexisip-debug- nta: 482 Loop Detected to message callback
2024-06-18 08:59:05:608 flexisip-debug- New SipEvent 0x563214bae0c0 - msg 0x563214b93260
2024-06-18 08:59:05:608 flexisip-debug- Receiving new Response SIP message: 482

SIP/2.0 482 Loop Detected
Via: SIP/2.0/UDP 172.17.0.4;rport=43189;branch=z9hG4bK.FU8HFKBycDt5Z5DvmUa3NaUytF;received=172.17.0.1
Via: SIP/2.0/UDP 192.168.1.9:36876;branch=z9hG4bK.Kg2Rud;rport=36876
From: sip:[email protected];tag=vpuUIwhEN
To: sip:[email protected];tag=paXjym6trS0Bc
Call-ID: s07t
4B-kf
CSeq: 68 REGISTER
Server: Flexisip/2.4.0-alpha-190-g1a358d74 (sofia-sip-nta/2.0)
Content-Length: 0

What could be the reason? Please guide.

Regards,
Shiv

@Failxxx
Copy link
Contributor

Failxxx commented Jun 19, 2024

Hi,
I guess the problem comes from a misconfiguration of Flexisip.
I can see that you use 192.168.1.15 a your SIP domain, so you should set module::Registrar/reg-domains to 192.168.1.15.

What probably happened is that the first REGISTER request did not enter into the Registrar module and went directly to the Forward module. Thus, the proxy received a second time the REGISTER request (hints: Max-Forwards=69 and VIA branch id) and tried again to forward it to itself.

Sincerely,
Félix.

@shivbuyya
Copy link
Author

shivbuyya commented Jun 24, 2024

Hi Félix,

Thanks for the response,
As per your suggestion I have changed reg-domains to 192.168.1.15, but still the same issue persists. Getting Loop detected error.

Please find my configuration file details:

#[global]
debug=false

[module::Registrar]
enabled=true
reg-domains=192.168.1.15

[module::Authentication]
enabled=false
auth-domains=192.168.1.15
db-implementation=file
file-path=/etc/flexisip/users.db.txt

Also I have tried to disable the Forward , in that case server crashes:

[module::Forward]
enabled=false

My Ubuntu PC(192.168.1.15), On which I have created a docker(172.17.0.2, this is the IP Address of docker) with port mapping 5060:5060.

Please suggest is this the right way to run a flexisip on docker?

MY PC(192.168.1.15) -Ubuntu PC
| |
| |
\ /
Docker(172.17.0.2) - FlexiSIP Server running here with configuration mentioned above. Port Mapping 5060:5060 is done while creating docker container.

Clients are trying to register using the IP 192.168.1.15.

It shows Loop detected.

Please find the attached Log file
log.txt

Kindly help, and suggest what could be the reason.

Thanks,
Shiv

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