[Home]

Summary:ASTERISK-10185: [patch] fix the redirect thru the ami
Reporter:Clod Patry (junky)Labels:
Date Opened:2007-09-06 17:28:16Date Closed:2008-02-11 11:21:53.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/PBX
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) redirect_man.txt
Description:When you have a channel in a meetme room (and inside an AGI), if you redirect throught the AMI, you get

Action: Redirect
Channel: SIP/10-0822b188
Context: meetme
Exten: 19
Priority: 2

Response: Success
Message: Redirect successful

but the channel is hanguped instead of being redirected correctly.

this is the command used in the AMI:
Action: Redirect
Channel: SIP/10-08231dd8
Context: meetme
Exten: 19
Priority: 1

with this patch, for an unknown reason, the chan->pbx has to be NULL so it could branched correctly in pbx.c::ast_explicit_goto().


****** ADDITIONAL INFORMATION ******

before the patch:
[Sep  6 16:20:06] DEBUG[13184]: manager.c:2346 process_message: Manager received command 'Redirect'
[Sep  6 16:20:06] DEBUG[13184]: channel.c:1363 ast_softhangup_nolock: Soft-Hanging up channel 'SIP/10-b6628110'
   -- Stopped music on hold on SIP/10-b6628110
[Sep  6 16:20:06] DEBUG[13184]: channel.c:1983 ast_settimeout: Scheduling timer at 0 sample intervals
[Sep  6 16:20:06] DEBUG[13184]: devicestate.c:448 __ast_devstate_changed_literal: Notification of state change to be queued on device/channel meetme:19
[Sep  6 16:20:06] DEBUG[13184]: res_agi.c:1892 run_agi: SIP/10-b6628110 hungup
   -- AGI Script ma/multibox17.agi completed, returning -1
[Sep  6 16:20:06] DEBUG[13184]: pbx.c:2402 __ast_pbx_run: Extension 21, priority 1 returned normally even though call was hung up
[Sep  6 16:20:06] DEBUG[13184]: channel.c:1363 ast_softhangup_nolock: Soft-Hanging up channel 'SIP/10-b6628110'
[Sep  6 16:20:06] DEBUG[13184]: channel.c:1460 ast_hangup: Hanging up channel 'SIP/10-b6628110'
[Sep  6 16:20:06] DEBUG[13184]: chan_sip.c:4041 sip_hangup: Hangup call SIP/10-b6628110, SIP callid f6b1e625-e6a70d7-a049811e@192.168.1.200)
[Sep  6 16:20:06] DEBUG[13184]: devicestate.c:448 __ast_devstate_changed_literal: Notification of state change to be queued on device/channel SIP/10-b6628110
[Sep  6 16:20:06] DEBUG[13184]: cdr_pgsql.c:126 pgsql_log: cdr_pgsql: inserting a CDR record.
[Sep  6 16:20:06] DEBUG[13184]: cdr_pgsql.c:134 pgsql_log: cdr_pgsql: SQL command executed:  INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield) VALUES ('2007-09-06 16:17:11','"JUNKY" <10>','10','46','unlimitel-inbound', 'SIP/10-b6628110','','MeetMe','19,MpT',175,175,'ANSWERED',3,'','1189109831.1481','')
[Sep  6 16:20:06] DEBUG[13184]: devicestate.c:327 ast_device_state: No provider found, checking channel drivers for SIP - 10



Comments:By: Jason Parker (jparker) 2007-09-06 17:39:57

Is this the same thing as ASTERISK-10227?  Sounds like it...



By: Atis Lezdins (atis) 2007-09-07 02:24:03

testing right now. i have some problems with applying this patch, it seems to me totally unrelated to code, but i got asterisk crashes on regular calls..

Btw, shouldn't you also set chan2? I think, it's used for ExtraChannel argument.

By: Clod Patry (junky) 2007-09-07 06:13:23

unrelated? Have you updated ur code to svn-trunk-81858 ?

I didnt look so much for extra channel, since im not using that option for that customer.
I will take a look at this option when i get back from week-end.

By: Atis Lezdins (atis) 2007-09-07 06:27:29

Sorry, i mean - my crashes are unrelated to your patch code :D

Im right now fighting with recompiling my testing server, as soon as i get it back working, i'll test it. It was just your patch i applied, when everything felt down - no i can't compile anything..

By: Atis Lezdins (atis) 2007-09-07 10:11:56

Ok, i managed to get my * box back up..

This patch doesn't help me in any way. I tested with chan->pbx = NULL, and also with added chan2->pbx = NULL.

I think this is completely unrelated issue - i got problems with third channel, my redirects are going just fine.

I'm using SVN-branch-1.4-r81832.

P.S.
junky, your log is quite unreadable. You have two different channel names (and destination contexts) in Redirect samples, and log have another channel name. You could provide "core show channels verbose", then Redirect sample, then again "core show channels", and then log with the same channel names.

P.P.S.
I really don't understand - you are in meetme room, and then you redirect again to meetme room? why would you?

By: Clod Patry (junky) 2007-09-07 11:10:39

hi, maybe its unrelated to ASTERISK-10227.
This patch solves all issues for that customers which having more then 1100 calls per days.
Like I said earlier, this patch wasnt tested for ExtraChannel, since I didnt need that in this install.

Just try to redirect (without ExtraChannel), with and without this patch, you will see the difference.

the reason is quite simple:
a person is talking in a meetme room and i want that person go at some other meetme room for talking with other people.

By: Atis Lezdins (atis) 2007-09-07 11:12:57

Sorry, i don't have the environment for that. For me, regular Redirect is working fine.

By: Olle Johansson (oej) 2007-12-16 03:40:50.000-0600

Is this a problem with latest trunk? Latest 1.4?

Who's working on it?

/Housekeeping

By: Clod Patry (junky) 2007-12-16 05:32:08.000-0600

since trunk Rev 81858 is really stable for me (with this patch), im running that specific version on a customer, so I dont know the exact status.
Since file changed the status to confirmed, maybe he knows more about it.

I applied the same patch for SVN-trunk-r93163M and still working great so far.


Also, i never mentionned 1.4 for this bug report.



By: Digium Subversion (svnbot) 2008-02-11 11:21:52.000-0600

Repository: asterisk
Revision: 103317

U   trunk/main/pbx.c

------------------------------------------------------------------------
r103317 | file | 2008-02-11 11:21:51 -0600 (Mon, 11 Feb 2008) | 4 lines

Fix Manager Redirect while in an AGI.
(closes issue ASTERISK-10185)
Reported by: junky

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=103317