Caller id number not showing on extension via Linksys3000

I’m using a Linksys3000 for receiving calls from the PSTN.
The FXS line is registered as extension 1000 port 5060
The FXO line is registered as extension 1001 port 5061

PSTN calls arriving at the FXO are forwarded to Asterisk extension 99, as described in
forum.voxilla.com/linksys-sipura … 10193.html

  1. PSTN Line tab:

PSTN-To-VoIP Gateway Setup

PSTN-To-VoIP Gateway Enable: NO
PSTN Ring Thru Line 1: YES
PSTN CID For VoIP CID: YES

(here’s one of the tricks to make it work)

PSTN CID Number Prefix: A

(I used ‘A’ but I suppose you could pick any ALPHA character that WOULDN’T be expected as a valid caller-ID NUMBER)

FXO Timer Values (sec)

PSTN Ring Thru Delay: 3

  1. User 1 tab:

Selective Call Forward Settings

Cfwd Sel1 Caller: A*
Cfwd Sel1 Dest: 99

  1. In Asterisk (in the context that you’ve defined exten 99):

exten => 99,1,SETCIDNUM(${CALLERIDNUM:1})
exten => 99,2,Dial(SIP/${exten})
(for example)

Here’s what happens:

Call rings FXO port.

Wait three seconds so that caller-ID gets sent (you might need to increase this, but 3 secs seems to work fine for me) to the SPA3000.

PREFIX the caller-ID NUMBER with a LETTER before passing it to LINE 1

(so if original caller-ID was 5559991212, it’s now A5559991212, not a ‘valid’ caller ID number, but SPA3000 and Asterisk don’t seem to care, thankfully).

SELECTIVELY forward ONLY calls with caller-ID NUMBER that begin with A (actually this should be EVERY inbound PSTN call) to Asterisk extension 99

As soon as Asterisk gets the call, STRIP the ‘invalid’ A off and we’re left with a good, original callerID number. Send the call out to a device (can be the SPA3000 FXS (exten 2000) or port if you want!)

The call is still UNANSWERED at this point.

FXS port starts to ring, and original PSTN-provided caller-ID is sent as usual.

Answer extension 99 (or send it voicemail) and FXO finally goes off-hook.

You can make calls to extension 2000 and not worry about them being bounced back to extension 99 since no “normal” caller-ID NUMBER should ever (??) start with “A”

So far so good :smiley:

My config of extension 99 is:
exten=>99,1,SetCIDNum(${CALLERID(number):1})
exten=>99,n,NoOp(${CALLERIDNUM})
exten=>99,n,dial(sip/1000)

My only problem is that extension 1000 does NOT show the PSTN caller id number, but the internal number 1001 (the FXO number from the Linksys)

The PSTN caller id number is however reveived, see:

= Parsing ‘/etc/asterisk/sip_notify.conf’: Found
– Executing SetCIDNum(“SIP/1001-081b1308”, “04763788xx”) in new stack
– Executing NoOp(“SIP/1001-081b1308”, “04763788xx”) in new stack
– Executing Dial(“SIP/1001-081b1308”, “sip/1000”) in new stack
– Called 1000
– SIP/1000-081c9390 is ringing
== Spawn extension (default, 99, 3) exited non-zero on ‘SIP/1001-081b1308’

How can I have 04763788xx displayed on my telephone :confused:

[quote=“henkoegema”]I’m using a Linksys3000 for receiving calls from the PSTN.
The FXS line is registered as extension 1000 port 5060
The FXO line is registered as extension 1001 port 5061

PSTN calls arriving at the FXO are forwarded to Asterisk extension 99…[/quote]

What version of Asterisk are you running? You may need to change the config thus:

exten => 99,1,Set(CALLERID(all)="${CALLERID(name)}" <"${CALLERID(number):1}">)

-jav

[quote=“javierhenderson”]

What version of Asterisk are you running? You may need to change the config thus:

exten => 99,1,Set(CALLERID(all)="${CALLERID(name)}" <"${CALLERID(number):1}">)

-jav[/quote]

I use Asterisk 1.2.16

This line:
exten => 99,1,Set(CALLERID(all)="${CALLERID(name)}" <"${CALLERID(number):1}">)
gives me a loop:

– Executing Set(“Local/99@default-b3c8,2”, “CALLERID(all)=1001<0476378861<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<”) in new stack
== Spawn extension (default, 99, 3) exited non-zero on ‘Local/99@default-c201,2’
– Executing NoOp(“Local/99@default-b3c8,2”, “”) in new stack
– Executing Dial(“Local/99@default-b3c8,2”, “sip/1000”) in new stack
– Called 1000
– Got SIP response 302 “Moved Temporarily” back from 192.168.1.12
– Now forwarding Local/99@default-b3c8,2 to ‘Local/99@default’ (thanks to SIP/1000-081bc1f0)
– Executing Set(“Local/99@default-e1e1,2”, “CALLERID(all)=1001<0476378861<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<”) in new stack
– Executing NoOp(“Local/99@default-e1e1,2”, “”) in new stack
– Executing Dial(“Local/99@default-e1e1,2”, “sip/1000”) in new stack
– Called 1000
– Got SIP response 302 “Moved Temporarily” back from 192.168.1.12
– Now forwarding Local/99@default-e1e1,2 to ‘Local/99@default’ (thanks to SIP/1000-081d3468)
== Spawn extension (default, 99, 3) exited non-zero on ‘Local/99@default-e1e1,2’
== Spawn extension (default, 99, 3) exited non-zero on ‘Local/99@default-b3c8,2’
– Executing Set(“Local/99@default-65aa,2”, “CALLERID(all)=1001<0476378861<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<”) in new stack
– Executing NoOp(“Local/99@default-65aa,2”, “”) in new stack
– Executing Dial(“Local/99@default-65aa,2”, “sip/1000”) in new stack
– Called 1000
– Got SIP response 302 “Moved Temporarily” back from 192.168.1.12
– Got SIP response 481 “Call Leg/Transaction Does Not Exist” back from 192.168.1.12
== Spawn extension (default, 99, 3) exited non-zero on ‘Local/99@default-65aa,2’

Greetings
Henk

[quote=“javierhenderson”]

exten => 99,1,Set(CALLERID(all)="${CALLERID(name)}" <"${CALLERID(number):1}">)

-jav[/quote]

Thanks Javier for putting me on the right track :smiley:

This line works OK:
exten=>99,1,Set(CALLERID(all)=${CALLERIDNUM:1})

When the PSTN number is sent it shows on the phone. :laughing:
When no PSTN number is sent, it show 1001 on the phone. (which is ok) :

[quote=“henkoegema”][quote=“javierhenderson”]

exten => 99,1,Set(CALLERID(all)="${CALLERID(name)}" <"${CALLERID(number):1}">)

-jav[/quote]

Thanks Javier for putting me on the right track :smiley:

This line works OK:
exten=>99,1,Set(CALLERID(all)=${CALLERIDNUM:1})

When the PSTN number is sent it shows on the phone. :laughing:
When no PSTN number is sent, it show 1001 on the phone. (which is ok) :[/quote]

The line I suggested would add the caller id name as well. Try taking out the < > and see if it works for you. It works with Asterisk 1.4.0 which is what I’m running here, it displays “John Doe <555-555-1212>”

-jav

[quote]

exten => 99,1,Set(CALLERID(all)="${CALLERID(name)}" <"${CALLERID(number):1}">)

The line I suggested would add the caller id name as well. Try taking out the < > and see if it works for you. It works with Asterisk 1.4.0 which is what I’m running here, it displays “John Doe <555-555-1212>”

-jav[/quote]

I understand that the number can be assigned to the varialble ${CALLERID(number):1}, because the number is sent by the PTT operator.

BUT

How is the name ‘Doe’ assigned to the variable ${CALLERID(name) ?
The PTT doesn’t send names ?

Henk

[quote=“henkoegema”][quote]

exten => 99,1,Set(CALLERID(all)="${CALLERID(name)}" <"${CALLERID(number):1}">)

The line I suggested would add the caller id name as well. Try taking out the < > and see if it works for you. It works with Asterisk 1.4.0 which is what I’m running here, it displays “John Doe <555-555-1212>”

-jav[/quote]

I understand that the number can be assigned to the varialble ${CALLERID(number):1}, because the number is sent by the PTT operator.

BUT

How is the name ‘Doe’ assigned to the variable ${CALLERID(name) ?
The PTT doesn’t send names ?[/quote]

Ah. They do here in the USA (we don’t call them PTT’s though, we have ILEC’s and CLEC’s).

-jav

[quote]

Ah. They do here in the USA (we don’t call them PTT’s though, we have ILEC’s and CLEC’s).

-jav[/quote]

Ok, now I understand.

What is the meaning of ILEC’s and CLEC’s ?

Henk

ILEC: Incumbent Local Exchange Carrier (ie, the local company that has been doing business forever)

CLEC: Competing Local Exchange Carrier (someone who came along and started offering service)

-jav

[quote]
ILEC: Incumbent Local Exchange Carrier (ie, the local company that has been doing business forever)
CLEC: Competing Local Exchange Carrier (someone who came along and started offering service)
-jav[/quote]

Thanks for your explanation. :laughing: