Stripping CID Prefix From Transfers

Status
Not open for further replies.

tony722

Joined
Sep 23, 2010
Messages
34
Reaction score
1
Hi,

When calls come into various ring groups from our IVR they get pre-pended with a prefix.

However when my phone rings and says "Sales: XXXXXX", there is no way to know if is:

A.) the call is actively ringing the ring-group (and thus I can ignore it and let someone else take it)

or B.) This call previously came into the ring-group, someone already has taken this call and they specifically want to talk to me and it's being transferred to me.

I've successfully fixed this for blind transfers by adding the following to globals_custom.conf:

Code:
TRANSFER_CONTEXT = from-internal-xfer-custom

And the following to extensions_custom.conf:

Code:
[from-internal-xfer-custom]
exten => _X.,1,noop(Entering from-internal-xfer-custom)
exten => _X.,n,Macro(strip-prefix,Sales: )
exten => _X.,n,Macro(strip-prefix,Oper: )
exten => _X.,n,Macro(prepend-cid,Xfer: )
exten => _X.,n,Dial(Local/${EXTEN}@from-internal,)

[macro-strip-prefix]
exten => s,n,GotoIf($["${ARG1}" != "${CALLERID(name):0:${LEN(${ARG1})}}"]?exitStripPrefix)
exten => s,n,Set(CALLERID(name)=${CALLERID(name):${LEN(${ARG1})}})
exten => s,n(exitStripPrefix),noop


How do you do this with attended transfers?
So far so good, but this (dialplan?) only runs on blind transfers. How do I make it work when we do attended transfers?

If they do an attended transfer of the call, the callerID still comes through with the original prefix, "Sales: XXXXXXXX". This is OK if the transferrer stays on the line (obviously then I see their CallerID), but 1/2 the time they just hit transfer, dial the extension, and hang up without explicitly hitting "blind". So the result is a ringing phone that says, "Sales: XXXXXXXX" (ok getting that much in the transfer is a new fix with Asterisk 1.8 and is an improvement) but there is still the same ambiguity.

Is there a dialplan that runs when you are doing an attended transfer that we could tap into?

Or could we strip the callerID when the call is first answered, maybe?

Running Elastix 2.3.

Thanks for any ideas!

Tony
 
Status
Not open for further replies.