Using SPA3000 as PSTN gateway for asterisk
| My example to dial out via SPA3000 
 Connect your SPA3000 PSTN to an account of asterisk e.g. 6298
 Set up the following script in extensions.conf
 
 [macro-senddigits]
 exten => s,1,Wait(2)  ; wait 1 second
 exten => s,n,SendDTMF(${hkno})  ; send the number
 
 ;dial-out via SPA3000
 [CallingRule_pstn]
 exten => _02XXXXXXXX,1,Set(GLOBAL(hkno)=${EXTEN:2})
 exten => _02XXXXXXXX,n,Dial(SIP/6298,2,M(senddigits)tr)
 
 So when you type 0291234567, asterisk will dial via extension 6298 and wait for 1 second before it sends out the telephone. In this way, you will have a caller ID as per your PSTN analog line.
 |