Hello, I am new to asterisk and having some trouble connecting to the pjsip. I am using MircoSIP to try and connect to the pjsip on my asterisk server. The connection keeps timing out and will not go through. I am trying to connect on the same network as the one I have the asterisk server on, the server is on a virutal machine and I am trying to connect from the host machine, so I’m not sure if NAT would be an issue here.
When I run ‘pjsip show endpoints’ on the Asterisk command line it gives me the following.
Endpoint: 6001 Not in use 0 of inf
InAuth: auth6001/6001
Aor: 6001 1
Contact: 6001/sip:6001@(ip address of the virtual machine that has asterisk running):5060 7b334d6fcf NonQual nan
Endpoint: 6002 Not in use 0 of inf
InAuth: auth6002/6001
Aor: 6002 0
Contact: 6002/sip:6002@(ip address of the virtual machine that has asterisk running):5060 a38543284f NonQual nan
Objects found: 2
Can someone please help? I am not sure why it doesn’t work when I try and connect to it using MicroSIP.
I believe the address should be that of the machine on which MicroSIP is running, i.e. it is the address that MicroSIP would provide if it were registering with Asterisk.
If the MicroSIP machine have a dynamic IP this will be an issue, better don’t add contact parameter when you are expecting the SIP User Agent (likely a phone) to register against the AOR. In this case, the contact objects will be created automatically
Hi, thanks for the reply. When I remove contact, it still doesn’t connect and it also shows the status of the endpoints as unavailable when I ask on Asterisk. When I add a contact it shows not in use rather than unavailable. It also still won’t connect?
I disabled iptables, my machine doesn’t have fail2ban, is there something else I need to do for firewall?
How do I know if the packets are arriving at Asterisk? When I try connecting, and have the CLI open, even with 25 verbosity, it doesn’t show anything. Is there another way to check?
Thanks for your replies. So I was working form home yesterday and for some reason when I followed the collecting debug information, it was just able to connect to my pjsip. Now that I’m trying on my work network again, the pjsip is failing to connect. Do you have any idea why that might be?