Summary:ASTERISK-06688: 180 RINGING Message immediately after INVITE - Causing problems at sipendpoints handling 480 Busy here message.
Reporter:Oscar Lazcano (olazcano)Labels:
Date Opened:2006-04-03 13:02:51Date Closed:2011-06-07 14:03:00
Versions:Frequency of
Environment:Attachments:( 0) messages_olazcano.rtf
( 1) olazcano_Ast_Busy_001.cap
( 2) olazcano_trace1.txt
( 3) olazcano_trace2.txt
Description:Scenario is like this:

SIP Endpoint->Asterisk 1.2.1 -> Huwai Softswitch ->PSTN

When doing a call from sip endpoint to the PSTN following the path above and happens that the Called Party at the PSTN is BUSY, there is an "early" 180 RINGING Message from the Asterisk to the SIP Endpoint that is causing the endpoint to misunderstand the future 486 Busy Here message generated by the PSTN Softswitch when the intended called party line is busy.

Attached you will se the trace, but this is what happens in words:

1. Sip Endpoint INVITES to Asterisk to Dial a PSTN Number
2. Asterisk responds to SIP Endpoint a TRYING
3. Asterisk INVITES the PSTN Softswitch to dial a PSTN Number
4. ASTERISK SENDS A 180 RINGING to the SIP Endpoint

"At this point, the caller phone starts to ring, due to this 180 RINGING, but this 180 RINGING is not generated at the PSTN, in "normal times" the call has not even been negotiated at the PSTN"

5. PSTN Softswitch responds TRYING to Asterisk
6. PSTN Softswitch notifies 486 Busy Here to Asterisk
7. Asterisk ACKNOWLEDGE the 486 Busy Here
8. Asterisk notifies 486 Busy Here to SIP Endpoint
9. SIP Endpoint ACKNOWLEDGE 486 Busy Here to Asterisk

"At this point, the SIP Endpoint keeps ringing... it is not able to understand that a BUSY HERE was RECEIVED, since it got first a 180 RINGING.

****** STEPS TO REPRODUCE ******

If you want to replicate this problem:

1. Connect SIP Endpoint to Asterisk 1.2.1
2. Connect Asterisk with Service Provider PSTN to get a Busy Line
3. Get a PSTN Number and make sure IT rings BUSY - NO VOICEMAIL - Someone may have to be using the phone at the exact time of testing.
4. Dial the PSTN Number from the SIP Endpoint passing through Asterisk and PSTN Service Provider equipment.
5. Review what tones were listened at Caller Party Phone
6. Review trace


Additional References:

1. Same scenario was tested with a NexTone MSW instead of an Asterisk, and the  180 Ringing Message is not generated. (Succesful busy tone at Caller Phone)

2. Second Scenario was tested with a Cisco Callmanager 4.1 using a SIP Trunk with Asterisk instead of a SIP Endpoint, and behaviour is exactly the same at the Caller Party (Caller at IP Phone listens how the Called Phone keeps ringing when the trace shows the call was busy and finally dropped)

3. SIP Endpoint is an W7 Optics LMG SIP Gateway with FXS Ports

4. Same scenario was tested with Asterisk@Home 1.5

On trace: = SIP ENDPOINT = Asterisk Server = Softswitch PSTN
Comments:By: Oscar Lazcano (olazcano) 2006-04-03 13:04:48

I forgot to say that with Asterisk@Home 1.5 the problem ALSO happened.

By: Serge Vecher (serge-v) 2006-04-03 13:14:14

olazcano: the latest version of Asterisk stable is 1.2.6. Please test with that version and report back if there is a problem there still. Also, please note that you need to include a trace from Asterisk with set debug 4, set verbose 4, with sip debug on. Thanks

By: Olle Johansson (oej) 2006-04-03 15:00:40

Can we please see the dialplan where you are dialling from Asterisk to the softwitch? Asterisk does not invent a ringing message unless told to.

By: Oscar Lazcano (olazcano) 2006-04-03 15:10:09



Sure, I'll post in the next few minutes the dial plan with comments on it.


Also, I'll start planning the upgrade to the latest stable version.

By: Andrey S Pankov (casper) 2006-04-03 15:12:02

Do you have "progressinband=never" configured?

By: Olle Johansson (oej) 2006-04-03 15:13:32

casper: Let us first find out where the ringing came from.

By: Oscar Lazcano (olazcano) 2006-04-03 15:38:05


This is the sip.conf piece of file including the involved endpoints:

context= sip
;register => 3310861409@
; phone definitions

host =


And this is the piece of extensions.conf

; Master context for local, toll-free, and iaxtel calls only
ignorepat => 9
include => default
include => parkedcalls
include => trunklocal
include => iaxtel700
include => trunktollfree
include => iaxprovider
include => sip ;x included sip
include => casas ;contexto para las casa
include => casetas

exten => _XXXXXXXX,1,Dial(SIP/332948${EXTEN}@bestel) ; Exit to softswitch
exten => _0.,1,Dial(SIP/332948${EXTEN}@bestel)   ; NLD & ILD
exten => _0.,1,Dial(SIP/332948${EXTEN}@bestel)   ; celLular

Attached is the complete extensions.conf.

Thanks for helping me!


btw, No, im not using progressinband=never.

I'll read about it, because i didnt know it.

By: Olle Johansson (oej) 2006-04-03 15:42:35

Ok, now we need a complete SIP debug as vechers asked for. The cap does not tell us what is happening inside your asterisk.

By: Oscar Lazcano (olazcano) 2006-04-03 16:35:16


I'll get it.

Hold on!

By: Oscar Lazcano (olazcano) 2006-04-03 18:16:15


Please find attached the traces you have requested to me.

olazcano_trace1.txt includes info only from SIP Endpoint.
olazcano_trace3.txt includes infro from and from which is the PSTN Softswitch.

Please let me know if you need any other information you may use to troubleshoot this problem.

I'd really appreciate your help.



By: Andrey S Pankov (casper) 2006-04-03 19:44:48

Do not forget to configure debug output in logger.conf first!!!
set debug 4
set verbose 4
sip debug
and then post them here :)

By: Oscar Lazcano (olazcano) 2006-04-03 20:38:17


I have upload the messages_olazcano.rtf file including the requested log.

If you open the file in wordpad, you will see in COLOR RED where i think everything starts.

Please let me know if this log fulfill your requirements.

Thanks again for your help!


By: Olle Johansson (oej) 2006-04-04 02:17:55

Please *always* upload text files. I have not got wordpad on any system I regurlarly use.

By: Olle Johansson (oej) 2006-04-04 02:20:46

Executing Dial("SIP/", "SIP/3329480443312870670@bestel|60|tr")

The "r" means "force ringing" - so Asterisk behaves exactly as you ask it for. This was not the dial plan you copied above, this is another part.

This is not a bug. Please do not use "r" in your dialplan as it will force ringing and cause what you describe.

By: Olle Johansson (oej) 2006-04-04 02:21:10

Not a bug, support issue.