Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Depending on the version of Asterisk that you are using, You may have two channels drivers that you could use in order to create a peer that you could use to place and receive calls
...
The sip peer object is a profile for the configuration of a remote server (or a SIP endpoint). Declaring a sip peer object is necessary so that Asterisk can maintain a proper identifier for the SIP entity with which it'll be communicating. A sample sip peer for use with Digium's SIP Trunking would resemble:
[digium-siptrunk]
type=peer
host=sip.digiumcloud.net
defaultuser=your_digium_username
fromuser=your_digium_username
secret=your_digium_password
insecure=invite
trustrpid=yes
sendrpid=pai
context=from-digium-siptrunk
directmedia=no
disallow=all
allow=g722
allow=ulaw
allow=g729
...
Here, in the sip peer object, we're setting our host to sip.digiumcloud.net, we're setting the defaultuser default user and the fromuser options to our Digium username, secret is set to our Digium password, we've set an option called insecure to invite (because the Digium's SIP Trunking servers don't reverse authenticate when sending calls to you), we've enabled trustrpid and sendrpid for Caller ID forwarding, we've set the inbound Dialplan context to from-digium-siptrunk, we've explicitly disabled directmedia, and, by virtue of disallowing first, we've enabled the G.722, G.711 u-law and G.729a audio codecs (if you have purchase the G.729 codec license and have installed on your Asterisk system)
...