Callback & Extension Follow Me

Hi Guys,

I’m doing a demo on Asterisk. There’s a ani problem,

Call from DID is answered with callback,if the call is active I’m sending the call the extension.

But, Extension for incoming call, can not see the ani.

dialparties.agi: Caller ID name is ‘Callback’ number is ‘unknown’

What can I do for this stage?


dialparties.agi originates from FreePBX, and a lot of the logic for things would originate from there too. You may have better luck on the FreePBX forum instead of here.

In addition, ANI is not the same as CLI and is not something that, say, SIP provides (although nowhere do you say you are using SIP). ANI is not what you normally want for call back.

How can I do this on asterisk ?

I’m connecting the callback call to another field. And the cli here is important to me, The use of mandatory cli is not working here. I need to show the real caller number for the project.

Unless you are another network operator, someone like the police, or, in some countries, the number called is a free number, networks operators generally won’t give you Accounting Number Information. Even when they do, there may be cases when it is not the primary number of the line used to make the call.

To have a chance of receiving ANI, you are likely to have to have an ISDN connection, but I’m not sure whether Asterisk actually captures that information and populates CALLID(ani).

For Calling Line Identification, the default behaviour of Asterisk sis to pass that through as received, although note that the default, for SIP, is to assume it is contained in user part of the the From: header. If it is contained elsewhere, you may have to enable trustrpid, or even explicitly parse it from a header.

Dear David,

I’m a licensed operator. I send ani / Cli information to asterisk via the main system.

If the call ends at once, there is no problem. The result is successful.

However, after the callback, the system for the second call naturally detects local and cannot find it ani. I have to tell him here,

maybe a macro or something else.

There are no macros provided with Asterisk and their use is deprecated. FreePBX has many macros, but is not supported on this forum.

I’m having trouble working out what you are actually doing, even to the extent of being able to work out what is being provided by FreePBX and what by Asterisk. Also, you haven’t yet told us the signalling protocol being used.

I understand, I’m going to investigate a little more. Surely it has the solution. I’m working on Sip.

I’m not aware of any standard mechanism in SIP for signalling ANI, chan_sip certainly doesn’t set CALLERID(ani).

Are you using chan_sip or chan_pjsip?

If there is a way, I can use Chan_sip.

You need to start by seeing how the information is communicated in the actual SIP protocol exchanges. If it is not there, you have to stop at that point.

I have redesigned the callback module, the problem is solved permanently with additional code, thanks for your help.