Caller id from PSTN line into Asterisk

Hi all,

I’ve set up my Asterisk Box.
OS:Fedora 7
Digium Card: TDM22B (2 FXS and 2 FXO)
SIP phones: Xlite & GXP 2000

I have connected 2 PSTN lines to my Asterisk box.
Everything works. Call outside, receive from outside. No problem.

If there is an incoming call, either my Xlite or GrandStream GXP 2000 will ring; depends on which line you call.

My question is about caller id.

If I call my PSTN line (connected to Asterisk) from my cellphone, the caller id showed on Xlite or GXP2000 is “Asterisk” instead of my cellphone number.

Is there a way, that I can capture the callerId of incoming call from public line to asterisk?

So, instead of showing “Asterisk” on Xlite or GXP2000, it shows, for example, +16130000001.
Or even better, it shows “fadils” as its caller id.

Thank You
fadils

You’ll need to post your zapata.conf and zaptel.conf files for us to help you out.

Generally, you’re looking to have a setting that says:

callerid=asreceived

For the two incoming ports.

Thank you for your reply.

Here is my zaptel.conf

fxoks=1-2
fxsks=3-4
loadzone=us
defaultzone=us

my zapata.conf (for incoming lines)

language=en
context=IncomingChannel3
signalling=fxs_ks
usecallerid=yes
callerid=asreceived
hidecallerid=no
callwaiting=yes
echocancel=yes
immediate=no
group=3
channel=3

language=en
context=IncomingChannel3
signalling=fxs_ks
usecallerid=yes
callerid=asreceived
hidecallerid=no
callwaiting=yes
echocancel=yes
immediate=no
group=4
channel=4

As you said, I add callerid=asreceived, however, it’s still the same. Caller id showed on Xlite is “asterisk”.

for your reference, here is my extensions.conf

[IncomingChannel3]

exten => s,1,Dial(SIP/XliteRN)

so, anybody can help?

Did you restart after you made your changes?

Restart Zaptel and Asterisk, then place a test call.

Yap.
I did restart asterisk and zaptel.

Nothing works.

However I just read that “callerid=asreceived” works only for trunk interface…

So, how can I make my SIP phones “become” like trunk interface?

Hi

Try adding

usecallerid=yes
;
;
cidsignalling=bell
;
;
cidstart=ring

Then add a Noop to see if there is actualy any CID coming in.

Ian

Hi Ian,

Thanks first of all.
I added your suggestion to my zapata.conf

language=en
context=IncomingChannel3
signalling=fxs_ks
usecallerid=yes
callerid=asreceived
cidsignalling=bell
cidstart=ring
hidecallerid=no
callwaiting=yes
echocancel=yes
immediate=no
group=3
channel=3

and my [IncomingChannel3]
exten => s,1,NoOp(${CALLERID})
exten => s,2,Dial(SIP/XliteRN)

Here what I got in the CLI:
– Executing [s@IncomingChannel3:1] NoOp(“Zap/3-1”, “” " <> ") in new stack
– Executing [s@IncomingChannel3:1] Dial(“Zap/3-1”, “SIP/XliteRN”)

So, it seems to me no caller id get in. However, when I call from this phone to my cellphone, it shows the number.

If there is a way how to show the number caller id (not the name), that is still good for me…

Please help…

Not sure what version but try

exten => s,1,NoOp(${CALLERIDNUM})

and the fact that you get the CLI on your MObile has nothing todo with this as CLI, The presentation of CLI is a feature of the line not the calling party.

Ian

Hi

Just did that.

I got:
– Executing [s@IncomingChannel3:1] Dial(“Zap/3-1”, “”)

So, what went wrong??
Is there any way to solve this problem?

oops… wrong copy-and-paste. it should be

– Executing [s@IncomingChannel3:1] NoOp(“Zap/3-1”, “”) in new stack

Hello I have just installed my asterisk server on debian. this sever has a digium card TDP04B (which can take 4 PSTN line)

But I have a serious problem I do not know how to make my dial plan and routing of the calls to and from PSTN line

I would be be very hapy if you help me to make my dial plan of routing of the calls

Here the list of my purpose

  1. in local network calls between users of the local network are direct (user with a station sip or a softphone can join directly another) and the number vary between 1000 and 1200

This first purpose is working fine

  1. calls towards line PSTN use the chart diguim: user uses an extension “8” for example to take line PSTN: each call begining by 8 is transfered to PSTN line

  2. Every call begining by 9 are transfered on our FAI sip account

For the reception of the calls all the calls coming from outside (line PSTN) are:

  • tranfered to the standard (1000) and it is the standard which transmits the call to the person indicated in local network

please help me to adapt my dial plan (extention.conf) for PSTN call and international call
Thank you in advance for your assistance