[asterisk-users] Problem routing call to fax machine on DAHDI FXS port

ftarz at mindspring.com ftarz at mindspring.com
Fri Mar 18 20:05:15 CDT 2011


> Message: 7
> Date: Fri, 18 Mar 2011 08:43:39 +0100
> From: Olivier<oza_4h07 at yahoo.fr>
> Subject: Re: [asterisk-users] Problem routing call to fax machine on
> 	DAHDI	FXS port
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> 	<asterisk-users at lists.digium.com>
> Message-ID:
> 	<AANLkTin6sFtC5ZacSzqO6ZW8WVSPkS=Q0f7LRNm_Pnys at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> 2011/3/18 Frank Tarczynski<ftarz at mindspring.com>
>
>> >  I am running Asterisk 1.6.2.17.2 with a Openvox A400 card with 2FXO/2FXS
>> >  modules.  I'm trying to set-up things to route analog fax calls from a FXO
>> >  port to an analog fax machine on a FXS port on the same card.
>> >
>> >  Outgoing faxes work just fine.  But incoming faces are routed to the right
>> >  DAHDI  extension, but the call dropped right as the fax machine rings for
>> >  the first time.  The fax machine works fine when connected directly to the
>> >  analog telephone line and I see the same behavior if I route the fax call to
>> >  anyother DAHDI or SIP extension.
>> >
>> >  Can anyone help?
>> >
>> >  I see this in the asterisk log:
>> >  (Send fax out to HP's fax check line)
>> >  [2011-03-17 13:40:17.4] VERBOSE[8825] chan_dahdi.c:     -- Starting simple
>> >  switch on 'DAHDI/1-1'
>> >  [2011-03-17 13:40:24.0] VERBOSE[8825] pbx.c:     -- Executing
>> >  [18884732963 at from-fax-machine:1] Set("DAHDI/1-1",
>> >  "CALLERID(num)=19195718465") in new stack
>> >  [2011-03-17 13:40:24.0] VERBOSE[8825] pbx.c:     -- Executing
>> >  [18884732963 at from-fax-machine:2] Dial("DAHDI/1-1", "DAHDI/4/18884732963")
>> >  in new stack
>> >  [2011-03-17 13:40:24.0] VERBOSE[8825] app_dial.c:     -- Called
>> >  4/18884732963
>> >  [2011-03-17 13:40:26.2] VERBOSE[8825] app_dial.c:     -- DAHDI/4-1 answered
>> >  DAHDI/1-1
>> >  [2011-03-17 13:40:29.6] NOTICE[8825] chan_dahdi.c: Fax detected, but no fax
>> >  extension
>> >  [2011-03-17 13:41:13.4] VERBOSE[8825] chan_dahdi.c:     -- Hungup
>> >  'DAHDI/4-1'
>> >  [2011-03-17 13:41:13.4] VERBOSE[8825] pbx.c:   == Spawn extension
>> >  (from-fax-machine, 18884732963, 2) exited non-zero on 'DAHDI/1-1'
>> >  [2011-03-17 13:41:13.4] VERBOSE[8825] chan_dahdi.c:     -- Hungup
>> >  'DAHDI/1-1'
>> >
>> >  (Incoming fax attempt)
>> >  [2011-03-17 13:43:18.3] VERBOSE[8834] chan_dahdi.c:     -- Starting simple
>> >  switch on 'DAHDI/4-1'
>> >  [2011-03-17 13:43:19.3] VERBOSE[8834] pbx.c:     -- Executing
>> >  [s at from-pstn-4:1] Wait("DAHDI/4-1", "1") in new stack
>> >  [2011-03-17 13:43:20.4] VERBOSE[8834] pbx.c:     -- Executing
>> >  [s at from-pstn-4:2] Verbose("DAHDI/4-1", "CALLERID is 8884732963") in new
>> >  stack
>> >  [2011-03-17 13:43:20.4] VERBOSE[8834] app_verbose.c: CALLERID is 8884732963
>> >  [2011-03-17 13:43:20.4] VERBOSE[8834] pbx.c:     -- Executing
>> >  [s at from-pstn-4:3] Verbose("DAHDI/4-1", "Time is 20110317-134320") in new
>> >  stack
>> >  [2011-03-17 13:43:20.4] VERBOSE[8834] app_verbose.c: Time is
>> >  20110317-134320
>> >  [2011-03-17 13:43:20.4] VERBOSE[8834] pbx.c:     -- Executing
>> >  [s at from-pstn-4:4] Answer("DAHDI/4-1", "") in new stack
>> >  [2011-03-17 13:43:20.4] VERBOSE[8834] pbx.c:     -- Executing
>> >  [s at from-pstn-4:5] Ringing("DAHDI/4-1", "") in new stack
>> >  [2011-03-17 13:43:20.4] VERBOSE[8834] pbx.c:     -- Executing
>> >  [s at from-pstn-4:6] Wait("DAHDI/4-1", "6") in new stack
>> >  [2011-03-17 13:43:21.4] VERBOSE[8834] chan_dahdi.c:     -- Redirecting
>> >  DAHDI/4-1 to fax extension
>> >  [2011-03-17 13:43:21.4] VERBOSE[8834] pbx.c:   == Spawn extension
>> >  (from-pstn-4, fax, 1) exited non-zero on 'DAHDI/4-1'
>> >  [2011-03-17 13:43:21.4] VERBOSE[8834] pbx.c:     -- Executing
>> >  [fax at from-pstn-4:1] NoOp("DAHDI/4-1", "Fax Detected") in new stack
>> >  [2011-03-17 13:43:21.4] VERBOSE[8834] pbx.c:     -- Executing
>> >  [fax at from-pstn-4:2] Dial("DAHDI/4-1", "DAHDI/1,40,tr") in new stack
>> >  [2011-03-17 13:43:21.4] VERBOSE[8834] app_dial.c:     -- Called 1
>> >  [2011-03-17 13:43:21.4] VERBOSE[8834] app_dial.c:     -- DAHDI/1-1 is
>> >  ringing
>> >  [2011-03-17 13:43:23.4] VERBOSE[8834] app_dial.c:     -- DAHDI/1-1 is
>> >  ringing
>> >
>> >  (Call is routed to fax machine, but then dropped before it can answer)
>> >  [2011-03-17 13:43:24.8] VERBOSE[8834] chan_dahdi.c:     -- Hungup
>> >  'DAHDI/1-1'
>> >  [2011-03-17 13:43:24.8] VERBOSE[8834] pbx.c:   == Spawn extension
>> >  (from-pstn-4, fax, 2) exited non-zero on 'DAHDI/4-1'
>> >  [2011-03-17 13:43:24.8] VERBOSE[8834] chan_dahdi.c:     -- Hungup
>> >  'DAHDI/4-1'
>> >
>> >  My dialplan looks like this:
>> >  [from-pstn-4]
>> >  exten =>  fax,1,NoOp(Fax Detected)
>> >  exten =>  fax,2,Dial(DAHDI/1,,rtT)
>> >  exten =>  fax,3,Congestion()
>> >  exten =>  fax,104,Busy()
>> >  exten =>  s,1,Wait(1)
>> >  exten =>  s,n,Verbose(CALLERID is ${CALLERID(num)})
>> >  exten =>  s,n,Verbose(Time is ${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)})
>> >  exten =>  s,n,Answer
>> >  exten =>  s,n,Ringing
>> >  exten =>  s,n,Wait(6)
>> >  exten =>  s,n,Dial(SIP/1000)
>> >  exten =>  s,n,Voicemail(1000,u)
>> >  exten =>  s,n,Hangup
>> >
>> >  My chan_dahdi.conf file looks like:
>> >  [trunkgroups]
>> >  ;trunkgroup =>  1,1
>> >  ;trunkgroup =>  2,2
>> >  ;trunkgroup =>  3,3
>> >  ;trunkgroup =>  4,4
>> >
>> >  ;spanmap =>  1,1
>> >  ;spanmap =>  2,2
>> >  ;spanmap =>  3,3
>> >  ;spanmap =>  4,4
>> >
>> >  [channels]
>> >  language=en
>> >  context=incoming
>> >  toneduration=40
>> >  ;usedistinctiveringdetection=yes
>> >  answeronpolarityswitch=no
>> >  usecallerid=yes
>> >  cidsignalling=bell
>> >  cidstart=ring
>> >  ;hidecallerid=yes
>> >  ;hidecalleridname=yes
>> >  ;waitfordialtone=yes
>> >  ;mwimonitor=no
>> >  ;mwilevel=512
>> >  ;mwimonitornotify=/usr/local/bin/dahdinotify.sh
>> >  ;mwisendtype=rpas,lrev
>> >  callwaiting=yes
>> >  ;restrictcid=no
>> >  usecallingpres=yes
>> >  sendcalleridafter = 1
>> >  callwaitingcallerid=yes
>> >  threewaycalling=yes
>> >  transfer=yes
>> >  canpark=yes
>> >  cancallforward=yes
>> >  callreturn=yes
>> >  echocancel=yes
>> >  echocancelwhenbridged=yes
>> >  echotraining=yes
>> >  rxgain=2.0
>> >  txgain=8.0
>> >  group=1
>> >  callgroup=1
>> >  pickupgroup=1
>> >  ;immediate=yes
>> >  immediate=no
>> >  callerid = asreceived
>> >  useincomingcalleridondahditransfer = yes
>> >  callprogress=no
>> >  progzone=us
>> >  ;faxdetect=both
>> >  faxdetect=incoming
>> >  ;faxdetect=outgoing
>> >  ;faxdetect=no
>> >  faxbuffers=>6,full
>> >  ;callerid="XXX"<1919XXXXXXX>
>> >  ;channel =>  3
>> >  ;callerid="XXX"<1919XXXXXXX>
>> >  ;channel =>  4
>> >  #include dahdi-channels.conf
>> >
>> >  My dahdi-channels.conf file look like:
>> >  ; Autogenerated by /usr/sbin/dahdi_genconf on Tue Nov 30 19:08:07 2010
>> >  ; If you edit this file and execute /usr/sbin/dahdi_genconf again,
>> >  ; your manual changes will be LOST.
>> >  ; Dahdi Channels Configurations (chan_dahdi.conf)
>> >  ;
>> >  ; This is not intended to be a complete chan_dahdi.conf. Rather, it is
>> >  intended
>> >  ; to be #include-d by /etc/chan_dahdi.conf that will include the global
>> >  settings
>> >  ;
>> >
>> >  ; Span 1: WCTDM/4 "Wildcard TDM400P REV E/F Board 5" (MASTER)
>> >  ;;; line="1 WCTDM/4/0 FXOKS  (In use) (SWEC: MG2)"
>> >  signalling=fxo_ks
>> >  callerid="Channel 1"<4001>
>> >  mailbox=5000
>> >  group=5
>> >  context=from-fax-machine
>> >  channel =>  1
>> >  callerid=
>> >  mailbox=
>> >  group=
>> >  context=default
>> >
>> >  ;;; line="2 WCTDM/4/1 FXOKS  (In use) (SWEC: MG2)"
>> >  signalling=fxo_ks
>> >  callerid="Channel 2"<4002>
>> >  mailbox=6000
>> >  group=5
>> >  context=from-internal
>> >  channel =>  2
>> >  callerid=
>> >  mailbox=
>> >  group=
>> >  context=default
>> >
>> >  ;;; line="3 WCTDM/4/2 FXSKS  (In use) (SWEC: MG2)"
>> >  signalling=fxs_ks
>> >  callerid=asreceived
>> >  group=0
>> >  context=from-pstn-3
>> >  channel =>  3
>> >  callerid=
>> >  group=
>> >  context=default
>> >
>> >  ;;; line="4 WCTDM/4/3 FXSKS  (In use) (SWEC: MG2)"
>> >  signalling=fxs_ks
>> >  callerid=asreceived
>> >  group=0
>> >  context=from-pstn-4
>> >  channel =>  4
>> >  callerid=
>> >  group=
>> >  context=default
>> >
>> >
>> >
>> >
>> >
>> >  --
>> >  _____________________________________________________________________
>> >  -- Bandwidth and Colocation Provided byhttp://www.api-digital.com  --
>> >  New to Asterisk? Join us for a live introductory webinar every Thurs:
>> >                http://www.asterisk.org/hello
>> >
>> >  asterisk-users mailing list
>> >  To UNSUBSCRIBE or update options visit:
>> >    http://lists.digium.com/mailman/listinfo/asterisk-users
>> >
> What happens when you call the fax machine from a cell phone, for instance ?
> Can you ear the fax machine answering ?
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:<http://lists.digium.com/pipermail/asterisk-users/attachments/20110318/3c81d121/attachment-0001.htm>
>
If I can the fax machine from the outside the call is routed to the 
expected voice extension as it is not a fax call:
Starting simple switch on 'DAHDI/4-1'
    -- Executing [s at from-pstn-4:1] Wait("DAHDI/4-1", "1") in new stack
    -- Executing [s at from-pstn-4:2] Verbose("DAHDI/4-1", "CALLERID is 
919XXXXXXX") in new stack
CALLERID is 919XXXXXXX
    -- Executing [s at from-pstn-4:3] Verbose("DAHDI/4-1", "Time is 
20110318-210123") in new stack
Time is 20110318-210123
    -- Executing [s at from-pstn-4:4] Answer("DAHDI/4-1", "") in new stack
    -- Executing [s at from-pstn-4:5] Ringing("DAHDI/4-1", "") in new stack
    -- Executing [s at from-pstn-4:6] Wait("DAHDI/4-1", "6") in new stack
    -- Executing [s at from-pstn-4:7] Dial("DAHDI/4-1", "SIP/1000") in new 
stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Called 1000
    -- SIP/1000-0000000b is ringing
  == Spawn extension (from-pstn-4, s, 7) exited non-zero on 'DAHDI/4-1'
    -- Hungup 'DAHDI/4-1'

This is what's supposed to happen for non-fax calls.

Fax calls still don't route to the DAHDI port correctly.






More information about the asterisk-users mailing list