[Freeswitch-users] playing sound file without answering the call
David Knell
dave at 3c.co.uk
Tue Aug 19 02:57:14 PDT 2008
Hi -
The answer to your initial question is "it depends." The ringtone
that a caller hears is generated by a switch at the far end of a call
- that's why, when you call people in different countries, you will
usually hear the ringtone for that country. If that switch is before
you in the chain - as it will be if, for example, you're receiving the
calls via an analogue line - then you cannot play audio to the caller
without answering the call. If there isn't a switch before you in the
chain which believes that it's its job to generate ringtone, then you
can play audio to the caller before answering.
If you can do what you want calling FS directly from a softphone on
your desk - I use X-Lite - then you've done your bit. If it doesn't
work when calling via the PSTN (but you hear ringing while the "your
balance is.." message is playing, then someone between FS and the
caller is generating that ringtone.
Cheers --
Dave
> Let me explain why i need this.
>
> I have a written a small script which will get balance from database
> and play the balance and after that connect the call by using
> session.originate.
>
>
> Dialing 009199XXXXXXX will call test.js which will first play
> balance and then dial 9199XXXXXX.
>
> Now the problem is :
>
>
> If i answer the call first and then play balance and then dial
> number .
>
> Call goes fine but the the session time calculated by freeswitch is
> from dialing 009199XXXXXXX till the end of call.
>
> which is wrong it should calculate only the call duration of new
> session originated by js.
>
>
> If not answer the call, duration is correct but it will not play the
> balance.
>
>
>
> On Tue, Aug 19, 2008 at 2:15 PM, vidhya sagar dixit
> <vids.cs at gmail.com> wrote:
> Hi,
>
> I am dialing from softphone to pstn using freeswitch.
> Is it possible to play a sound file before connecting the call.
>
> when dial from softphone i should hear first the sound file lets say
> welcome.wav and then dial the number.
>
>
>
> On Tue, Aug 19, 2008 at 2:10 PM, James Green <james.green at stealthnet.net
> > wrote:
> vidhya sagar dixit wrote:
> > Hi All,
> >
> > Is it possible to play a sound file without answering the call in
> free
> > switch ?
>
> To whom?
>
> James
>
> _______________________________________________
> 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
>
>
>
>
> --
> Thanks and Regards
>
> Vidhya Sagar Dixit
>
>
>
> --
> Thanks and Regards
>
> Vidhya Sagar Dixit
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080819/3efdd8f1/attachment-0002.html
More information about the FreeSWITCH-users
mailing list