Skip to content

Instantly share code, notes, and snippets.

@gtjoseph
Last active August 29, 2015 14: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 gtjoseph/f11e1cdf261d93ef5516 to your computer and use it in GitHub Desktop.
Save gtjoseph/f11e1cdf261d93ef5516 to your computer and use it in GitHub Desktop.
PJSIP Wizard Proposal 1
; Define types
[trunk]
type = object_type
has_aor = yes
has_static_contacts = yes
has_identify = yes
has_inbound_auth = no
has_outbound_auth = yes
has_outbound_registration = yes
contact_pattern = sip:%{REMOTE_HOST}
client_uri_pattern = sip:%{USERNAME}@%{REMOTE_HOST}
server_uri_pattern = sip:${REMOTE_HOST}
[phone]
type = object_type
has_aor = yes
has_static_contacts = no
has_identify = no
has_inbound_auth = yes
has_outbound_auth = no
has_outbound_registration = no
[phone-static]
type = object_type
has_aor = yes
has_static_contacts = yes
has_identify = yes
has_inbound_auth = no
has_outbound_auth = no
has_outbound_registration = no
contact_pattern = sip:%{REMOTE_HOST}
; Define templates if desired
[phone_template](!)
type = phone
endpoint/context = incoming_default
endpoint/allow = ulaw,gsm
endpoint/device_state_busy_at = 2
endpoint/transport = ipv4
endpoint/force_rport = yes
aor/qualify_frequency = 60
aor/minimum_expiration = 30
aor/support_path = yes
aor/max_contacts = 1
[trunk_template](!)
type = trunk
endpoint/context = trunk_default
endpoint/allow = ulaw,gsm
endpoint/device_state_busy_at = 20
endpoint/force_rport = no
endpoint/transport = ipv4-external
aor/qualify_frequency = 60
aor/minimum_expiration = 30
aor/support_path = yes
registration/expiration = 1800
registration/retry_interval = 15
registration/forbidden_retry_interval = 120
registration/transport = ipv4-external
; Define actual objects
[myitsp](trunk_template)
type = trunk
remote_hosts = sip1.myitsp.com,sip2.myitsp.com
outbound_auth/username = myaccount
outbound_auth/password = mysecret
[1000](phone_template)
type = phone
endpoint/callerid = Joe <1000>
endpoint/mailboxes = 1000
inbound_auth/username = 1000
inbound_auth/password = mysecret
[1001](phone_template)
type = phone-static
remote_hosts = bobsphone.example.com
endpoint/callerid = Bob <1001>
endpoint/mailboxes = 1001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment