Asterisk 1.4 id caller number not shown whit analog phone

Hi to everyone, i have a problem with analog phones and the caller id number.

this is my dahdi-chan.conf

;;; line="3 WCTDM/0/2 FXSKS  (EC: MG2)"
signalling=fxs_ks
hidecallerid=no
usecallerid=yes
callerid=asreceived
group=2
context=Incoming
channel => 3

and this in extension.conf

but nothing, it do not want to say the caller id number. Some help?
Thx for advices[/code]

To answer this more info is needed: -
[ul]Who dials what / from where up to the point where the saydigits() is called?
What are the dialplan steps leading up to saydigits()?
It would be a useful to see the CLI output from the call the saydigits() call (with about verbose 4)[/ul]

sorry… my fault!!
So i have digium 422. Channel 3 is connected on an external pstn line.
An an external analog phone calls the PBX So i want to catch id caller number

this is output of asterisk cli

[Feb 18 18:08:30] NOTICE[6821]: chan_dahdi.c:6522 ss_thread: Got event 18 (Ring Begin)... [Feb 18 18:08:31] NOTICE[6821]: chan_dahdi.c:6522 ss_thread: Got event 2 (Ring/Answered)... -- Executing [s@Incoming:1] Set("DAHDI/3-1", "LANGUAGE()=it") in new stack -- Executing [s@Incoming:2] Wait("DAHDI/3-1", "1") in new stack -- Executing [s@Incoming:3] Answer("DAHDI/3-1", "") in new stack -- Executing [s@Incoming:4] Wait("DAHDI/3-1", "1") in new stack -- Executing [s@Incoming:5] SayDigits("DAHDI/3-1", " "" <> ") in new stack ...continue and works well
notice the << “DAHDI/3-1”, " “” <> " >> so dahdi doesn’t give a number.
Within the conversation i give this command in the cli

dahdi show channel 3

Caller ID is alway null. If with that phone i call another phone, i can see its ID number…

File Descriptor: 10 Span: 1 Extension: Dialing: no Context: Incoming Caller ID: Calling TON: 0 Caller ID name: Destroy: 0 InAlarm: 0 Signalling Type: FXS Kewlstart Radio: 0 Owner: DAHDI/3-1 Real: DAHDI/3-1 Callwait: <None> Threeway: <None> Confno: -1 Propagated Conference: -1 Real in conference: 0 DSP: yes Relax DTMF: no Dialing/CallwaitCAS: 0/0 Default law: ulaw Fax Handled: no Pulse phone: no Echo Cancellation: 128 taps, currently ON Actual Confinfo: Num/0, Mode/0x0000 Actual Confmute: No

Edit: i have just tried to froce the id number in the dahdi’s settings to 123. Dahdi return correctly this number to asterisk. So the problem is Dhadi that doesn’t recognize the id for incoming call

That narrows it down anyway. However, the DAHDI / Zaptel is the most difficult part to sort out because of there being so many variations involved.

First the obvious stuff: -

[ul]1 - If you put a Caller ID capable analog phone on the phone line directly, does it get Caller ID? (thought I’d better check that)
2 - What is the local Caller ID system where the line comes in (Italy?)? (v23, bell, DTMF. Ring start, Polarity start)
3 - What are cidsignalling, answeronpolarityswitch, hanguponpolarityswitch, cidstart and sendcalleridafter set to in chan_dahdi.conf?[/ul]

1)Yes, it does
2)Italy
3)is all commented except an #include dahdi-channels.conf
that is it:

signalling=fxo_ls
callerid="Channel 1" <4001>
mailbox=2000
group=1
context=Internal
channel => 1
callerid=
mailbox=
group=
context=default

;;; line="2 WCTDM/0/1 FXOLS  (EC: MG2)"
signalling=fxo_ls
callerid="Channel 2" <4002>
mailbox=1000
group=1
context=Internal
channel => 2
callerid=
mailbox=
group=
context=default

;;; line="3 WCTDM/0/2 FXSKS  (EC: MG2)"
signalling=fxs_ks
hidecallerid=no
usecallerid=yes
callerid=asreceived
sendcalleridafter=2
group=2
context=Incoming
channel => 3

;;; line="4 WCTDM/0/3 FXSKS  (EC: MG2)"
signalling=fxs_ks
usecallerid=yes
callerid=asreceived
group=2
context=Incoming
channel => 4
callerid=
group=
context=default

In chan_dahdi.conf, you almost certainly need these settings (before the #include) : -

loadzone=it defaultzone=it
You may need to set: -

cidsignalling=?????? cidstart=??????
I’m still trying to find out what Italy needs for the ???'s so I’m not sure if the defaults (bell,ring) are ok or not.

Also, in /etc/modprobe.conf, you probably need: -

Need to restart DAHDI after setting this change.

if you come in naples, i’ll offer you a big pizza!! Thanks for these advices, now i have edited modules.conf and chan_dahdi.conf… I’m just trying what is the Italian combination for cidsignalling… it’s not working yet…
thx so much!!!
EDIT 1: i found this bug:
mailfunnel.org/asterisk-bugs … 00219.html

It resembles my problem…

I seem to remember that bug has been floating about for some time. And I have to ask myself what idiot designed a comms standard for transferring data with no definite ‘start’ indication!

Anyway, back to the problem at hand: We are still not certain what exact system (or systems) is in use in Italy. I have a way that you can find out some of this information by experiment.

If you put something like this into your dialplan, somewhere that an extension can dial it: -

[code]exten => 883,1,DAHDIBarge(3)
exten => 884,1,DAHDIBarge(4)

-or-

exten => _88X,1,DAHDIBarge(${EXTEN:2})[/code]
Then you can dial 883 or 884 on an extension ‘listen’ to the line even when it’s on hook so you can listen as you dial a test call in to the line (from a totally separate phone like a mobile or something).

Now, how does this help? Well, we all know what DTMF tones sound like and modem tones are familiar, and a ring sounds like a nasty 25Hz buzz, so: -

  • If you hear CLICK, DTMF tones, RING - you have polarity start,dtmf
  • If you hear DTMF tones, RING - you have a problem
  • If you hear RING, DTMF, RING - you have ring start,dtmf
  • If you hear CLICK, MODEM data, RING - you have polarity start,bellcore
  • If you hear RING, MODEM data, RING - you have ring start, bellcore
  • etc. etc.

This is how I debugged & fixed the UK cid (v23) code and figured out what was going on on my lines.

Any luck?

[quote=“jedi98”]I seem to remember that bug has been floating about for some time. And I have to ask myself what idiot designed a comms standard for transferring data with no definite ‘start’ indication!

Anyway, back to the problem at hand: We are still not certain what exact system (or systems) is in use in Italy. I have a way that you can find out some of this information by experiment.

If you put something like this into your dialplan, somewhere that an extension can dial it: -

[code]exten => 883,1,DAHDIBarge(3)
exten => 884,1,DAHDIBarge(4)

-or-

exten => _88X,1,DAHDIBarge(${EXTEN:2})[/code]
Then you can dial 883 or 884 on an extension ‘listen’ to the line even when it’s on hook so you can listen as you dial a test call in to the line (from a totally separate phone like a mobile or something).

Now, how does this help? Well, we all know what DTMF tones sound like and modem tones are familiar, and a ring sounds like a nasty 25Hz buzz, so: -

  • If you hear CLICK, DTMF tones, RING - you have polarity start,dtmf
  • If you hear DTMF tones, RING - you have a problem
  • If you hear RING, DTMF, RING - you have ring start,dtmf
  • If you hear CLICK, MODEM data, RING - you have polarity start,bellcore
  • If you hear RING, MODEM data, RING - you have ring start, bellcore
  • etc. etc.

This is how I debugged & fixed the UK cid (v23) code and figured out what was going on on my lines.

Any luck?[/quote]
Thx so much!!! Tommorrow i’ll try to do this experiment!! [/quote]

i hear only a long dtmf tone

i hve done in this way:
[Incoming]
exten=>s,1,DAHDIBarge(3)

I call 310 (asterisk external number) from a telephone (319) and i hear a never ending dtmf tone…
Does something go wrong?

No, I think you misunderstood. I’m terrible at explaining stuff. I’ll try again!

Add an extension 399 (presuming that 399 is not used) into the same context where 310 & 319 are defined in the dialplan, e.g. : -

exten=>310,1,(definition for exten 310) exten=>319,1,(definition for exten 319) exten=>399,1,DAHDIBarge(3)
CLI> dialplan reload

Now, pick up 319 and dial 399, you should hear silence. You are listening to the sound of the open DAHDI/3 line while it is still on-hook. Keep listening…

Now get a completely unconnected phone like a mobile or other phone line or anything you can lay your hands on that is not connected to your * server and dial the public incoming number for your incoming line.

To summarize, you are making 2 calls, one to listen to the open line and one to create an incoming call from outside.

There are other ways, this is the simplest.

i’m newbie :blush:

this is my extension.conf

[code][general]
static = yes
writeprotecte = yes

[Internal]

exten => 1000,1,Dial(dahdi/1,20,t)
exten => 1000,n,Set(LANGUAGE() = IT)
exten => 1000,n,SayNumber(EXTEN)
exten => 1000,n,Goto(s-${DIALSTATUS},1)

exten => 2000,1,Dial(dahdi/1,20,t)
exten => 2000,n,Set(LANGUAGE() = IT)
exten => 2000,n,SayNumber(EXTEN)
exten => 2000,n,Goto(s-${DIALSTATUS},1)

exten => s-NOANSWER,1,Festival(‘non risponde’)
exten => s,n,System(playsox.sh)
exten => s,n,Playback(frasetemp)

exten => s-BUSY,1,Festival('Occupato! ')
exten => s,n,System(playsox.sh)
exten => s,n,Playback(frasetemp)

exten => _s-.,1,Goto(s-NOANSWER,1)

exten => 8000,1,MusicOnHold()

exten => _9.,1,Dial(dahdi/g2/www${EXTEN:1})
exten => _9.,2,Congestion

[Incoming]
exten => s,1,Set(LANGUAGE()=it)
exten => s,n,Wait(1)
exten => s,n,Answer()
exten => s,n,Wait(1)
exten => s,n,SayDigits( ${CALLERID(all)} ${CALLERID(num)} )

;;Questo genera il wav in /tmp/output.wav
exten => s,n,Festival(‘Benvenuto! Digita il codice del manifesto!’)
;;questo trasforma il wav in un file gsm frasetemp.gsm nella cartlla di asterisk
exten => s,n,System(playsox.sh)
;;questo riproduce il frasetemp.gsm
exten => s,n,Playback(frasetemp)

exten => s,n,Read(Idmanifesto,10)
;exten => s,n,Goto(Leggi-Sommario,s,1)
exten => s,n,Goto(Leggi-Manifesto,s,1)
;exten => s,n,Hangup

[Leggi-Manifesto]
exten => s,1,MYSQL(Connect connid 127.0.0.1 patred picciola manifest)
exten => s,n,MYSQL(Query resultid ${connid} SELECT\ testo\ FROM\ Manifesto\ WHERE\ id=${Idmanifesto})
exten => s,n,MYSQL(Fetch fetchid ${resultid} text)

exten => s,n,Festival(${text})
exten => s,n,System(playsox.sh)
exten => s,n,Playback(frasetemp)

exten => s,n,MYSQL(Clear ${resultid})
exten => s,n,MYSQL(Disconnect ${connid})
exten => s,n,Hangup

[Leggi-Sommario]
exten => s,1,MYSQL(Connect connid 127.0.0.1 patred picciola manifest)
exten => s,n,MYSQL(Query resultid ${connid} SELECT\ sommario\ FROM\ Manifesto\ WHERE\ id=${Idmanifesto})
exten => s,n,MYSQL(Fetch fetchid ${resultid} text)
exten => s,n,Festival(${text})
exten => s,n,System(playsox.sh)
exten => s,n,Playback(frasetemp)
exten => s,n,MYSQL(Clear ${resultid})
exten => s,n,MYSQL(Disconnect ${connid})
exten => s,n,Hangup
[/code]
Can you suggest to me where to put these lines?
In incoming or Internal? Sorry :blush:

Ok, try this, add the DAHDIBarge() under internal, something like this (I have integrated it into your numbering system): -... exten => 8000,1,MusicOnHold() exten => 8993,1,DAHDIBarge(3) ...
Now, temporarily, change your first Wait() on internal to 10 so that the line has 10 seconds of being undisturbed by asterisk (change it backe when done): -[Incoming] exten => s,1,Set(LANGUAGE()=it) exten => s,n,Wait(10) ...
Also, is this line you have, correct: -exten => 2000,1,Dial(dahdi/1,20,t)Should that dahdi/1 be dahdi/2 ?

Make sure you’ve done a dialplan reload.

Now, it looks like you have 2 extensions, 1000 & 2000 so pick up one of those phones and dial 8993. You should hear silence. You are listening to the sound of the open DAHDI/3 line while it is still on-hook.

You should now trigger an incoming call to DAHDI line 3 and see what you hear…

many thanks for your support… I have a debt to you !!!
So this is what I hear:

italianhost.org/mp3host/images/7 … 0cm3wv.mp3
or
badongo.com/audio/13543712

are the same in different hosts…
What do you think about? Many many Thanks again!

sounds to me like no Caller ID data is being sent… all I heard in the audio is the ringing voltage…

does caller ID work if you take a caller-ID capable telephone and plug directly into the line and call it?

perhaps check with telephone company and make sure caller ID is present on the line… it appears no caller ID is coming from the Telco
-Christopher

Near the top of the thread Carlo indicated that a phone on the line does get caller id. Now I wonder are there 2 lines one with caller id service & one without? Otherwise this is beginning to turn into a real mystery!

Maybe you are right… i’ll try some experiment… thanks to all !!!especially to Jedi98

Asterisk is on a different line than the phone (a digital phone so i can’t plug asterisk analog phone in to it)… Maybe it doesn’t have a cid signalling…