* You are viewing the archive for March 27th, 2012

How to stop ringing when incoming PSTN call is answered externally?

This is a hard one to explain. My home PSTN line is connected via an Openvox A400P card to my Asterisk 1.6.2.23 box which then routes incoming calls to my 2 SCCP extensions.

The calls are routed just fine, but when a call is answered at one of the extensions or externally (by a home telephone) the asterisk extensions continue to ring one more time. Is there a way to have Asterisk drop an incoming PSTN call as soon as it’s answered?

CLI output when receiving a PSTN call: Starting simple switch on ‘DAHDI/3-1′

Best Way to Send Fax on Sangoma ?

Hi

What should be the optimal settings for HWEC related parameters in
wanpipe1.conf to be able to receive Fax over T.30 on a Sangoma A108DE Card ?

In particular, should I enable echo ? If yes, to what parameter ? What
other values like RXGAIN, TXGAIN should I tune ?

TDMV_HW_DTMF
= YES # YES: receive dtmf events from hardware
TDMV_HW_FAX_DETECT = YES # YES: receive fax 1100hz
events from hardware
HWEC_OPERATION_MODE = OCT_NORMAL # OCT_NORMAL: echo
cancelation enabled with nlp (default)

# OCT_SPEECH: improves software tone detection by disabling NLP (echo
possible)

# OCT_NO_ECHO:disables echo cancelation but allows VQE/tone functions.
HWEC_DTMF_REMOVAL = NO # NO: default YES: remove dtmf out
of incoming media (must have hwdtmf enabled)
HWEC_NOISE_REDUCTION = NO # NO: default YES: reduces noise on
the line – could break fax
HWEC_ACUSTIC_ECHO = NO # NO: default YES: enables
acustic echo cancelation
HWEC_NLP_DISABLE = NO # NO: default YES: guarantees
software tone detection (possible echo)
HWEC_TX_AUTO_GAIN = 0 # 0: disable -40-0: default tx
audio level to be maintained (-20 default)
HWEC_RX_AUTO_GAIN = 0 # 0: disable -40-0: default tx
audio level to be maintained (-20 default)
HWEC_TX_GAIN = 0 # 0: disable
-24-24: db values to be applied to tx signal
HWEC_RX_GAIN = 0 # 0: disable
-24-24: db values to be applied to tx signal

Retransmission timeout

Hello

We have a Genband C3 Switch and a couple of customers that operate asterisk
PBXes connected via SIP Trunk. All of them still use some 1.6.X asterisk and
this works fine.

One customer uses a 1.8 version and has a very strange problem:

Asterisk 1.8.10.0-1digium1~lucid built by pbuilder @ nighthawk on a x86_64
running Linux on 2012-03-06 01:51:21 UTC

When a call reaches this asterisk the call get’s dropped after a couple of
seconds with this message:

[Mar 27 13:47:35] WARNING[29806]: chan_sip.c:3641 retrans_pkt: Retransmission
timeout reached on transmission F47F6F67@7f33ff47 for seqno 907689273
(Critical Response) — See
https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 6400ms with no response
[Mar 27 13:47:35] WARNING[29806]: chan_sip.c:3670 retrans_pkt: Hanging up call
F47F6F67@7f33ff47 – no reply to our critical packet (see
https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).

Well, the Wiki is not very helpfull, as the problems explained there do not
seem to be the cause.

I sniffed the connection on the Asterisk Box itself and what I see is this
flow of SIP messages:

C3 < => Asterisk

=> Invite +sdp
< = 401 Unauthorized
=> Ack
=> Invite +sdp +auth
< = 100 Trying
< = 180 Ringing
< = RTP Audio
< = 200 OK +sdp
=> Ack
< => RTP Audio
< = 200 OK +sdp
=> Ack
< = 200 OK +sdp
=> Ack
< = 200 OK +sdp
=> Ack
< = Bye
=> Ack
< = Bye
=> Ack
< = Bye
=> Ack

Well apparently the C3, from my point of view sends correct Acks to the
Asterisk, but somehow the Asterisk ignores them.

I did try to get more information with debug and verbose level set to ’99′,
but I don’t see more messages

Does anyone have a clue, why acks could be not accepted by asterisk 1.8.10.0 ?

The other way round (asterisk => c3) the calls work fine.

Regards

Benoit Panizzon

Dynamic hint from db?

I would like to fetch my extensions from the database. I created a dynamic
hint, but doesn’t seem to work. The BLF on my phone doesn’t change when the
state of the extension changed.

This is in my dialplan:

exten => _ZXX!,hint,${SIP_BYEXT(${EXTEN},${CONTEXT})}
exten => _ZXX!,1,Verbose(3, Search extension ${EXTEN} in context ${CONTEXT})
same => n,Set(SIP=${SIP_BYEXT(${EXTEN},${CONTEXT})})
same => n,GotoIf(${SIP}?:notFound)
same => n,SIPAddHeader(Alert-Info: internal)
same => n,Dial(${SIP})
same => n(notFound),Playback(you-dialed-wrong-number)
same => n,Hangup

Is something like this possible?

username and password, also to be from the LAN

On 3/26/2012 1:11 PM, bilal ghayyad wrote:
> If it possible, then is it possible to be a configuration per user?

Just expanding on Jim’s answer-

to allow user “example” with password “secret” from 192.168.0.*, do
something like:

in /etc/asterisk/sip.conf:

[example]
type=friend
secret=secret
host=dynamic
deny=0.0.0.0/0
permit=192.168.0.0/24

then asterisk -rx “sip reload”

in sip.conf or dialplan or db?

On Tuesday 27 March 2012, Roland wrote:
> I am setting up my dialplan with quite some outbound numbers. We have a
> block of 100 DID’s, for which some of them will go direct to specific
> phones. I am struggling how to solve this, so I am searching for a little
> advice. These are my concerns.
>
> I could set the DID in the sip.conf using something like:
>
> callerid=”137-Roland” <31229253137>
>
> 137 would be my extention number here.
> …..
> Any suggestions would be appreciated! Am I missing any options here?

Assuming there is a reasonable mapping from “outside” numbers to “inside”
numbers (your example shows the external number as being 31229253 followed by
the internal number; note also you can do simple integer maths within a
dialplan, as unlike some languages + hasn’t been appropriated for string
concatenation), it shouldn’t be that difficult.

If an internal extension wants to call an internal extension, its caller ID
ought already to be set to its “inside” extension number in sip.conf. If it
wants to call an external number, then it needs to set its caller ID to the
appropriate inbound number. If it’s as simple as adding a prefix, then you
need something in your dialplan like:

[management]
; 3 digits is internal
exten => XXX,1,Dial(SIP/${EXTEN},90)
exten => XXX,2,Hangup()
; 5 digits or more must be external — ident as own DDI number
exten => XXXX.,1,Set(CallerID(num)=${DDIPREFIX}${callerID(num)})
exten => XXXX.,2,Dial(${POTS}/${EXTEN},90)
exten => XXXX.,3,Hangup()

Now, chances are, not every internal phone will want to ident as a unique
external number — perhaps you want all the phones in one office to ident as a
single number, and all ring together (using something like
Dial(TECH/ext&TECH/ext&TECH/ext ….. ) when called from outside. In this
case, you just need to configure all these phones into their own context in
your sip.conf and something like this in your dialplan:

[sales-office]
; 3 digits is internal
exten => XXX,1,Dial(SIP/${EXTEN},90)
exten => XXX,2,Hangup()
; 5 digits or more must be external — one ident for whole office
exten => XXXX.,1,Set(CallerID(num)=${SALESOFFICE})
exten => XXXX.,2,Dial(${POTS}/${EXTEN},90)
exten => XXXX.,3,Hangup()