TRUNK: Adding a username/password Authenticated Trunk

Hi Everyone,

This is my first post. So hello !

I am testing VitalPBX for my company. I am trying to add a SIP trunk from a provider that authenticates on username / password but I am having problems.

The SIP trunk definitions in sip.conf of Asterisk are defined as:

register => telephone_number:secret@sip.providers-domain.net/telephone_number

[sip-trunk-definition-in-sip.conf]
host=sip.providers-domain.net
fromdomain=providers-domain.net
defaultuser=telephone_number
username=telephone_number
secret=secret
type=peer
nat=no
canreinvite=no
disallow=all
allow=alaw
allow=ulaw
allow=g729
dtmfmode=rfc2833
insecure=port,invite

I cannot get the trunk to register.

Could anyone offer any advice please?

In our existing VoIP platform we had to define the inbound and outbound trunks in the web GUI but still add the register=> line in the sip.conf

Any assistance would be greatly received.

Many thanks,
Simon.

If you google “VitalPBX” and the SIP Providers Name you will often find a writeup how to add them. If you care to share the providers name I may be able to help more.

Hi Brian,

The VoIP provider is UK based VoIP Unlimited.

Regards,
Simon

Hi, welcome to the community.

I personally recommend using IP auth. Does your provider have such an option?

Chan_SIP is deprecated. Try to set up a PJSIP Trunk and let us know if you fail.

Hi PitzKey,

Thanks for the welcome :smiley:

The provider does not authenticate using IP. Username and password only i’m afraid. We have another SIP provider that most of our customer base is on that uses IP auth but we also need to accommodate our VoIP Unlimited customers.

I have created a PJSIP trunk :+1: but no joy.

Thanks for the quick response.

Regards,
Simon

Unfortunately I couldn’t find one specifically for that provider, but I used this as a guide for my provider and it worked great.

Thanks Brian. I will look at the recommendations and report back :+1:

Can you please share your config and the outcome?
Incoming and outgoing aren’t working?

Hi Brian,

Thanks for the guide, it worked ! :smiley: :+1:

I was able to use the ‘Register string’ field to get the trunk registered.

Thanks again.

Kind regards,
Simon

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.