Skip to content

Instantly share code, notes, and snippets.

@NickBouwhuis
Last active February 20, 2022 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NickBouwhuis/81c83b270e9dd33884b822efebfa8f9b to your computer and use it in GitHub Desktop.
Save NickBouwhuis/81c83b270e9dd33884b822efebfa8f9b to your computer and use it in GitHub Desktop.
Asterisk - Starter pjsip.conf with one phone and one provider
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0
; Phones
[6001]
type=endpoint
context=from-internal
disallow=all
allow=g722
allow=alaw
allow=ulaw
allow=gsm
auth=6001
aors=6001
[6001]
type=auth
auth_type=userpass
password=unsecurepassword
username=6001
[6001]
type=aor
max_contacts=1
; Providers
[example]
type=auth
auth_type=userpass
username=example-username
password=example-password
[example]
type=aor
contact=sip:sip.example.nl
[example]
type=endpoint
context=from-example
disallow=all
allow=g722
allow=alaw
allow=ulaw
allow=gsm
outbound_auth=example
aors=example
[example]
type=identify
endpoint=example
match=sip.example.nl
[example]
type = registration
server_uri=sip:sip.example.nl
client_uri=sip:sip.example.nl
contact_user=s
outbound_auth=example
auth_rejection_permanent=no
retry_interval=30
forbidden_retry_interval=300
max_retries=20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment