Summary:ASTERISK-08168: chan_h323 disables fastStart in connect message
Reporter:Di-Shi Sun (homesick)Labels:
Date Opened:2006-11-21 11:11:30.000-0600Date Closed:2008-04-02 14:31:31
Versions:Frequency of
Environment:Attachments:( 0) cisco.txt
( 1) h323.doc
Description:Test bed:
Cisco 3620 gateway -> asterisk (chan_h323)

Call secnario:
1. gateway sends call setup with fastStart and mediaWaitForConnect as false
2. asterisk sends proceeding
3. asterisk sends progress with fastStart
4. asterisk sends alert
5. asterisk sends connect with fastConnectRefused
Call is completed without fastStart.

From the source code,
1. MyH323Connection::OnAnswerCall returns AnswerCallDeferredWithMedia because fastStart!=FastStartDisabled.  
2. H323Connection::AnsweringCall sends progress with fastStart because mediaWaitForConnect==false. It calls SendFastStartAcknowledge to build fastStart.
3. When asterisk builds connect message in H323Connection::AnsweringCall, it calls SendFastStartAcknowledge again. SendFastStartAcknowledge returns false. H323Connection::AnsweringCall disables fastStart.

I am not sure which part has problems. I had tested several solutions,
1. MyH323Connection::OnAnswerCall returns AnswerCallDeferred if pi==0.
2. H323Connection::AnsweringCall sends progress without fastStart.
3. H323Connection::AnsweringCall sends connect, checks fastStartState first.
4. SendFastStartAcknowledge checks fastStartState, if it is FastStartAcknowledged, returns true.
All the solutions work for my test case. I would prefer 2 and overwriting AnsweringCall in MyH323Connection class.

If everybody agrees this solution. We can provide a patch.

Comments:By: Paul Cadach (pcadach) 2007-01-23 22:03:27.000-0600

PROGRESS message usually used to start early media, so if fast start is allowed it should be used to open media path.

If gateway "forget" to answer to fast start request from asterisk, this is definitely IMHO bug in gateway. As workaround, I would suggest to disable fast start with such type of gateway.

BTW, some versions of Cisco IOS/Call manager behaves as described above, i.e. silently ignores fast start request in PROGRESS/ALERT messages.

When I will have a test bed I will study this case a bit more.


By: Paul Cadach (pcadach) 2007-02-10 03:34:17.000-0600

Could you please provide sample call trace to clarify some issues I see here?

By: Di-Shi Sun (homesick) 2007-02-10 03:42:35.000-0600

I need a while to rebuild the test bed. I hope I can send the trace soon.

By: Serge Vecher (serge-v) 2007-03-06 10:02:32.000-0600

any updates here, homesick?

By: Di-Shi Sun (homesick) 2007-03-07 03:28:24.000-0600

Sorry. I got stuck in another project. I may back in two weeks.

By: Paul Cadach (pcadach) 2007-04-24 18:30:10

Could you please provide call traces to track this issue?


By: Di-Shi Sun (homesick) 2007-04-24 19:25:01

Hi Paul, I am really sorry for the long delay. I am working on the OpenSER/SER benchmark test. I hope I can finish it this week. We have scheduled to work for Asterisk around May.

By: Paul Cadach (pcadach) 2007-04-24 20:29:27

I'll check why OpenH323 answers with fastConnectRefused in case we acknowledged fastStart before Connect message, and is this behavior in compliance with existing H.323 standards or not, and report here shortly.


By: Di-Shi Sun (homesick) 2007-05-22 20:23:03

Hi Paul, I attached the test trace with "h323 set debug" and "h323 set trace 10". I am not sure if the Cisco gateway has the bug you mentioned. I also attached "show version" of the Cisco gateway. Regards, Di-Shi Sun.

By: Brandon Kruse (bkruse) 2008-01-27 23:43:47.000-0600

Hey guys, it has been awhile since the last comment.

What is the status of this issue? Can we close it?


By: Di-Shi Sun (homesick) 2008-01-28 06:41:34.000-0600

I think PCadach is right. This is a Cisco gateway bug. If PCadach agrees, we can close this ticket.

Di-Shi Sun.

By: jmls (jmls) 2008-02-17 13:10:24.000-0600

PCadach, can we close ?

By: Mark Michelson (mmichelson) 2008-04-02 14:31:24

Instead of continuing to ask if this can be closed, I'm just going to do it! If it needs to be re-opened, it can be done later.