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



922 posts

Ultimate Geek
+1 received by user: 21

Trusted

Topic # 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
19775 posts

Uber Geek
+1 received by user: 1515

Moderator
Trusted
Biddle Corp
Subscriber

  Reply # 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



922 posts

Ultimate Geek
+1 received by user: 21

Trusted

  Reply # 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

19775 posts

Uber Geek
+1 received by user: 1515

Moderator
Trusted
Biddle Corp
Subscriber

  Reply # 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



922 posts

Ultimate Geek
+1 received by user: 21

Trusted

  Reply # 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



922 posts

Ultimate Geek
+1 received by user: 21

Trusted

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

Dammit, freitasm, please enable <pre> :)




contentsofsignaturemaysettleduringshipping

3734 posts

Uber Geek
+1 received by user: 980

Trusted
Subscriber

  Reply # 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.




Chorus has spent $1.4 billion on making their ADSL broadband network faster. Why not spend a couple of hundred to make sure you are getting the most out of your connection?
Geekzone special price: $150* for master splitter install, normally $200+ through your ISP. Auckland and Waikato areas.
*Travel charges may apply. Additional costs may apply for complex installs.
I install - Naked DSL, DSL Master Splitters, VoIP, RBI Rural Broadband. Also a dealer for WorldxChange.
Need help in Auckland or Waikato? Click my email button, or email me direct: [my user name] at geekzonemail dot com

mjb



922 posts

Ultimate Geek
+1 received by user: 21

Trusted

  Reply # 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

3 posts

Wannabe Geek


  Reply # 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



1615 posts

Uber Geek
+1 received by user: 66

Trusted

  Reply # 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.




Qualified in business, certified in fibre, stuck in copper, have to keep going  ^_^

3 posts

Wannabe Geek


  Reply # 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......



19775 posts

Uber Geek
+1 received by user: 1515

Moderator
Trusted
Biddle Corp
Subscriber

  Reply # 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.


300 posts

Ultimate Geek
+1 received by user: 15


  Reply # 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.




Now on Slingshot Better Network and it's better.

Share Image

3 posts

Wannabe Geek


  Reply # 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




Twitter »
Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





Trending now »

Hot discussions in our forums right now:

How stable are snap IP addresses?
Created by Physn, last reply by timmmay on 23-Oct-2014 10:38 (19 replies)
Pages... 2


Who Audits IRD?
Created by gundar, last reply by charsleysa on 22-Oct-2014 15:52 (18 replies)
Pages... 2


Spark Socialiser
Created by freitasm, last reply by freitasm on 22-Oct-2014 18:39 (34 replies)
Pages... 2 3


American legal jurisdiction in New Zealand
Created by ajobbins, last reply by gzt on 21-Oct-2014 14:58 (30 replies)
Pages... 2


Another Trade Me competitor: SellShed
Created by freitasm, last reply by SellShed on 22-Oct-2014 11:54 (42 replies)
Pages... 2 3


iPad Air 2 and iPad Mini 3. Gonna get one?
Created by Dingbatt, last reply by Paul1977 on 23-Oct-2014 10:39 (85 replies)
Pages... 4 5 6


Theif taunts 12 year old via stolen laptop
Created by macuser, last reply by charsleysa on 22-Oct-2014 23:49 (12 replies)

Snap have failed our company!
Created by dafman, last reply by sbiddle on 23-Oct-2014 11:23 (35 replies)
Pages... 2 3



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.

Alternatively, you can receive a daily email with Geekzone updates.