ARI pjsip originate sip uri via trunk

Hello, I am trying to originate sip uri like this - PJSIP/kamailio/sip:411@1.2.3.4
I am expecting that INVITE should go to my kamailio trunk as outbound proxy, but it is going directly to 1.2.3.4.
How to send INVITE via my trunk?

[kamailio]
type = aor
contact = sip:10.101.2.204

[kamailio]
type = identify
endpoint = kamailio
match = 10.101.2.204

[kamailio]
type = endpoint
context = stasis-app
dtmf_mode = rfc4733
disallow = all
allow = alaw
allow = h263
allow = h264
allow = vp8
direct_media = no
language = ru
aors = kamailio

I have found that I can add maddr parameter in sip uri to send request via any proxy, but are there any way to use trunk as outbound proxy by default? why shoud I add trunk in endpoint if it is not used?

You haven’t configured an outbound proxy on the endpoint, so one would not be used. You’ve merely configured a Contact URI, which would be overridden by the URI in the Dial line.

1 Like

yes, this is working, thank you!