Unable to create SIP Channel

I’m trying to create an ARI Application and i want to create a channel, but i get this error when i send a request:

POST https://x.x.x.x:8089/ari/channels/create?endpoint=sip/4445&app=hello-world

500 Internal Server Error{ “error”: “Allocation failed” }

Thank you in advance.

Have you tried using the capitalized form? SIP/4445? Is there anything in the console output?

Yes i tried but still the same error.

In the debug console i get this message… !

Your initial message had “sip/4445” but your console output shows “4455”. You need to confirm the correct one to use.

It was an other test.

When facing a problem and posting on here it is best to not change variables so that the people helping don’t question what is going on. The log message states what the problem is - there is no configured chan_sip peer for it.

Okay, thank you so much @jcolp for your reply.
I have a question about chan_sip peer configuration, do i have to create an extension ‘4445’ before creating a channel ?.

Yes. How else would it know where to dial and what configuration to use?

thank you very much again for your reply @jcolp,i’m so sorry this is my fault i dont have any extension ‘4445’.

I would like to ask you about inbound calls, how can i catch the inbound calls with my application, or how can i make difference between inbound outbound calls using stasis application because for each one I have a treatment…

Thank you in advance.

You direct them into your application in dialplan and then do what you want with them. You can also pass in variables when sending them to the application, such as the dialed number. What you do with that information is up to you.

Thank you once more for your answer, how can i direct them into my application ?

The wiki has information[1] on this.

[1] https://wiki.asterisk.org/wiki/display/AST/Introduction+to+ARI+and+Channels

Thank you once more for your answers.