I am writing a bit of dialplan where I call out to a video service and join that leg to a confbridge.
I am using the Originate application but can’t get it to offer video codecs. I have tried with both PJSIP and SIP channels.
I see that with AMI or call files you can set parameters including codecs, caller ID, etc. Is there a way to do this with the dialplan Originate application?
At your recommendation, I am doing Originate(Local/number@context, ...)
Context sends the call via SIP peer. peer is configured to allow ulaw&h264. Calls through this peer from another Asterisk endpoint (using Dial) have video.
So what else are you suggesting is needed to be set in the dialplan before the Originate?
It seems that you guys are just guessing on this matter which is very unfortunate for me as I took your word for it and spent several more hours trying to make it work as you assert it should.
After enough of that, I dug into the code for app_originate and was not too surprised to find that it is hard-coded with the slin audio formats, which of course can be transcoded into any other audio format. But this excludes all video codecs, no matter whether they are set in dialplan variables, functions, or peer definitions.
A workaround for me is to modify app_originate.c to include h264 format at the end of the list of capabilities:
This (hard-coding) is a poor solution and would be more complete if the application took an argument or checked a variable as to whether it should offer video.
I must admit that I forgot that you needed a preferred codec before you can initiate an outgoing channel, and originate defaults to slin. AMI originate, which is what we used, does have a codecs parameter, although I don’t know if it honours video ones.
Unless you are very luck and someone has had exactly the same issue, the nature of a forum like this is that you will only get hints, and sometimes those hints will be wrong. People are not going to do detailed research before replying.
We are not guessing, we just give you hints and thoughts and as David said unless some one had the same issue and fixed, you wont find an exact answer.realize that for your fix your issue you went to the source code of the originate app. In a peer forum nobody is diging in the source code to fix others members problems, forums are to exchange hints and thoughts , and working solution you have found before.
I wasn’t asking anyone to do deep research or examine the source code for me. Actually I thought it was reasonable that someone might have initiated video calls from Asterisk before.
So yeah, you were guessing, and I suggest that in the future if you offer help on something for which you do not have direct experience that you mention that. “I haven’t initiated video calls, but here’s something you could check…”
Thanks anyway. My opinion is that forum help is not a race; it’s better to be accurate than fast.