[Home]

Summary:ASTERISK-25553: endpoints created via pjsip_wizard does not have registrations
Reporter:Max (god)Labels:
Date Opened:2015-11-14 09:25:57.000-0600Date Closed:2020-01-14 11:13:32.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) ast25553
Description:I've created trunk and user endpoints in pjsip_wizard.conf as follows:
{noformat}
[trunk1]                  
type = wizard            
sends_auth = yes          
sends_registration = yes  
remote_hosts = tel.t-online.de
outbound_auth/username = mylogin@t-online.de
outbound_auth/password = mypassword
endpoint/context = inco
aor/max_contacts = 1  

[fri]
type = wizard
accepts_registrations = yes
sends_registrations = no
accepts_auth = yes
sends_auth = no
endpoint/context = telefon
endpoint/allow = !all,ulaw,alaw,gsm,g722
endpoint/direct_media = no
endpoint/force_rport = yes
endpoint/disable_direct_media_on_nat = yes
endpoint/rewrite_contact = yes
aor/max_contacts = 1
aor/remove_existing = yes
inbound_auth/username = fri
inbound_auth/password = fripassword
{noformat}

The endpoints are clearly visible via CLI:

Endpoint:  fri                                              Invalid       0 of inf
    InAuth:  fri-iauth/fri
       Aor:  fri                                            1
     Contact:  fri/sip:fri@1.2.3.4;uniq=5FAFCAFB8  Unknown               nan

Endpoint:  trunk1                                               Invalid       0 of inf
   OutAuth:  trunk1-oauth/mylogin@t-online.de
       Aor:  trunk1                                             1
     Contact:  trunk1/sip:tel.t-online.de                       Unknown               nan
  Identify:  trunk1-identify/trunk1
       Match: 217.0.23.4/32

The surprising thing is "Invalid" state though - how can I figure out what's causing it?

Could it be related to missing registrations?
pjsip show registrations
No objects found.

Also, when I'm trying to place a call via fri endpoint it first sends invite, asterisk expectedly reply with 401 Unauthorized with www-auth digest, fri ACK it and send another invite, this time with digest auth response. So far so good but the reply from asterisk is 501 Not Implemented!

What is not implemented? What could be causing it? How can I find out?
Note: I'm using asterisk 13.6.0 on ubuntu.

Comments:By: Asterisk Team (asteriskteam) 2015-11-14 09:25:58.922-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Rusty Newton (rnewton) 2015-11-18 15:43:16.535-0600

We require additional debug to continue with triage of your issue. Please follow the instructions on the wiki [1] for how to collect debugging information from Asterisk. For expediency, where possible, attach the debug with a '.txt' file extension so that the debug will be usable for further analysis.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

Let's get a debug log as described in the linked wiki page. Preferably showing the entire call and how it fails.

Also check out ASTERISK-25466 and see if it is similar to you in how you create the endpoint.

By: Max (god) 2015-11-19 09:22:13.868-0600

The asterisk started, logging set according to recommendations, client connects, tries to call, got 501 reply.

By: Max (god) 2015-11-19 09:23:09.935-0600

As for 25466 - I'm not sure - does pjsip_wizard.conf use the same mechanism as in this issue? What puzzles me as well - I do not see any registration attempts related to trunk1 nor I see any errors about it.

By: Rusty Newton (rnewton) 2015-11-19 17:59:37.508-0600

In regards to ASTERISK-25466 - Do you see the issue only when you edit pjsip_wizard.conf and reload it during runtime? Or do you see it when Asterisk is first loaded?

By: Max (god) 2015-11-19 18:28:06.661-0600

The issue is persistent: I restart asterisk with systemctl restart and with stop/start - no difference.

By: Rusty Newton (rnewton) 2015-11-21 10:33:07.608-0600

{quote}
[trunk1]                  
type = wizard            
sends_auth = yes          
sends_registration = yes  
remote_hosts = tel.t-online.de
outbound_auth/username = mylogin@t-online.de
outbound_auth/password = mypassword
endpoint/context = inco
aor/max_contacts = 1  
{quote}

"sends_registration" is missing the final 's'. It should be "sends_registrations". I imagine that option would be ignored and no registration would be created for it.

{quote}
[fri]
type = wizard
accepts_registrations = yes
sends_registrations = no
accepts_auth = yes
sends_auth = no
endpoint/context = telefon
endpoint/allow = !all,ulaw,alaw,gsm,g722
endpoint/direct_media = no
endpoint/force_rport = yes
endpoint/disable_direct_media_on_nat = yes
endpoint/rewrite_contact = yes
aor/max_contacts = 1
aor/remove_existing = yes
inbound_auth/username = fri
inbound_auth/password = fripassword
{quote}

Here you apparently expecting inbound registrations. Are the problems only with inbound registrations, outbound registrations or both?

This might be simply a configuration issue. Did you already run this past others on the forums or mailing lists? It is a good idea to do that before assuming that an issue is a bug...

Fix your configuration  (you might compare it to https://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Wizard ) and try again. If you still run into the invalid state issue that will be a separate problem. Since the invalid state is so close to ASTERISK-25466 you will probably want to simply comment on that issue and attach debug (assuming you still have the issue after fixing your configuration).

By: Max (god) 2015-11-22 07:22:16.704-0600

> option would be ignored

How come there's no error regarding unrecognized option? Have I missed it somehow?

> Are the problems only with inbound registrations, outbound registrations or both?

Both: even with configuration issue above for outbound registrations, the "pjsip show registrations" still should display inbound registration. I'm unable to spot any misconfiguration for inbound registrations and there seems to be no errors in the log attached except for 501 response for inbound registration attempts. No idea what could be causing it.

By: George Joseph (gjoseph) 2015-11-28 12:14:31.394-0600

I'll look at the unrecognized option problem.

"pjsip show registrations"  only shows outbound registrations.  An inbound registration gets handled as a dynamically created contact and would show up in "pjsip show contacts"

Your log shows a lot of modules with invalid symbols, including pjsip modules.  I'm pretty certain that if you recompile and do a clean install, you'll resolve the 501.



By: Max (god) 2015-12-02 05:23:13.855-0600

The loading errors are described in ASTERISK-24567 - I don't understand why it's "not a bug" since it adds confusion and make troubleshooting in cases like this much harder.

Also, what do you mean by "clean install"?
I've took latest stable sources, took official debian package, rebuilt and installed it. No errors were reported, no missing libraries.

Is there some particular --configure option or some missing library dependency I should look for?

Also, grepping through source code does not clarify it either:
- I see bunch or 501 in res_ari* but it seems to be unrelated to registrations
- there are few in chan_sip.c but I'm using pjsip

Is there any way to understand where exactly this error is generated from?

By: George Joseph (gjoseph) 2015-12-02 12:19:27.452-0600

I can't seem to reproduce the 501.  I even installed Blink (on Windows because I couldn't get it installed on Fedora) and used your "fri" config.

You could try adding a "transport = " line to the fri config especially if you have multiple transports defined in pjsip.conf.

What version of pjproject is installed and where did you get it from?

Can you post your modules.conf and pjsip.conf?

We really need to get rid of those loader errors.  They may be false errors but they may not.

Also, can you describe your history with Asterisk?  Is this your first experience with pjsip for instance, does it work in other circumstances, etc.




By: Asterisk Team (asteriskteam) 2015-12-17 12:00:20.641-0600

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines