Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
minLevel1
maxLevel6
outlinefalse
stylenone
typelist
printabletrue

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, if you are looking for how to configure asterisk with chan_sip we have another KB article that talks about the configuration.  
 

...

Transport
It's likely that you've already configured a transport object within chan_pjsip for use with SIP phones. If you have already configured a suitable transport you can use it rather than adding another.  The transport object defines protocol options and the local binding address.  A sample transport for use with Digium SIP Trunking would resemble:
 
 

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

...

Here, in the digium-siptrunk-aor object, we've declared that the Contact address for Digium's SIP Trunking will be sip.digiumcloud.net on port 5060.

Endpoint
The endpoint object is a profile for the configuration of a remote server (or a SIP endpoint) that ties together the other sections we've created.  Declaring an endpoint object is necessary so that Asterisk can maintain a proper identifier for the SIP entity with which it'll be communicating.  A sample endpoint for use with Digium's SIP Trunking, in consideration of the other sample objects we've already defined, would resemble:

...

[digium-siptrunk-registration]
type=registration
transport=transport-udp
outbound_auth=digium-siptrunk-auth 
server_uri=sip:sip.digiumcloud.net
client_uri=sip:your_digium_username@sip.digiumcloud.net
contact_user=your_digium_username
retry_interval=60

Here, in the digium-siptrunk-registration object, we've declared a registration that uses our transport-udp transport object, that uses the digium-siptrunk-auth authentication information for outbound authentication, that sets the outbound server URI as sip.digiumcloud.net, that specifies our client URI as your_digium_username at sip.digiumcloud.net, that sets our Contact user to your_digium_username, and that will retry failed registrations every 60 seconds.
 

Identify
The identify object type is used to help route incoming packets inside of Asterisk, so that Asterisk knows to what endpoint an incoming call should be associated.  A sample identify for use with Digium SIP Trunking would resemble:
 

[digium-siptrunk-identify]
type=identify
match=sip.digiumcloud.net
endpoint=digium-siptrunk 

Here, in the digium-siptrunk-identify object, we've declared that we'd like to match inbound calls from sip.digiumcloud.net (the Digium SIP Trunking server) to the digium-siptrunk endpoint (the one we've created here).

...