Hello all,<br>
<br>
Not sure if this mail belongs to this users or dev list. Sorry about<br>
that.<br>
<br>
We have the following scenario:<br>
<br>
<span style="font-family: courier new,monospace;"> PhoneA OpenSER Asterisk PhoneB</span><span style="font-family: courier new,monospace;"> PhoneC</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">
| | | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| | | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| | | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
|INVITE B | | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
|------------->| | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| |INVITE B | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| |------------->| | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| | |INVITE B | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| | |------------->| |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| | |486 Busy Here | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| | |<-------------| |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| | |ACK | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| | |------------->| |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| |486 Busy Here | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| |<-------------| | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| |ACK | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| |------------->| | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
|302 MOVED (to C) | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
|<-------------| | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
|ACK | | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
|------------->| | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
|INVITE C | | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
|------------->| | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| |INVITE C | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| |------------->| | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| |503 Unavailable | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| |<-------------| | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| |ACK | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| |------------->| | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
|503 Unavailable | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
|<-------------| | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
|ACK | | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
|------------->| | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| | | | |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
| | | | |</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;">
<br>
<br>
1.- Phone A calls Phone B behind Asterisk.<br>
2.- Phone B rejects call by sending a '486 Busy Here' response.<br>
3.- When OpenSER receives the 486 it sends a '302 Moved Temporarily'<br>
to Phone A to redirect the call to Phone C.<br>
4.- Phone A perfoms the redirection and sends a new INVITE to Phone C<br>
(that is also behind Asterisk) with same call-id BUT DIFFERENT from-tag,<br>
CSeq.<br>
5.- Asterisk, for some reason, considers the new INVITE to belong to the<br>
previous call and then rejects the call with a<br>
'503 Unavailable'. But it cannot be considered to belong to the same<br>
dialog because the tags are different, although the call-id is the same.<br>
We have used pedantic checking. Could it be considered as a bug?<br>
<br>
Looking at the code of chan_sip.c (version 1.4.23.1), we have observed<br>
that in function 'find_call' line 4667, asterisk is considering the call<br>
as FOUND because of this test:<br>
!ast_test_flag(&p->flags[1], SIP_PAGE2_DIALOG_ESTABLISHED).<br>
Commenting out this comparison, the call proceeds correctly. Sure, there<br>
is some reason for this checking and we would like to know which is and<br>
in what does it affect. How could we fix it?<br>
<br>
The following is the asterisk console output when the call does not<br>
proceed:<br>
[Mar 2 12:15:24] DEBUG[9989]: chan_sip.c:15813 handle_request: ****<br>
Received INVITE (5) - Command in SIP INVITE [Mar 2 12:15:24]<br>
NOTICE[9989]: chan_sip.c:14724<br>
handle_request_invite: Unable to create/find SIP channel for this INVITE<br>
[Mar 2 12:15:24] DEBUG[9989]: chan_sip.c:4653 find_call: = Looking for<br>
Call ID: <a href="mailto:9463D153-64F11DE-8602E9BF-A87F52E0@172.16.103.15" target="_blank">9463D153-64F11DE-8602E9BF-A87F52E0@172.16.103.15</a><br>
(Checking From) --From tag 182B3580-E9 --To-tag as62e21069<br>
<br>
Any feedback would be appreciated.<br>
<br>
Thank you in advance,<br>
<br>
Santi