FreePBX 12, Asterisk 13 and PJSIP trunk config

Hi,

We are trying to setup PJSIP with our SIP trunk. Our current SIP trunk provider (PhonePower) does only IP authentication so we do not have any registration string or outbound auth credentials. Using chan_sip, the config for the trunk looks like this and works fine.

Peer Details:
type=peer
trustrpid=yes
nat=never
insecure=very
host=XXX.XX.XX.XX
dtmfmode=inband
disallow=all
context=from-trunk
allow=uLaw&g729

User details:
type=peer
trustrpid=yes
sendrpid=yes
qualify=yes
nat=never
insecure=very
host=XXX.XX.XX.XX
faxdetect=no
dtmfmode=inband
disallow=all
context=from-pstn
allow=uLaw&g729

and registration string is blank. This works fine when we using SIP both for inbound and outbound calls.

Now when we create a PJSIP channel trunk for the same SIP provider we configure as below.

SIP Server: XXX.XX.XX.XX
SIP port: 5060
Context: from-trunk
Transport: OURSERVERIP-UDP (this is the selected transport from the Advanced SIP settings page for Chan PJSIP)
Everything else is left as default values or blank.

We do an amportal restart after changing these values. Finally we changed the outbound route (we only have 1) to use this PJSIP trunk and not the original SIP trunk.

When we use the PJSIP trunk, inbound calls are working fine. But outbound calls are giving an error:

[30564][C-0000000e] pbx.c: Executing [[email protected]:22] Dial(“PJSIP/239-0000000e”, “PJSIP/@PhonePowerPJSIP,300,”) in new stack
[2014-11-12 12:33:05] WARNING[30564][C-0000000e] app_dial.c: Unable to create channel of type ‘PJSIP’ (cause 3 - No route to destination)

Any idea why we are getting this error? I think it has to do something with the fact that there is no outbound_auth required for our SIP Trunk and so asterisk/freepbx thinks there is no outbound PJSIP channel…

Apurva

At this time it won’t write out configurations if there is no “secret” set.

So are you saying we should just set a value in secret and try again? Or are you saying our sip truck configuration that is only authenticity by IP is not supported by PJSIP since there is no secret?

quick update: I just put “nothing” in username and “nothing” in secret and now I can dial outbound.
I still get the error:

[2014-11-12 14:18:03] WARNING[2695] res_pjsip_outbound_registration.c: Fatal response ‘405’ received from ‘sip:XXX.XXX.XXX.XXX:5060’ on registration attempt to ‘sip:[email protected]:5060’, stopping outbound registration

but then it seems to dial out.

Yeah probably because it’s trying to register and your server is saying “why are you sending me a username and password, I dont want one”

So looks like we just need to allow nothing values there.

I would also expect to have PJSIP endpoints not needing registration, like SIP MGW for PSTN connectivity.

Any traction on this yet?

I have 7 SIP trunk configurations all with no registration. I really dont want my log filled with the errors from my system wanting to register where registration isnt needed.

If I leave user/secret blank, the trunk stays unavailable.

For the moment, just use chan_sip for trunks that don’t require registration.

I realise it seems like it’s a trivial change, but it’s not, and I apologise for that. I expect support for that will appear during the 13 release cycle.

I’m wondering if this has been resolved?

Bart

We are having a similar issue. Looking for an update also.

Adding to the frey. Although I am running FreePBX 13 has this issue been resolved? I would assume yes but would love to be sure!

Wondering about this as well.

Yes it’s allowed now.

Great Thanks!

I have the same problem.
How can i resolve it.

You open a new thread instead of replying to a 2 year old thread that no longer applies due to the changes of FreePBX and Asterisk in those two years.

Include your current issue and setup details in the thread.

1 Like