[Asterisk-Dev] SIP - asterisk does not handle re-INVITEs correctly

Alex Zeffertt ajz at cambridgebroadband.com
Thu Aug 5 05:34:13 MST 2004


Hi,

I have some more information on this problem.  It is beginning to look
more like a codec or RTP problem than a SIP problem.

In order to eliminate SIP from the equation I tried just dynamically
switching the codec being sent to asterisk from GSM to ULAW without
first sending a re-INVITE.  (This is allowed since asterisk offered ULAW
in its 200 OK message.)

When I did this I found that the same problem occurred.  Although
asterisk did change the codec it sent from GSM to ULAW to match its
peer, the ULAW data was corrupted.  Although the asterisk echotest
application was receiving a continuous stream of 0xAAs, it  sent back
data which started at 0xAA and slowly incremented until it reached 0xFD.

It looks like asterisk has a problem with dynamic codec switching.  Has
anybody else seen this?  Or am I doing something wrong....

Regards,

Alex


On Wed, 4 Aug 2004 15:31:08 +0100
Alex Zeffertt <ajz at cambridgebroadband.com> wrote:

> 
> Hi all,
> 
> I've got a problem with the way asterisk behaves following the
> reception of a  re-INVITE. Although it correctly responds to the
> SIP/SDP message, there appears to be something wrong with the handling
> of the RTP data after the codec has been changed.
> 
> For example.  I have a SIP UA which I am using to call the
> EchoTest demo (sip:600 at asterisk).  I can verify using a packet sniffer
> that a GSM session is created and that the RTP payloads coming back
> from asterisk match the RTP payloads being sent to asterisk.  The SIP
> UA then sends asterisk a re-INVITE and using the packet sniffer I can
> verify that the codec changes to ULAW in both directions.  However,
> now the data being sent by asterisk does not match the data being sent
> to asterisk.  In fact, if the SIP UA sends asterisk a continuous
> stream of 0xAAs, then asterisk sends back roughly 30 0xABs, followed
> by roughly 30 0xACs, then 0xADs, until it gets to 0xFD at which point
> it just keeps sending 0xFDs.
> 
> Does anybody know what is happening here?
> 
> For the record, the reason I need asterisk to be able to handle
> re-INVITEs is that I am implementing a fax-upspeed scheme.  The idea
> is that when the SIP-UA recognises a fax tone it attempts to
> renegotiate the codec used for talking to asterisk to G711, which is
> low compression enough to allow fax pass-through.
> 
> TIA,
> 
> Alex
> 
> 
> -- 
> Alex Zeffertt
> Software Engineer
> Cambridge Broadband Ltd.
> http://www.cambridgebroadband.com
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list