tic tac
2008-Oct-01 13:38 UTC
[asterisk-users] RTP sent before the INVITE ACK (for voicemail app)
Hello, With asterisk 1.4.11, I am calling AGI "exec voicemail" upon a SIP INVITE invite -> asterisk <- 100 <- 200 <- RTP ACK -> ... asterisk is sending the RTP for the greeting before the original invite is ACK-ed (confirmed with a tcpdump) as if playing the prompt as soon as it is received from the AGI. I don't see any 183 so I don't think early media should apply. CLI output does not show any error that I see. Is there any reason other than a SIP 183 that would trigger this and isn't asterisk supposed to ACK/answer the channel before playing any prompt? Thanks, Sebastien. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20081001/ec4e7ef2/attachment.htm
Grey Man
2008-Oct-01 14:43 UTC
[asterisk-users] RTP sent before the INVITE ACK (for voicemail app)
> > CLI output does not show any error that I see. Is there any reason other > than a SIP 183 that would trigger this and isn't asterisk supposed to > ACK/answer the channel before playing any prompt? >Asterisk wil start the audio as soon as it sends back the 200 Ok response it doesn't wait for the ACK. Most SIP servers will work like that. The matching of ACK requests to a SIP transaction is not a particulalrly robust mechanism (for instance if a user agent puts its IP address in the Call-ID and a SIP ALG fiddles with the SIP packet for INVITEs but ignores ACKs then there will be a mismatch. This happens more frequently then you would think) so sending RTP after an OK response is the correct thing to do. I think Asterisk will actually cut off the call after 32s if it doesn't get an ACK which is not such a great idea but that may have been changed in later versions. The arrival of an RTP packet from the remote end should be used as the definitive indication of an answered call not the ACK. Regards, Greyman.