simple (fixed) asterisk callback configuration
intro
This a simple howto get a callback feature into asterisk.
Its based on the assumption, that you have a account at a provider, which lets you dial into your box remotely and the location you call from provides a callerID. So this setup is mostly useful, if you have a flatrate at home and would like to use it, lets say, from your parents place.
The call process looks is the following:
- you call from the phone which sends the caller ID 004144555111 the trigger number 004144555666
- wait until you get a buisy signal
- hangup
- wait until it rings
- pick it up
- enter password (optional, see security remark)
- enter target number
Of course, you can setup more than one of those in case you are in a hotel and your room fone provides direct dial through callerID. Just install it temporarily for your hotel stay on your home asterisk.
Security remark: The authentication of the callback trigger is based on the callerID of the calling line. If your SIP provider allows SIP URI calls the callerID might be spoofed. I thats the case, you should but additional security in place (like a password, see below).
A more complicated setup which allows to trigger a callback from any number can be found here.
how does it work
- The system recognizes the number you dialed and the number you dialed from (CallerID)
- the call gets rejected
- a fixed call file will be copied from a directory (/var/spool/asterisk/ in the example below) into the outgoing directory
- asterisk initiates the outbound call according to the rules in the call file
- once you pick up the callback call, you will get a dialtone and be able to dial as from a local extension
example
004144555666: inbound number on your asterisk
004144555111: number of the remote destination which would likes to get a callback
provider: is the SIP account of your outbound (flatrate?) SIP provider, as configured in sip.confsomewhere in your inbound context in extensions.conf:
exten => 004144555666/004144555111,1,NoOp(provider callback destination)somewhere in extensions.conf (without password):
exten => 004144555666/004144555111,2,Wait(1)
exten => 004144555666/004144555111,3,system(cp /var/spool/asterisk/provider.call /var/spool/asterisk/outgoing/)
exten => 004144555666/004144555111,4,HangUp
[callback-dialtone]
exten => s,1,answer()
exten => s,2,background(welcome)
exten => s,3,DISA(no-password,home)
exten => s,4,goto(2)
somewhere in extensions.conf (with password):
[callback-dialtone-auth]call file: /var/spool/asterisk/provider.call
exten => s,1,answer()
exten => s,2,background(welcome)
exten => s,3,authenticate(5678)
exten => s,4,DISA(no-password,home)
Channel: SIP/004144555111@provider
Context: callback-dialtone
Extension: s
MaxRetries: 2
RetryTime: 1
bugs & questions
In case of questions &bugs please leave a comment here in this blog.

introThis howto is a extension to my recent "simple (fixed) asterisk callback configuration". This configuration is useful to trigger a callback from a location you rarely use, but provides a callerID. This is for example useful in hotel ro
Tracked: Mar 31, 15:36