Please help me work out what would cause an endpoint in pjsip_custom.conf to not be found

So I am working on getting Naf’s GVSip to work with my Google voice account.

I used this guide to get me going, but rather than doing a new install I used it to tweak the existing install I have.

For the record I am working on RasPBX.

Basically I updated to the Naf version of Asterisk, and then edited the config file mentioned (/etc/asterisk/pjsip_custom_post.conf) to match the settings in the guide (I copied and pasted, then made the required changes).

Initially I mistyped my Client_ID and Client_Secret in the file, and got greeted with a ton of errors in asterisk when I rebooted it, but I fixed that and all the errors went away, so it would appear that oauth is working.

But as you can imagine, it’s not all rainbows and unicorns over here. The setup is not working. Incomging calls do not ring through to my server, and outgoing calls result in the following error:

ERROR[1042]: chan_pjsip.c:2225 request: Unable to create PJSIP channel - endpoint 'gvsip1' was not found

So I painstakingly went through every step of the guide (starting at the point where @xekon directs us to the browser) and verified every setting in every screen, and I can honestly say that they all match. Then I went into the pjsip config file and read through it about a dozen times, comparing it with the one in the guide, and I am fairly certain that it matches letter for letter. But the error persists.

So does anyone have any ideas on where I screwed this thing up?

Thanks in advance for the help!

1 obvious thing, that guide is for Ubuntu, IIRC RasPBX is based on Debian.

I’m going to say something unpopular.

We shouldn’t be supporting Google Voice questions. This is using a custom system separate and distinct from what we are using.

I think our forum should strive to provide a big tent so that all topics related to FreePBX can be explored, taking care to ensure our big tent doesn’t become a 3 ring circus.

2 Likes

I suppose, but the assumption on many of these posts is that we are the first-tier support organization for Google Voice. That is, and should be, a bad assumption.

I also understand that the caliber of people here is such that many of the people that come here looking for that support can be helped, but it’s a self-inflicted wound that becomes our problem once they get here.

Feel free to ignore me - I’m guess I’m just in a bad mood. Sorry.

My reply from the other thread was this:

The reason I thought there was a problem with your pjsip_custom.conf file is because the endpoint itself is declared in that file with this block:

[gvsip1]
type=endpoint
context=from-pstn-e164-us
disallow=all
allow=ulaw
allow=opus
outbound_auth=gvsip1
outbound_proxy=sip:obihai.telephony.goog:5061\;transport=tls\;lr\;hide
aors=gvsip1
direct_media=no
ice_support=yes
rtcp_mux=yes
media_use_received_transport=yes
outbound_registration=gvsip1

and so in the trunk creation in the FreePBX GUI you set the Custom Dial String (which points to that block/endpoint)

Custom Dial String: PJSIP/$OUTNUM$@gvsip1

So to me it seems you setup the trunk, and its looking for gvsip1 but its not seeing it anywhere, so to me it seems like your _custom file is not loading or is broken.

Hopefully somebody else comes along that can help, and if I think of anything I will let you know…

EDIT: I do not know enough about FreePBX to know what might be causing the endpoint to not be seen when it is clearly specified in the _custom file. Also Lutiana did not have any other obvious ERRORS in their Asterisk Log file:

[2018-07-22 22:43:22] ERROR[979] chan_phone.c: Unable to load config phone.conf
[2018-07-22 22:43:22] ERROR[979] pbx_dundi.c: Unable to load config dundi.conf
[2018-07-22 22:43:22] ERROR[979] chan_unistim.c: Unable to load config unistim.conf
[2018-07-22 22:43:23] ERROR[979] app_amd.c: Configuration file amd.conf missing.

That is a terrible assumption which I completely agree with you on.

But I am not seeking support for Google Voice, I am seeking help with getting a PJSIP endpoint working, that just happens to be handled by Google Voice, and I am asking for help with the FreePBX end of it. And as near as I can tell this is a community forum that supports FreePBX and Asterisk.

I note that there is a file called pjsip.endpoint.conf that has my phone extension in it, along with something called “anonymous” but no gvsip1 declared in it. Should there be something in there about gvsip1 as an endpoint?

On a side note, why on earth are there 3 pjsip conf files? I mean do you really need a pjsip_custom.conf AND a pjsip_custom_post.conf when they seemingly seem to do the same thing?

Well Ubuntu is also based on Debian. Besides, there is nothing in that guide that is Ubuntu specific, or at least that would not work on Debian without a very minor change (mostly to do with how Debian uses sudo).

One solution if you cannot get it to work, would be to install whatever install method works for your Raspberry Pi (from some other NON-gvsip guide) Then use the Patch file provided by Naf to just Patch an existing Asterisk. Some of the users in the DSLReports thread have outlined how to patch Asterisk. I have not tried it myself.

Keep in mind, you’re asking for help with custom configuration of PJSIP in FreePBX. The reason you are asking for this help is because you want to make GVSIP work. If you were not using GVSIP, you would not require this help. It correlates.

This is the main PJSIP endpoint configuration file. It is generated by FreePBX for the PJSIP endpoints created through FreePBX’s GUI. Anything custom would not appear here. So you’re GVSIP will never appear in this file.

They do completely different things. The _custom.conf file is where you put custom PJSIP endpoints, just like you’re doing now. The _custom_post.conf is for when you want to use the “include” option to add custom settings for an endpoint that exists (be it created via the GUI or custom) so that you can add/modify settings that FreePBX doesn’t generate as you’d like.

Correlation does automatically mean causation. The fact that GVSIP is involved does not automatically mean that the issue is caused by my need to use it. There is no way to know if I was using another sip provider that I would not need the same or similar custom settings.

The issue is VERY clearly that FreePBX is unable to find the defined PJSIP channel, which tells me that the system is ignoring part of or all of the customization. This is pretty clearly a FreePBX issue and not a Google one as this happens before it even touches Google.

On a completely unrelated note (well to the problem at any rate) I am rather alarmed at the attitude in this thread. Some of the response are coming across as a “It’s your problem, we don’t want to help and how dare you try to customize this.” I’ve been involved in community support for a ton of different products and this is the fist time I have run into a community that just seems uninterested in helping, specifically the people who appear to be directly related to the product.

We are considering moving towards FreePBX at work, hence the reason why I am setting it up at home to play with, and why I am not really interested in paying for a SIP provider right now. We have nearly 350 end points and 250 users over 5 sites, and are looking for a way to save money over the current Cisco support contracts and hardware. But if the attitude is not support customization on the free side of things, then maybe it’s not the way we want to go.

Show your configuration for this endpoint. Lets see what is in the config that could cause a problem.

Actually, Asterisk is unable to find your custom code. It sounds like you’re looking in the wrong place for where the problem is. Try using the ‘pjsip show …’ commands in Asterisk to figure out where your problem is.

Well, yes. Asterisk is extremely convoluted and complex. You’re trying to do something that’s ALSO convoluted and complex, and you’re so unsure of what you’re doing you don’t even know where to start looking to solve the problem.

Google Voice is great for someone who has all the free time in the world, and puts no value on their time to continuously fiddle with it, every time Google change something.

But someone who has “350 endpoints and 250 users over 5 sites” shouldn’t even be DREAMING of using an unsupported, unofficial, violating Google’s Terms-of-Service, unreliable and hacked together way of making phone calls. That’s criminally unethical, and if you went to the CEO and said ‘Hey, I’m going to go out of my way to annoy Google, waste a couple of hours or so of my time per month, and deliberately put all our phone calls through a place that tells me not to, to save $20 a month’ what do you EXPECT would happen?

I don’t care if you use Sipstation, or voip.ms, or even “Honest” Rob’s Used Car and VoIP Emporium. At least they actually say “Yes, this is suitable for a business”.

1 Like

Sorry, I was not very clear. The GV integration is for my home use to play with FreePBX and Asterisk as a way to sort of evaluate it as a whole. The production environment would NEVER use GV as the provider, that would be idiotic and as you said “criminally unethical”

The home setup has just 2 phones to play with (with another 2 to add if I want to), and only me using it to test things, I do not even intend to keep it as a permanent setup. GV allows me to avoid signing a contract and shelling out money just to tinker and learn.

Yes, I am aware, and that is precisely why I am asking the “experts” and the experienced alike. Not to completely fix my issue, but to help me learn how to work out the issue and then possibly work out a solution. How else are people expected to learn when the standard answer is a shrug and an explanation about how something should not be supported?

Thanks, that is the command I was playing with, but I am honestly not sure what I am looking at, or what to look for.

Here is the output for “pjsip show enpoints”

Endpoint: <Endpoint/CID…> <State…> <Channels.>
I/OAuth: <AuthId/UserName…>
Aor: <Aor…>
Contact: <Aor/ContactUri…> <Hash…> <RTT(ms)…>
Transport: <TransportId…> <BindAddress…>
Identify: <Identify/Endpoint…>
Match: <criteria…>
Channel: <ChannelId…> <State…> <Time…>
Exten: <DialedExten…> CLCID: <ConnectedLineCID…>
================================================================================

Endpoint: 2000/2000 Not in use 0 of inf
InAuth: 2000-auth/2000
Aor: 2000 1
Contact: 2000/sip:2000@:5060 381f1fbeee Avail 17.493

Endpoint: 2001/2001 Not in use 0 of inf
InAuth: 2001-auth/2001
Aor: 2001 1
Contact: 2001/sip:2001@:5060 76c1c151cd Avail 16.869

Endpoint: anonymous Unavailable 0 of inf

And here is the output for “pjsip show endpoint anonymous”

Endpoint: <Endpoint/CID…> <State…> <Channels.>
I/OAuth: <AuthId/UserName…>
Aor: <Aor…>
Contact: <Aor/ContactUri…> <Hash…> <RTT(ms)…>
Transport: <TransportId…> <BindAddress…>
Identify: <Identify/Endpoint…>
Match: <criteria…>
Channel: <ChannelId…> <State…> <Time…>
Exten: <DialedExten…> CLCID: <ConnectedLineCID…>
==========================================================================================

Endpoint: anonymous Unavailable 0 of inf

ParameterName : ParameterValue

100rel : yes
accept_multiple_sdp_answers : false
accountcode :
acl :
aggregate_mwi : true
allow : (g723|ulaw|alaw|gsm|g726|g726aal2|adpcm|slin|slin|slin|slin|slin|slin|slin|slin|slin|lpc10|g729|speex|speex|speex|ilbc|g722|siren7|siren14|testlaw|g719|opus|jpeg|png|h261|h263|h263p|h264|mpeg4|vp8|vp9|red|t140|silk|silk|silk|silk)
allow_overlap : true
allow_subscribe : true
allow_transfer : true
aors :
asymmetric_rtp_codec : false
auth :
bind_rtp_to_media_address : false
call_group :
callerid :
callerid_privacy : allowed_not_screened
callerid_tag :
connected_line_method : invite
contact_acl :
context : from-sip-external
cos_audio : 0
cos_video : 0
device_state_busy_at : 0
direct_media : true
direct_media_glare_mitigation : none
direct_media_method : invite
disable_direct_media_on_nat : false
dtls_ca_file :
dtls_ca_path :
dtls_cert_file :
dtls_cipher :
dtls_fingerprint : SHA-256
dtls_private_key :
dtls_rekey : 0
dtls_setup : active
dtls_verify : No
dtmf_mode : rfc4733
fax_detect : false
fax_detect_timeout : 0
follow_early_media_fork : true
force_avp : false
force_rport : true
from_domain :
from_user :
g726_non_standard : false
ice_support : false
identify_by : username,ip
inband_progress : false
incoming_mwi_mailbox :
language :
mailboxes :
media_address :
media_encryption : no
media_encryption_optimistic : false
media_use_received_transport : false
message_context :
moh_suggest : default
mwi_from_user :
mwi_subscribe_replaces_unsolicited : false
named_call_group :
named_pickup_group :
notify_early_inuse_ringing : false
one_touch_recording : false
outbound_auth :
outbound_proxy :
pickup_group :
record_off_feature : automixmon
record_on_feature : automixmon
refer_blind_progress : true
rewrite_contact : false
rpid_immediate : false
rtcp_mux : false
rtp_engine : asterisk
rtp_ipv6 : false
rtp_keepalive : 0
rtp_symmetric : false
rtp_timeout : 0
rtp_timeout_hold : 0
sdp_owner : -
sdp_session : Asterisk
send_diversion : true
send_pai : false
send_rpid : false
set_var :
srtp_tag_32 : false
sub_min_expiry : 0
subscribe_context :
t38_udptl : false
t38_udptl_ec : none
t38_udptl_ipv6 : false
t38_udptl_maxdatagram : 0
t38_udptl_nat : false
timers : yes
timers_min_se : 90
timers_sess_expires : 1800
tone_zone :
tos_audio : 0
tos_video : 0
transport : udp,tcp,ws,wss
trust_id_inbound : false
trust_id_outbound : false
use_avpf : false
use_ptime : false
user_eq_phone : false
voicemail_extension :

I’m not sure how this logic makes sense. If you want to evaluate FreePBX/Asterisk as a whole for your business then using a forked/non-Digium/Sangoma supported version of Asterisk and trying to setup custom extensions for GVSIP (which is not support at this point by FreePBX) is a poor way to evaluate FreePBX.

If you are honestly doing this at home to evaluate how FreePBX/Asterisk is going to benefit your company then you should set it up in a way that is going to be used by your company. Which sounds like a Distro install of a fully supported version(s) of FreePBX/Asterisk.

The best option for this is to go to someplace like Flowroute.com and just put $20 on the account, get a DID and set it up. No contract, no commitment. You can cancel the service anytime you’d like. That would give you a better idea of how FreePBX/Asterisk would work for you in your business/company scenario and give you a more accurate evaluation of FreePBX overall

1 Like

Also, please provide the output of your _custom.conf file for the PJSIP extension you are having problems with. It will be helpful to see what you actually have in it.

Tom, I would point out that technically , both naf and sangoma ‘patch’ ‘official’ asterisk releases to their individual needs, its just horses for courses, and FreePBX (as an open source offering) currently accepts either patched or unpatched ‘versions’ of any ‘asterisk’ if it passes a rudimentary version check. It also runs on any number of linux distributions.

JM2CWAE

OK. So going to Asterisk for support on the patched version equals not a lot of help because it’s a modified version. Going to Sangoma for support on the patched version equals the same thing, It’s not an version they released or tested against.

Splitting hairs doesn’t change the result.

OK. So now you know where your problem is, and when you fix your problem with your configuration, you’ll be able to continue on.

1 Like

If nafs patches work or will eventually , not that i use gv , then the result is in fact changed for those that want to ’ boldy go’.

That they can peacefully coexist with FBX happily is just also a fact.