About 70% of the time, my Local DID provider sends me ANI II digits (see http://www.nanpa.com/number_resource_info/ani_ii_assignments.html) where there will be an extra 2 digits added to the Caller ID - For example 627142225555 where '62' = Cell Phone for example.. The problem is, I have not found a way to remove these digits before it's used by Asterisk in CDR and Voice Mail with any Asterisk script or command. What can I do to strip these digits from Caller ID before answering the call so CDR and Voice Mail Caller ID announcement show correct number? TIA Bart
At 03:37 PM 9/2/2006, you wrote:>What can I do to strip these digits from Caller ID before answering >the call so CDR and Voice Mail Caller ID announcement show correct number?I probably mis-typed something here, but something like this should do: exten => s,n,gotoif($[length(${CALLERID(number)}) = 11]?goodID) exten => s,n,set(CALLERID(number)=${CALLERID(number):2}) exten => s,n(goodID), noop()
You could create a function that uses GotoIf() to detect the extra digits. The line it points to could strip the extra digits. What version of asterisk are you using? (the functions are different pre-1.2.1) On September 2, 2006 18:37, Bart Fisher wrote:> About 70% of the time, my Local DID provider sends me ANI II digits > (see http://www.nanpa.com/number_resource_info/ani_ii_assignments.html) > where there will be an extra 2 digits > added to the Caller ID - For example 627142225555 where '62' = Cell > Phone for example.. > > The problem is, I have not found a way to remove these digits before > it's used by Asterisk in CDR and Voice Mail with any > Asterisk script or command. > > What can I do to strip these digits from Caller ID before answering the > call so CDR and Voice Mail Caller ID announcement show correct number? > > TIA > > Bart > > > > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- Tim St. Pierre IP telephony specialist sip://5101@communicatefreely.net Toronto: 647 722 6930 Toll-Free 1 888 488 6940 tim@communicatefreely.net -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20060902/8806de2c/attachment.pgp
I was hoping someone might have the answer to this: As an update: even though you can modify the Caller ID in extensions.conf for call handling and use CallerID(number) in you script, asterisk does not honor the modified number in CDR and VoiceMail.- I need to fix the number at answer. Bart Bart Fisher wrote:> ==> > About 70% of the time, my Local DID provider sends me ANI II digits > (see > http://www.nanpa.com/number_resource_info/ani_ii_assignments.html) > where there will be an extra 2 digits > added to the Caller ID - For example 627142225555 where '62' = Cell > Phone for example.. > > The problem is, I have not found a way to remove these digits before > it's used by Asterisk in CDR and Voice Mail with any > Asterisk script or command. > What can I do to strip these digits from Caller ID before answering > the call so CDR and Voice Mail Caller ID announcement show correct > number? > > TIA > > Bart > > > > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > > > >