editor
520
edits
This is the support site for Andrews & Arnold Ltd, a UK Internet provider. Information on these pages is generally for our customers but may be useful to others, enjoy!
m (Change the password shown - don't know if the account details were of a live service) |
m (Don't feel comfortable with live number in example. No point in allowing ulaw because AAISP don't use it) |
||
(11 intermediate revisions by the same user not shown) | |||
= Configuration =
Asterisk
Newer installations of Asterisk should be configured to use PJSIP as it will be more supported as Asterisk development continues, '''however''' it's been reported that PJSIP doesn't support in-band DTMF detection properly. You may need to switch back to legacy sip.conf if this affects you. The official recommendation on the [https://trac.pjsip.org/repos/wiki/FAQ#dtmf PJSIP FAQ] seems to be to write your own plugin if you need it. In-band DTMF support seems like an important thing to have, so we suggest raising a bug to report a missing feature in PJSIP if this affects you!
When reading the instructions below be aware which are for sip.conf and which are for pjsip.conf.
=indications.conf=
Here's an easy change to make, to use UK call progress tones in the [general] section change the country code from us to uk (assuming you are in the UK).
[general]
country = us ; default location
to
[general]
country = uk
=pjsip.conf (PJSIP)=
==PJSIP: Trunk registration==
Here is an example of a working pjsip.conf setup where Asterisk will register with A&A in the same way as a SIP phone does in order to
It is recommended you read the "PJSIP: NAT Issues: Keep-Alive / Anti-Idle" section below as you may wish to comment out or drastically increase the qualify_frequency line(s) if your Asterisk is not behind NAT.
In pjsip.conf:
[
type = registration
retry_interval = 20
contact_user = maininbound
expiration = 120
outbound_auth =
client_uri = sip:+
server_uri = sip:voiceless.aa.net.uk
[
type = auth
password =
username = +
[aaisptrunk]
type = aor
contact = sip:+
qualify_frequency=20
[aaisptrunk_servera]
type = aor
contact = sip:+
qualify_frequency=20
[aaisptrunk_serverb]
type = aor
contact = sip:+
qualify_frequency=20
disallow = all
allow = alaw
direct_media = no
rtp_symmetric = yes
aors = aaisptrunk,aaisptrunk_servera,aaisptrunk_serverb
outbound_auth=
The "contact_user" option in the registration section sets the context for incoming calls to Asterisk, in this example calls come into the context "maininbound" in extensions.conf
Calls come into the context "maininbound" in extensions.conf - in this example calls get sent onto extension 222 and 205 for 20 seconds and then go to voicemail.▼
===extensions.conf===
▲
[maininbound]
exten = maininbound,1,Dial(PJSIP/222&PJSIP/205,20)
exten = maininbound,n,Voicemail(222@default,us)
exten => _X.,1,Dial(PJSIP/${EXTEN}@aaisptrunk,,)
==PJSIP: Trunk without registration==
If you don't need Asterisk to make outgoing calls, you can have A&A send incoming calls directly to Asterisk. Use the above example but do not include the top section for "[reg_442082881111]" and the 'outbound_auth' item in the aaisptrunk endpoint.
Then set the AAISP control panel to point to your server by hostname or IP address:<br />
Outgoing calls require registration, and you'll automatically receive incoming calls to registered "phones". If you register Asterisk and have calls sent directly to Asterisk you'll receive 2 copies of each call.
[[File:Asterisk pjsip noregistration.png|border]]
exten => _X.,1,Dial(SIP/voiceless-out/${EXTEN})
</syntaxhighlight>
For inbound calls (assuming you're routing
<syntaxhighlight lang="ini">
[voiceless-in]
|