[Home]

Summary:ASTERISK-15942: Caller ID from internal DAHDI extensions not detected
Reporter:Leonardo Cardozo Vargas (lcvleo)Labels:
Date Opened:2010-04-11 18:22:35Date Closed:2010-04-11 20:57:40
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Channels/chan_dahdi
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I use Asterisk with FreePBX. FreePBX has a macro called user-callerid that gets the caller id from the extensions and give it to other parts like, for exemple, the voicemail *97 feature. But, apparently chan_dahdi don't gives the caller id informations. When I place a call, the log bellow is presented:

-- Starting simple switch on 'DAHDI/3-1'
-- Executing [*97@from-internal:1] Answer("DAHDI/3-1", "") in new stack
-- Executing [*97@from-internal:2] Wait("DAHDI/3-1", "1") in new stack
-- Executing [*97@from-internal:3] Macro("DAHDI/3-1", "user-callerid,") in new stack
-- Executing [s@macro-user-callerid:1] Set("DAHDI/3-1", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("DAHDI/3-1", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("DAHDI/3-1", "1?Set(REALCALLERIDNUM=)") in new stack
-- Executing [s@macro-user-callerid:4] Set("DAHDI/3-1", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:5] Set("DAHDI/3-1", "AMPUSERCIDNAME=") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("DAHDI/3-1", "1?report") in new stack
-- Goto (macro-user-callerid,s,10)
-- Executing [s@macro-user-callerid:10] GotoIf("DAHDI/3-1", "0?continue") in new stack
-- Executing [s@macro-user-callerid:11] Set("DAHDI/3-1", "__TTL=64") in new stack
-- Executing [s@macro-user-callerid:12] GotoIf("DAHDI/3-1", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] NoOp("DAHDI/3-1", "Using CallerID "" <>") in new stack
-- Executing [*97@from-internal:4] Macro("DAHDI/3-1", "get-vmcontext,") in new stack
-- Executing [s@macro-get-vmcontext:1] Set("DAHDI/3-1", "VMCONTEXT=") in new stack
-- Executing [s@macro-get-vmcontext:2] GotoIf("DAHDI/3-1", "1?200:300") in new stack
-- Goto (macro-get-vmcontext,s,200)
-- Executing [s@macro-get-vmcontext:200] Set("DAHDI/3-1", "VMCONTEXT=default") in new stack
-- Executing [*97@from-internal:5] MailboxExists("DAHDI/3-1", "@default") in new stack
-- Executing [*97@from-internal:6] GotoIf("DAHDI/3-1", "0?mbexist") in new stack
-- Executing [*97@from-internal:7] VoiceMailMain("DAHDI/3-1", "") in new stack
-- Playing 'vm-login.gsm' (language 'en')

At the 5th line from this log, the variable "AMPUSER=" comes empty.

When I run the command "asterisk -rx 'database show device/7000'", the bellow is presented:

[root@remi asterisk]# asterisk -rx 'database show device/7000' ->
Parsing /etc/asterisk/extconfig.conf
/DEVICE/7000/default_user : 7000
/DEVICE/7000/dial : DAHDI/3
/DEVICE/7000/type : fixed
/DEVICE/7000/user : 7000
4 results found.
Asterisk ending (0).

And, when I run the command "asterisk -rx 'dahdi show channel 3'", the bellow is presented:

[root@remi ~]# asterisk -rx 'dahdi show channel 3'
Parsing /etc/asterisk/extconfig.conf
Channel: 3
File Descriptor: 32
Span: 1
Extension:
Dialing: no
Context: from-internal
Caller ID:
Calling TON: 0
Caller ID name:
Mailbox: 7000@default
Destroy: 0
InAlarm: 0
Signalling Type: FXO 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
Busy Detection: yes
   Busy Count: 2
   Busy Pattern: 0,0
TDD: no
Relax DTMF: no
Dialing/CallwaitCAS: 0/0
Default law: ulaw
Fax Handled: no
Pulse phone: no
DND: no
Echo Cancellation:
       128 taps
       (unless TDM bridged) currently OFF
Wait for dialtone: 0ms
Actual Confinfo: Num/0, Mode/0x0000
Actual Confmute: No
Hookstate (FXS only): Offhook
Asterisk ending (0).

In the log above, the variables Caller ID: and Caller ID name: come empty.

/etc/asterisk/chan_dahdi.conf:

[channels]
language=en
usecallerid=yes
hidecallerid=no
callwaiting=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
rxgain=5.0
txgain=5.0
progzone=br
tonezone=20
cidsignalling=dtmf
cidstart=polarity
canpark=yes
callreturn=yes
useincomingcalleridondahditransfer=yes

[netphones](!)
group=0
callgroup=0
pickupgroup=0
signalling=fxs_ks
callerid=asreceived
context=from-zaptel
echotraining=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=yes
busydetect=yes
busycount=2
callprogress=yes

[internos](!)
group=1
callgroup=1
pickupgroup=1
signalling=fxo_ks
context=from-internal
echotraining=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=yes
busydetect=yes
busycount=2
callprogress=yes

[2130157398](netphones)
dahdichan=1

[2130055849](netphones)
dahdichan=2
faxdetect=incoming

[7000](internos)
dahdichan=3
callerid=Quarto <7000>
mailbox=7000@default

[7100](internos)
dahdichan=4
callerid=Fax <7100>
mailbox=7100@default

I opened a discussion at FreePBX forum and its developer answer me as possible to see in -> http://www.freepbx.org/forum/freepbx/users/macro-user-callerid-cant-find-ampuser.
Comments:By: Leonardo Cardozo Vargas (lcvleo) 2010-04-11 18:28:22

chan_dahdi.so => (DAHDI Telephony Driver w/PRI & SS7 & MFC/R2)

By: Leonardo Cardozo Vargas (lcvleo) 2010-04-11 19:24:30

I found the solution at the ticket https://issues.asterisk.org/view.php?id=16968.
This ticket can be closed!
Thank you so much!

By: Paul Belanger (pabelanger) 2010-04-11 20:57:40

Closed for OP.