[asterisk-dev] ast_moh_start/stop not playing MOH sounds

Sergey Tamkovich serg at voipsolutions.ru
Tue Jun 3 02:23:54 CDT 2008


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




More information about the asterisk-dev mailing list