I am curious. Can you give a practical example that would justify including this is a2billing? And do you want to do this on a per user basis? In the mean time, you can certainly do this. The 2nd phase of the callback sent the 1st leg to the context/extension (priority 1 is implied) that you will specify in as2billing.conf (in the [callback] section)
Instead of calling the agi as you would normally, you can use the asterisk Dial command to dial any number of your choice.
For example, is you have this in your a2billing.conf
Code:
[callback]
; When web call-back is enabled this is the context to sent the call.
context_callback = my_context_for_the_2nd_phase_of_callback
; this is the Extension to redirect the call when the web callback is returned
extension = 1234
You can have the following in extension.conf
If your home number is 1234567891
Code:
[my_context_for_the_2nd_phase_of_callback]
exten => 1234,1,Answer
exten => 1234,n,Wait(1)
exten => 1234,n,Dial(SIP/some_sip_server/1234567891)
exten => 1234,n,Hangup
If you have no other choice but sharing this callback context with a2billing, then you may do this instead
Code:
[my_context_for_the_2nd_phase_of_callback]
exten => 1234/987654321,1,Answer
exten => 1234/987654321,n,Wait(1)
exten => 1234/987654321,n,Dial(SIP/some_sip_server/1234567891)
exten => 1234/987654321,n,Hangup
exten => 1234,1,Answer
exten => 1234,n,Wait(1)
exten => 1234,n,DeadAGI(a2billing|1|callback)
exten => 1234,n,Hangup
Of course, 987654321 will be the callerid of the phone you want this feature to be available from. But if your trunk provider does does not let you set callerid on outbound calls, than this may not work at all.
Good luck