Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


mjb

mjb

996 posts

Ultimate Geek

Trusted

#33497 6-May-2009 20:16
Send private message

To save me reinventing the wheel, has anyone done some work in their asterisk dialplan to 'clean up' the incoming callerid data from their SIP trunk?

I'm interested in things like:

64X[localnum] -> 4[localnum]
64X[nonlocalnum] -> 0X[nonlocalnum]
642X[mobile] -> 02X[mobile]

etc etc. That's not the exact set of course, just the concept. It looks easy to do with some variable tests and what not, but if someone else has done it already... :)

(on this note, what do people use for CIDName lookup if you use it at all? just astdb with LookupCIDName() and co?)




contentsofsignaturemaysettleduringshipping


Create new topic
sbiddle
30853 posts

Uber Geek

Retired Mod
Trusted
Biddle Corp
Lifetime subscriber

  #212940 6-May-2009 20:30
Send private message

I use astdb with LookupCIDName().. Has great integration into FreePBX if you are using that.




mjb

mjb

996 posts

Ultimate Geek

Trusted

  #212943 6-May-2009 20:34
Send private message

Nup, apt-get install asterisk :)

Yeah, looking to just use astdb for now, may look into developing a simple web interface to a database table down the line.

More interested in the first item tbh :)

To start with I might just modify "64" to "0". I forgot to mention, that this is mainly so that redialing from callerid works on the old pots cordless.




contentsofsignaturemaysettleduringshipping


sbiddle
30853 posts

Uber Geek

Retired Mod
Trusted
Biddle Corp
Lifetime subscriber

  #212948 6-May-2009 20:57
Send private message

I don't have any issues with my trunks - I'm assuming you're using iTalk or somebody that sends in the full IDD format?

I remember playing with this a long time ago and from memory had it strip the 64 and replace it with a 0 so last call return would work. I can't remember off the top of my head the code I changed but I remember Google being my friend at the time and it was very simple.

I'm not quite sure how you would differentiate between a local and non local number, ideally you should be using the 0x xxxxxxx for all local or national numbers so that calls outside your LICA that are also within the same STD code will work.



mjb

mjb

996 posts

Ultimate Geek

Trusted

  #212952 6-May-2009 21:28
Send private message

Yep, considered all of that... for now just 64 => 0 will be fine. (yes, it's iTalk, bite me :P)

I've come up with this:


[macro-process-callerid]
; Fix up the "64" prefix
exten => s,1,ExecIf($["${CALLERID(num):0:2}" == "64"]|Set|CALLERID(num)=0${CALLERID(num):2})
; Update the CallerID name from astdb
exten => s,n,Set(DBCIDName=${DB(cidname/${CALLERID(num)})})
exten => s,n,ExecIf($["${DBCIDName}" != ""]|Set|CALLERID(name)=${DBCIDName})
; Now Announce the callerID data to various locations on the LAN
exten => s,n,AGI(cid_dream.agi|${CALLERID(num)}|${CALLERID(name)})
exten => s,n,AGI(cid_growl.agi|${CALLERID(num)}|${CALLERID(name)})


Works well. The only downside is having to run away and add data to astdb :)




contentsofsignaturemaysettleduringshipping


mjb

mjb

996 posts

Ultimate Geek

Trusted

  #212959 6-May-2009 21:56
Send private message

Dammit, freitasm, please enable <pre> :)




contentsofsignaturemaysettleduringshipping


coffeebaron
6233 posts

Uber Geek

Trusted
Lifetime subscriber

  #212968 6-May-2009 22:26
Send private message

The other option is to "fix" the caller ID on the outgoing call. So an incoming call ID of:
6491234567 would be dialed from your pots phone as such, but your outgoing dial rule would strip & change 64 to 0.




Rural IT and Broadband support.

 

Broadband troubleshooting and master filter installs.
Starlink installer - one month free: https://www.starlink.com/?referral=RC-32845-88860-71 
Wi-Fi and networking
Cel-Fi supply and installer - boost your mobile phone coverage legally

 

Need help in Auckland, Waikato or BoP? Click my email button, or email me direct: [my user name] at geekzonemail dot com


mjb

mjb

996 posts

Ultimate Geek

Trusted

  #212971 6-May-2009 22:34
Send private message

That's true, but in this instance I want to fix up the incoming number, as it gets displayed on the TV and with growl on PC's on the network. Much easier to read without the 64.




contentsofsignaturemaysettleduringshipping


 
 
 

Cloud spending continues to surge globally, but most organisations haven’t made the changes necessary to maximise the value and cost-efficiency benefits of their cloud investments. Download the whitepaper From Overspend to Advantage now.
superfishnz
3 posts

Wannabe Geek


  #400496 5-Nov-2010 09:30
Send private message

mjb: Nup, apt-get install asterisk :)



Yeah, looking to just use astdb for now, may look into developing a simple web interface to a database table down the line.



More interested in the first item tbh :)



To start with I might just modify "64" to "0". I forgot to mention, that this is mainly so that redialing from callerid works on the old pots cordless.



Hi mjb,

Sorry to bring up an old topic but I just joined with iTalk.

When I get a missed call, I would like to view it, then press the dial button my phone and it will dial the correct number. However, given this format, when I try to dial it from my phone (using iTalk via Linksys PAP2T), it tries to dial "0649xxxxxxx" which then gives me an invalid tone reply....

Is there anyway I can fix this by putting in a dial plan or something into my Linksys PAP device?

Any help appreciated.

I have posted this on the iTalk forum at Slingshot but no one's reply so hence I thought I would ask here as I would probably get an answer here than on Slingshot's forum (Surprised)

Thanks



webwat
2036 posts

Uber Geek

Trusted

  #401022 6-Nov-2010 00:06
Send private message

looks to me that you already have a dialplan adding "0" to all numbers, so check that you have the country code and national code set in the dialplan? It seems to think that "64" is for national access.




Time to find a new industry!


superfishnz
3 posts

Wannabe Geek


  #401028 6-Nov-2010 00:53
Send private message

webwat: looks to me that you already have a dialplan adding "0" to all numbers, so check that you have the country code and national code set in the dialplan? It seems to think that "64" is for national access.


Thank you for taking the time to reply.

Here is what my dial plan looks like:

(#|*xx|*0xx.|[2-9]xxxxxx|xxxS1|0210xxxxxxx|0212xxxxxx|021[3-9]xxxxx|02[0279]xxxxxxx|0240xxxxxx|024[1-
9]xxxxxxx|028[0134567]xxxxxx|028[289]xxxxxxx|026[1-3]xxxxx|0264xxxxxx|0[34679][0-
9]xxxxxx|0508xxxxxx|070xxxxxxx|080[0-8]xxxxxx|1xxx|08[2-
3]xxx|01681x.|083201234|014xx|015xxx|017[02]|00x.)


I think it may have to do with my Panasonic cordless phone. I have a Philips cordless and when it dials from a missed number, it dials it as 00649xxx xxxx which works. However, the Panasonic one tries to dial 0649xxx xxxx instead.

So I wonder if there is a way to change the dial play so it accepts it or removes the 0649 and replaces it with 09 instead? Not sure if it's possible, otherwise I may have to get a new phone......



sbiddle
30853 posts

Uber Geek

Retired Mod
Trusted
Biddle Corp
Lifetime subscriber

  #401041 6-Nov-2010 07:42
Send private message

You can't remap the CID from a Linksys ATA. Running something like Asterisk it's easy.

Your issue is that Telepermit specs say that phones have to add the 0 or 00 at the start of numbers, most phones allow this to be configured in the menu.

The real question however is why they are sending the CID in that format, while it's not wrong it's not user friendly.


techmeister
310 posts

Ultimate Geek


  #405895 17-Nov-2010 13:52
Send private message

I think they(in my case 2talk) do not send the caller ID like that, I think the issue is with the phone.
I have a Philips phone that adds 00 in front of the number all the other phones work fine.

superfishnz
3 posts

Wannabe Geek


  #405913 17-Nov-2010 14:32
Send private message

Thanks techneister,

I agree. I tried my old Philips cordless phone and while it adds 00, I am able to dial the missed number fine. However, my Panasonic doesn't do it.

Think I'll have to get a new phone then to make it work with iTalk or 2Talk then.... :(

Create new topic





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.