Reputation: 584
Can somebody tell me how to prevent my freeswitch extension from hangup after playing some music?
Here is my extension:
<include>
<extension name="welcome_ivr" continue="true">
<condition field="destination_number" expression="^411$">
<action application="answer" />
<action application="playback" data="/usr/local/funny.wav"/>
</condition>
</extension>
</include>
and to this extension i call a script which look likes this:
def handler(session, args):
logging.basicConfig(filename='/tmp/test.log',level=logging.INFO)
while session.ready():
logging.info("string")
return
So after the song is played it hangup. How can i prevent that. I want the channel stay open also after the song is played and only hangup if i want to hangup (session.hangup())
Hope somebody can help me.
Upvotes: 0
Views: 634
Reputation: 584
It was very simple. I just change the extension to play the song endless.
<action application="endless_playback" data="/usr/local/funny.wav"/>
So i can do stuff how long i want.
Upvotes: 1
Reputation: 891
Yes, once the song is over it's "done" so it hangs up.
Have it go to park after, then it will stay open until the park timeout.
<action application="park" />
Upvotes: 0