A2Billing Outbound Caller ID from a SIP client

If you register SIP devices to A2Billing then at some point you will no doubt want to set what outbound caller ID is presented when a call is made. There are a lot of different settings around the caller ID and lots of different setups depending on what you want to do. Below are a few examples.

This guide was written using a SysAdminMan VPS, details of this can be found here – http://sysadminman.net/sysadminman-freepbx-a2billing-hosting.html

Also the following is assumed –

  • A2Billing is already set up and working to make outbound calls
  • Your call provider allows you to pass any caller ID – this is not always the case

What’s the default for a SIP client?

This is what happens if we make no changes to the settings on the SysAdminMan template. Here are the default settings and the customer account details –

In agi-conf2 (the default for SIP clients) there are 3 settings relating to caller ID.

auto_setcallerid = Yes    |    force_callerid = [BLANK]    |    cid_sanitize = No

agi-conf2

The account number for the A2Billing customer we are using is 7599833548 –

a2billing account number

In the a2billing voip account settings we have nothing set –

voip settings caller ID

and in the A2Billing customer account we have no caller IDs set –

a2billing customer account caller ID

Now if we make a call from a SIP client (I’m using Zoiper) the A2Billing account number will be presented as the called ID, in this case “7599833548”. Actually if I call my mobile in the UK I get “+7599833548”. I think this is because the mobile provider is seeing it as a number in an international format.

In Zoiper (and in other clients it may be called something different) we have a setting for caller ID name –

zoiper caller id name

You should be aware though that, as far as Asterisk and A2Billing is concerned, caller ID number and caller ID name or 2 separate things. If we set the caller ID we want to be displayed in the “Caller ID Name” box this is NOT the number that will be presented when we make a call. However, look out for another blog post soon that will show how to do this!

Presenting a caller ID

Often what you will want to do is present a specific caller ID for a customer, or allow them to do it themselves.

There are a couple of ways to do this, this is the way I would recommend as being the most flexible.

In A2Billing / Settings / agi-conf2 / set cid_sanitize = ‘CID’ –

cid_sanitize

Now in the A2Billing customer account enter the caller ID that you want them to use –

add caller id

Now when I make a call I get “441604283000” presented as my caller ID.

And if I want to allow the customer to set their own caller ID I can go to A2Billing / Customers / Groups / Default – and allow the customer to see the Caller ID menu –

a2billing_customer_caller_id_menu

They will then see the Caller ID menu page in the customer GUI and be able to add new ones. If they add multiple entries I think the last one will be used –

a2billing_customer_caller_id_page

9 thoughts on “A2Billing Outbound Caller ID from a SIP client

  1. flipdee

    Hey there, I was wondering if anyone has found a call provider which allows you to pass any caller ID, specifically in the UK, I’ve found a range of providers, some which only allow you to present outgoing caller id from “real voip lines” and some others which will allow you to prove you own a number and add it to a list of selectable numbers to present as caller id.
    I’m trying to setup a asterisk server as a call screening server for incoming calls made to a mobile phone number.
    As I cannot find a voip provider who allows porting in of a mobile phone numbers my thoughts are forwarding calls from a mobile sim to a voip line and doing the call screening on asterisk then forwarding the “original” caller id of allowed calls out through another voip line onto a mobile phone.
    Cheers, flipdee

  2. matt Post author

    Hi Flipdee, some wholesale providers will let you set any caller ID, although they may make you sign an agreement first. Drop me a line here – http://sysadminman.net/contact.php – and I can recommend someone.

    You’re also going to have to get the mobile call to Asterisk? How were you planning on doing that?

  3. Javid

    Hello matt, I have an ATA registered to my asterisk with a sip account but when the user picks up their phone to dial they hear “Please enter your complete pin number” and then after they enter the pin they again are requested to dial the number. I actually know the reason for this because it goes to agi-conf1 which is configured for calling cards.

    Now I do have an agi-conf2 configured correctly for sip accounts but how do I tell asterisk to direct the sip calls to agi-conf2. I also have the correct extensions_custom.conf configuration which you have provided for different situations but I just don’t know how do I tell asterisk to use it. Thanks in advance

  4. matt Post author

    Hi Javid,

    You’re close. In a2billing you want to edit the customers SIP account and set ‘context’ to the Asterisk context that puts the call through to agi-conf2. Maybe ‘a2billing-sip’, rahter than ‘a2billing’ ?

  5. Javid

    you know what dont worry i got it working i just changed the inbound calls to go to a different custom destination which had agi-conf1 and changed the SIP calls to go to the main a2billing agi-conf2. Thank you

  6. NefariousParity

    This is all fine and dandy. What if you want to run a predictive dialer through a2billing. Sure that was easy no big deal. My issue is, I set my dialer to assign a DID to match the record it is dialing. A2billing is only letting me use one DID at a time that is preset!

    How do you get a2billing to either match a group that I have on the dialer? Or how do you get a2billing to just forward the call with DID being placed on to carrier.

    I understand this thread is old.

  7. Ami

    Hi Matt,

    Wouldn’t it would be nice to customer to be able to auto-send dynamic caller-id’s based on the country he dials to (we can check if client had inbound DID’s associated with the country dialed and then submit the value otherwise submit the default value which is stored in the VoIP account settings).

    Regards,
    Ami

  8. matt Post author

    Hi Ami

    It would definitely be an interesting feature for some customers. It would either need to be done with a database lookup as the call came in to the initial context, or by changes to the a2billing code as the call is processed. Neither are going to be straight forward!

    Cheers, Matt

  9. Najib

    Hi Matt,

    I have an issue with my A2Billing system. I am setting up Singapore number as Caller ID, which is 10 digits starting with 65 (CC). The system always keeps adding +1 as prefix with the number. Please advise how to turn this off. I have already set base_country as SGP (Singapore). Other country (non-10-number) CLIs work fine.

    I have been thinking there must be a solution through the Global List, but please advise.

    Thank you,

    Najib

Comments are closed.