[Home]

Summary:ASTERISK-07081: [patch] Call received on a link declared in network mode : wrong call state after answering the call
Reporter:Frederic LE FOLL (flefoll)Labels:
Date Opened:2006-06-02 07:18:49Date Closed:2006-07-21 10:44:42
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) patch_connect_q931.c_br1.2_rev347.txt
( 1) patch_connect_q931.c_trunk_rev356.txt
( 2) patch_q931.c_state_after_connect.txt
Description:In q931_connect(), libpri always sets the call to Q931_CALL_STATE_CONNECT_REQUEST state.
When Asterisk side is configured as Network side, libpri should set the call state directly in Q931_CALL_STATE_ACTIVE (Q.931 5.1.8, no change in ETSI 300 403).

I propose a patch for SVN/branches/1.2 that tests pri->localtype before setting c->ourcallstate.
Comments:By: Matthew Fredrickson (mattf) 2006-06-02 11:06:43

Fixed in trunk and 1.2.  Thanks!

By: Frederic LE FOLL (flefoll) 2006-07-05 07:40:37

I reopen this issue in order to propose an additional patch, for trunk and 1.2 :
- so that Libpri ignores CONNECT ACK if an EUROISDN CPE side sends this message although it is optional for him (Q.931 5.8.1, no change in ETSI 300 403), instead of sending a STATUS,
- for better QSIG compatibility (ECMA-143 10.1.6), since QSIG call establishment procedure is symetrical (no cpe/network difference).

As far as QSIG is concerned, I suggest to always enter Active state directly after sending CONNECT, just like EUROISDN does on Network side, since this is permitted by ECMA-143 (the other alternative is to enter transitional Connect Request state and start T313, like EUROISDN on User side, until the peer side sends CONNECT ACK).

Thus, the patch does this in q931_connect() :
- directly enter Active state after sending CONNECT for QSIG signalling.
- start T313 depending on c->ourcallstate, instead of testing pri->localtype (cpe/network).
- fix a comment bug in q931_connect() : T313 is not "setup timer" but "connect request timer".

And in q931_receive() :
- check pri->localtype and pri->switchtype when receiving CONNECT ACK.

Warning : this patch will break q931.c patch that I proposed for issue ASTERISK-7083 (T309, trunk only). But I can update ASTERISK-7081 or ASTERISK-7083 patches as required, whatever patch you decide to apply first, second, or not at all.

By: Serge Vecher (serge-v) 2006-07-05 12:18:58

flefoll: it's better to open a new bug and say that this new bug is related to an old one, than reopen the old one. Thanks for the patches.

By: Frederic LE FOLL (flefoll) 2006-07-07 02:50:55

Just a patch update : patch_connect_q931.c_trunk_rev356.txt replaces former patch_connect_q931.c_trunk_rev352.txt for Libpri trunk.

vechers: sorry for reopening, I had a look at buglines and it was not clear to me, which solution was better : reopening or new issue. Next time, I will know.

By: Matthew Fredrickson (mattf) 2006-07-21 10:44:42

Fixed in trunk r365.