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
+1 received by user: 11

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
+1 received by user: 9996

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
+1 received by user: 11

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
+1 received by user: 9996

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
+1 received by user: 11

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
+1 received by user: 11

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
+1 received by user: 9996

Retired Mod
Trusted
Biddle Corp
Lifetime subscriber

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

Good work!


Create new topic








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.