Hello, I am trying to handle SIP MESSAGE in ARI. But no success, can you, please assist me?
Asterisk receives MESSAGE, answers 202 OK, and sends event StasisStart instead of TextMessageReceived. There are no endpoints. I just want to receive MESSAGE and get body in my application
You do not configure the dialplan to send the message channel to ARI. You subscribe to the endpoint, or the channel technology[1], and then will receive TextMessageReceived.
Having never explicitly done this in quite a long time, I don’t recall any further. Someone else may have additional input or done it - I vaguely recall someone else posting about it.
I will say regardless of that, you don’t want the message channel going to ARI. You could send it to another context that just does NoOp, but sending it to ARI isn’t going to end well.
When a message is received it goes to the dialplan. What I’m saying is do not send it to your ARI application in the dialplan. It’s not made for that, and you could run into issues. This is why the TextMessageReceived functionality exists which is outside of that.
hmm… I don’t send SIP MESSAGE from my dialplan to ARI application… I just want asterisk to send TextMessageReceived event, when asterisk receive MESSAGE