The ${BRIDGEPEER} variable missing! (and simlar solutions..)

Hi,
I need to mimic the function of bind xfer, but I would like to be more verbose to the user. For my conferancing service I have a phonnumber that calls a receptionist via a queue / dial (see below), she will be informed to enter 1 to connect the call, 2 to reject it and then she can talk to the caller.

I’ve planed to use the ${BRIDGEPEER} variable to redirect the call to the right place in the dialplan. And a meetme-conferance allowing the receptionist to escape by pressing 1 or 2.

I’ve tried the following solutions without any luck. In neither case the variable ${BRIDGEPEER} are set.

Can anyone clarify in which sircumstances this variable are set?

Please help correction my errors, or propose a different solution.
To transfer the calls to the right context I must know both channelnames, but it seems hard to retrive the bridged channels name.

Any thoughts?

Plain dial:
Dialplan

Outputs:

[quote] – Called teleman_out/xxxxxx
– Call accepted by 212.3.3.171 (format alaw)
– Format for call is alaw
– IAX2/teleman_out-4 is ringing
– IAX2/teleman_out-4 stopped sounds
– IAX2/teleman_out-4 answered IAX2/teleman_out-3
– Executing [s@macro-test:1] NoOp(“IAX2/teleman_out-4”, “Originating channel is IAX2/teleman_out-4”) in new stack
– Executing [s@macro-test:2] NoOp(“IAX2/teleman_out-4”, "Answered peer is ") in new stack
– Channel ‘IAX2/teleman_out-4’ ready to transfer
– Channel ‘IAX2/teleman_out-3’ ready to transfer
– Releasing IAX2/teleman_out-3 and IAX2/teleman_out-4
– Hungup ‘IAX2/teleman_out-4’
== Spawn extension (rs_incoming, s, 15) exited non-zero on ‘IAX2/teleman_out-3’
– Hungup ‘IAX2/teleman_out-3’
[/quote]

Queue with the new 1.4 agi option

the php-agi file:

And the output of this (with agi debug)

[quote] – Executing [s@rs_incoming:15] Queue(“IAX2/teleman_out-1”, “stenungsund|||||rs-incomingcall-agi.php”) in new stack
– Call accepted by 212.3.3.171 (format alaw)
– Format for call is alaw
– IAX2/teleman_out-5 is ringing
– IAX2/teleman_out-5 answered IAX2/teleman_out-1
– Launched AGI Script /var/lib/asterisk/agi-bin/rs-incomingcall-agi.php
AGI Tx >> agi_request: rs-incomingcall-agi.php

AGI Tx >> agi_channel: IAX2/teleman_out-1

AGI Tx >> agi_language: sv

AGI Tx >> agi_type: IAX2

AGI Tx >> agi_uniqueid: 1176514622.2

AGI Tx >> agi_callerid: 0757709766

AGI Tx >> agi_calleridname: unknown

AGI Tx >> agi_callingpres: 0

AGI Tx >> agi_callingani2: 0

AGI Tx >> agi_callington: 0

AGI Tx >> agi_callingtns: 0

AGI Tx >> agi_dnid: unknown

AGI Tx >> agi_rdnis: unknown

AGI Tx >> agi_context: rs_incoming

AGI Tx >> agi_extension: s

AGI Tx >> agi_priority: 15

AGI Tx >> agi_enhanced: 0.0

AGI Tx >> agi_accountcode:

AGI Tx >>

AGI Rx << GET VARIABLE BRIDGEPEER
AGI Tx >> 200 result=0

-- AGI Script rs-incomingcall-agi.php completed, returning 0
-- Channel 'IAX2/teleman_out-1' ready to transfer
-- Channel 'IAX2/teleman_out-5' ready to transfer
-- Releasing IAX2/teleman_out-5 and IAX2/teleman_out-1

[/quote]

I’ve now tried to use the manager api to get the channelnames for the bridged channel.

It seems like asterisk is bridging the channel after the execution of the agi.
This is the output (using phpagi manager class) from the script abow if you run:$peer = $asm->command("show channels verbose");

Output:

Trying to use the same AGI code inside of the macro in the post above generates this output:

Seems like the channel is never bridged before the AGI is executed in either case.

If I run the same code manualy the seconds after the AGI-script is finished I get this output (would solve my problem if accessible from AGI):

Anyone who have any ideas?

Greetings Johan

Can someone advice why the variable ${BRIDGEPEER} isn’t set in either of the cases above?

I’ve managed to solve my problem by using the G(gotocontext^exten^n) flag to Dial(), and send the two lines to a shared conferance. Then I can use “meetme list verbose” as a manager command to get the lines in that conferance. And it’s voila.

But - the approach would be much easier if the variable was set, as indicated in the documentation. Why isn’t it?

Anyone?

Please,

I’ve tried in asterisk 1.2 and 1.4 and can’t get this variable ${BRIDGEPEER}.

Is this a bug? Anyone who have an example that actually works?
The examples on the wiki doesn’t.

Greetings

Ok, I take like it is a bug.

I will try to submit this bug

/Johan