Re: [asterisk-users] Create new channel from dialplan

2014-05-01 Thread Josh Metzger
I'm not sure exactly what your use case is, but you could execute a Dial()
and use the M option to execute a Macro (or U to execute a gosub).
From there, the call routes into the macro/subroutine, and you can process
away.  After all of that is completed in the macro/subroutine, you can set
MACRO_RESULT or GOSUB_RESULT (depending on which you used) to
CONTINUE, so your dialplan continues after everything is complete (or, if
you finish everything within the routine, just let it end there).

Josh


On Wed, Apr 30, 2014 at 10:21 PM, Igor Dvorzhak idm...@gmail.com wrote:

 Thanks, it almost what I need.
 But I can't find a way to pass channel variables to Originate cmd in
 dialplan.

 Is it possible at all?


 On Wed, Apr 30, 2014 at 3:13 PM, Richard Mudgett rmudg...@digium.comwrote:




 On Wed, Apr 30, 2014 at 4:33 PM, Igor Dvorzhak idm...@gmail.com wrote:

 Hi all,

 I need a command to originate a new channel from dialplan. I should be
 able to continue execution of the current context after this command.

 How to do this?


 Look at this application:
 *CLI core show application Originate

 Richard


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

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



 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

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

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Create new channel from dialplan

2014-05-01 Thread Igor Dvorzhak
Hi John,

Detailed use case:
I have a contact call connected to which played the IVR. On transfer
digit key press I need to transfer it to the predefined transfer number.
I don't want use the Dial command to do transfer because it will
automatically connect contact channel with transfer channel. Instead I
want to put transfer channel and contact channel in the MeetMe
conference.

So I need to use Originate command to originate transfer call in the
separate channel. After this command I will put current contact channel
in MeetMe conference. When transfer connects it will be put to the same
MeetMe conference as contact.

Now I'm using the System command to originate call through external
executable in dialplan, but it looks ugly, so I'm trying to find a better
way to do this.

What I'm using now:
exten = meetme,1,System(/usr/bin/php
/etc/asterisk/script/originate_call.php Channel:
Local/+${TRANSFER_NUMBER}@cf3-transfer-dial\,MaxRetries: 0\,RetryTime:
60\,WaitTime: 640\,CallerID: \${TO}\\,Context:
cf3-transfer-leg\,Extension: s\,Priority: 1\,Set:
ACTIVE_ID=${ACTIVE_ID}\,Set: TERMINATION_IP=${TERMINATION_IP}\,Set:
DIAL_TIME=${DIAL_TIME}\,Set:
TRANSFER_TEST_NUMBER=${TRANSFER_TEST_NUMBER}\,)

Igor


On Thu, May 1, 2014 at 5:23 AM, Josh Metzger joshdmetz...@gmail.com wrote:

 I'm not sure exactly what your use case is, but you could execute a Dial()
 and use the M option to execute a Macro (or U to execute a gosub).
 From there, the call routes into the macro/subroutine, and you can process
 away.  After all of that is completed in the macro/subroutine, you can set
 MACRO_RESULT or GOSUB_RESULT (depending on which you used) to
 CONTINUE, so your dialplan continues after everything is complete (or, if
 you finish everything within the routine, just let it end there).

 Josh


 On Wed, Apr 30, 2014 at 10:21 PM, Igor Dvorzhak idm...@gmail.com wrote:

 Thanks, it almost what I need.
 But I can't find a way to pass channel variables to Originate cmd in
 dialplan.

 Is it possible at all?


 On Wed, Apr 30, 2014 at 3:13 PM, Richard Mudgett rmudg...@digium.comwrote:




 On Wed, Apr 30, 2014 at 4:33 PM, Igor Dvorzhak idm...@gmail.com wrote:

 Hi all,

 I need a command to originate a new channel from dialplan. I should be
 able to continue execution of the current context after this command.

 How to do this?


 Look at this application:
 *CLI core show application Originate

 Richard


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

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



 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

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



 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

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

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] Create new channel from dialplan

2014-04-30 Thread Igor Dvorzhak
Hi all,

I need a command to originate a new channel from dialplan. I should be able
to continue execution of the current context after this command.

How to do this?

Best,
Igor
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Create new channel from dialplan

2014-04-30 Thread Richard Mudgett
On Wed, Apr 30, 2014 at 4:33 PM, Igor Dvorzhak idm...@gmail.com wrote:

 Hi all,

 I need a command to originate a new channel from dialplan. I should be
 able to continue execution of the current context after this command.

 How to do this?


Look at this application:
*CLI core show application Originate

Richard
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Create new channel from dialplan

2014-04-30 Thread Igor Dvorzhak
Thanks, it almost what I need.
But I can't find a way to pass channel variables to Originate cmd in
dialplan.

Is it possible at all?


On Wed, Apr 30, 2014 at 3:13 PM, Richard Mudgett rmudg...@digium.comwrote:




 On Wed, Apr 30, 2014 at 4:33 PM, Igor Dvorzhak idm...@gmail.com wrote:

 Hi all,

 I need a command to originate a new channel from dialplan. I should be
 able to continue execution of the current context after this command.

 How to do this?


 Look at this application:
 *CLI core show application Originate

 Richard


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

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

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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