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.


Glazza

279 posts

Ultimate Geek

Trusted

#207499 29-Dec-2016 09:35
Send private message

Hi All

 

Does anyone know if it is possible to have Spark provide you with the complete number, including the leading 0(s) on a Spark ISDN Primary Rate.

 

I realise that the Telepermit standard states that the 0 is required to be added by the end point; however with the longer numbers used by the mobile providers it isn't as straight forward as it was assumed to be when the telepermit standard was created.

 

The Telepermit assumption was:

 

if the number presented was less than 7 digits, you didn't insert the leading 0
if 8 or 9 digits, you insert the leading 0 (this was generally accurate, although some small countries would get presented as a national number)
if over 10 digits, you inserted 00 (as this was a international call).

 

This isn't a new issue; but I'm struggling to find a suitable solution, without having Spark include the required 0's.

 

Thanks


Create new topic
sbiddle
30853 posts

Uber Geek

Retired Mod
Trusted
Biddle Corp
Lifetime subscriber

  #1696069 29-Dec-2016 09:37
Send private message

Nope.

 

0 is not part of a phone number, it's an access code, so isn't included on the ANI/CLI

 

 

 

 




Glazza

279 posts

Ultimate Geek

Trusted

  #1696074 29-Dec-2016 09:56
Send private message

sbiddle:

 

Nope.

 

0 is not part of a phone number, it's an access code, so isn't included on the ANI/CLI

 

 

Thanks Steve - in the numerous installations that you have undertaken how to do work around this?


sbiddle
30853 posts

Uber Geek

Retired Mod
Trusted
Biddle Corp
Lifetime subscriber

  #1696075 29-Dec-2016 10:02
Send private message

Glazza:

 

sbiddle:

 

Nope.

 

0 is not part of a phone number, it's an access code, so isn't included on the ANI/CLI

 

 

Thanks Steve - in the numerous installations that you have undertaken how to do work around this?

 

 

It's been a long time since I've played with any PRI gear and everything I maintain now is pure SIP.

 

There isn't an simple fix for your problem with the 10 digit mobile ranges because any assumptions for 0 and 00 end up being wrong. If you're using something like Asterisk it wouldn't be that difficult as you could look at the inbound number and match for NZ fixed line and mobile based on the number ranges and then add 00 for everything else.

 

 

 

 

 

 

 

 




Glazza

279 posts

Ultimate Geek

Trusted

  #1696077 29-Dec-2016 10:10
Send private message

 

 

sbiddle:

 

 

 

It's been a long time since I've played with any PRI gear and everything I maintain now is pure SIP.

 

There isn't an simple fix for your problem with the 10 digit mobile ranges because any assumptions for 0 and 00 end up being wrong. If you're using something like Asterisk it wouldn't be that difficult as you could look at the inbound number and match for NZ fixed line and mobile based on the number ranges and then add 00 for everything else.

 

 

Thanks - I did look at that; but lost motivation when I discovered that country code 27 was South Africa, (would be 27 xxx xxx xxx when calling NZ, and I don't believe we have any 027 numbers that long in NZ?

 

I'm not too worried about 21 - I dont think we would receive many calls from those countries.

 

Cheers


Glazza

279 posts

Ultimate Geek

Trusted

  #1696230 29-Dec-2016 16:56
Send private message

I've gone with the following hack for now..  my Asterisk skills are somewhat questionable...  but this seems to do the job...

 

[from-Spark-ISDN]
exten => _X.,1,Set(CLIDLen=${LEN(${CALLERID(num)})})
exten => _X.,n,Gotoif($["${CLIDLen}" <= "7"}]?end)
exten => _X.,n,Gotoif($["${CLIDLen}" <= "9"}]?prepend0)
exten => _X.,n,Gotoif($["${CLIDLen}" = "10"}]?check)
exten => _X.,n,Gotoif($["${CLIDLen}" > "10"}]?prepend00)

 

; Assume number is a regional NZ Number - add 0
exten => _X.,n(prepend0),Set(CALLERID(num)=0${CALLERID(num)})
exten => _X.,n,Goto(end)

 

; Assume number is international number - add 00
exten => _X.,n(prepend00),Set(CALLERID(num)=00${CALLERID(num)})
exten => _X.,n,Goto(end)

 

; Check number to see number is NZ Mobile
exten => _X.,n(check),ExecIf($[ "${CALLERID(num):0:1}" = "2"]?Goto(prepend0):Goto(prepend00))
exten => _X.,n,Goto(end)

 

; End
exten => _X.,n(end),NoOp(CLID is ${CALLERID(num)})
exten => _X.,n,Goto(from-trunk,${EXTEN},1)
include => from-pstn


sbiddle
30853 posts

Uber Geek

Retired Mod
Trusted
Biddle Corp
Lifetime subscriber

  #1696232 29-Dec-2016 17:01
Send private message

Good work!


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.