Ticket #706 (closed Feature Requests: wontfix)

Opened 3 years ago

Last modified 2 years ago

Would like a couple lines added in extensions.conf to facilitate advanced caller ID lookups

Reported by: anonymous Assigned to:
Priority: blocker Milestone:
Component: Core Version: next release
Keywords: Cc:
Confirmation: SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

This should be VERY easy... could I please request a couple of added lines in extensions.conf to facilitate an advanced Caller-ID name lookup. The first is in the from-pstn context (to set a flag so that later on in processing we can positively distinguish an external call from an internal one):

[from-pstn] exten => s,1,Set(extcallflag=1) ;PLEASE ADD THIS FLAG include => from-pstn-custom ; etc. etc.

The second addition is a one-line #include in the macro-user-callerid context in extensions.conf - the purpose being to allow some advance caller ID lookup processing when the caller ID NAME isn't available (but the number is):

;sets the callerid of the device to that of the logged in user [macro-user-callerid] exten => s,1,GotoIf?($["${REALCALLERIDNUM:1:2}" != ""]?start) exten => s,n,Set(REALCALLERIDNUM=${CALLERID(number)}) exten => s,n(start),NoOp?(REALCALLERIDNUM is ${REALCALLERIDNUM}) exten => s,n,Set(AMPUSER=${DB(DEVICE/${REALCALLERIDNUM}/user)}) exten => s,n,Set(AMPUSERCIDNAME=${DB(AMPUSER/${AMPUSER}/cidname)}) exten => s,n,GotoIf?($["${AMPUSERCIDNAME:1:2}" = ""]?report) exten => s,n,Set(CALLERID(all)=\"${AMPUSERCIDNAME}\" <${AMPUSER}>) #include => callerid-custom.conf ; THIS IS THE HOOK I'D LIKE TO SEE ADDED exten => s,n(report),NoOp?(Using CallerID ${CALLERID(all)})

If you wonder why I want this it is to implement an advanced Caller ID name function such that when the call arrives with number but no name, this routine will do a reverse number lookup and try to get the name or alternately will at least try to pull a city and state associated with the area code and number, to do that it needs to be able to determine if Asterisk has already found a name. This is would be based on what's described at http://nerdvittles.com/index.php?p=82 (with some modifications, particularly the use of the previously set extcallflag so that it does NOT try to do lookups on calls between extensions!).

I actually had this working in an earlier version of FreePBX but that was before extensions.conf was one of the files overwritten when the "red bar" is clicked.

Change History

04/25/06 22:23:04 changed by anonymous

Trying that code again:

[from-pstn]
exten => s,1,Set(extcallflag=1)  ;PLEASE ADD THIS FLAG
include => from-pstn-custom                     ; etc. etc.
;sets the callerid of the device to that of the logged in user
[macro-user-callerid]
exten => s,1,GotoIf($["${REALCALLERIDNUM:1:2}" != ""]?start)
exten => s,n,Set(REALCALLERIDNUM=${CALLERID(number)})
exten => s,n(start),NoOp(REALCALLERIDNUM is ${REALCALLERIDNUM})
exten => s,n,Set(AMPUSER=${DB(DEVICE/${REALCALLERIDNUM}/user)})
exten => s,n,Set(AMPUSERCIDNAME=${DB(AMPUSER/${AMPUSER}/cidname)})
exten => s,n,GotoIf($["${AMPUSERCIDNAME:1:2}" = ""]?report) 
exten => s,n,Set(CALLERID(all)=\"${AMPUSERCIDNAME}\" <${AMPUSER}>)
#include => callerid-custom.conf  ; THIS IS THE HOOK I'D LIKE TO SEE ADDED
exten => s,n(report),NoOp(Using CallerID ${CALLERID(all)})

07/22/06 23:34:25 changed by webrainstorm

I think we can close this feature request and eventually adding a 'custom agi' source type in the cidlookup module.

This way people can use their cusomized scripts with the cidlookup module taking advantage of other module features as caching

09/18/06 08:11:43 changed by webrainstorm

  • status changed from new to closed.
  • resolution set to wontfix.
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads