> On Aug. 21, 2013, 1:47 p.m., Matt Jordan wrote:
> > Why not use pre-dial to put the musicclass directly on the channel that 
> > will survive, as opposed to the Local channel?

Because I have no pre-dial in this old branch, mostly.  But now I don't need it 
on the local channel anymore.

Thanks for the review!


- wdoekes


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2764/#review9454
-----------------------------------------------------------


On Aug. 16, 2013, 3:26 p.m., wdoekes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2764/
> -----------------------------------------------------------
> 
> (Updated Aug. 16, 2013, 3:26 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> I'm trying to set a musicclass from a Local channel.
> 
> After the channels get bridged, the Local channels get optimized away
> and now I get the wrong musicclass.
> 
> This patch fixes so I can alter the master CHANNEL settings instead.
> 
> Instead of:
> 
>   Set(CHANNEL(musicclass)=special)
> 
> We do:
> 
>   Set(CHANNEL(musicclass,M)=special)
> 
> If there is some other way I should've done this, I'd like to hear how :)
> 
> 
> Diffs
> -----
> 
>   /trunk/funcs/func_channel.c 396839 
> 
> Diff: https://reviewboard.asterisk.org/r/2764/diff/
> 
> 
> Testing
> -------
> 
> === extensions.conf ===
> 
> [general]
> 
> [default]
> exten => 1,1,Goto(direct,1)
> exten => 2,1,Goto(local,1)
> exten => 3,1,Goto(localm,1)
> 
> exten => direct,1,NoOp(Direct)
>       same => n,Set(CHANNEL(musicclass)=special)
>       same => n,NoOp(musicclass: ${CHANNEL(musicclass)})
>       same => n,Goto(dial,1)
> 
> exten => local,1,Dial(Local/local2@default)
> exten => local2,1,NoOp(Local, no Master)
>       same => n,Set(CHANNEL(musicclass)=special)
>       same => n,NoOp(musicclass: ${CHANNEL(musicclass)})
>       same => n,Goto(dial,1)
> 
> exten => localm,1,Dial(Local/localm2@default)
> exten => localm2,1,NoOp(Local, with Master)
>       same => n,Set(CHANNEL(musicclass,M)=special)
>       same => n,NoOp(musicclass: ${CHANNEL(musicclass,M)})
>       same => n,Goto(dial,1)
> 
> exten => dial,1,Dial(SIP/victim)
> 
> === musiconhold.conf ===
> 
> [general]
> 
> [default]
> mode=files
> directory=moh
> 
> [special]
> mode=files
> directory=moh
> 
> === output ===
> 
> `caller` calls `victim`, and `victim` presses hold.
> 
> Like expected, the only direct and localm channels get the right musicclass 
> set.
> 
> 1:
>     -- Executing [direct@default:1] NoOp("SIP/caller-00000000", "Direct") in 
> new stack
>     -- Executing [direct@default:2] Set("SIP/caller-00000000", 
> "CHANNEL(musicclass)=special") in new stack
>     -- Executing [direct@default:3] NoOp("SIP/caller-00000000", "musicclass: 
> special") in new stack
> ...
>     -- Started music on hold, class 'special', on SIP/caller-00000000
> 
> 2:
>     -- Executing [local@default:1] Dial("SIP/caller-00000004", 
> "Local/local2@default") in new stack
>     -- Called Local/local2@default
>     -- Executing [local2@default:1] NoOp("Local/local2@default-00000001;2", 
> "Local, no Master") in new stack
>     -- Executing [local2@default:2] Set("Local/local2@default-00000001;2", 
> "CHANNEL(musicclass)=special") in new stack
>     -- Executing [local2@default:3] NoOp("Local/local2@default-00000001;2", 
> "musicclass: special") in new stack
> ...
>     -- Move-swap optimizing Local/local2@default-00000001;1 <-- 
> SIP/victim-00000005.
> ...
>     -- Started music on hold, class 'default', on SIP/caller-00000004
> 
> 3:
>     -- Executing [localm@default:1] Dial("SIP/caller-0000000c", 
> "Local/localm2@default") in new stack
>     -- Executing [localm2@default:1] NoOp("Local/localm2@default-00000005;2", 
> "Local, with Master") in new stack
>     -- Called Local/localm2@default
>     -- Executing [localm2@default:2] Set("Local/localm2@default-00000005;2", 
> "CHANNEL(musicclass,M)=special") in new stack
>     -- Executing [localm2@default:3] NoOp("Local/localm2@default-00000005;2", 
> "musicclass: special") in new stack
> ...
>     -- Move-swap optimizing Local/localm2@default-00000002;1 <-- 
> SIP/victim-00000007.
> ...
>     -- Started music on hold, class 'special', on SIP/caller-00000006
> 
> 
> Thanks,
> 
> wdoekes
> 
>

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to