Edit the /etc/asterisk/extensions.conf and add an extension which will send outgoing calls to Junction Networks. For example...
; ---------------------------------------------------------
; This context is used to send all outgoing calls to
; Junction Networks for connection to the PSTN.
; ---------------------------------------------------------
[outgoing]
exten => _1NXXNXXXXXX,1,Dial(IAX2/jnctn_out/${EXTEN})
exten => _1NXXNXXXXXX,2,Congestion()
exten => _1NXXNXXXXXX,102,Busy()
To provide your own caller-id number on outbound calls, add the following prior to the Dial line. (Renumbering the priority as appropriate)
[outgoing]
; Enter CID line here
; for Asterisk 1.6 ONLY, also use Set(CALLERPRES()=allowed)
exten => _1NXXNXXXXXX,1,Set(CALLERID(num)=15555551234)
exten => _1NXXNXXXXXX,2,Dial(IAX2/jnctn_out/${EXTEN})
exten => _1NXXNXXXXXX,3,Congestion()
exten => _1NXXNXXXXXX,103,Busy()
Most basic setups have the dial statement as position 1. In this case you need to move dial to position 2. Keep in mind, the number you enter for caller-id needs to be a valid 11 digit number (1[2-9]XX[2-9]XXXXXX).
While we honor caller-id name, we cannot forward it to the PSTN so we cannot reliably deliver name information via caller-id. On the PSTN, the caller-id number is matched to the number database of the local telephone company to determine the name provided with caller-id.
These examples assume that you are setting up a "generic" Asterisk configuration. The examples do not account for any conflicting entries already in your configuration files. Please edit your files accordingly.
Add a context to your extensions.conf to process incoming calls. Here is an example which answers the call and reads back any digits you press.
; ---------------------------------------------------------
; [arbitrary-name] is the context referred to by the
; [jnctn] user in iax.conf. This is where your
; custom incoming call processing should go.
;
; Replace 1NXXNXXXXXX in the exten => lines below with
; the DID you are subscribing to. If you are subscribing
; to multiple DIDs, add entries for each DID.
;
; For sample purposes, this section will read back the
; dialed number and then test DTMF by reading back each
; digit pressed by the caller.
;
; *** International DID Subscribers ***
; Note that pattern, _1NXXNXXXXXX, in the exten => lines
; below will only match North American numbers. If you
; have subscribed to any International DID's, you will
; need to add appropriate extensions to match those DID's.
; ---------------------------------------------------------
[arbitrary-name] ; <-- Should match the context you have
; under [jnctn] in iax.conf
exten => _1NXXNXXXXXX,1,Playback(beep)
exten => _1NXXNXXXXXX,2,SayDigits(${EXTEN})
exten => _1NXXNXXXXXX,3,Goto(testdtmf|s|1)
;
; This context is used by the sample [arbitrary-name]
; context above to read back each digit you press.
;
[testdtmf]
exten => s,1,Background(beep)
exten => s,2,ResponseTimeout(60)
exten => s,3,WaitExten(10)
exten => _x,1,SayDigits(${EXTEN})
exten => _x,2,Goto(testdtmf|s|1)
exten => i,1,Goto(testdtmf|s|1)
exten => t,1,Hangup