SIP Simple Support On Asterisk 11

Home » Asterisk Users » SIP Simple Support On Asterisk 11
Asterisk Users 4 Comments

Hi all,

I am trying to enable SIP SIMPLE communication in my test environment.

I have the following env :

– one server ( with Asterisk 11
– 2 clients using pidgin : demo-bob and demo-alice on my

I successfully had a phone call between clients.

I used the following link to enable SIMPLE messaging between my clients :

Both users managed to register.

Adding verbose on the server, I have the following traces when I send the message “MESSAGE FROM ALICE TO BOB” from “demo-alice” to “demo-bob”

As you can see I succeed to have the message sent from alice to Asterisk.

When the server is trying to transmitting, I see a 401 error message. According to this post (
the first 401 should be normal as authentication is requested.

Afterwards the server emit 202 message.

But “demo-bob” never receives a message. I ran wireshark on server and client. It confirms that no message is sent from Asterisk to “demo-bob”.

Could you please give me advice ?

Here are my extensions.conf and sip.conf according to the link I mentioned.

Thanks a lot,


4 thoughts on - SIP Simple Support On Asterisk 11

  • Eloi Bail wrote:


    The trace shows that the initial MESSAGE from Alice does not include an Authorization header so Asterisk responds with a 401 Unauthorized. Alice then replies with a MESSAGE with an Authorization header, but reuses the same CSeq header (CSeq: 6 MESSAGE) which causes Asterisk to ignore it as a retransmit:

    I believe this is a bug in Pidgin because RFC 3261 [1] states:

    CSeq or Command Sequence contains an integer and a method name. The
    CSeq number is incremented for each new request within a dialog and
    is a traditional sequence number.

    Requests within a dialog MUST contain strictly monotonically
    increasing and contiguous CSeq sequence numbers (increasing-by-one)
    in each direction (excepting ACK and CANCEL of course, whose numbers
    equal the requests being acknowledged or cancelled).

    However, there is also a similar issue [2] that can be worked around by setting
    “pedantic=no” in sip.conf. If that doesn’t work, you can give the following
    (untested) patch to chan_sip.c a try:

    ===============================================================================— chan_sip.c.orig 2013-06-19 11:44:38.000000000 -0400
    +++ chan_sip.c 2013-06-19 11:47:22.000000000 -0400
    @@ -28078,6 +28078,7 @@
    } else if (p->icseq &&
    p->icseq == seqno &&
    req->method != SIP_ACK &&
    + p->method != SIP_MESSAGE &&
    (p->method != SIP_CANCEL || p->alreadygone)) {
    /* ignore means “don’t do anything with it” but still have to
    respond appropriately. We do this if we receive a repeat of
    Good luck and please let the list know how this works out.



    Matthew Roth InterMedia Marketing Solutions Software Engineer and Systems Developer

  • Hi,

    Thanks a lot for this detailed answer :

    – I managed to have it working disabling auth message request
    : auth_message_requests = no in sip.conf
    – pedantic=no does not resolve the issue
    – reenabling auth_message_requests = yes and removing pedantic option, your patch in chan_sip resolves the issues !

    As it looks like pidgin has an issue, I guess that we can use it as a workaround.

    I would like know to enable presence notification between each users. To fulfill it, I am using

    Am I doing it in a good way ?

    Thanks !


  • Eloi,

    My responses are inline.

    You’re welcome. Thank you for responding. A lot of people forget to do so and future list readers are left wondering whether or not the proposed solution worked.

    I’m glad my patch worked but keep in mind that it really is a workaround, because it will cause actual retransmits of MESSAGE requests to be treated as new requests. This may not cause you any issues, but the root problem should still be addressed by submitting a report to the Pidgin bug tracker [1]. It’s a straightforward problem so if you provide a link to your original post [2] the developers should be able to resolve it quickly.

    Yes, but there is a 4th edition of “Asterisk: The Definitive Guide” available in the Open Feedback Publishing System [3] that is focused on documenting Asterisk 11.



    Matthew Roth InterMedia Marketing Solutions Software Engineer and Systems Developer