<div dir="ltr">Hi,<div><br></div><div style>Thanks a lot for this detailed answer :</div><div style><br></div><div style>- I managed to have it working disabling auth message request : auth_message_requests = no in sip.conf</div>
<div style>- pedantic=no does not resolve the issue</div><div style>- reenabling auth_message_requests = yes and removing pedantic option, your patch in chan_sip resolves the issues !</div><div style><br></div><div style>
As it looks like pidgin has an issue, I guess that we can use it as a workaround.</div><div style><br></div><div style>I would like know to enable presence notification between each users. To fulfill it, I am using <a href="http://asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/DeviceStates_id265377.html">http://asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/DeviceStates_id265377.html</a></div>
<div style><br></div><div style>Am I doing it in a good way ?</div><div style><br></div><div style>Thanks !</div><div style><br></div><div style>Eloi</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 19, 2013 at 12:11 PM, Matthew J. Roth <span dir="ltr"><<a href="mailto:mroth@imminc.com" target="_blank">mroth@imminc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Eloi Bail wrote:<br>
><br>
> I am trying to enable SIP SIMPLE communication in my test environment.<br>
><br>
> I have the following env :<br>
><br>
> - one server (192.168.50.126) with Asterisk 11<br>
> - 2 clients using pidgin : demo-bob and demo-alice on my 192.168.50.143<br>
><br>
> I successfully had a phone call between clients.<br>
><br>
> I used the following link to enable SIMPLE messaging between my clients :<br>
> <a href="http://highsecurity.blogspot.ca/2012/03/asterisk-10-110-sms-messaging-or-sip.html" target="_blank">http://highsecurity.blogspot.ca/2012/03/asterisk-10-110-sms-messaging-or-sip.html</a><br>
><br>
> Both users managed to register.<br>
><br>
> Adding verbose on the server, I have the following traces when I send the<br>
> message "MESSAGE FROM ALICE TO BOB" from "demo-alice" to "demo-bob"<br>
><br>
> <a href="http://paste.fedoraproject.org/19489/37158861/" target="_blank">http://paste.fedoraproject.org/19489/37158861/</a><br>
><br>
> As you can see I succeed to have the message sent from alice to Asterisk.<br>
><br>
> When the server is trying to transmitting, I see a 401 error message.<br>
> According to this post ( <a href="http://forums.digium.com/viewtopic.php?f=1&t=72814" target="_blank">http://forums.digium.com/viewtopic.php?f=1&t=72814</a> )<br>
> the first 401 should be normal as authentication is requested.<br>
><br>
> Afterwards the server emit 202 message.<br>
><br>
> But "demo-bob" never receives a message.<br>
> I ran wireshark on server and client. It confirms that no message is sent from<br>
> Asterisk to "demo-bob".<br>
><br>
> Could you please give me advice ?<br>
><br>
> Here are my extensions.conf and sip.conf according to the link I mentioned.<br>
> <a href="http://paste.fedoraproject.org/19626/16493741/" target="_blank">http://paste.fedoraproject.org/19626/16493741/</a><br>
><br>
> <a href="http://paste.fedoraproject.org/19627/49423137/" target="_blank">http://paste.fedoraproject.org/19627/49423137/</a><br>
<br>
<br>
</div></div>Eloi,<br>
<br>
The trace shows that the initial MESSAGE from Alice does not include an<br>
Authorization header so Asterisk responds with a 401 Unauthorized. Alice then<br>
replies with a MESSAGE with an Authorization header, but reuses the same CSeq<br>
header (CSeq: 6 MESSAGE) which causes Asterisk to ignore it as a retransmit:<br>
<br>
> [Jun 18 16:49:35] DEBUG[16266] chan_sip.c: Ignoring SIP message because of<br>
> retransmit (MESSAGE Seqno 6, ours 6)<br>
<br>
I believe this is a bug in Pidgin because RFC 3261 [1] states:<br>
<br>
CSeq or Command Sequence contains an integer and a method name. The<br>
CSeq number is incremented for each new request within a dialog and<br>
is a traditional sequence number.<br>
...<br>
Requests within a dialog MUST contain strictly monotonically<br>
increasing and contiguous CSeq sequence numbers (increasing-by-one)<br>
in each direction (excepting ACK and CANCEL of course, whose numbers<br>
equal the requests being acknowledged or cancelled).<br>
<br>
However, there is also a similar issue [2] that can be worked around by setting<br>
"pedantic=no" in sip.conf. If that doesn't work, you can give the following<br>
(untested) patch to chan_sip.c a try:<br>
<br>
================================================================================<br>
--- chan_sip.c.orig 2013-06-19 11:44:38.000000000 -0400<br>
+++ chan_sip.c 2013-06-19 11:47:22.000000000 -0400<br>
@@ -28078,6 +28078,7 @@<br>
} else if (p->icseq &&<br>
p->icseq == seqno &&<br>
req->method != SIP_ACK &&<br>
+ p->method != SIP_MESSAGE &&<br>
(p->method != SIP_CANCEL || p->alreadygone)) {<br>
/* ignore means "don't do anything with it" but still have to<br>
respond appropriately. We do this if we receive a repeat of<br>
================================================================================<br>
<br>
Good luck and please let the list know how this works out.<br>
<br>
[1] <a href="http://www.ietf.org/rfc/rfc3261.txt" target="_blank">http://www.ietf.org/rfc/rfc3261.txt</a><br>
[2] <a href="https://issues.asterisk.org/jira/browse/ASTERISK-19139" target="_blank">https://issues.asterisk.org/jira/browse/ASTERISK-19139</a><br>
<br>
Regards,<br>
<br>
Matthew Roth<br>
InterMedia Marketing Solutions<br>
Software Engineer and Systems Developer<br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</blockquote></div><br></div>