The Congestion() Application


i have bristuff isdn installed and after some time when asterisk is running there is still nothing to hear if the called party is busy. no congestion tone. my extensions.conf is built up this way:


so now is my question is there an alternative for the congestion() application? i heard from other things like playtones but in this case the caller has to pay the call.

so i hope you can help me :smile:, Greetings Oliver

i dont think that i can find an answer in the docs because i think that this is not a normal case of asterisk behviour.

Greetings, Oliver

Post your configs, we cant read your mind nor your setup…

Also, what country is this ?

I get this problem too. Both on SIP in, SIP out and SIP in, ZAP out. Did you ever find a solution? I’ll try and put together a proper posting on this!

so here is an extract of my configfile:
the stars were added by me in the real config are full numbers



  exten => 95**********,1,Dial(${Claudio},60)
  exten => 95**********,2,Congestion()
  exten => 95**********,102,Congestion()



  exten => _0.,1,Set(CALLERID(number)=0)
  exten => _0.,2,Dial(Zap/g2/${EXTEN:1},120)
  exten => _0.,3,Congestion()
  exten => _0.,103,Congestion()

i am living in germany and i use the bristuff driver.

Greetings, Oliver

Try this (not sure if it works on BRI like on PRI, but should):

For making a call and ending it cleanly and/or signalling that claudio is busy (if busy):

exten => 95**********,1,Dial(${Claudio},60)
exten => 95**********,2,Hangup
exten => 95**********,102,Set(PRI_CAUSE=17)
exten => 95**********,103,hangup

What happens now ?

the pricause variable is PRI_CAUSE

If this is working, we could use a bit more detailled branching (goto Dialstate sheme) and set the correct causes.

1 = Unallocated number
16 = Normal call clearing
17 = User busy
18 = No user responding (telephone device not connected)
21 = Call rejected
22 = Number changed
27 = Destignation out of order
38 = Network out of order
41 = Temporary failure

Please note, asterisk isnt setting any pricause on its own (iirc), it always returns “0” on default.

hi oh that looks great. but what are dialstates? should i add this into the brackets in congestion?

Greetings, Oliver

Before we go into that, lets see if this is the right way.

Is the busystate working now, with the above Set PRI_CAUSE example ?

that is my question :wink: where do i have to set this default?

Greetings, Oliver

Huh ?

My above example, use instead of your previous posted block.

Take YOUR code out of extensions code and replace it with the bit i posted.

For the extension “claudio” / incoming that is.

Setting PRI_CAUSE to 17 is good to indicate to a call coming in on a PRI channel that the hangup was because of busy. How can one indicate to a call coming in on SIP that the hangup is because of BUSY (I would expect this to result in the sending of a 436 or a 600 SIP message back)? (I don’t want to generate a CP tone)

ok i didnt see your one post first. THanks a lot, olvier

wit the line

exten => XXXX,102,busy

then congest.


wit the line

exten => XXXX,102,busy

then congest.[/quote]

So from within a Perl AGI script, would that be

$agi->exec( ‘Busy’,‘10’)
$agi->exec( ‘Congestion’,‘10’)

That seems a little odd as I thought both these methods sent an audio signal, but I’ll give it a go!

Blimey - it worked!

Thanks very much.

[quote=“alex.lake”]Blimey - it worked!

Thanks very much.[/quote]

Of course it does… :smiling_imp:

Anytime buddy!