New instalation FREEPBX on VM, 401 not authorization

Hello Guys, good afternoon, i’m starter on FreePBX… i Follow some guides on internet about how install and configure trunks, routes and extensions.
but when i try to connect with x-lite, i’m getting 401 error.

I’m trying to connect a X_lite Extension with Chan_SIP, and when i get "Unauthorized " two times, my IP is blocked, and i’m in white list :’(

can someone help? Need any evidence? I’m refreshing this page every minute

Nobody?

As I mentioned in your other thread, you will find a hard time getting support on a freshly installed Elastix system. No one wants to deal with old stuff.

To troubleshoot your issues call logs are required.
SSH into your machine and go to the Asterisk CLI via asterisk -vvvvvr

Then place your call and look at the output.
You can also do sip set debug on from that CLI and perform sip debug.

but i’m using the FreePBX now, that link u sent me

Ok, then logs would be next step to troubleshoot

Would be this?
[2017-11-11 13:23:25] NOTICE[2307] res_pjsip/pjsip_distributor.c: Request ‘REGISTER’ from ‘“2001” sip:[email protected]’ failed for ‘192.168.1.223:1698’ (callid: ZTk0NmZlZjc3MzdiMDY5MDc4YzRiN2JkYTY0YjIzZjE.) - No matching endpoint found
[2017-11-11 13:23:25] NOTICE[2307] res_pjsip/pjsip_distributor.c: Request ‘REGISTER’ from ‘“2001” sip:[email protected]’ failed for ‘192.168.1.223:1698’ (callid: ZTk0NmZlZjc3MzdiMDY5MDc4YzRiN2JkYTY0YjIzZjE.) - No matching endpoint found
[2017-11-11 13:23:25] NOTICE[2307] res_pjsip/pjsip_distributor.c: Request ‘REGISTER’ from ‘“2001” sip:[email protected]’ failed for ‘192.168.1.223:1698’ (callid: ZTk0NmZlZjc3MzdiMDY5MDc4YzRiN2JkYTY0YjIzZjE.) - Failed to authenticate

If i get unauthorized two times, i get a Ip block

Hi!

This is PJSIP, not chan_sip…

Look in your Settings > Asterisk SIP Settings which one is listening to port 5060, the port you are most likely sending this traffic to since it’s the default. Currently I am pretty sure it’s PJSIP…

If you want to stick to Chan_SIP for your extensions, replace the PJSIP port with the Chan_PJSIP one and vice versa…

Good luck and have a nice day!

Nick

1 Like

i’m searching here how to disable PJSIP

That’s under Settings > Advanced Settings > SIP Channel Driver but you don’t need to disable it…

Just switch it to the port currently used by Chan_SIP…

Chan_SIP is legacy stuff barely if at all maintained, one day we will all have to switch to PJSIP… There are still people reporting problems with PJSIP (especially with extensions I believe) which is why quite a few people are hesitant to switch to PJSIP right now…

Good luck and have a nice day!

Nick

1 Like

Did you set up your extension 2001 as chan_sip but the port your soft client is sending traffic to is 5060, which on distro installs by default is pjsip?

Then create your extensions as pjsip or interchange sip ports as described by marbled.

1 Like

Nice, my route was configured with pjsip, i have deleted and created a chansip and work fine!, thank u guys

i have other problem, should i open a new topic?

is about outgoing call don’t happen…

[2017-11-11 14:22:28] VERBOSE[3203][C-00000002] app_stack.c: SIP/2001-00000004 Internal Gosub(crm-hangup,s,1) start [2017-11-11 14:22:28] VERBOSE[3203][C-00000002] pbx.c: Executing [[email protected]:1] NoOp("SIP/2001-00000004", "Sending Hangup to CRM") in new stack [2017-11-11 14:22:28] VERBOSE[3203][C-00000002] pbx.c: Executing [[email protected]:2] NoOp("SIP/2001-00000004", "HANGUP CAUSE: 16") in new stack [2017-11-11 14:22:28] VERBOSE[3203][C-00000002] pbx.c: Executing [[email protected]:3] ExecIf("SIP/2001-00000004", "0?Set(__CRM_VOICEMAIL=)") in new stack [2017-11-11 14:22:28] VERBOSE[3203][C-00000002] pbx.c: Executing [[email protected]:4] NoOp("SIP/2001-00000004", "MASTER CHANNEL: 1510417348.4 = 1510417348.4") in new stack [2017-11-11 14:22:28] VERBOSE[3203][C-00000002] pbx.c: Executing [[email protected]:5] GotoIf("SIP/2001-00000004", "0?return") in new stack [2017-11-11 14:22:28] VERBOSE[3203][C-00000002] pbx.c: Executing [[email protected]:6] Set("SIP/2001-00000004", "__CRM_HANGUP=1") in new stack [2017-11-11 14:22:28] VERBOSE[3203][C-00000002] pbx.c: Executing [[email protected]:7] AGI("SIP/2001-00000004", "sangomacrm.agi") in new stack [2017-11-11 14:22:28] VERBOSE[3203][C-00000002] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi [2017-11-11 14:22:28] VERBOSE[3203][C-00000002] res_agi.c: <SIP/2001-00000004>AGI Script sangomacrm.agi completed, returning 0 [2017-11-11 14:22:28] VERBOSE[3203][C-00000002] pbx.c: Executing [[email protected]:8] Return("SIP/2001-00000004", "") in new stack [2017-11-11 14:22:28] VERBOSE[3203][C-00000002] app_stack.c: Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/2001-00000004' [2017-11-11 14:22:28] VERBOSE[3203][C-00000002] app_stack.c: SIP/2001-00000004 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

Hi!

Not necessary…

Could you please post what is before those entries…We only see a lot of CRM stuff there…

Good luck and have a nice day!

Nick

Hi, good afternoon,
i’ve past the log into a website, here is the link:
Log asterisk

Here a image of crm https://imgur.com/zpBl66B

this is my trunk config:
host=sip..com.br
username=1630068
secret=
**
type=friend
qualify=yes
nat=no
insecure=invite,port
disallow=all
context=from-trunk
canrinvite=no
allowguest=yes
allow=g729

if u need other resource, please, i’m looking this post every time

thanks for help

I’m registered in my provider, (checked through the “Sip show registry”)

You are only allowing g729, do you have any licenses?

I think this g729 means a audio codec… my SIP service told me is viable to accept this,

But are YOU viable to send it?

I don’t know, i’ve just installed FreePBX on Linux VM… i’m really new in this…