I am trying to create an OOH323 channel (without dialling) from the ARI. When I create the channel to a registered extension (399) the command succeeds:
curl -v -u username:pw \
-X POST "http://1.2.3.4:8088/ari/channels/create?channelId=b0c1&endpoint=OOH323/399&app=myStasisApp&callerId=TestCaller"
but when I try to create the channel to an unregistered extension (399 at ip 1.2.3.5 port 1720) I get a 401 error with “Allocation Failed” error:
curl -v -u username:pw \
-X POST "http://1.2.3.4:8088/ari/channels/create?channelId=b0c1&endpoint=OOH323/399@1.2.3.5:1720&app=myStasisApp&callerId=TestCaller"
Is there something wrong with my endpoint syntax when creating the channel directly to the device by ip address and port? The only difference between these two lines is the endpoint string. In the case of the failed attempt, the CLI also shows the following, which suggests Asterisk is treating the passed IP address as an endpoint name:
ERROR[617720]: chan_ooh323.c:733 ooh323_request: Call to undefined peer 1.2.3.5:1720
Dial strings are the responsibility of the channel driver. In this case that is chan_ooh323, so your issue is really with it and what the dial string should look like to accomplish what you want. To that end I’ve moved this out of APIs and into the normal support category.
But they all fail with the same error about undefined peer. According the the ooh323.conf.sample file shipped with Asterisk:
; For unregistered H.323 phones:
; OOH323/ip[:port] OR if gk is used OOH323/alias where alias can be any H323
; alias
; For dialing into another asterisk peer at a specific exten
; OOH323/exten/peer OR OOH323/exten@ip
Just for the hell of it (running out of ideas), I tried to replicate the PJSIP syntax like this:
endpoint=OOH323/399/h323:172.31.254.78
and it seemed to work. Should I use this syntax? (Is this “right”, or I am just asking for problems)
Well, in case someone with OOH323 knowledge can add some insight, I noticed that the above non-registered syntax works ONLY if the extension is included. In fact, the extension must exist in ooh323.conf or Asterisk will fail the channel creation attempt.
This doesn’t really make sense for dialing an unregistered device (should not have to exist in the conf file)