System information

toronto*CLI> sip reload
To accept the incoming calls, define the [DUNDi_Incoming] context in extensions.conf
and add the following to the Toronto system’s dialplan.
[DUNDi_Incoming]
exten => 1000,1,Verbose(2,Incoming call from the DUNDi peer)
same => n,Answer()
same => n,Playback(silence/1)
same => n,Playback(tt-weasels)
same => n,Hangup()
Reload the dialplan with dialplan reload after saving your changes to extensions.conf.
For our first test, we’ll create an extension in the LocalSets context and try placing a
call to extension 1000 using the information provided via DUNDi:
[LocalSets]
exten => 1000,1,Verbose(2,Test extension to place call to remote server)
same => n,Dial(SIP/dundi:very_secret_secret@172.16.0.161/1000,30)
same => n,Hangup()
If we reload the dialplan and try testing the extension by dialing 1000, we should be
connected to the tt-weasels prompt on the remote machine. With our user configured
correctly to accept incoming calls, let’s make our dialplan and responses more dynamic
with some additional tools.
Using dbsecret with iax.conf
If you use the iax.conf channel driver, you can authenticate incoming calls using the
dbsecret directive in iax.conf along with the ${SECRET} variable in your mapping. The
use of the ${SECRET} variable in the mapping causes a rotated password to be sent back
in the response, which can then be used for authentication via IAX2. Here is an example
of an authentication definition in the iax.conf file:
[dundi]
type=friend
context=DUNDi_Incoming
dbsecret=dundi/secret
disallow=all
allow=ulaw
allow=alaw
The password is stored in the AstDB and is rotated every 3600 seconds (1 hour). To
use the password in your mappings, change the mappings in dundi.conf to use $
{SECRET} instead of very_secret_secret. This is the mapping we configured on the
Vancouver system:
[mappings]
; All on a single line
;
extensions => RegisteredDevices,0,SIP,dundi:${SECRET}@vancouver.example.com/
${NUMBER},nopartial
Configuring Asterisk for Use with DUNDi | 515