[Home]

Summary:ASTERISK-09506: Dial option S and reinvites
Reporter:Gaspar Zoltan (gasparz)Labels:
Date Opened:2007-05-24 09:12:14Date Closed:2007-06-06 08:32:51
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_dial
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) sip_log.txt
Description:Hi,

We are trying to setup asterisk to send reinvites and use the max_duration option for Dial (option S). All goes well but when the max_duration is passed after the dial we cannot play any sound:
WARNING[27869]: file.c:587 ast_readaudio_callback: Failed to write frame.


Looking into this issue we found out that when the call is hanguped by asterisk the RTP ip is not taken back to asterisk by another invite, so it makes sence failing to send RTP.

Our testcase:
We use agi for running the applications but I really think this is not affecting the test. The succesion of the applications run for this test is:

Answer
say_number(12)
Dial(Sip/destination@provider||S(5))
say_number(34)
hangup

We captured the sip messages and the callflow is:

Phone -> asterisk: invite
Asteriks - >Phone: 100 Trying
Asteriks - >Phone: 200 OK
Phone -> Asterisk: ACK
(now on the rtp we have the the say_number(12)
Asterisk -> Provider: Invite -> SDP: RTP endpoint Asterisk ip
Provider -> Asterisk: 100 Trying
Provider -> Asterisk: 183 Session
Provider -> Asterisk: 200 OK
Asterisk -> Provider: Ack

Asterisk -> Phone: Invite -> SDP: RTP endpoint Provider ip
Asterisk -> Provider: Invite -> SDP: RTP endpoint Phone ip
Provider -> Asterisk: 100 Trying
Phone -> Asterisk: 200 OK
Asterisk -> Phone: Ack
Provider -> Asterisk: 200 OK
Asterisk -> Provider: Ack
(I assume right now the RTP goes between the phone and the provider on the (newly) negociated codec and have 5 seconds of call)

Asterisk -> Provider: Invite -> SDP: RTP endpoint Phone ip
Provider -> Asterisk: 100 Trying
Provider -> Asterisk: 200 OK
Asterisk -> Provider: Ack
(I didn't understand compleatly why it sent an identical invite the asterisk but it doesn't hurt)

Asterisk -> Provider: bye (the 5 seconds have passed)
Provider -> Asterisk: 200 ok

(I assume now we have the
WARNING[27869]: file.c:587 ast_readaudio_callback: Failed to write frame.)

Asterisk -> Phone : bye
Phone -> Asterisk : Ok


My opinion is that fixing this issue is sending another invite to the phone with SDP: RTP ip address to asterisk if a reinvite had been sent out.
This way the playbacks and any other RTP after the dial can work.

attacked are the actual sip messages.
Comments:By: Joshua C. Colp (jcolp) 2007-06-06 08:32:50

Fixed in 1.2 as of revision 67649, 1.4 as of revision 67650, and trunk as of revision 67651. Thanks!