In FreePBX there is an option to make Caller ID lookup from an URL. That would be really nice feature :-)
If someone has a script and can point me in the right direction I will try make it possible - I already have an URL I can look up Danish numbers so im just waiting ;-)
The URL is something like http://callerid.kjeldsen.it/phonenumer=12345678 and it then returns a name and no more - simple :-)
Regards
Jesper
I think he's looking for a
I think he's looking for a means to do a CNAM lookup and populate CALLERID(name) without paying for the service from his carrier
Gotcha. On a similiar note,
Gotcha. On a similiar note, I'm trying to get screen pop ups to work with VTiger. It seems that VTiger wants the URL to have a record number to search for, not a phone number. I do not have a solution for that yet. EEman, how exactly do the screen pop ups work? It's certainly nothing in the dial plan that I can see. Any insight at all would be greatly appreciated.
Frank
wait, is it STE or MTE? and
wait, is it STE or MTE? and is this the new vtiger?
the new vtiger makes an AMI connection that will do its own popup in vtiger, it will also let you call from the contact. IT only works with STE, those dash-tenant entries mess it up entirely.
I'm working with STE and the
I'm working with STE and the new VTiger, but in general, I have no idea how the pop ups work.
Thanks
FSD
Yes - CNAM lookup
Yes, I wanne do a CNAM lookup and populate CALLERID(name).
My carrier doesn't have that services so I am actually bying it somwhere else (XML lookup and output the name). So I pay for - just not at my carrier ;-)
Regards
Jesper
i have some AGI code that
i have some AGI code that uses curl to do the lookup and then returns the value. It would require modification to parse data returned by your site as opposed to other sites i've written it for. It even cache's into mysql to curb expenses.
welcome to send it...
Hi Erik
You are welcome to send it to me if you want ;-)
You can reach me at jesper (the funny a) kjeldsen.it :-)
If I suceed to get it to work (at some time I will) - I will of course share it.
Regards
Jesper
I've been working on this for
I've been working on this for some days, but I just can't get over the last problem.
From extensions.conf I run the AGI script with one argument. If I put in a phone-numer directly it works, but now then I use variables.
What have I done wrong?
From extensions.conf:
[from-outside]
exten => _X.,1,Wait(1)
exten => _X.,2,AGI(kit-lookup1.agi|${CALLERID(num)})
exten => _X.,3,Set(CALLERID(name)=${lookupname})
exten => _X.,n,Set(__INCOMINGCLI=${CALLERID(num)})
exten => _X.,n,Goto(from-outside-redir,${EXTEN},1)
And the kit-lookup1.agi looks like this:
#!/bin/sh
name=`curl http://url-to-the-server/?phone=${1}`
echo "SET VARIABLE lookupname \"$name\""
I know I need a lot of security to ensure there isn't any "bad" chars and so on, but for testing I like to keep it as simple as possible ;-)
If I use exten =>
If I use exten => _X.,2,AGI(kit-lookup1.agi|96950000) I get the right "answer" (its our own phone number).
So $lookupname comes back to Asterisk, but its like ${CALLERID(num)} dosen't contain the number.
Sorry I forgot to say its Asterisk 1.4..
Regards
jesper
well that is likely a problem
well that is likely a problem with your carrier if they arent providing you callerid.
If I call from outside I get
If I call from outside I get the callers number, so unless there more kinds of caller ids I must get it.
Regards
Jesper
not possible.. if you get
not possible.. if you get caller's number.. then CALLERID(num) is set. That IS what you are seeing... your callerid on your phone comes from the same internal value that CALLERID(num) reads. what sort of line is this?
Solved :-)
I didn't went to bed, started working on this as the time right now is great for the restart of Asterisk every time I changes in extensions.conf :-)
I haven't changed a lot, but it works with this in extensions.conf:
[from-outside]
exten => _X.,1,Wait(1)
exten => _X.,n,Set(__INCOMINGCLI=${CALLERID(num)})
exten => _X.,n,AGI(kit-lookup1.agi|${CALLERID(num)})
exten => _X.,n,Set(CALLERID(name)=${lookupname})
exten => _X.,n,Goto(from-outside-redir,${EXTEN},1)
And the kit-lookup1.agi is still like this and placed in /var/lib/asterisk/agi-bin/:
#!/bin/sh
name=`curl http://url-to-the-server/?phone=${1}`
echo "SET VARIABLE lookupname \"$name\""
One question to that, in this way I will have to enabled it to all users (in this case it is an MTE) at one time. If I want to do it for a single tennant, isn't I right in that I will have to "enable" it in inbound.include og inbound_actions.include for every trunk?
Regards
Jesper
Hello Erik Can you email me
Hello Erik
Can you email me also the lookup scripts
marvin AT intacs dot com
Me too please
I would like to get the lookup script as well...
phoetger AT nationsline dot com
Thank you
Hi again To make a long story
Hi again
To make a long story short, we had a programmer who did it in .NET but our phone-to-name provider change the structure so no I am working on a small PHP script that does the caching.
So in fact I make the lookup from Asterisk to an webserver that look up another webbased service :-)
When I have finshed I will try to remember to post the script here, but do not expext rocket-sciene :-)
Regards
Jesper
phoetger, How do you do a
phoetger,
Shouldn't be hard to put it in a mysql database. Asterisk could look to the database to see if there is an entry for that number before you do a lookup. The next level would keep track of when you did the lookup so you could expire old records - maybe every 12 months.
It would be interesting to see the database grow. I imagine it would level off fairly quickly.
-Matt
you need to expire them a lot
you need to expire them a lot more frequently than 12months. believe me, you'll regret it if you dont. legally you're not suppose to cache them at all. There are 3 CNAM databases, depending on your service your provider will have access to 1 or all 3. ATT is one of the database maintainers. ATT has a clause that you cannot cache their lookups. Setting the cache too long will get you caught. ATT will randomly run checks. If one of their customers places a call to you, and their database records a lookup, and then later that same number is called from their network and there is no lookup they flag it for investigation. Ive heard rumor of them doing tricks like changing the CNAM entry to see if the data changes after buying service at a place like vonage.
then there is the issue that these actually _do_ change from time to time and having a bad entry will cause your customers to complain. I would make your record expire every 30 days. Right now I am only caching for 6 days, but thats still cutting my costs down on frequent calls by 85%. If they arent calling any more frequently than once a month then why go as far as 12mos thats only a 0.015 savings right?
CNAM lookup from URL
Erik,
Migrating off our homegrown asterisk service to thirdlane. Our lookup uses a pipe to pass the callerid num to an agi script. I understand this will not work in 1.6. I would love to take a look at your code to solve this problem, as well as review your implementation of record aging. (We are caching with astdb with no aging.) Moving to mysql for caching with the aging capability would be great.
I can be contacted at poliver@fortistelecom.net
Best regards...
so you should be able to
so you should be able to change it to
exten => s,31,AGI(lookupcidname.agi, ${lcallerid})
You mean the Thirdlane feature under CRM Links/CRM Settings?
FSD