Documentation - Dahdi and PJSIP on Asterisk 14

I’m trying to find some good up-to-date documentation for Asterisk 14, Dahdi 2.11.2 and PJSIP using ODBC on Mysql. All this on Ubuntu 16.04 LTS

In general, documentation always seems out-of-date. Although there’s a doc directory in the source files, the documentation which it generates doesn’t help much.

Although I’m using the latest versions which for Dahdi means this does not work and for PJSIP means some things work but registration is proving difficult, in the past with earlier versions things have worked. I have been using Asterisk on a test basis for a long time.

Is the only way to get any decent documentation to go on a training course? I’m not convinced I should need to.

You may say that since this is only a test system, it doesn’t matter but since I’m a consultant I get to advise clients on whether to use this package or not. From the point of view of documentation I would advise against Asterisk.

Clearly Asterisk is feature rich but if documentation does not exist to exploit those features there’s no point in having them.

I have been using Asterisk since 2007.

Have you looked at the wiki[1]? We have a ton of documentation for PJSIP[2] including examples, how to convert from SIP, and other parts. As for DAHDi it hasn’t really changed in years so any existing documentation should work.

[1] https://wiki.asterisk.org/
[2] https://wiki.asterisk.org/wiki/display/AST/Configuring+res_pjsip

1 Like

Hi,
DAHDI may not have changed for years but the documentation still isn’t good.

I’m trying to configure DAHDI, which I have been able to do in the past.

sudo dahdi_genconf gives
Missing a channel number parameter

but using -h doesn’t indicate any channel number parameter

This is pretty fundamental since the config files are not being generated and so Dahdi won’t function.

As for pjsip, yes I have looke at the wiki. Sorcery may be a workaround but I’d like to get a standard config to work for outbound registration.
I’m getting res_pjsip_outbound_authenticator_digest.c:144 Unable to create reqest with auth. No auth credentials for any realms in challenge.

However I have another outbound registration which works.

Any other suggestions for good documentation?

Best regards

That is our source of documentation, I can’t comment on the DAHDi problem as that’s not my area of expertise.

As for PJSIP numerous people are using it in that exact configuration. If you provide the configuration we may be able to help.

Here is the outbound registration part of pjsip.conf
[net2phone]
type=registration
transport=transport-udp
outbound_auth=net2phone
server_uri=sip:xyz:abc@ippbx.net2phone.com
client_uri=sip:xyz@192.168.1.40:5060

[net2phone_auth]
type=auth
auth_type=userpass
password=abc
username=xyz

[net2phone_aor]
type=aor
contact=sip:ippbx.net2phone.com

[net2phone_endpoint]
type=endpoint
transport=transport-udp
context=outgoing
disallow=all
allow=g729a,ulaw,alaw
outbound_auth=net2phone_auth
aors=net2phone

[net2phone]
type=identify
endpoint=netphone_endpoint
match=ippbx.net2phone.com

[ovh]
type=registration
transport=transport-udp
outbound_auth=ovh
server_uri=sip:xxx:yyy@sip.ovh.fr
client_uri=sip:xxx@192.168.1.40:5061

[ovh_auth]
type=auth
auth_type=userpass
password=yyy
username=xxx

[ovh_aor]
type=aor
contact=sip:sip.ovh.fr

[ovh_endpoint]
type=endpoint
transport=transport-udp
context=outgoing
disallow=all
allow=ulaw,alaw
outbound_auth=ovh_auth
aors=ovh_aor

[ovh]
type=identify
endpoint=ovh_endpoint
match=sip.ovh.fr

However I still don’t understand what is really being used: this pjsip.conf or the tables in mysql which correspond to the contents above i.e ps_aors, ps_auth, ps-endpoints, ps_registrations etc

If you have configured sorcery.conf to use realtime, then it would be the database. I’d also suggesting providing a SIP trace (pjsip set logger on).

logging doesn’t seem to be possible since it is impossible to reload pjsip without switching off logging in the process

res_pjsip_outbound_registration.c:880 handle_registration_response: Fatal response ‘401’ received from ‘sip:xxx:yyy@sip.ovh.fr’ on registration attempt to ‘sip:xxx@192.168.1.40:5061’, stopping outbound registration

Once the 1st 401 is received outbound registration stops for this destination despite the fact that auth_rejection_permanent is set to no in the ps_registrations table

sorcery.conf
[res_pjsip] ; Realtime PJSIP configuration wizard
endpoint=realtime,ps_endpoints
auth=realtime,ps_auths
aor=realtime,ps_aors
domain_alias=realtime,ps_domain_aliases

[res_pjsip_endpoint_identifier_ip]
identify=realtime,ps_endpoint_id_ips

ps_domain_aliases table is empty

I just noticed in your configs you provided this for the OVH registration:

outbound_auth=ovh

But you have it named ovh_auth

Thanks. That was true but it didn’t help.
There is some confusion about what can be realtime and what can’t.
I have now trimmed pjsip.conf to only contain my outbound registrations since apparently these CANNOT be in the ps_registrations table which I have now emptied.

sorcery.conf now looks like this
[res_pjsip] ; Realtime PJSIP configuration wizard
endpoint=realtime,ps_endpoints
auth=realtime,ps_auths
aor=realtime,ps_aors
domain_alias=realtime,ps_domain_aliases
transport=realtime,ps_transports

[res_pjsip_endpoint_identifier_ip]
identify=realtime,ps_endpoint_id_ips

extconfig.conf

ps_endpoints => odbc,asterisk
ps_auths => odbc,asterisk
ps_aors => odbc,asterisk
ps_contacts => odbc,asterisk
ps_domain_aliases => odbc,asterisk
ps_endpoint_id_ips => odbc,asterisk
ps_transports => odbc,asterisk

The significant change is in where the realm for ovh should be sip.ovh.fr

Now the registration is successful

However an outgoing call to OVH is still failing. That used to work too so that’s the next step.

This did help:
https://wiki.asterisk.org/wiki/display/AST/Configuring+Outbound+Registrations