Re: [asterisk-users] Playback on h exten

2013-02-21 Thread Leandro Dardini
2013/2/21 Enrico Pasqualotto e.pasqualo...@netspin.it

 Hi all, I'm trying to setup a Quiz/feedback for caller of call center when
 a agent hangup.
 I use Asterisk 1.8.16 and I'm trying with Queue and Dial with options c
 and g but every time I try to play something I got:

 -- Executing [301@from-test:1] Dial(SIP/300-0045,
 SIP/301,60,rjtTg) in new stack
 -- Called SIP/301
 -- SIP/301-0046 is ringing
 -- SIP/301-0046 answered SIP/300-0045
 -- Auto fallthrough, channel 'SIP/300-0045' status is 'ANSWER'
 -- Executing [h@from-test:1] Goto(SIP/300-0045, play,s,1) in
 new stack
 -- Goto (play,s,1)
 -- Executing [s@play:1] NoOp(SIP/300-0045, play) in new stack
 -- Executing [s@play:2] SayDigits(SIP/300-0045, 123579) in
 new stack
 [Feb 21 10:35:00] WARNING[31945]: file.c:833 ast_readaudio_callback:
 Failed to write frame
 -- SIP/300-0045 Playing 'digits/1.ulaw' (language 'en')
   == Spawn extension (play, s, 2) exited non-zero on 'SIP/300-0045'

 This is my dialplan:

 [from-test]
 exten = _X.,1,Dial(SIP/${EXTEN},60,rjtTg)
 exten = h,1,Goto(play,s,1)

 [play]
 exten = s,1,Noop(play)
 exten = s,2,Saydigits(123579)


 Anyone can help me?

 Thanks

 Enrico.


If you choose to go with the Dial command and use the g option, you have
not to use the h extension, but just provide a next priority. Your
dialplan has to be:

[from-test]
exten = _X.,1,Dial(SIP/${EXTEN},60,rjtTg)
*exten = _X.,2,Goto(play,s,1)*

[play]
exten = s,1,Noop(play)
exten = s,2,Saydigits(123579)

Leandro
--
_
-- 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] Playback on h exten

2013-02-21 Thread Enrico Pasqualotto
Yes, correct now it works for Dial. 
I think is the same with c option on Queue, do you think there's a way to do 
it on h exten? 
My goal is to inject my dialplan on hangup macro. 

Enrico. 
- Messaggio originale -

 If you choose to go with the Dial command and use the g option, you
 have not to use the h extension, but just provide a next priority.
 Your dialplan has to be:

 [from-test]
 exten = _X.,1,Dial(SIP/${EXTEN},60,rjtTg)
 exten = _X.,2,Goto(play,s,1)

 [play]
 exten = s,1,Noop(play)
 exten = s,2,Saydigits(123579)

 Leandro

-- 

-- 
Pasqualotto Enrico 
cell. +39 3473292620 
skype://epasqualotto :: http://www.linkedin.com/in/epasqualotto 
http://www.netspin.it :: e.pasqualo...@netspin.it 
--
_
-- 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] Playback on h exten

2013-02-21 Thread A J Stiles
On Thursday 21 February 2013, Enrico Pasqualotto wrote:
 Hi all, I'm trying to setup a Quiz/feedback for caller of call center when
 a agent hangup. I use Asterisk 1.8.16 and I'm trying with Queue and Dial
 with options c and g but every time I try to play something I got:
 .  stuff deleted .
 This is my dialplan:
 
 [from-test]
 exten = _X.,1,Dial(SIP/${EXTEN},60,rjtTg)
 exten = h,1,Goto(play,s,1)
 
 [play]
 exten = s,1,Noop(play)
 exten = s,2,Saydigits(123579)
 
 
 Anyone can help me?

By the time you reach extension h, it's too late for playing audio; the call 
has already been hung up, and the process of freeing up resources has begun.

If you are using the g modifier to the Dial() command then the call doesn't 
jump to extension h, but carries on with the next step if the far end hangs 
up.  So what you probably want is something more like this:

[from-test]
exten = _X.,1,Dial(SIP/${EXTEN},60,rjtTg)
exten = _X.,2,Noop(play)
exten = _X.,3,Saydigits(123579)


-- 
AJS

Answers come *after* questions.

--
_
-- 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] Playback on h exten

2013-02-21 Thread Leandro Dardini
The h exten is triggered when the channel is hangup, so you cannot send any
voice data on it.

Leandro

2013/2/21 Enrico Pasqualotto e.pasqualo...@netspin.it

 Yes, correct now it works for Dial.
 I think is the same with c option on Queue, do you think there's a way
 to do it on h exten?
 My goal is to inject my dialplan on hangup macro.

 Enrico.
 --


 If you choose to go with the Dial command and use the g option, you have
 not to use the h extension, but just provide a next priority. Your
 dialplan has to be:

 [from-test]
 exten = _X.,1,Dial(SIP/${EXTEN},60,rjtTg)
 *exten = _X.,2,Goto(play,s,1)*

 [play]
 exten = s,1,Noop(play)
 exten = s,2,Saydigits(123579)

 Leandro


 --
 --
 Pasqualotto Enrico
 cell. +39 3473292620
 skype://epasqualotto :: http://www.linkedin.com/in/epasqualotto
 http://www.netspin.it :: e.pasqualo...@netspin.it

 --
 _
 -- 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] Playback on h exten

2013-02-21 Thread Bharat Lalcheta
Any application with audio stream like playback or background will not work
in h priority, use of g in Dial() and c in Queue() is best approach for the
same.

Refer following link for h priority detail explanation
http://www.voip-info.org/wiki/view/Asterisk+h+extension

Regards,

Bharat
On Thu, Feb 21, 2013 at 3:53 PM, A J Stiles
asterisk_l...@earthshod.co.ukwrote:

 On Thursday 21 February 2013, Enrico Pasqualotto wrote:
  Hi all, I'm trying to setup a Quiz/feedback for caller of call center
 when
  a agent hangup. I use Asterisk 1.8.16 and I'm trying with Queue and Dial
  with options c and g but every time I try to play something I got:
  .  stuff deleted .
  This is my dialplan:
 
  [from-test]
  exten = _X.,1,Dial(SIP/${EXTEN},60,rjtTg)
  exten = h,1,Goto(play,s,1)
 
  [play]
  exten = s,1,Noop(play)
  exten = s,2,Saydigits(123579)
 
 
  Anyone can help me?

 By the time you reach extension h, it's too late for playing audio; the
 call
 has already been hung up, and the process of freeing up resources has
 begun.

 If you are using the g modifier to the Dial() command then the call doesn't
 jump to extension h, but carries on with the next step if the far end hangs
 up.  So what you probably want is something more like this:

 [from-test]
 exten = _X.,1,Dial(SIP/${EXTEN},60,rjtTg)
 exten = _X.,2,Noop(play)
 exten = _X.,3,Saydigits(123579)


 --
 AJS

 Answers come *after* questions.

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




-- 
Bharat Lalcheta
--
_
-- 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