[asterisk-dev] ast_moh_start/stop not playing MOH sounds
ast guy
astguy at gmail.com
Wed Jun 11 02:15:09 CDT 2008
I was able to get it done using following code
ast_indicate(transferee, AST_CONTROL_HOLD);
ast_autoservice_start(transferee);
ast_moh_start(transferee, NULL);
/*
Your code here
*/
ast_moh_stop(transferee);
ast_autoservice_stop(transferee);
ast_indicate(transferee, AST_CONTROL_UNHOLD);
On Tue, Jun 3, 2008 at 12:23 PM, Sergey Tamkovich <serg at voipsolutions.ru>
wrote:
> check how builtin_atxfer() from res_features.c works.
> in short:
>
> ast_autoservice_start(mychan);
> ast_indicate(mychan, AST_CONTROL_HOLD);
>
> /* your code here */
>
> ast_indicate(mychan, AST_CONTROL_UNHOLD);
> ast_autoservice_stop(mychan);
>
> ast guy wrote:
> > Hi,
> >
> > I am building an application and at point caller has to wait for 1-2
> > mins. So to avoid user gets bored, I wanted to play MOH sounds using
> > ast_moh_start(chan,"default") function call in application. But it
> > didn't work as expected. I checked the app_dial.c and it was using the
> > same way. I was able to hear sound when executed MusicOnHold() in
> > dialplan but not in application.
> >
> >
> > here is my /etc/asterisk/musiconhold.conf
> >
> > [default]
> > mode=files
> > directory=/var/lib/asterisk
> > /mohmp3
> >
> >
> >
> > any suggestion what am I missing ? any other function call I need to
> > make before calling ast_moh_start() ?
> >
> > -ag
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > --Bandwidth and Colocation Provided by http://www.api-digital.com--
> >
> > asterisk-dev mailing list
> > To UNSUBSCRIBE or update options visit:
> > http://lists.digium.com/mailman/listinfo/asterisk-dev
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20080611/61cdb911/attachment-0001.htm
More information about the asterisk-dev
mailing list