Summary:ASTERISK-08469: Replace not working properly?
Reporter:deti (deti)Labels:
Date Opened:2007-01-03 09:41:58.000-0600Date Closed:2007-10-30 10:30:36
Versions:Frequency of
Environment:Attachments:( 0) replaces.log
Description:Tried to replace a call and got:

'Supervised transfer attempted to replace non-ringing or active call id(...)'

There is a check in chan_sip.c near line 13342:
if (!error && p->refer->refer_call->owner->_state != AST_STATE_RING && p->refer->refer_call->owner->_state != AST_STATE_UP )

I guess this should be something like  
if (!error && p->refer->refer_call->owner->_state != AST_STATE_RINGING && p->refer->refer_call->owner->_state != AST_STATE_UP )

But I still run into trouble with this change: The call is not being cancelled on the RINGING device and therefor device state is not being updated properly.

Am I doing something wrong? Any clues?
Comments:By: Serge Vecher (serge-v) 2007-01-03 09:45:19.000-0600

Deti: as per bug guidelines, can you please attach a sip debug with and without your change?

1) Prepare test environment (reduce the amount of unrelated traffic on the server);
2) Make sure your logger.conf has the following line:
  console => notice,warning,error,debug
3) restart Asterisk with the following command:
  'asterisk -Tvvvvvdddddngc | tee /tmp/verbosedebug.txt'
4) Enable SIP transaction logging with the following CLI commands:
set debug 4
set verbose 4
sip debug
5) Trim startup information and attach verbosedebug.txt to the issue.

By: deti (deti) 2007-01-03 10:37:58.000-0600

This is how it looks before:

*CLI> sip show subscriptions
Peer             User        Call ID      Extension        Last state     Type            Mailbox  
xxx   71034554-B  3c2674624e2  71034577@db-ext  Idle           dialog-info+xml <none>    
1 active SIP subscription

*CLI> core show hints

   -= Registered Asterisk Dial Plan Hints =-
              71034577@db-extensions       : SIP/71034567-U        State:Idle            Watchers  1

Now I call extension 71034577

Peer             User        Call ID      Extension        Last state     Type            Mailbox  
xxx   71034554-B  3c26700b41e  71034577@db-ext  Ringing        dialog-info+xml <none>    
*CLI> core show hints

   -= Registered Asterisk Dial Plan Hints =-
              71034577@db-extensions       : SIP/71034567-U        State:Ringing         Watchers  1

See log what happens when I do a replace on a call to extension 71034577.

Then after hanging up the call you still can see:
core show hints

   -= Registered Asterisk Dial Plan Hints =-
              71034577@db-extensions       : SIP/71034567-U        State:Ringing         Watchers  0

By: Serge Vecher (serge-v) 2007-03-13 10:05:44

deti: is this still an issue with 1.4.1? If so, can we please have a new verbosedebug.txt?

By: deti (deti) 2007-03-13 10:14:48

Sorry, can't test right now. Let's close the bug for now if I'm the only one who was affected by that.

By: Serge Vecher (serge-v) 2007-03-13 11:32:07

timrobbins: are you able to test 1.4.1?

By: Olle Johansson (oej) 2007-03-14 07:54:44

We don't want to be in RING mode, we want the call to be in RINGING mode, so your change is wrong. I'll take a log at your debug files later (occupied at a conference).

By: Olle Johansson (oej) 2007-05-15 15:33:03

well, I'm sorry. The conference wasn't a one-month conference. But there has been a lot to do and I am way behind in the bug tracker. Will try to get this checked during the dev meeting next week.

By: Gregory Hinton Nietsky (irroot) 2007-07-07 05:01:28

hi there this is a problem still see


and i also have patched sip to allow both RING and RINGING.

By: Gregory Hinton Nietsky (irroot) 2007-08-08 10:15:22

this can probably be closed see ASTERISK-1008143 it is related/duplicate and resolves this issue

By: Joshua C. Colp (jcolp) 2007-10-30 10:30:35

Closed as it should already be fixed by change in 10143.