Enable Chan SIP on Freepbx 16

Hi eveyone

Hi try to configure Sip account for mi ISP Provider Wind, but not work, i want to try to use the old sip but in Freepbx 16 i don’t have the option when i try to add a trunk, how can i enable it ?

Not recommended, but if you need to enable it, you can do so in Settings, Advanced Settings:

You will need to restart asterisk after it’s configured.

Ok it works thank you

These are the parameters of the voip:
username: 390541333333
password: 888888
Domain: windtre.it
Proxy: voip.windtre.it

where do i configure the proxy?

Use Chan_PJSIP and set the outbound proxy. You shouldnt be using chan_sip, it is going away. It isnt really supported anymore.

I already try use PJSIP but failed registration

So then we troubleshoot that. So set it up under chan_pjsip and test again. Tell us the errors and show the settings from the trunk in FreePBX.

Chan_sip is no longer the answer for “Tried chan_pjsip once, it didnt work”

1 Like

Ok i fix i configure proxy and now PJSIP it’s registrered, but if i try to make an outbound call “all circuits are busy try again later”

And if i try to make an incoming call from my cellphone doesn’t work.

How can i troubleshoot?

I register the trunk on a 3cx Softphone for Windows and it works so the problem must be in the configuration of the Pjsip on FreePBX

In general, you look at the log to find out exactly why it failed. You will probably need the CLI command “pjsip set logger on”. However the likely reason for the incoming calls failing is that you haven’t configured match/permit correctly:

(Image was borrowed from another posting to show the field, rather than because the exact contents are relevant for you.)

did you Actually set an outbound route to USE this trunk?
that sounds like you don’t have an outbound route set up.

you could also use the sngrep command line tool to watch the invite and see where its failing.

No, the OP stated that he hears “all circuits are busy …” With no Outbound Route, he’d hear “your call cannot be completed …”

Please try adding these settings to your pjsip trunk:
From User: 390541333333
From Domain: windtre.it

If you still have trouble, at the Asterisk command prompt type
pjsip set logger on
make a failing outbound call, paste the Asterisk log for the call at pastebin.freepbx.org and post the link here.

For incoming, if anything appears in the Asterisk log for an attempt, post that. If not, if anything appears in sngrep for the attempt, post that. If nothing in sngrep, either, post details about your router/firewall.

while Technically true, you get that same experience if you:

  • have a carrier set up, and it sucks
  • set up a trunk with a new carrier
  • forget to route calls to the new trunk

is that not Also what you get if you have an outbound route, but no Trunk assigned into it?

Sure, an Outbound Route with no trunks will also result in “all circuits are busy …”

Hi @Stewart1

Hi add these option you tell me:
From User: 390541333333
From Domain: windtre.it
But nothing change i’m not able to do outbound and inbound call.
I enable the log with this command on asterisk CLI pjsip set logger on

This is the asterisk log /var/log/asterisk/full:
https://pastebin.freepbx.org/view/68d5cfe3

Please set Outbound Proxy to
sip:voip.windtre.it\;lr\;hide
and retest.

Hi

Internal call is ok, i connect with vpn and register with a soptphone and if i try to make call the phone is ringing but no audio i’m connet in vpn so the firewall in front of pbx doesn’t matter.

What is the possible cause for no audio in vpn ?

Thanks

Confirm that in Asterisk SIP settings, External Address and Local Networks are correctly set, including the VPN subnet. If you change these, after Submit and Apply Config you must restart Asterisk.

If the above doesn’t help, paste a new log including SIP trace.

ok now after add local vpn network the audio is ok.

I configure another pjsip trunk but if i make outbound call i receive the same error as wind trunk “all circuits are busy try again later” the outbound route is configure

UPDATE:

I put this command in asterisk CLI > core set debug 4

and after i make an outbound call this is the part of the log:
https://pastebin.freepbx.org/view/d804101d

Thanks you

Log starts after the call has already failed. Please paste from the start of the call attempt.

Hi

https://pastebin.freepbx.org/view/a88bc623

This seems relevant:
[2022-03-25 09:10:56] VERBOSE[2601] res_pjsip_logger.c: <— Received SIP response (439 bytes) from UDP:83.211.227.21:5060 —>
SIP/2.0 405 Method Not Allowed
Via: SIP/2.0/UDP 151.42.233.118:5060;received=151.42.233.118;rport=60000;branch=z9hG4bKPj18ca4cd7-b5aa-4bb0-a414-35b7f24241f5
From: sip:[email protected];tag=72e49ea5-0123-4b93-a878-b55b86d98679
To: sip:[email protected];tag=2285.297d1be8bd6297ba1aac8c3f99a7bacb
Call-ID: fb77963d-27af-4e99-8766-1a21bc37043f
CSeq: 61891 OPTIONS
Server: Milano Naz SPS 04
Content-Length: 0

405 Method not Allowed

UPDATE

I configure my trunk in SIP and not in pjsip and it works, maybe a need to try to configure the sip Wind of the customer in sip mode but i don’t know which parameters use for the Outgoing Peer Details

UPDATE:

I try to configure Wind in Sip trunks with this configuration Outgoing Peers:
username=390541000000
type=friend
context=provider
secret=Z9CCYGY2
nat=force_rport,comedia
disallow=all
allow=ulaw,alaw
host=windtre.it
insecure=invite
outboundproxy=voip.windtre.it
fromdomain=windtre.it
fromuser=390541000000

Incoming:
User: 390541000000
User Details:
type=user
secret=password
dtmfmode=rfc2833
context=from-pstn
allow=ulaw

Register String: 390541000000:[email protected]/0541000000

But this is the state of the sip trunk: