StasisEnd in 30 seconds

Hi,

I made a simple ari application like this:

import ari

app_name = “scp”

client = ari.connect(‘url’)

def on_start(channel_obj, event):

incomming_chan = channel_obj.get('channel')
incomming_chan.answer()

# the channel id of the incoming call
chan_id = incomming_chan.id

client.on_channel_event(‘StasisStart’, on_start)

client.run(apps=app_name)

However every time I call it with my own cellphone, StasisEnd at 30 seconds itself. While using Linphone, it never ends itself.
Anyone knows why?
Is there any way to control StasisEnd while using my own cellphone? cause I want the channel holds there and I will play with it by using api.

Thanks a lot for helping!

Is the channel hanging up? Have you looked at the console to see what is happening and the SIP signaling? It may be because no audio would be getting played.

The channel is hang up.
Sorry but what is the console you were talking about?
and I will check the SIP signaling.
Thanks

I’m referring to the Asterisk console. You need to identify who is hanging up the channel which will allow you to further isolate the cause.

Is that the “asterisk -r” command to get into asterisk console?

Yes, that is how you get into the Asterisk console.

Great, thanks a lot!

This looks to be a NAT issue, more than ARI issue

I tried that, if I keep calling asterisk apis after StasisStart, the StasisEnd event won’t come at 30 seconds.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.