pjsip / pjproject

PJSIP project
http://www.pjsip.org
GNU General Public License v2.0
2.05k stars 782 forks source link

Cant rewind .wav to start #2469

Closed uniofweb closed 4 years ago

uniofweb commented 4 years ago

Use text-to-speech and pjsua for control home. ./pjsua-x86_64-unknown-linux-gnu --play-file ivr.wav --capture-dev=-1 --playback-dev=-1 --auto-answer 200 --auto-play --id sip:@pbx.zadarma.com --registrar sip:pbx.zadarma.com --realm pbx.zadarma.com --username --password ***

If the call was ended in the middle, the file on the next call starts from the middle.

nanangizz commented 4 years ago

Try --auto-play-hangup, it will reset wav position on call hangup, but of course it will hangup the call after playback is done. If that's not acceptable, I am afraid that you'd need to modify the pjsua_app.c, e.g: insert pjsua_player_set_pos(app_config.wav_id, 0) here.