TE220 Unable to create channel of type 'DAHDI'

Hi Guys,
Having issues placing outgoing calls with our Trixbox server.
Using a TE220 Gen5 connected to a ISDN E1 connection (Australia)

Sip.conf:

cat /etc/asterisk/sip.conf
[general]
limitonpeer=yes
; required for HUDPhone
ignoresdpversion=1
counteronpeer=yes
constantssrc=yes
port=5060 ; Port to bind to
bindaddr=0.0.0.0 ; Address to bind to
tcpenable=yes
tcpbindaddr=0.0.0.0
context=incoming ; Default for incoming calls
tos=none
dtmfmode=info
disallow=all
allow=ulaw
allow=alaw
allow=gsm
allow=ilbc

externip=59.167.141.247 ; Address that we’re going to put in outbound SIP messages
; if we’re behind a NAT

                            ; The externip and localnet is used
                            ; when registering and communicating with other proxies
                            ; that we're registered with
                            ; You may add multiple local networks.  A reasonable set of defaults
                            ; are:

localnet=192.168.0.0/255.255.0.0; All RFC 1918 addresses are local networks
localnet=10.0.0.0/255.0.0.0 ; Also RFC1918
localnet=172.16.0.0/12 ; Another RFC1918 with CIDR notation
localnet=169.254.0.0/255.255.0.0 ;Zero conf local network
localnet=1.0.0.0/255.0.0.0
localnet=2.0.0.0/255.0.0.0
qualifyfreq=55

system.conf

cat /etc/dahdi/system.conf

loadzone = au
defaultzone=au

span=1,1,0,ccs,hdb3,crc4
bchan=1-15,17-31

chan_dahdi.conf

[channels]
usecallerid=yes
echocancelwhenbridged=yes
hidecallerid=no
threewaycalling=yes
transfer=yes
immediate=no
callgroup=1
rxwink=300
pickupgroup=1
cancallforward=yes
callwaitingcallerid=yes
callreturn=yes
callwaiting=yes
usecallingpres=yes

group=1
echocancel=0
rxgain=0.0
switchtype=euroisdn
txgain=0.0
echotraining=0
signalling=pri_cpe
context=incoming

output when trying to make a call

asterisk vvvvr
cli
== Using SIP RTP CoS mark 5
– Executing [0401834231@device-internal:1] Set(“SIP/0004F2161DEB-0000000b”, “__HUD_fmfm_set=-1”) in new stack
– Executing [0401834231@device-internal:2] Gosub(“SIP/0004F2161DEB-0000000b”, “SetHUDfmfm,s,1(”")") in new stack
– Executing [s@SetHUDfmfm:1] GotoIf(“SIP/0004F2161DEB-0000000b”, “0?2:3”) in new stack
– Goto (SetHUDfmfm,s,3)
– Executing [s@SetHUDfmfm:3] GotoIf(“SIP/0004F2161DEB-0000000b”, “1?4:7”) in new stack
– Goto (SetHUDfmfm,s,4)
– Executing [s@SetHUDfmfm:4] Set(“SIP/0004F2161DEB-0000000b”, “HUD_fmfm=”"") in new stack
– Executing [s@SetHUDfmfm:5] UserEvent(“SIP/0004F2161DEB-0000000b”, “fmfm,fmfm: “””) in new stack
– Executing [s@SetHUDfmfm:6] Set(“SIP/0004F2161DEB-0000000b”, “__HUD_fmfm_set=0”) in new stack
– Executing [s@SetHUDfmfm:7] Return(“SIP/0004F2161DEB-0000000b”, “”) in new stack
– Executing [0401834231@device-internal:3] Goto(“SIP/0004F2161DEB-0000000b”, “internal,0401834231,1”) in new stack
– Goto (internal,0401834231,1)
– Executing [0401834231@internal:1] Macro(“SIP/0004F2161DEB-0000000b”, “tollrest,dialplan,_0NXXXXXXXX”) in new stack
– Executing [s@macro-tollrest:1] AGI(“SIP/0004F2161DEB-0000000b”, “agi://127.0.0.1:6969/tollrest?type=dialplan&content=_0NXXXXXXXX&server=”) in new stack
[Feb 16 14:26:28] NOTICE[6787]: chan_sip.c:19833 handle_request_subscribe: Received SIP subscribe for peer without mailbox: (null)
– <SIP/0004F2161DEB-0000000b>AGI Script agi://127.0.0.1:6969/tollrest?type=dial … XX&server= completed, returning 0
– Executing [s@macro-tollrest:2] GotoIf(“SIP/0004F2161DEB-0000000b”, “1?20:10”) in new stack
– Goto (macro-tollrest,s,20)
– Executing [mobilenumber@internal:2] GotoIf(“SIP/0004F2161DEB-0000000b”, “0?centrex”) in new stack
– Executing [mobilenumber@internal:3] Set(“SIP/0004F2161DEB-0000000b”, “EXTENSION=3601”) in new stack
– Executing [mobilenumber@internal:4] AGI(“SIP/0004F2161DEB-0000000b”, “trixNet.agi,trixnet.trixbox.com”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/trixNet.agi
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 14:26:28] ERROR[21320]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
– <SIP/0004F2161DEB-0000000b>AGI Script trixNet.agi completed, returning 0
– Executing [mobilenumber@internal:5] AGI(“SIP/0004F2161DEB-0000000b”, “agi://localhost:4574”) in new stack
– <SIP/0004F2161DEB-0000000b>AGI Script agi://localhost:4574 completed, returning 0
– Executing [mobilenumber@internal:6] Wait(“SIP/0004F2161DEB-0000000b”, “1”) in new stack
– Executing [mobilenumber@internal:7] NoOp(“SIP/0004F2161DEB-0000000b”, “Caller ID is 0386713601”) in new stack
– Executing [mobilenumber@internal:8] GotoIf(“SIP/0004F2161DEB-0000000b”, “1?skipagi”) in new stack
– Goto (internal,mobilenumber,11)
– Executing [mobilenumber@internal:11] Set(“SIP/0004F2161DEB-0000000b”, “DIALEXTEN=mobilenumber”) in new stack
– Executing [mobilenumber@internal:12] Dial(“SIP/0004F2161DEB-0000000b”, “DAHDI/g0/mobilenumber,W”) in new stack
[Feb 16 14:26:29] WARNING[21320]: app_dial.c:1520 dial_exec_full: Unable to create channel of type ‘DAHDI’ (cause 0 - Unknown)
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [0401834231@internal:13] Congestion(“SIP/0004F2161DEB-0000000b”, “”) in new stack
== Spawn extension (internal, 0401834231, 13) exited non-zero on ‘SIP/0004F2161DEB-0000000b’
– Executing [h@internal:1] GotoIf(“SIP/0004F2161DEB-0000000b”, “1?3”) in new stack
– Goto (internal,h,3)
– Executing [h@internal:3] Hangup(“SIP/0004F2161DEB-0000000b”, “”) in new stack
== Spawn extension (internal, h, 3) exited non-zero on ‘SIP/0004F2161DEB-0000000b’

Any help?

In your chan_dahdi.conf, you have a group=1 but in dialplan it is calling for group 0 Dial(dahdi/g0/xxxxxx)

Also, I see no channel assignments in the chan_dahdi.conf. Channels need to be assigned to groups.
group=[color=#FF0000]0[/color]
echocancel=0
rxgain=0.0
switchtype=euroisdn
txgain=0.0
echotraining=0
signalling=pri_cpe
context=incoming
[color=#FF0000]channel => 1-15,17-31[/color]

In system.conf you identify the b-channels versus the d-channel, I see the b-channel definitions, but nothing for the d-channel. It may have 16 as a default but I am not sure as I always add a d-channel line just to make sure.

After changing your recommendations with out specifying the 16th channel I get the below:

== Using SIP RTP CoS mark 5
– Executing [0401834231@device-internal:1] Set(“SIP/SOFTPHONE001-00000000”, “__HUD_fmfm_set=-1”) in new stack
– Executing [0401834231@device-internal:2] Gosub(“SIP/SOFTPHONE001-00000000”, “SetHUDfmfm,s,1(”")") in new stack
– Executing [s@SetHUDfmfm:1] GotoIf(“SIP/SOFTPHONE001-00000000”, “0?2:3”) in new stack
– Goto (SetHUDfmfm,s,3)
– Executing [s@SetHUDfmfm:3] GotoIf(“SIP/SOFTPHONE001-00000000”, “1?4:7”) in new stack
– Goto (SetHUDfmfm,s,4)
– Executing [s@SetHUDfmfm:4] Set(“SIP/SOFTPHONE001-00000000”, “HUD_fmfm=”"") in new stack
– Executing [s@SetHUDfmfm:5] UserEvent(“SIP/SOFTPHONE001-00000000”, “fmfm,fmfm: “””) in new stack
– Executing [s@SetHUDfmfm:6] Set(“SIP/SOFTPHONE001-00000000”, “__HUD_fmfm_set=0”) in new stack
– Executing [s@SetHUDfmfm:7] Return(“SIP/SOFTPHONE001-00000000”, “”) in new stack
– Executing [0401834231@device-internal:3] Goto(“SIP/SOFTPHONE001-00000000”, “internal,0401834231,1”) in new stack
– Goto (internal,0401834231,1)
– Executing [0401834231@internal:1] Macro(“SIP/SOFTPHONE001-00000000”, “tollrest,dialplan,_0NXXXXXXXX”) in new stack
– Executing [s@macro-tollrest:1] AGI(“SIP/SOFTPHONE001-00000000”, “agi://127.0.0.1:6969/tollrest?type=dialplan&content=_0NXXXXXXXX&server=”) in new stack
– <SIP/SOFTPHONE001-00000000>AGI Script agi://127.0.0.1:6969/tollrest?type=dial … XX&server= completed, returning 0
– Executing [s@macro-tollrest:2] GotoIf(“SIP/SOFTPHONE001-00000000”, “1?20:10”) in new stack
– Goto (macro-tollrest,s,20)
– Executing [0401834231@internal:2] GotoIf(“SIP/SOFTPHONE001-00000000”, “0?centrex”) in new stack
– Executing [0401834231@internal:3] Set(“SIP/SOFTPHONE001-00000000”, “EXTENSION=3601”) in new stack
– Executing [0401834231@internal:4] AGI(“SIP/SOFTPHONE001-00000000”, “trixNet.agi,trixnet.trixbox.com”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/trixNet.agi
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 16 23:02:32] ERROR[11252]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
– <SIP/SOFTPHONE001-00000000>AGI Script trixNet.agi completed, returning 0
– Executing [0401834231@internal:5] AGI(“SIP/SOFTPHONE001-00000000”, “agi://localhost:4574”) in new stack
– <SIP/SOFTPHONE001-00000000>AGI Script agi://localhost:4574 completed, returning 0
– Executing [0401834231@internal:6] Wait(“SIP/SOFTPHONE001-00000000”, “1”) in new stack
– Executing [0401834231@internal:7] NoOp(“SIP/SOFTPHONE001-00000000”, “Caller ID is 0386713601”) in new stack
– Executing [0401834231@internal:8] GotoIf(“SIP/SOFTPHONE001-00000000”, “1?skipagi”) in new stack
– Goto (internal,0401834231,11)
– Executing [0401834231@internal:11] Set(“SIP/SOFTPHONE001-00000000”, “DIALEXTEN=0401834231”) in new stack
– Executing [0401834231@internal:12] Dial(“SIP/SOFTPHONE001-00000000”, “DAHDI/g0/0401834231,W”) in new stack
[color=#FF0000][Feb 16 23:02:33] WARNING[11252]: chan_dahdi.c:2915 dahdi_call: Unable to create call on channel 1
– Couldn’t call g0/0401834231
– Hungup ‘DAHDI/1-1’
== Everyone is busy/congested at this time (0:0/0/0)
– Executing [0401834231@internal:13] Congestion(“SIP/SOFTPHONE001-00000000”, “”) in new stack[/color]
== Spawn extension (internal, 0401834231, 13) exited non-zero on ‘SIP/SOFTPHONE001-00000000’
– Executing [h@internal:1] GotoIf(“SIP/SOFTPHONE001-00000000”, “1?3”) in new stack
– Goto (internal,h,3)
– Executing [h@internal:3] Hangup(“SIP/SOFTPHONE001-00000000”, “”) in new stack
== Spawn extension (internal, h, 3) exited non-zero on ‘SIP/SOFTPHONE001-00000000’

You will need to turn on detailed protocol debugging for DAHDI (and may need to adjust logger.conf, so that you can capture it).

How can I enable it?

wiki.asterisk.org/wiki/display/ … nformation

As dahdi doesn’t have a specific debug command, I imagine you will have to make use of :

[quote]*CLI> help core set debug
Usage: core set {debug|verbose} [atleast] [filename]
core set {debug|verbose} off
Sets level of debug or verbose messages to be displayed or
sets a filename to display debug messages from.
0 or off means no messages should be displayed.
Equivalent to -d[d[…]] or -v[v[v…]] on startup[/quote]

I don’t use dahdi for more than timing/meetme, so I don’t know the details.

Please contact Digium’s Support department directly.

You can open a case by visiting:
digium.com/en/users/support_ … hp?tab=log

Or contact us by telephone:
+1 256 428 6000

Setting verbose and debug to higher values offers only minor amounts of additional information when a call fails.

Can you post the Asterisk CLI output of…

pri show spans
pri show channels
dahdi show status

Also, can you post the updated chan_dahdi.conf file just to be on the safe side.

*CLI> dahdi show status
Description Alarms IRQ bpviol CRC4 Fra Codi Options LBO
T2XXP (PCI) Card 0 Span 1 OK 1 0 0 CCS HDB3 CRC4 0 db (CSU)/0-133 feet (DSX-1)
T2XXP (PCI) Card 0 Span 2 UNCONFI 1 0 0 CAS Unk YEL 0 db (CSU)/0-133 feet (DSX-1)

spans and channels were empty

cat chan_dahdi.conf
[channels]
context=incoming
switchtype=euroisdn
signalling=pri_cpe
rxwink=300 ; Atlas seems to use long (250ms) winks
usecallerid=yes
hidecallerid=no
;callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
;threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=yes
rxgain=0
txgain=0
group=0
callgroup=1
pickupgroup=1
immediate=no

callerid=asreceived

switchtype=euroisdn
pridialplan=unknown
context=incoming
group=0
signalling=pri_cpe
relaxdtmf=no
channel => 1-15,17-31

Well, Dahdi see the circuit is UP. That’s good.

If the ‘pri show spans’ returns nothing, I have to believe that the system does not realize there is a d-channel and is looking at it as plain channelized E-1. (Please note: I have never dealt with E-1 and have very little experience with non-PRI T-1)

I would go back to look at the /etc/dahdi/system.conf. Make sure the dchan=16 is in there. If you added that before, did you shut down Asterisk, unload dahdi, load dahdi and restart Asterisk?

dchan=16
That has fixed it !!!
I can make outgoing calls
but now the below happens and the call drops after 21sec with silence in between

== Using SIP RTP CoS mark 5
– Executing [0401834231@device-internal:1] Set(“SIP/SOFTPHONE001-00000002”, “__HUD_fmfm_set=-1”) in new stack
– Executing [0401834231@device-internal:2] Gosub(“SIP/SOFTPHONE001-00000002”, “SetHUDfmfm,s,1(”")") in new stack
– Executing [s@SetHUDfmfm:1] GotoIf(“SIP/SOFTPHONE001-00000002”, “0?2:3”) in new stack
– Goto (SetHUDfmfm,s,3)
– Executing [s@SetHUDfmfm:3] GotoIf(“SIP/SOFTPHONE001-00000002”, “1?4:7”) in new stack
– Goto (SetHUDfmfm,s,4)
– Executing [s@SetHUDfmfm:4] Set(“SIP/SOFTPHONE001-00000002”, “HUD_fmfm=”"") in new stack
– Executing [s@SetHUDfmfm:5] UserEvent(“SIP/SOFTPHONE001-00000002”, “fmfm,fmfm: “””) in new stack
– Executing [s@SetHUDfmfm:6] Set(“SIP/SOFTPHONE001-00000002”, “__HUD_fmfm_set=0”) in new stack
– Executing [s@SetHUDfmfm:7] Return(“SIP/SOFTPHONE001-00000002”, “”) in new stack
– Executing [0401834231@device-internal:3] Goto(“SIP/SOFTPHONE001-00000002”, “internal,0401834231,1”) in new stack
– Goto (internal,0401834231,1)
– Executing [0401834231@internal:1] Macro(“SIP/SOFTPHONE001-00000002”, “tollrest,dialplan,_0NXXXXXXXX”) in new stack
– Executing [s@macro-tollrest:1] AGI(“SIP/SOFTPHONE001-00000002”, “agi://127.0.0.1:6969/tollrest?type=dialplan&content=_0NXXXXXXXX&server=”) in new stack
– <SIP/SOFTPHONE001-00000002>AGI Script agi://127.0.0.1:6969/tollrest?type=dial … XX&server= completed, returning 0
– Executing [s@macro-tollrest:2] GotoIf(“SIP/SOFTPHONE001-00000002”, “1?20:10”) in new stack
– Goto (macro-tollrest,s,20)
– Executing [0401834231@internal:2] GotoIf(“SIP/SOFTPHONE001-00000002”, “0?centrex”) in new stack
– Executing [0401834231@internal:3] Set(“SIP/SOFTPHONE001-00000002”, “EXTENSION=3601”) in new stack
– Executing [0401834231@internal:4] AGI(“SIP/SOFTPHONE001-00000002”, “trixNet.agi,trixnet.trixbox.com”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/trixNet.agi
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
[Feb 17 10:36:30] ERROR[12757]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe
– <SIP/SOFTPHONE001-00000002>AGI Script trixNet.agi completed, returning 0
– Executing [0401834231@internal:5] AGI(“SIP/SOFTPHONE001-00000002”, “agi://localhost:4574”) in new stack
– <SIP/SOFTPHONE001-00000002>AGI Script agi://localhost:4574 completed, returning 0
– Executing [0401834231@internal:6] Wait(“SIP/SOFTPHONE001-00000002”, “1”) in new stack
– Executing [0401834231@internal:7] NoOp(“SIP/SOFTPHONE001-00000002”, “Caller ID is 0386713601”) in new stack
– Executing [0401834231@internal:8] GotoIf(“SIP/SOFTPHONE001-00000002”, “1?skipagi”) in new stack
– Goto (internal,0401834231,11)
– Executing [0401834231@internal:11] Set(“SIP/SOFTPHONE001-00000002”, “DIALEXTEN=0401834231”) in new stack
– Executing [0401834231@internal:12] Dial(“SIP/SOFTPHONE001-00000002”, “DAHDI/g0/0401834231,W”) in new stack
– Requested transfer capability: 0x00 - SPEECH
– Called g0/0401834231
– DAHDI/1-1 is proceeding passing it to SIP/SOFTPHONE001-00000002
– DAHDI/1-1 is making progress passing it to SIP/SOFTPHONE001-00000002
– DAHDI/1-1 is making progress passing it to SIP/SOFTPHONE001-00000002
– DAHDI/1-1 is ringing
– DAHDI/1-1 answered SIP/SOFTPHONE001-00000002
[Feb 17 10:36:58] WARNING[6673]: chan_sip.c:3036 retrans_pkt: Maximum retries exceeded on transmission ODBjMWExMzNlZTg5ODRlMzliZmYyN2Q2ZDc3MzgwY2U. for seqno 2 (Critical Response) – See doc/sip-retransmit.txt.
[Feb 17 10:36:58] WARNING[6673]: chan_sip.c:3068 retrans_pkt: Hanging up call ODBjMWExMzNlZTg5ODRlMzliZmYyN2Q2ZDc3MzgwY2U. - no reply to our critical packet (see doc/sip-retransmit.txt).
– Executing [h@internal:1] GotoIf(“SIP/SOFTPHONE001-00000002”, “1?3”) in new stack
– Goto (internal,h,3)
– Executing [h@internal:3] Hangup(“SIP/SOFTPHONE001-00000002”, “”) in new stack
– Hungup ‘DAHDI/1-1’
== Spawn extension (internal, 0401834231, 12) exited non-zero on ‘SIP/SOFTPHONE001-00000002’

You need to provide sip set debug on output to see whether this is a 200 OK that is not getting through, or a re-invite (although you won’t get get direct media, you may be getting a connected line id update.

A missing 200 OK suggests one way routing of port 5060. A timed out re-invite indicates a SIP device with broken re-invite support. Are you using X-Lite’s?

Could you also get your AGI script fixed so that it closes the connection properly?

Calls are working, it was my fault on that one for using a Bria3 to connect via the external IP.
Soon as I configured a phone locally everything worked.

You said something about AGI, your right, my calls don’t hang up soon as someone disconnects the call.
What can I check for?

Also caller ID… all the logs are saying the caller ID being passed on is the right one, however when it arrives on my cell phone it’s the main caller ID and not the extension.

Anything I can do on my end there before I go to the provider?

Thanks for all the help!

I think there is a recent issue on the issue tracker about this, although it might be ruled a feature request.

Great!!

Does Trixbox have the option to force CID on the trunk that may be overridding the CID of the set? I know it is an option in FreePBX. Never looked at Trixbox before, but the CLI output from earlier posts does not support this theory.

A couple of options in chan_dahdi.conf that may come into play…

usecallerid=yes
facilityenable = yes

Your provider may also be disregarding your callerID and putting in what they want.

All working perfect, it was all cause I was using Bria3 over the internet.
When using the phone locally, everything works, including the hang up delay but the caller ID isn’t though.

It’s with the provider now who will do a trace in realtime to figure out the issues.
Thank you to all who have helped!
Here is the log when working…

== Using SIP RTP CoS mark 5 -- Executing [0401834231@device-internal:1] Set("SIP/0004F2161DEB-00000001", "__HUD_fmfm_set=-1") in new stack -- Executing [0401834231@device-internal:2] Gosub("SIP/0004F2161DEB-00000001", "SetHUDfmfm,s,1("")") in new stack -- Executing [s@SetHUDfmfm:1] GotoIf("SIP/0004F2161DEB-00000001", "0?2:3") in new stack -- Goto (SetHUDfmfm,s,3) -- Executing [s@SetHUDfmfm:3] GotoIf("SIP/0004F2161DEB-00000001", "1?4:7") in new stack -- Goto (SetHUDfmfm,s,4) -- Executing [s@SetHUDfmfm:4] Set("SIP/0004F2161DEB-00000001", "HUD_fmfm=""") in new stack -- Executing [s@SetHUDfmfm:5] UserEvent("SIP/0004F2161DEB-00000001", "fmfm,fmfm: """) in new stack -- Executing [s@SetHUDfmfm:6] Set("SIP/0004F2161DEB-00000001", "__HUD_fmfm_set=0") in new stack -- Executing [s@SetHUDfmfm:7] Return("SIP/0004F2161DEB-00000001", "") in new stack -- Executing [0401834231@device-internal:3] Goto("SIP/0004F2161DEB-00000001", "internal,0401834231,1") in new stack -- Goto (internal,0401834231,1) -- Executing [0401834231@internal:1] Macro("SIP/0004F2161DEB-00000001", "tollrest,dialplan,_0NXXXXXXXX") in new stack -- Executing [s@macro-tollrest:1] AGI("SIP/0004F2161DEB-00000001", "agi://127.0.0.1:6969/tollrest?type=dialplan&content=_0NXXXXXXXX&server=") in new stack -- <SIP/0004F2161DEB-00000001>AGI Script agi://127.0.0.1:6969/tollrest?type=dialplan&content=_0NXXXXXXXX&server= completed, returning 0 -- Executing [s@macro-tollrest:2] GotoIf("SIP/0004F2161DEB-00000001", "1?20:10") in new stack -- Goto (macro-tollrest,s,20) -- Executing [0401834231@internal:2] GotoIf("SIP/0004F2161DEB-00000001", "1?centrex") in new stack -- Goto (internal,0401834231,18) -- Executing [0401834231@internal:18] GotoIf("SIP/0004F2161DEB-00000001", "1?dial") in new stack -- Goto (internal,0401834231,3) -- Executing [0401834231@internal:3] Set("SIP/0004F2161DEB-00000001", "EXTENSION=3601") in new stack -- Executing [0401834231@internal:4] AGI("SIP/0004F2161DEB-00000001", "trixNet.agi,trixnet.trixbox.com") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/trixNet.agi [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe [Feb 20 10:11:34] ERROR[13374]: utils.c:1043 ast_carefulwrite: write() returned error: Broken pipe -- <SIP/0004F2161DEB-00000001>AGI Script trixNet.agi completed, returning 0 -- Executing [0401834231@internal:5] AGI("SIP/0004F2161DEB-00000001", "agi://localhost:4574") in new stack -- <SIP/0004F2161DEB-00000001>AGI Script agi://localhost:4574 completed, returning 0 -- Executing [0401834231@internal:6] Wait("SIP/0004F2161DEB-00000001", "1") in new stack -- Executing [0401834231@internal:7] NoOp("SIP/0004F2161DEB-00000001", "Caller ID is 0386713601") in new stack -- Executing [0401834231@internal:8] GotoIf("SIP/0004F2161DEB-00000001", "1?skipagi") in new stack -- Goto (internal,0401834231,11) -- Executing [0401834231@internal:11] Set("SIP/0004F2161DEB-00000001", "DIALEXTEN=0401834231") in new stack -- Executing [0401834231@internal:12] Dial("SIP/0004F2161DEB-00000001", "DAHDI/g0/0401834231,,W") in new stack -- Requested transfer capability: 0x00 - SPEECH -- Called g0/0401834231 -- DAHDI/1-1 is proceeding passing it to SIP/0004F2161DEB-00000001 -- DAHDI/1-1 is making progress passing it to SIP/0004F2161DEB-00000001 -- DAHDI/1-1 is making progress passing it to SIP/0004F2161DEB-00000001 -- DAHDI/1-1 is ringing [Feb 20 10:11:42] NOTICE[6751]: chan_sip.c:19984 handle_request_register: Registration from '<sip:3610@10.31.2.1>' failed for '10.31.3.29' - No matching peer found -- Hungup 'DAHDI/1-1' == Spawn extension (internal, 0401834231, 12) exited non-zero on 'SIP/0004F2161DEB-00000001' -- Executing [h@internal:1] GotoIf("SIP/0004F2161DEB-00000001", "1?3") in new stack -- Goto (internal,h,3) -- Executing [h@internal:3] Hangup("SIP/0004F2161DEB-00000001", "") in new stack == Spawn extension (internal, h, 3) exited non-zero on 'SIP/0004F2161DEB-00000001'

Confirmed with my provider that trixbox is sending a private/unknown as the caller ID, however asterisk cli is saying otherwise as per above.

Any ideas?

This is what they had to say:

[quote]I am sending you a copy of the call trace made on the ISDN Pri service 0386713600.

The current trace shows that the equipment is configured to send present/send Caller ID. We have also noticed that the number format currently configured for this ISDN circuit on your equipment is National Number Format and sending 10 digit extension level phone numbers towards the network.

Please note that when using National Number Format, you have to send 9 digit phone number by removing the leading “zero” from area code to have your extension level phone numbers presented at the B-Party i.e. Answering Party. for ex: 386713601 instead of 0386713601

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

1778438 Usr / Orig 0003 Setup
Ch=B-1 Anb=ENat-0386713601 Bnb=Unk-0292627201

1778541 Net / Dest 0003 Call Proceeding
Ch=B-1 Notification=Reserved

1779689 Net / Dest 0003 Alerting
Prog Ind=Public Net-Remote User-In-Band information available

1779727 Net / Dest 0003 Progress
Prog Ind=Public Net-Remote User-In-Band information available

1780956 Net / Dest 0003 Connect

1780986 Usr / Orig 0003 Connect Acknowledge

1817415 Usr / Orig 0003 Disconnect
Cause=16 - Normal clearing (User)

1817440 Net / Dest 0003 Release

1817466 Usr / Orig 0003 Release Complete
Cause=16 - Normal clearing (User)

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Setup Message Data
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

00:00:00.010 Dir=Usr/Orig Cref=0003 Setup ETSI-PA

01 04 00000100 BEARER CAPABILITY
02 03 00000011 IE Length = 3 Octet(s)
03 80 1------- Extension : End of Current Octet
-00----- Coding Standard : CCITT standardised Coding
—00000 Info Transfer Capability Speech
04 90 1------- Extension : End of Current Octet
-00----- Transfer Mode : Circuit Mode
—10000 Info Transfer Rate : 64kBits/s
05 A3 1------- Extension : End of Current Octet
-01----- Layer Identifer : Layer 1 Identified
—00011 User Info L1 Protocol : Recommendation G.711 A-law

01 18 00011000 CHANNEL IDENTIFICATION
02 03 00000011 IE Length = 3 Octet(s)
03 A1 1------- Extension : End of Current Octet
-0------ Interface ID present : Interface implicity identified
–1----- Interface Type : Primary Rate
—0---- Spare : Set to 0('s)
----0— Pref/Excl : Indicated channel is preferered
-----0-- D-Ch Indicator : The channel identified is not the D-Ch
------01 Info Channel Selection : As indicated in following octet
04 83 1------- Extension : End of Current Octet
-00----- Coding Standard : CCITT standardised
—0---- Number/Map : Channel is indicated by the number in the following octet
----0011 Channel/Map Type : B-channel units
xx xx xxxxxxxx Channel/Map (OCT3.3) : 1

01 6C 01101100 CALLING PARTY NUMBER
02 0C 00001100 IE Length = 12 Octet(s)
03 21 0------- Extension : Extended See next Octet
-010---- Type of Number : National Number
----0001 Numbering Plan ID : ISDN/Telephony number plan (Rec E.164/E163)
03A 80 1------- Extension : End of Current Octet
-00----- Presentation Indicator : Presentation allowed
—000-- Spare : Set to 0('s)
------00 Screening Indicator : User provided, not screened
xx xx xxxxxxxx Number : 0386713601  Please use 9 Digit FNN

01 70 01110000 CALLED PARTY NUMBER
02 0B 00001011 IE Length = 11 Octet(s)
03 80 1------- Extension : End of Current Octet
-000---- Type of Number : Unknown
----0000 Numbering Plan ID : Unknown
xx xx xxxxxxxx Number : 0292627201
[/quote]

The only thing I can think of regarding what you are sending is that either the extension definition or the trunk definition has the wrong data set for CID. Again, not familiar with trixbox, but in FreePBX it allows you to set the CID in three different places. In the extension, for the outbound route and on the trunk.

You should be able to see what you are sending out by turning on debug of the PRI.

From the Asterisk CLI…

pri set debug 2 span 1

To turn off again,

pri set debug off span 1

It is not sending private unknown. It is sending:

Type of number: national
Unscreened (i.e. could be forged - if you don’t set this, you service provider probably should)
Number: A number which is not in national format, because it includes the initial 0.

National number format in ISDN generally means starting from the national number group code, not starting from the “this is a national number” digit. You need to either set the type of numer to unknown, or strip the initial 0.