Re: [asterisk-users] how to play music when dial fail or time out

2011-05-11 Thread John Wu
Thanks Matt,
can I transform the format in dial plan?

On Wed, May 11, 2011 at 11:24 AM, Matt Riddell li...@venturevoip.comwrote:

 On 11/05/11 3:11 PM, John Wu wrote:

 Hi Enrico
 thanks I do what u said but meet this problem:
 [May 11 11:08:49] WARNING[4545]: file.c:650 ast_openstream_full: File
 fail.wav does not exist in any format
 [May 11 11:08:49] WARNING[4545]: file.c:953 ast_streamfile: Unable to
 open fail.wav (format 0x2 (gsm)): No such file or directory
 [May 11 11:08:49] WARNING[4545]: app_playback.c:471 playback_exec:
 ast_streamfile failed on SIP/IMSI460020656177633- for fail.wav


 When you playback a file in Asterisk you don't provide the extension.

 So you'd do Playback(fail) rather than Playback(fail.wav)

 That way if you have 10 files all called fail (i.e. fail.wav, fail.gsm,
 fail.ulaw, fail.alaw etc etc) it will pick the one which matches the phone
 calls.

 For example in the above example you were making a call in the GSM format
 but it couldn't find a file called fail.wav.gsm so it looked for fail.wav.*
 and couldn't find anything.

 Basically just drop the extension.

 --
 Cheers,

 Matt Riddell
 ___

 http://www.venturevoip.com/news.php (Daily Asterisk News)
 http://www.venturevoip.com/exchange.php (Full ITSP Solution)
 http://www.venturevoip.com/cc.php (Call Centre Solutions)


 --
 _
 -- 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] how to play music when dial fail or time out

2011-05-11 Thread John Wu
Thanks Matt
the problem is solved.

On Wed, May 11, 2011 at 11:24 AM, Matt Riddell li...@venturevoip.comwrote:

 On 11/05/11 3:11 PM, John Wu wrote:

 Hi Enrico
 thanks I do what u said but meet this problem:
 [May 11 11:08:49] WARNING[4545]: file.c:650 ast_openstream_full: File
 fail.wav does not exist in any format
 [May 11 11:08:49] WARNING[4545]: file.c:953 ast_streamfile: Unable to
 open fail.wav (format 0x2 (gsm)): No such file or directory
 [May 11 11:08:49] WARNING[4545]: app_playback.c:471 playback_exec:
 ast_streamfile failed on SIP/IMSI460020656177633- for fail.wav


 When you playback a file in Asterisk you don't provide the extension.

 So you'd do Playback(fail) rather than Playback(fail.wav)

 That way if you have 10 files all called fail (i.e. fail.wav, fail.gsm,
 fail.ulaw, fail.alaw etc etc) it will pick the one which matches the phone
 calls.

 For example in the above example you were making a call in the GSM format
 but it couldn't find a file called fail.wav.gsm so it looked for fail.wav.*
 and couldn't find anything.

 Basically just drop the extension.

 --
 Cheers,

 Matt Riddell
 ___

 http://www.venturevoip.com/news.php (Daily Asterisk News)
 http://www.venturevoip.com/exchange.php (Full ITSP Solution)
 http://www.venturevoip.com/cc.php (Call Centre Solutions)


 --
 _
 -- 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] how to play music when dial fail or time out

2011-05-10 Thread John Wu
Hi Enrico
thanks I do what u said but meet this problem:
[May 11 11:08:49] WARNING[4545]: file.c:650 ast_openstream_full: File
fail.wav does not exist in any format
[May 11 11:08:49] WARNING[4545]: file.c:953 ast_streamfile: Unable to open
fail.wav (format 0x2 (gsm)): No such file or directory
[May 11 11:08:49] WARNING[4545]: app_playback.c:471 playback_exec:
ast_streamfile failed on SIP/IMSI460020656177633- for fail.wav

fail.wav is the sound which I want to playback, from the message this file
can not be found,
I put it under /var/lib/asterisk/sounds/

On Mon, May 9, 2011 at 9:37 PM, Enrico Cicconi enrico.cicc...@rdmnet.itwrote:

  Hi,
 have you tried to manage all with dialplane ?

 just an example:

 [incoming]
 **exten = s,1,Dial (SIP/your_called_party,20)
 exten = s,n, Playback(music_message)
 .



 In the first step the call is redirect to the configured called party and
 if without answer (busy, not logged, not answered) ...
 ... in the second step a music is played.

 You can also do other kind of job instead of 'playback' if you need.

 Hoping to have helped you, have a nice day

 Enrico
 www.rdmnet.it

 http://www.rdmnet.it/asterisk/104-asterisk-in-pillole-impostare-il-dialplan.html



 Il 09/05/2011 09:41, John Wu ha scritto:

 Hi all,
 I need to support this feature. When caller dial if the dial fail or no
 answer from the
 called number then play a music. So how to achieve that?

 Thanks!


 --
 _
 -- 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] how to play music when dial fail or time out

2011-05-10 Thread John Wu
thanks Dovid.

On Mon, May 9, 2011 at 5:30 PM, Dovid Bender asteriskus...@dovid.netwrote:

  John,

 You want to do it only after it fails ?

 If so you can do something like.

 Exten = _X., 1, Dial(SIP/${EXTEN}@PEER SIP/$%7BEXTEN%7D@%3CPEER%3E,20
 )
 Exten = _X., 2, GotoIf($[${DIALSTATUS} = ANSWER]?10)
 Exten = _X., 4, MusicOnHold()
 Exten = _X., 10, Hangup


 - Original Message -
 *From:* John Wu jwjo...@gmail.com
 *To:* Asterisk Users Mailing List - Non-Commercial 
 Discussionasterisk-users@lists.digium.com
 *Sent:* Monday, May 09, 2011 10:41
 *Subject:* [asterisk-users] how to play music when dial fail or time out

 Hi all,
 I need to support this feature. When caller dial if the dial fail or no
 answer from the
 called number then play a music. So how to achieve that?

 Thanks!

 --

 --
 _
 -- 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] how to play music when dial fail or time out

2011-05-09 Thread John Wu
Hi all,
I need to support this feature. When caller dial if the dial fail or no
answer from the
called number then play a music. So how to achieve that?

Thanks!
--
_
-- 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] how to let the call play audio when the dial fail

2011-05-05 Thread John Wu
Hi all,
I want to play an audio hint to caller when his dial fail rather than the
current sound dodo. The caller use asterisk to do the call so I want to
setup this asterisk to achieve play specific audio when the dial fail
or time out.
How to setup to achieve that?

Thanks!
--
_
-- 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] why asterisk sip dial procedure take long time

2011-03-17 Thread John Wu
Hi all
I use asterisk connect sip. I dial a phone number which is outside network
so asterisk will
dial the phone through sip server. But this procedure take too long between
dial and
ringing (about 40s). Any way to reduce the time it take?

Regards!
--
_
-- 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] can anyone tell me how to set asterisk to record all phonecall

2011-03-06 Thread John Wu
Hi Jeremy
Thanks for your reply, I did what u said, but still can not work. the
/var/spool/asterisk/monitor
do not have any file. Attachment is my extensions.conf


On Sat, Mar 5, 2011 at 12:37 PM, Jeremy Kister asterisk...@jeremykister.com
 wrote:

 On 3/4/2011 9:49 PM, John Wu wrote:

 I need to use asterisk to record all phonecall I have test using
 mixmonitor to record a call.


 this is one way it can be done

 make sure you have 'lame' installed.

 - in your extensions.conf:

 [global]
 VSA=/var/spool/asterisk

 [outbound-or-wherever-you-dial]
 exten = _XXX,1,Macro(Snoop,${EXTEN})
 exten = _XXX,n,Dial(SIP/${EXTEN},${TIMEOUT})
 exten = _XXX,n,StopMixMonitor
 ; above in case you're in some loop  Dial fails,
 ; e.g., swift+monitor crash asterisk


 [macro-Snoop]
 ; ${ARG1} channel
 exten = s,1,GotoIf($[${SNOOPING} = 1]?snooping)
 exten = s,n,Set(SNOOPING=1)
 exten = s,n,Set(=${STRFTIME(${EPOCH},,%Y)})
 exten = s,n,Set(MM=${STRFTIME(${EPOCH},,%m)})
 exten = s,n,Set(DD=${STRFTIME(${EPOCH},,%d)})
 exten = s,n,Set(HMS=${STRFTIME(${EPOCH},,%H%M%S)})
 exten = s,n,Set(FILENAME=${HMS}-${CALLERID(num)}-${ARG1}-${UNIQUEID})
 exten = s,n,Set(MIXMON_ARGS=mkdir -p ${VSA}/monitor/${}/${MM}/${DD} 
 nice -n 19 /usr/local/bin/lame --silent --resample 11.025 -b 16 -t -m m
 ${VSA}/monitor/${FILENAME}.wav
 ${VSA}/monitor/${}/${MM}/${DD}/${FILENAME}.mp3  rm -f
 ${VSA}/monitor/${FILENAME}.wav)
 exten = s,n,MixMonitor(${FILENAME}.wav,,${MIXMON_ARGS})
 exten = s,n(snooping),NoOp(snooping on ${CHANNEL})



 that'll end up putting a mp3 of the call in
 /var/spool/asterisk/monitor//MM/DD/HHMMSS-CALLERID.mp3

 don't forget any legal issues you might have to work around, recording the
 fact that you declared the message is being recorded.


 --

 Jeremy Kister
 http://jeremy.kister.net./

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



extensions.conf
Description: Binary data
--
_
-- 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] can anyone tell me how to set asterisk to record all phonecall

2011-03-06 Thread John Wu
Thanks Steve,
But I do not have many time to read asterisk usage. I will read it when I
got free time.
I find other ones use [macro-record-enable] to achieve auto record phone
call. Can I directly
use it? and how to debug the configure file?

On Mon, Mar 7, 2011 at 10:16 AM, Steve Edwards asterisk@sedwards.comwrote:

 On Mon, 7 Mar 2011, John Wu wrote:

  Thanks for your reply, I did what u said, but still can not work. the
 /var/spool/asterisk/monitor do not have any file. Attachment is my
 extensions.conf


 I don't think Jeremy intended for you to copy his example literally.

 Do you really have your endpoints pointed at
 '[outbound-or-wherever-you-dial]?'

 I suggest you take a step back and read 'Asterisk: The Future of Telephony'
 to get a bit more insight into how Asterisk works.

 You can buy a paper copy or google for the free PDF.

 --
 Thanks in advance,
 -
 Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline  Fax: +1-760-731-3000


 --
 _
 -- 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] can anyone tell me how to set asterisk to record all phonecall

2011-03-06 Thread John Wu
In my asterisk config files, extensions_additional.conf do not exist so
should I set [macro-record-enable]
in extensions_additional.conf or in extensions.conf? My version is
1.8.0beta5

On Mon, Mar 7, 2011 at 10:45 AM, John Wu jwjo...@gmail.com wrote:

 Thanks Steve,
 But I do not have many time to read asterisk usage. I will read it when I
 got free time.
 I find other ones use [macro-record-enable] to achieve auto record phone
 call. Can I directly
 use it? and how to debug the configure file?


 On Mon, Mar 7, 2011 at 10:16 AM, Steve Edwards 
 asterisk@sedwards.comwrote:

 On Mon, 7 Mar 2011, John Wu wrote:

  Thanks for your reply, I did what u said, but still can not work. the
 /var/spool/asterisk/monitor do not have any file. Attachment is my
 extensions.conf


 I don't think Jeremy intended for you to copy his example literally.

 Do you really have your endpoints pointed at
 '[outbound-or-wherever-you-dial]?'

 I suggest you take a step back and read 'Asterisk: The Future of
 Telephony' to get a bit more insight into how Asterisk works.

 You can buy a paper copy or google for the free PDF.

 --
 Thanks in advance,
 -
 Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline  Fax: +1-760-731-3000


 --
 _
 -- 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] can anyone tell me how to set asterisk to record all phonecall

2011-03-04 Thread John Wu
Hi all,
I need to use asterisk to record all phonecall I have test using
mixmonitor to record a call.
Now I need to set the configure file to let asterisk auto record all
calls. I have searched many
document but still can not succeed. My version is 1.8beta and I prefer
using mixmonitor.

Regards!

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