Is it possible to clean up the caller id from an incoming call before passing it to the extensions.
I have a problem with a Panasonic KX-TGP550, most of the time it works fine, but when I receive a phone call from a number formatted ( 0114-123 4567 ) the phone doesn’t respond and in Asterisks logs I get an Internal Server Error message from the phone.
I am giving the massive assumption that this is to do with the Caller ID, I don’t really know how to test it other than waiting for phone calls to arrive with this style of formatted caller id.
Now is it possible to get FreePBX / Asterisk to clean up the callerID so it just becomes 01141234567? Get rid of all spaces and dashs?
I added this to /etc/asterisk/extensions_custom.conf
[from-trunk-sip-OBITRUNK1]
exten => _X!,1,AGI(clean-caller-id.php) ;calls script located in /var/lib/asterisk/agi-bin
exten => _X!,n,Goto(from-trunk,${EXTEN},1) ;continue with normal inbound handling
*from-truck-sip-OBITRUNK1 is the context set for trunk the calls are coming from.
And created the following file /var/lib/asterisk/agi-bin/clean-caller-id.php, this file removes any spaces and dashs from the caller id.
[php]
#!/usr/bin/php -q
Then I suggest you read some more. The recipe you followed created a context that modifies your CID . you need to send your inbound calls to that context.
Does any have an idea why this doesn’t work?. I’ve changed the OBITRUNK1 in extensions_custom.conf to reflect my trunk name. (Under Connectivity - Trunks Trunk Name half way down)
The only thing I can think of is maybe this is incorrect and should be different ? Without this working this really makes FreePBX useless, because inbound routes can’t be directed properly and caller ID passed to the phone is messed up with an added ‘20’ instead replacing the added space.
I’m not a PHP expert but can’t really see a problem with the script ?
Still not working The only think thing I changed was the name of the trunk the call came in on in the extensions_custom.conf file. Looking at the log it appears the call came in correctly on trunk SIP/BTLL-00000010 the trunk name is BTLL do I need add the ‘-00000010’ bit to the conf file ?
I put the additional lines at the start of the extensions_custom.conf file before a few of lines for my UKDDI lines other than that it’s empty
Yes, numbers show up but they still include the - and a space (0114-123 4567) so I assume the patch is not working for some reason. I think the extensions_custom.conf gets ‘called’ when a call comes in then runs the script ?