返回列表 發帖

Forget hangup?

The PSTN trunk turns on/off as polarity changes in theory. Sometime it(OK, sip trunk also) strikes

To avoid this, we might use other mechanics to limit the loss.
1. In sip.conf, set
   rtptimeout=xx  ;rtp time out after xx seconds of no rtp package sent/received
   or
   rtpholdtimeout=xxx  ;time out of rtp activity when on hold(must larger than rtptimeout)
  I am not sure if it works as some voip phones/ATAs have comfortable noise genertion

2. The opion in Dial command could limit the length of time:
Dial(DAHDI/1|120|L(3600000:60000:20000))  ; max one hour, peep every 20 seconds at the last minute

# L(x[:y][:z]): Limit the call to 'x' ms, warning when 'y' ms are left, repeated every 'z' ms) Only 'x' is required, 'y' and 'z' are optional. Numbers must be integers- beware of AGI scripts that may return long integers in scientific notation (esp PHP 5.2.5&6) The following special variables are optional for limit calls: (pasted from app_dial.c)

    * LIMIT_PLAYAUDIO_CALLER - yes|no (default yes) - Play sounds to the caller.
    * LIMIT_PLAYAUDIO_CALLEE - yes|no - Play sounds to the callee.
    * LIMIT_TIMEOUT_FILE - File to play when time is up.
    * LIMIT_CONNECT_FILE - File to play when call begins.
    * LIMIT_WARNING_FILE - File to play as warning if 'y' is defined. If LIMIT_WARNING_FILE is not defined, then the default behaviour is to announce ("You have [XX minutes] YY seconds").
http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial

This one seems to me an advanced version of timeout
http://www.voip-info.org/wiki/view/Asterisk+func+timeout

回復 1# Qnewbie

Thanks for the great information. I occasionally encounter this problem when I dial in via the ATA. We may perhaps develop some best practice in writing the rules.

TOP

I have been using the 1st option for several months by settings 60/120 for rtptimeout and rtpholdtimeout in sip.conf respectively.  So far no problem.

As I am using Telephony card in the server, I think the chan_dahdi.conf has its own mechanism for similar effect with the optional use of the busydetect and busycount.

TOP

Set the second option to DAHDI. However the SIP strikes too
Timestamps: 2011-02-07 06:52:46, 2011-02-07 06:52:55, 2011-02-07 15:24:09
Durations: 8:31:23, 8:31:14
Disposition/AMA flags: ANSWERED / DOCUMENTATION

TOP

This is my chan_dahdi.conf settings.  The busycount varies from case to case and also depending on your telecom operator.  Default is 4 but shorter is not recommended by DAHDI manufacturer.  Despite of their advise, setting to 2 works for me.
  1. [trunkgroups]

  2. [channels]
  3. language=en
  4. ;switchtype=national
  5. ;rxwink=300                                ; Atlas seems to use long (250ms) winks
  6. usecallerid=yes
  7. hidecallerid=no
  8. hidecalleridname=no
  9. callwaiting=yes
  10. usecallingpres=yes
  11. callwaitingcallerid=yes
  12. threewaycalling=yes
  13. transfer=yes
  14. canpark=yes
  15. cancallforward=yes
  16. callreturn=yes
  17. echocancel=yes
  18. echocancelwhenbridged=yes
  19. echotraining=800
  20. relaxdtmf=yes
  21. rxgain=0.0
  22. txgain=0.0
  23. ;callgroup=1
  24. ;pickupgroup=1
  25. immediate=no
  26. busydetect=yes                        ; Uncomment these lines if you have problems with the disconection of your analog lines
  27. busycount=2
  28. faxdetect=incoming

  29. #include /etc/asterisk/dahdi-channels.conf
複製代碼

TOP

The DAHDI settting works but the SIP did not. Now I set both.

The 8:31:14 call is disconnected by the operator after 23 minutes. So the bill would be normal.

TOP

返回列表