James Northcott / Chief Systems
2010-Feb-17 15:00 UTC
[asterisk-users] chan_local and Originate
Hi, I've recently upgraded from Asterisk 1.4.22 to 1.4.29, and I'm now having a problem with Originate and chan_local. I'm using the following Manager API action to originate a call: Action: originate Priority: 1 Context: trunk Callerid: 100 Channel: Local/100 at callback/n Exten: 123456789 Variable: USERFIELD=127.0.0.1|USEREXT=123456789 WaitTime: 30 This is intended to first call extension 100 in the callback context, and then when that is answered, call 123456789 in the trunk context. I have the following in the callback context: exten => 100,1,Answer exten => 100,2,Wait(2) exten => 100,3,NoOP(${ANSWERED} ${USEREXT}) exten => 100,4,AGI(getChannelState.agi|${USEREXT}) exten => 100,5,GotoIf($[${EXISTS(${ANSWERED})}]?6:2) exten => 100,6,Set(CDR(accountcode)=${USERFIELD}) exten => 100,7,Set(__OriginalCallerNum=c2c ${USEREXT}) exten => 100,8,Goto(handleq,s,new) exten => 100,9,Hangup The getChannelState AGI script just waits until the call to 123456789 is answered before putting the caller into a queue. The problem is that the second leg of the Originate, the call to 123456789 at trunk, never happens. Even though the first action at 100 at local is to Answer, the Originate action doesn't see this, so I just get the AGI calls every 2 seconds for 30 seconds, and then everything hangs up. This code did work in a previous version of Asterisk, but I am not 100% sure it worked in 1.4.22 - it may have broken before then. If I replace Local/100 at callback/n with my direct SIP channel, the Originate works as expected. Can anyone tell me if I am using the Local channel incorrectly here? Or did something about the Local channel change in recent 1.4 versions? Is there a better way to do what I'm trying to do? Thanks, James
17 feb 2010 kl. 16.00 skrev James Northcott / Chief Systems:> Hi, > > I've recently upgraded from Asterisk 1.4.22 to 1.4.29, and I'm now > having a problem with Originate and chan_local. > > I'm using the following Manager API action to originate a call: > > Action: originate > Priority: 1 > Context: trunk > Callerid: 100 > Channel: Local/100 at callback/n > Exten: 123456789 > Variable: USERFIELD=127.0.0.1|USEREXT=123456789 > WaitTime: 30 > > This is intended to first call extension 100 in the callback context, > and then when that is answered, call 123456789 in the trunk context. I > have the following in the callback context: > > exten => 100,1,Answer > exten => 100,2,Wait(2) > exten => 100,3,NoOP(${ANSWERED} ${USEREXT}) > exten => 100,4,AGI(getChannelState.agi|${USEREXT}) > exten => 100,5,GotoIf($[${EXISTS(${ANSWERED})}]?6:2) > exten => 100,6,Set(CDR(accountcode)=${USERFIELD}) > exten => 100,7,Set(__OriginalCallerNum=c2c ${USEREXT}) > exten => 100,8,Goto(handleq,s,new) > exten => 100,9,Hangup > > The getChannelState AGI script just waits until the call to 123456789 is > answered before putting the caller into a queue. > > The problem is that the second leg of the Originate, the call to > 123456789 at trunk, never happens. Even though the first action at > 100 at local is to Answer, the Originate action doesn't see this, so I just > get the AGI calls every 2 seconds for 30 seconds, and then everything > hangs up. > > This code did work in a previous version of Asterisk, but I am not 100% > sure it worked in 1.4.22 - it may have broken before then. > > If I replace Local/100 at callback/n with my direct SIP channel, the > Originate works as expected. > > Can anyone tell me if I am using the Local channel incorrectly here? Or > did something about the Local channel change in recent 1.4 versions? Is > there a better way to do what I'm trying to do?I think I've seen the same problem with 1.4 from svn. Can't confirm it but based on your e-mail I will try with an old version and see if there's any difference. Thanks for e-mailing that, you woke me up. I spent almost an hour in a very busy system trying to find the second call leg of an AMI originate yesterday. The CLI originate works just fine. If you can confirm that it works in one version of 1.4 and not in 1.4.29, then please open a bug report on issues.asterisk.org /O
There was a bug reported on this, I think ... yes #16581 Fixed in r244070 | tilghman | 2010-02-01 11:46:32 -0600 (Mon, 01 Feb 2010) Julian On 17 February 2010 15:00, James Northcott / Chief Systems <james at chiefsystems.ca> wrote:> Hi, > > I've recently upgraded from Asterisk 1.4.22 to 1.4.29, and I'm now > having a problem with Originate and chan_local. > > I'm using the following Manager API action to originate a call: > > Action: originate > Priority: 1 > Context: trunk > Callerid: 100 > Channel: Local/100 at callback/n > Exten: 123456789 > Variable: USERFIELD=127.0.0.1|USEREXT=123456789 > WaitTime: 30 > > This is intended to first call extension 100 in the callback context, > and then when that is answered, call 123456789 in the trunk context. ?I > have the following in the callback context: > > exten => 100,1,Answer > exten => 100,2,Wait(2) > exten => 100,3,NoOP(${ANSWERED} ${USEREXT}) > exten => 100,4,AGI(getChannelState.agi|${USEREXT}) > exten => 100,5,GotoIf($[${EXISTS(${ANSWERED})}]?6:2) > exten => 100,6,Set(CDR(accountcode)=${USERFIELD}) > exten => 100,7,Set(__OriginalCallerNum=c2c ${USEREXT}) > exten => 100,8,Goto(handleq,s,new) > exten => 100,9,Hangup > > The getChannelState AGI script just waits until the call to 123456789 is > answered before putting the caller into a queue. > > The problem is that the second leg of the Originate, the call to > 123456789 at trunk, never happens. ?Even though the first action at > 100 at local is to Answer, the Originate action doesn't see this, so I just > get the AGI calls every 2 seconds for 30 seconds, and then everything > hangs up. > > This code did work in a previous version of Asterisk, but I am not 100% > sure it worked in 1.4.22 - it may have broken before then. > > If I replace Local/100 at callback/n with my direct SIP channel, the > Originate works as expected. > > Can anyone tell me if I am using the Local channel incorrectly here? ?Or > did something about the Local channel change in recent 1.4 versions? ?Is > there a better way to do what I'm trying to do? > > Thanks, > > James > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > ? http://lists.digium.com/mailman/listinfo/asterisk-users >
James Northcott / Chief Systems escribi?:> Hi, > > I've recently upgraded from Asterisk 1.4.22 to 1.4.29, and I'm now > having a problem with Originate and chan_local. > >Hi, This is a known and solved bug: https://issues.asterisk.org/view.php?id=16717 Give the latest 1.4.30-rc2 a try. Cheers, -- Ing. Miguel Molina Grupo de Tecnolog?a Millenium Phone Center