Hope you are having amazing time. I am using Asterisk ARI with Java statis application to build my IVR/OBD solution. I am trying to make outbound call using Channel with ID ARI API with following request body:
when I use contact_user, contact header is changed to hardcoded value but I want dynamic contact header in below format
sip:CALLER_NUMBER@CALLER_IP:PORT
I tried sending sip_headers in JSON request body, tried sending variable also in JSON but didn’t get any success. Can anyone suggest if it is possible to change dynamically using Statis application only? By the way, I’m using Asterisk version 18.8.0 on CentOS
I’m facing one more issue. For outbound calls made via ARI (using Channel with ID), asterisk is not sending ACK for 200 OK (INVITE) message. Could you please guide me how this issue can be fixed. Contact header one is working like a charm, just this issue is remaining.
Due to this, call is not getting terminated properly on statis application end. Do I need to enable/disable something in pjsip.conf to make it work or other information is required for my end? Asterisk configuration is similar to above one.
There is no configuration specifically for ACK. It is commonly a result of networking configuration, NAT, firewall, or SIP ALG. You would need to actually show a SIP trace (pjsip set logger on), including if Asterisk is receiving the 200 OK.
Yes, asterisk is receiving 200 OK (INVITE) from other end but it is not sending ack for the same. Due to confidential data, I won’t be able to share SIP trace
Hi, there is one more issue. I enabled p-asserted-header to sent in outbound call but it is being sent in different format than expected one. following is the request body which I am sending to originate with id ARI endpoint.
final Map<String, Object> body = new HashMap<>();
body.put(“callerId”, getCallerId(callerName, callerNumber));
body.put(“endpoint”, dialoutAddress);
body.put(“app”, obdAppName);
final Map<String, Object> channelVars = new HashMap<>();
channelVars.put("P-Asserted-Identity", "<tel:" + callerNumber + ">");
body.put("variables", channelVars);
Currently, I’m getting following PAI header:
“caller_number” <sip:caller_number@caller_sip_ip>