<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/1676/">https://reviewboard.asterisk.org/r/1676/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On August 31st, 2012, 3:18 p.m., <b>rmudgett</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/1676/diff/14/?file=31128#file31128line41" style="color: black; font-weight: bold; text-decoration: underline;">trunk/configs/ss7.timers.sample</a>
<span style="font-weight: normal;">
(Diff revision 14)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">41</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">;isup_timer.t10 = 4000                ITU only</pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I cannot find the definition for this timer in ITU. It is really the overlap digit timeout and must always be defined (Even for ANSI).
If your dialplan has extension 100 and extension 1000 and an incoming call calls 100, then the call will not go through and the channel will get stuck in the allocated state. (p->call_level = SIG_SS7_CALL_LEVEL_ALLOCATED)
Also if the incoming call hangs up before this timer expires, the channel will be stuck because the call was never passed to Asterisk core.
Another incoming call on this circuit will clear this stuck condition if it gets passed to the Asterisk core. However, it will have an assertion failure in the IAM processing about the channel not being idle.
ast_assert(!p->owner && p->call_level == SIG_SS7_CALL_LEVEL_IDLE)</pre>
</blockquote>
<p>On September 3rd, 2012, 7:20 a.m., <b>KNK</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">ITU-T Q.764 2.1.2.1 d) and 2.1.4.8 e) then 4-6sec timer value defined in table A.1 and we should send ACM on expire, but in ANSI T1.113 there is a Note that 'Timer is not specified for U. S. networks.'
So the assert should be changed to pass both states SIG_SS7_CALL_LEVEL_IDLE and SIG_SS7_CALL_LEVEL_ALLOCATED or i misunderstood?
</pre>
</blockquote>
<p>On September 4th, 2012, 4:19 p.m., <b>rmudgett</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">There are two issues here:
1) I take it the SAM message is not supported by ANSI since T10 is not specified. With no T10 specified, then ss7_match_extension() should be changed to not call isup_start_digittimeout() if configured for ANSI since that timer is not specified for US networks. The called number must either match or not match an extension.
2) There is a glare problem at the root of this assertion failure. It is not easy to explain because it involves a long chain of events. Since libss7 now handles glare resolution, libss7 needs to be informed about a pending outgoing call when chan_dahdi allocates a channel for it.
ast_request() allocates resources for an outgoing call.
ast_call() initiates the outgoing call.
ast_hangup() can be called on a channel at any time after ast_request() to destroy the created channel.
Currently libss7 doesn't know about a pending outgoing call until the ast_call() happens. If an incoming call happens between the ast_request() and the ast_call(), the glare is not handled and the two calls step on each other.
</pre>
</blockquote>
<p>On September 5th, 2012, 9:47 a.m., <b>KNK</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">1) About T10 - the original code had it as DIGITTIMEOUT timer used for both ITU and ANSI. As T10 on my understanding has the similar functionality i have renamed it to T10 which led to the confusion, because T10 is not defined for ANSI ... after digging (googling) a bit more i've found that 'In North America, enbloc signaling is always used', so it is OK to leave it as T10 and will fix ss7_match_extension() to send REL if T10 is not defined or ANSI (just to be safe) ... isup_start_digittimeout() in libss7 should be changed to non-void.
Actually libss7 is unable to use overlap dialing out and i have not tested dialing in too - that functionality deserves some attention later.
2) the code removed after v6 https://reviewboard.asterisk.org/r/1676/diff/6/?file=29257#file29257line1461, should be restored then - dropping both calls is the only way out of this situation as we do not have an isup_call yet and no way to inform libss7</pre>
</blockquote>
<p>On September 5th, 2012, 11 a.m., <b>KNK</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Just an idea about 2) ... what if we do the opposite i.e. add a callback in Asterisk, so libss7 can check for dual seizure from isup_event_iam(). The callback can then simply check for call_level == SIG_SS7_CALL_LEVEL_IDLE</pre>
</blockquote>
<p>On September 5th, 2012, 11:03 a.m., <b>rmudgett</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">2) Yes. I think that would be best. The architecture of chan_dahdi handles glare poorly for anything but analog. The problem is mainly because chan_dahdi assigns the media to the call before the channel protocols have a chance to negotiate for it.</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">My last comment was before your callback idea. My preliminary idea was to move the calls to isup_new_call() and isup_init_call() in sig_ss7_call() to sig_ss7_available() and then indicate to libss7 that a call was pending that way libss7 would know about the call earlier. The isup_new_call() and isup_init_call() call are really allocation resource related and not call initiation. Unfortunately, doing that would also cause many other change ripples.
The isup_event_iam() already has a callback doing essentially that. libss7 just needs to know about the pending call.</pre>
<br />
<p>- rmudgett</p>
<br />
<p>On August 31st, 2012, 10:36 a.m., KNK wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By KNK.</div>
<p style="color: grey;"><i>Updated Aug. 31, 2012, 10:36 a.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">chan_dahdi / sig_ss7 part of changes</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">compiles, link setup, cli commands, bassic calls, connected line and redirection.</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/SS7-27">SS7-27</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>trunk/channels/chan_dahdi.c <span style="color: grey">(372115)</span></li>
<li>trunk/channels/sig_ss7.h <span style="color: grey">(372115)</span></li>
<li>trunk/channels/sig_ss7.c <span style="color: grey">(372115)</span></li>
<li>trunk/configs/chan_dahdi.conf.sample <span style="color: grey">(372115)</span></li>
<li>trunk/configs/ss7.timers.sample <span style="color: grey">(PRE-CREATION)</span></li>
<li>trunk/configure.ac <span style="color: grey">(372115)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/1676/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>