Asterisk settings Broadvoice distinctive ring support

Broadvoice offers the option to have two alternative numbers associated with your primary number. Unfortunately incoming calls to those alternative numbers are directed at your primary number. The only way to distinguish them from the primary number is that the SIP Alert-Info header is set with a distinctive ring sequence. For a default Broadvoice configuration, the Alert-Info header will look like <> for the first alternate, and <> for the second alternate.

Historically, it's been difficult to get at that information, but the latest versions of Asterisk (1.2 and above) now provide the needed support.

I have Broadvoice configured so that the primary number is a local number (2015551234), the first alternative is a toll-free number (8885551234), and the second alternative is a number in the UK which I give to relatives (441715551234). The intention is that callers to the local number get a menu, callers to the toll-free number go straight to voicemail (so the minutes don't get burnt up), and callers from the UK ring every phone in the house because they rarely make "international" calls, so it must be important. Also, Asterisk does not answer incoming calls from the UK until somebody picks up.

This is the configuration used with an unpatched Asterisk@Home 2.1/2.2 and Asterisk Management Portal 1.10.010 to make this happen. Your mileage may vary with other configurations, but the principals remain the same.

  1. Get Broadvoice working for the primary number. There are plenty of pages elsewhere describing this. Note that with current versions of Asterisk no patches are required. There's no point in proceeding until you have a basic Broadvoice configuration working.
  2. Using Asterisk@Home, create incoming routes for each of your alternative numbers, in this case 8885551234 and 441715551234, and define how you want the calls processed.
  3. Create an incoming route that will be used to process calls to the main number. For this example it's called bv-main (Note that this cannot be your Broadvoice main number, although you enter it on the same field as the number). Again, define how you want calls to the main number to be processed.
  4. Now go back to the incoming route for your main number (in this case 2015551234), and change the processing to Custom-App, and set the value to custom-bv-incoming,s,1
  5. We're almost done - resist the temptation to apply the changes, as there's one more change to make.
  6. Now you need to open a shell window on your Asterisk box, and use your favorite text editor edit the file /etc/asterisk/extensions_custom.conf, and add the following lines to the end of the file. Note that the extensions need to be modified to match the incoming numbers defined previously:-
exten => s,1,Noop(Alert-Info -> '${SIP_HEADER(Alert-Info)}')
exten => s,2,Gotoif($["${SIP_HEADER(Alert-Info)}" = "<>"]?ext-did,8885551234,1)
exten => s,3,Gotoif($["${SIP_HEADER(Alert-Info)}" = "<>"]?ext-did,441715551234,1)
; Note the priority in the next line is set to 2
exten => s,4,Goto(ext-did,bv-main,2)

  • That's it - You're done - you can tell Asterisk to apply the changes.

This configuration should survive any configuration changes made through Asterisk Management Portal, but it may not survive version updates as it makes certain assumptions about how AMP organizes configuration files.

BroadVoice/Asterisk configuration help is also available at the BroadVoice Support Forum.
Created by: timhunt, Last modification: Thu 18 of Nov, 2010 (15:30 UTC) by fabiolr
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+