raphou - Terribly sorry - but at this time, Superfecta can not deal with number formats longer than 10 digits.
We continue to plan for better support for international formatted numbers - but that is the future.
[custom-from-trunk]
exten => _X!,1,NoOp(Caller ID name received from provider is ${CALLERID(name)})
exten => _X!,n,GotoIf($["${CALLERID(num):0:2}" != "+1"]?noplusatstart)
exten => _X!,n,NoOp(Changing Caller ID number from ${CALLERID(num)} to ${CALLERID(num):1})
exten => _X!,n,Set(CALLERID(num)=${CALLERID(num):1})
exten => _X!,n(noplusatstart),Goto(from-trunk,${EXTEN},1)
exten => h,1,Macro(hangupcall,)
-- Executing [12345678900@custom-from-trunk:1] NoOp("SIP/12345678900-b7d14960", "Caller ID name received from provider is LASTNAME,FIRST") in new stack
-- Executing [12345678900@custom-from-trunk:2] GotoIf("SIP/12345678900-b7d14960", "0?noplusatstart") in new stack
-- Executing [12345678900@custom-from-trunk:3] NoOp("SIP/12345678900-b7d14960", "Changing Caller ID number from +18005551212 to 18005551212") in new stack
-- Executing [12345678900@custom-from-trunk:4] Set("SIP/12345678900-b7d14960", "CALLERID(num)=18005551212") in new stack
-- Executing [12345678900@custom-from-trunk:5] Goto("SIP/12345678900-b7d14960", "from-trunk|12345678900|1") in new stack
-- Goto (from-trunk,12345678900,1)
-- Executing [12345678900@from-trunk:1] Set("SIP/12345678900-b7d14960", "__FROM_DID=12345678900") in new stack
-- Executing [12345678900@from-trunk:2] Gosub("SIP/12345678900-b7d14960", "cidlookup|cidlookup_6|1") in new stack
-- Executing [cidlookup_6@cidlookup:1] Set("SIP/12345678900-b7d14960", "CALLERID(name)=First Lastname") in new stack
Do you mean that Superfecta will not deal with 11 digit numbers in the form 1NXXNXXXXXX? It sure SEEMS to, so I just want to make sure.
Do you really feel that a Caller ID lookup program should be rewriting CallerID(num) for the system? Think about that.... I really think that's something that belongs in FreePBX. So far Superfecta only adds data where absent. Your talking about changing existing data - which could potentially have systemic results through out the system. What if you had two inbound routes from the famous +-sign provider - and one you pass through superfecta, the other one you didnt. The resultant CallerID(num) would be inconsistent between these two inbound routes, even though they are from the same provder.Bigger question: There is one provider which, on only SOME of its servers, sends TWELVE character numbers in the form +1NXXNXXXXXX. Ideally what I wish Superfecta would do is handle those as well, but also rewrite the CallerID(num) variable without the + (the callback function on some phones will send the + if you don't strip it). ....
I opened a bug report so we can look into your suspicions about the "," in the returned data.even though I am specifying the lookups in this order:
* Asterisk Phonebook
* PhoneSpamFilter
* Trunk Provided
* Superfecta Cache
* (....the rest....)
It is apparently in some cases skipping the "Trunk Provided" name. For example, I saw one come in today where the Noop statement was showing that the provider was sending the name in the form LASTNAME,FIRST and yet the Caller ID being sent to the end user is First Lastname, which it probably got from AnyWho (this is a number that's definitely NOT in the Asterisk Phonebook).
This is the "sanitized" CLI output from that call (actual numbers and name changed):
Note that I had already stripped the + before Superfecta ever got hold of the number, so that should not be the issue.Code:-- Executing [12345678900@custom-from-trunk:1] NoOp("SIP/12345678900-b7d14960", "Caller ID name received from provider is LASTNAME,FIRST") in new stack -- Executing [12345678900@custom-from-trunk:2] GotoIf("SIP/12345678900-b7d14960", "0?noplusatstart") in new stack -- Executing [12345678900@custom-from-trunk:3] NoOp("SIP/12345678900-b7d14960", "Changing Caller ID number from +18005551212 to 18005551212") in new stack -- Executing [12345678900@custom-from-trunk:4] Set("SIP/12345678900-b7d14960", "CALLERID(num)=18005551212") in new stack -- Executing [12345678900@custom-from-trunk:5] Goto("SIP/12345678900-b7d14960", "from-trunk|12345678900|1") in new stack -- Goto (from-trunk,12345678900,1) -- Executing [12345678900@from-trunk:1] Set("SIP/12345678900-b7d14960", "__FROM_DID=12345678900") in new stack -- Executing [12345678900@from-trunk:2] Gosub("SIP/12345678900-b7d14960", "cidlookup|cidlookup_6|1") in new stack -- Executing [cidlookup_6@cidlookup:1] Set("SIP/12345678900-b7d14960", "CALLERID(name)=First Lastname") in new stack
I will also mention that for now I'm only using the basic set of "Ignore keywords": unknown, wireless, toll free, unlisted
I am wondering if the comma in the Caller ID name might for some reason be causing Superfecta to think the name is invalid? That's just a shot in the dark, though.
I opened a feature request so this will be discussed - and then possibly acted on.... it would certainly be helpful in debugging if it (Superfecta) could print one line to the CLI in the form "Superfecta: Caller ID name set to (name used) - source was: (source name)." And also, if any time it checks the "Trunk Provided", it would output a line to the CLI that says "Superfecta: Caller ID name from provider is (name received, or words 'not received' if it was null)" - so if the name looks valid and yet Superfecta is using a name from a different source, you'd know there's an issue somewhere.
It occurs to me that with certain services you may wish to use a lookup table of vaild area codes that the service will check. For example, in the case of a Canada-only service, there's no point in even trying a number with a U.S. area code, so if you had a list of Canadian area codes you could first look at the number and if it isn't from one of those area codes, simply consider it a failed lookup and move on to the next on the list. Why waste a fraction of a second on a lookup that has no chance of succeeding? Just a thought.
I opened a bug report so we can look into your suspicions about the "," in the returned data.
Hi!
I found some bug:
Mismatch between SugarCRM and Yellowpages? Number not well translated (international format)?
Okay, I think I have figured it out, and it has nothing to do with the comma. In source-Trunk_Provided.php it looks like you are first executing a core show channels, trying to pick out the right one, and then doing a core show channel (Channel ID) to get the extended info. Which, at least on my box, works great on some trunks, but not others. The reason is that in some cases the full channel identifier gets truncated in the core show channels display, therefore the core show channel doesn't work!
AND THE SOLUTION IS...
Use "core show channels concise" instead. It does NOT truncate the channel identifier. It uses ! characters as separators between fields, like this:
SIP/12345678900-b7d15628!ivr-2!s!12!Up!BackGround!custom/ivr-main!8005551212!!3!7!(None)
I don't know what the fields all are, but I'm guessing that the first (and maybe the eighth) are the two that would be significant to the operation of this module. The beauty is that you don't get any head or tail information lines that have to be knocked out. So you could just look at the eighth field of each line until you match the caller ID number, then use the channel identifier in the first field (which is NOT truncated) as the argument of your core show channel to get the name.
Yes, I HAVE been up all night trying to track this down, and FINALLY the light dawned.
I bet this post sets some kind of record for the number of times edited since original creation, as I definitely went down a few blind alleys before finding the cause of the problem.
I tried, but everytime it goes as original. I've removed the pictures..makes it easier to read indeed. Sorry about that!My friend - All I really needed was a little cut and past data from the Debug screen. I'm as big a fan of wall murals as anybody else, but did you notice how your full-size screen captures make reading the forum much harder?
I think it was version 2.0.0. I use curl 7.19.4-5 on fedora10 (I'm running VPN in a flash with asterisk 1.4)Ok - so - you have said the previous version of Superfecta did not have the "resolving host problem". Exactly what version of Superfecta did not have the problem? We recently began using curl for the http functions. Can you tell us what version of curl you are running?
It was with SugarCRm but problem solved..Then you also said "I have seen that problem with other apps. (saying it can't connect to server) Where could it come from?" What other apps are giving the same error?
VPN in a flashIn the first delux-sized graphic in this message, in the debug data, I see "Searching Address.com Yellow Pages...Couldn't resolve host."
That's a combination of TWO different source script messages. I cant imagine what to make of it.
So - tell us this (please, without a mural sized graphic), What Distribution are you using? For Example, PBXIAF 1.2, or TriceBoxCE 2.6, or ??
I admit - its pretty strange. Does your system exibit any other quirky behaviours?
Puzzled in San Diego-
Thank you for the input, you seem to have struck upon something. I have implemented your suggested changes and it appears to be working on my system. Since your system is exhibiting the symptoms, I've attached a revised version of the source file. Can you copy this source file over to your machine and give it a test. If this corrects the problem it will be implemented in the next bug fix release.
Note: The trunk I tested it on sends a ten digit Caller ID. I have not tested it with a pattern of 1NXXNXXXXXX nor +1NXXNXXXXXX for incoming Caller ID ... I'm guessing you'd know whether the incoming number length might make any difference.
I'll go ahead and make the change so that it matches the last 10 digits.
At risk of sounding a bit negative, I will just say, "don't hold your breath." There are many great third-party modules awaiting some hint of recognition, let alone acceptance, but the FreePBX development team (which at this point isn't so much a team as one guy, or so I'm told).
A (probably partial) list of such modules can be found here.
I observed a bit of chatter on one of the channels the other day that for some reason led me to think that at some point there may be another "fork" of FreePBX, ... but because although it may be an open source project, it's not an open community at this point - basically one guy holds all the power, and just doesn't seem to be very accepting of contributions by others (it's not that he outright rejects them, but from outward appearances he just sort of leaves them "lying on the floor" until the developer takes the hint and goes away). ...
I do know that Rob Thomas, who was one of the orginal developers of FreePBX, submitted a new routepermissions module (it's also listed on the above-mentioned page) and so far it hasn't even been considered for acceptance, despite the fact that it was apparently written to be part of the main distribution. Things must be getting weird when the previous lead developer can't get a module accepted (at least not in a fairly timely manner).
Personally, I hope that if anyone does start a project that competes with FreePBX, they build it around FreeSWITCH rather than Asterisk. Exerything I've heard about FreeSWITCH recently has been very positive, but unfortunately there has not (so far) been anything like FreePBX built or adapted to work with FreeSWITCH (despite the similarity of the names, the two projects are not related, at least not as far as I know).
As it sits now, this module truly does deserve to be part of the main freePBX distribution, or at least included in the "official" third-party modules distribution. But as I say, I would not hold my breath. Of course, getting recommended by Uncle Ward and included with PiaF is the next best thing!
Disclaimer: I am NOT a FreePBX developer, so don't get the idea that I have any "inside knowledge."
The development process is very open, all activity that occurs can be seen on the timeline. There are often discussions that occur on the IRC which is an open channel. Unfortunately, there are also phone conversations that occur and those are hard to capture......but on the other hand it would be nice if the development process were just a bit more open. If there are concerns about a certain module that might preclude it being placed in the main distribution, maybe those ought to be documented somewhere...
...You said, "Getting a mod into the “Standard Repository” is a little tougher as Modules accepted into this group generally have to pass some criteria before being integrated." My only question is, is that criteria actually documented anywhere, or do module developers just have to submit and hope they haven't broken some unwritten rule or policy? If it's the latter then I hope you can see whay that might be a problem, and why some developers might take it the wrong way. How can you follow the rules if the rules only exist in someone's mind?...
The trac site has a wiki section where there is developer documentation. Unfortunately much of the documentation is stale. Anyone with an account can modify this wiki, it's the unfortunate nature that many developers aren't always known for proactively writing documentation, and new developers who use that information and find some of it is stale are not updating it, which is what you expect in documentation.IMHO there probably ought to be a section of the FreePBX wiki specifically devoted to helping developers create modules, and stay within whatever parameters are necessary to not "break" anything else. And I definitely do agree that you can't have one module breaking another, or part of the main distribution, but as far as I can tell there's really no way for a developer to know in advance what not to do.
You are referencing the 'drupal' side of FreePBX.org vs. the wiki that is part of trac. The answer to your question is very straight forward. When we setup drupal we found it to be very fragile and the required 'fine grain permissions' module that would allow access to 99% of the site (which is our desire) broke all sorts of things. Taking the significant amount of time to setup a new test server to try to get that right has just not made it to the top of the priority list. As a stop gap, ANYONE who has ever asked how they can get access to the site to contribute has been granted that permission. It just unfortunately involves enough 'exposure' to breaking things that they must ask to get it vs. every single account having the level of access that we are currently capable of providing through that mechanism. There are dozens of users who do have permission to update the site.Also, just as a point of information, why is the FreePBX wiki "closed", as opposed to, for example, the one at voip-info.org, when anyone can register and then add relevant information to any page immediately?
I'm sorry that you feel that way as it is not the case at all. Given the roughly 60+ modules that FreePBX.org has, you are going to get a wide variance on responsivness on any give request depending on what module it is, who is around and what the nature of the request is. It's a bit different then a module actively being developed and maintained by the current author.All I'm saying is that to an outsider, it almost seems like the FreePBX community (if such exists) is designed to make information sharing and openness more difficult than it should be. I feel as though there is more of an active community here than at the FreePBX site - note my interaction with the developers of the Superfecta module in this thread - I doubt I'd ever get that level of response and help in the FreePBX forums. And because they were so open, I was in turn able to help them figure out what was causing one particular bug.
You have the right to write what you want, we live in a wonderful world of 'freedom of speech.' However, it's also a good idea to "check your sources" as a good newspaper typcially wouldAnyway, had I not written that post when I was tired and maybe a little cranky, I might not have been quite so hard on the development team, because I do know they work very hard. I also know it's primary a volunteer effort, so I apologize for my original negativity. My only wish is that the FreePBX community were a bit more "inclusive" toward third-party developers, of which I am NOT one, but I really appreciate a lot of the "extras" they have come up with.
Well as William mentioned, 2.6 is not even out and what you see wether in the main repo or in the extended repository does not mean they are or aren't going to be there.By the way, I just checked and noticed that the routepermissions module that I mentioned in my earlier post has finally appeared in the third-party repository - not sure when that happened (looks like yesterday from the file date), but it's good to see it there.
Link up your team and customers Phone System Live Chat Video Conferencing
Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.
Check your inbox!
We’ve sent you an email. Click on the button in the email body to verify your email address – (if you can not find it, check your spam folder).
Upon verification you will be directed to the 3CX setup wizard.