@jcolp I’m trying to create a custom asterisk resource which can trigger an outbound test call on demand. It’s very similar in functionality to res_clioriginate
except its input interface will not be cli driven and so I thought res_clioriginate
was a good starting point.
What other existing functionality are you referring to?
@david551 I presume you mean
int ast_pbx_outgoing_exten_predial(const char *type, struct ast_format_cap *cap, const char *addr,
int timeout, const char *context, const char *exten, int priority, int *reason,
int synchronous, const char *cid_num, const char *cid_name, struct ast_variable *vars,
const char *account, struct ast_channel **locked_channel, int early_media,
const struct ast_assigned_ids *assignedids, const char *predial_callee);
I have no problem executing the function. I can see PJSIP SIP traffic on the console suggesting it’s worked, however the To field isn’t correct and Asterisk seems to make an outbound call to itself.
[Dec 5 17:11:18] ERROR[2903]: app_stack.c:593 gosub_exec: Attempt to reach a non-existent destination for Gosub: (Context:incoming_calls, Extension:s, Priority:789)
<--- Transmitting SIP request (1262 bytes) to TLS:a.b.c.d:5061 --->
INVITE sip:+44123456789@yy.com:5061 SIP/2.0
Via: SIP/2.0/TLS 10.10.1.4:5061;rport;branch=z9hG4bKPj2e1323ff-da41-4bf4-976a-5ecd1ded397d;alias
From: "New" <sip:+44123456789@yy.com:5061>;tag=b1230782-3b9c-4c60-80eb-905775ca2db3
To: <sip:+44123456789@yy.com>
Contact: <sip:+44123456789@10.10.1.4:5061;transport=TLS>
Call-ID: 210b5595-2279-4c18-9556-ea9cb3bff894
CSeq: 27917 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Security-Client: sdes-srtp;mediasec
Proxy-Require: mediasec
Require: mediasec
Security-Verify: msrp-tls;mediasec
Security-Verify: sdes-srtp;mediasec
Security-Verify: dtls-srtp;mediasec
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: 358
I would have expected To
to be something like:
To: <sip:123@@yy.com>
or To: <sip:789@@yy.com>