[Freeswitch-users] Hangup and sound question

Brian West brian at freeswitch.org
Sun Apr 20 07:25:17 PDT 2008


On Apr 20, 2008, at 8:54 AM, Pete Kay wrote:

> Hi,
>
> I two a few questions about hangup and sounds:
>
>
> 1.
> In my dialplan, I have
>
>  <extension name="catchall">
>       <condition field="destination_number" expression="^(.*)$">
>            <action application="set" data="default_language=zh"/>
>         <action application="phrase" data="call-back-later"/>
>         <action application="hangup" data="SUCCESS"/>
>       </condition>
>     </extension>
>
> After it play the call-back-later marco, it then goes on to play the  
> "The extension you are dialing is unavailable..." even I have  
> specified the HANGUP application.  How come?  How to remove that  
> greeting?
>
>
> Also, when can i change the "The extension you are dialing is  
> unavailable..." greeting to a localized version?

What? You're not making any sense to me.. can you slow down and  
clarify a bit more?  In addition I do not recall "SUCCESS" being a  
hangup cause.  Try "NORMAL_CLEARING"


>
>
>
> 2.  I am writing my application in javascript.  Is there anyway to  
> play sounds that are loaded from DB?  Two ways I can think of are:
>
>    1. Use session.streamfile: but I need to extract the wav file  
> from DB file and then stored it in the filesystem.  Is it possible  
> to do that in Javascript or I need to use something like PHP?

Why on earth do you want to store your wav files in the database?   
Thats so inefficient.

>
>    2. Sound marco: in the sound marco, is there a way to specify the  
> file to be extracted from DB?

Try xml_curl on the wiki.

>
>
> 3.  Let's say i have an external TTS engine.  How do I make a call  
> to it in javascript?  The TTS engine can take text-message as input  
> and generate wav content as STDOUT.  What would be the best way to  
> incorporate it into my application?

Right now you can't really accept any media on stdout and feed it to  
the channel.  (api command to execute system)

>
>
> 4. Is there anyway to display the post request within the console  
> whenever the post is done?I tried curl_xml debug_on but it only  
> gives me the received xml.

You could debug it on your server side that receives the post.

>
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

Brian West
sip:brian at freeswitch.org







More information about the FreeSWITCH-users mailing list