Re: [asterisk-users] A Leg Control on Asterisk Callback

2007-10-30 Thread Atis Lezdins
Douglas Garstang wrote:
 I'm confused about something.
 It's the way Asterisk handles the A leg (ie the first party dialed) on
 an originate command via the Manager Interface.
 
 Lets say our originate commands looks like this:
 
 ACTION: Originate
 Async: yes
 Timeout: 6
 Exten: callback
 Channel: SIP/[EMAIL PROTECTED]
 Variable: destination=SIP/[EMAIL PROTECTED]
 Callerid: 5551212
 Context: default
 ActionID: 849120
 Priority: 1
 
 Asterisk first goes and dials the Channel parameter,
 SIP/[EMAIL PROTECTED] This is where it gets confusing. You have no
 control over what happens here. The actions don't even appear on the
 Asterisk console debug. It isn't until this party has picked up, and
 control jumps to the 'callback' extension, that Asterisk shows you what
 it is doing.
 
 So, I went and changed the Channel parmeter to Channel:
 Local/[EMAIL PROTECTED], and made a LegA context:
 
 [LegA]
 exten = _X.,1,Dial(SIP/[EMAIL PROTECTED])
 exten = _X.,n,Playback(tt-monkeys)
 
 I wanted to have control over the call both before and after it is
 placed. I wanted to be able to play a prompt to the caller before the
 call is placed to the destination number. However, since we've dialled
 the A party already, we have no control over the dial plan anymore after
 they have answered, and I can't play prompts.
 
 What can I do here?
 
 Doug.

I would suggest you to dial to Local channel.. From there you can use
Dial() application and macros if you wish to playback something.. So you
would have two call legs - one connected to local channel and second to
specified context/extension/priority in call file. Then in local channel
you can do Answer() - that would mark that as answered and start
executing context/exten/priority from callfile, or don't do answer -
then answer from next subsequent dial would count.

Regards,
Atis

___
--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


Re: [asterisk-users] A Leg Control on Asterisk Callback

2007-10-30 Thread Suity Zsolt
Douglas Garstang wrote:

 [LegA]
 exten = _X.,1,Dial(SIP/[EMAIL PROTECTED])
 exten = _X.,n,Playback(tt-monkeys)
 
 I wanted to have control over the call both before and after it is 
 placed. I wanted to be able to play a prompt to the caller before the 
 call is placed to the destination number. However, since we've dialled 
 the A party already, we have no control over the dial plan anymore after 
 they have answered, and I can't play prompts.

If you want to play (just) an anouncement, add option A() to Dial command:
A(x): Play an announcement (x.gsm) to the called party.

or M(), if You want to do more:

M(x): Executes the macro (x) upon connect of the call (i.e. when the 
called party answers)

--
Suich

___
--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


[asterisk-users] A Leg Control on Asterisk Callback

2007-10-29 Thread Douglas Garstang
I'm confused about something.
It's the way Asterisk handles the A leg (ie the first party dialed) on an 
originate command via the Manager Interface.

Lets say our originate commands looks like this:

ACTION: Originate
Async: yes
Timeout: 6
Exten: callback
Channel: SIP/[EMAIL PROTECTED]
Variable: destination=SIP/[EMAIL PROTECTED]
Callerid: 5551212
Context: default
ActionID: 849120
Priority: 1

Asterisk first goes and dials the Channel parameter, SIP/[EMAIL PROTECTED] This 
is where it gets confusing. You have no control over what happens here. The 
actions don't even appear on the Asterisk console debug. It isn't until this 
party has picked up, and control jumps to the 'callback' extension, that 
Asterisk shows you what it is doing.

So, I went and changed the Channel parmeter to Channel: Local/[EMAIL 
PROTECTED], and made a LegA context:

[LegA]
exten = _X.,1,Dial(SIP/[EMAIL PROTECTED])
exten = _X.,n,Playback(tt-monkeys)

I wanted to have control over the call both before and after it is placed. I 
wanted to be able to play a prompt to the caller before the call is placed to 
the destination number. However, since we've dialled the A party already, we 
have no control over the dial plan anymore after they have answered, and I 
can't play prompts.

What can I do here?

Doug.








__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
--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

Re: [asterisk-users] A Leg Control on Asterisk Callback

2007-10-29 Thread Moises Silva
Why dont you make 2 separate Originate actions, one for each call leg.
Then call Bridge manager Action whenever you want.

Moy

On 10/29/07, Douglas Garstang [EMAIL PROTECTED] wrote:

 I'm confused about something.
 It's the way Asterisk handles the A leg (ie the first party dialed) on an
 originate command via the Manager Interface.

 Lets say our originate commands looks like this:

 ACTION: Originate
 Async: yes
 Timeout: 6
 Exten: callback
 Channel: SIP/[EMAIL PROTECTED]
 Variable: destination=SIP/[EMAIL PROTECTED]
 Callerid: 5551212
 Context: default
 ActionID: 849120
 Priority: 1

 Asterisk first goes and dials the Channel parameter, SIP/[EMAIL PROTECTED]
 This is where it gets confusing. You have no control over what happens here.
 The actions don't even appear on the Asterisk console debug. It isn't until
 this party has picked up, and control jumps to the 'callback' extension,
 that Asterisk shows you what it is doing.

 So, I went and changed the Channel parmeter to Channel: Local/[EMAIL 
 PROTECTED],
 and made a LegA context:

 [LegA]
 exten = _X.,1,Dial(SIP/[EMAIL PROTECTED])
 exten = _X.,n,Playback(tt-monkeys)

 I wanted to have control over the call both before and after it is placed. I
 wanted to be able to play a prompt to the caller before the call is placed
 to the destination number. However, since we've dialled the A party already,
 we have no control over the dial plan anymore after they have answered, and
 I can't play prompts.

 What can I do here?

 Doug.






 __
 Do You Yahoo!?
 Tired of spam? Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com
 ___
 --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



-- 
Within C++, there is a much smaller and cleaner language struggling
to get out.

___
--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


Re: [asterisk-users] A Leg Control on Asterisk Callback

2007-10-29 Thread Nasir Iqbal
Hi,

On Mon, 2007-10-29 at 10:29 -0700, Douglas Garstang wrote:
 I'm confused about something.
 It's the way Asterisk handles the A leg (ie the first party dialed) on
 an originate command via the Manager Interface.
 
 Lets say our originate commands looks like this:
 
 ACTION: Originate
 Async: yes
 Timeout: 6
 Exten: callback
 Channel: SIP/[EMAIL PROTECTED]
 Variable: destination=SIP/[EMAIL PROTECTED]
 Callerid: 5551212
 Context: default
 ActionID: 849120
 Priority: 1
 
 Asterisk first goes and dials the Channel parameter,
 SIP/[EMAIL PROTECTED] This is where it gets confusing. You have no
 control over what happens here. The actions don't even appear on the
 Asterisk console debug. It isn't until this party has picked up, and
 control jumps to the 'callback' extension, that Asterisk shows you
 what it is doing.
 
 So, I went and changed the Channel parmeter to Channel:
 Local/[EMAIL PROTECTED], and made a LegA context:
 
 [LegA]
 exten = _X.,1,Dial(SIP/[EMAIL PROTECTED])
 exten = _X.,n,Playback(tt-monkeys)
 
 I wanted to have control over the call both before and after it is
 placed. I wanted to be able to play a prompt to the caller before the
 call is placed to the destination number. However, since we've dialled
 the A party already, we have no control over the dial plan anymore
 after they have answered, and I can't play prompts.
 
 What can I do here?

You can use dial macro here like

exten = _X.,1,Dial(SIP/[EMAIL PROTECTED],M(a_leg))

and

[macro_a_leg]
exten = s,1,Playback(tt-monkeys)

you can run most of asterisk dialplan commands in macro. as soon as your
macro finished your call will be connected to Leg B

you can read more at 

http://www.voip-info.org/wiki-Asterisk+cmd+Dial#Dialmacros
and
http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Macro


Nasir Iqbal

ICT Innovations
http://www.ictinnovations.com



___
--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


Re: [asterisk-users] A Leg Control on Asterisk Callback

2007-10-29 Thread Brian Hutchinson
Read all the options of the Dial() function.  There are options you can mess
with to play something while the call is ringing (music on hold feature if I
recall). Check out all the Dial options.

On 10/29/07, Douglas Garstang [EMAIL PROTECTED] wrote:

 I'm confused about something.
 It's the way Asterisk handles the A leg (ie the first party dialed) on an
 originate command via the Manager Interface.

 Lets say our originate commands looks like this:

 ACTION: Originate
 Async: yes
 Timeout: 6
 Exten: callback
 Channel: SIP/[EMAIL PROTECTED]
 Variable: destination=SIP/[EMAIL PROTECTED]
 Callerid: 5551212
 Context: default
 ActionID: 849120
 Priority: 1

 Asterisk first goes and dials the Channel parameter, SIP/[EMAIL PROTECTED]
 This is where it gets confusing. You have no control over what happens here.
 The actions don't even appear on the Asterisk console debug. It isn't until
 this party has picked up, and control jumps to the 'callback' extension,
 that Asterisk shows you what it is doing.

 So, I went and changed the Channel parmeter to Channel: Local/[EMAIL 
 PROTECTED],
 and made a LegA context:

 [LegA]
 exten = _X.,1,Dial(SIP/[EMAIL PROTECTED])
 exten = _X.,n,Playback(tt-monkeys)

 I wanted to have control over the call both before and after it is placed.
 I wanted to be able to play a prompt to the caller before the call is placed
 to the destination number. However, since we've dialled the A party already,
 we have no control over the dial plan anymore after they have answered, and
 I can't play prompts.

 What can I do here?

 Doug.






 __
 Do You Yahoo!?
 Tired of spam? Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com

 ___
 --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

___
--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