PJSIP outbound proxy issue

Dear all
I’m trying to connect to my trunk provider the provider sent to me the following details :
User name: MY-USER
Pass Word : MY-SUPPER-PASS
Domain : domain.site
pbx IP address : x.x.x.x
Outbound proxy : y.y.y.y:5038
I spent two days trying to connect with trunk with no success .
If any one can help in this i’ll appreciate .
Regards

Set your outbound proxy as sip:y.y.y.y:5038\;lr

1 Like

Try these settings:

Username: MY-USER
Secret: MY-SUPPER-PASS
Authentication: Outbound
Registration: Send (or None if provider doesn't use registration)
SIP Server: domain.site
Outbound Proxy: sip:y.y.y.y:5038\;lr
From Domain: domain.site
From User: MY-User

I try the same registered once but go offline again .

At the Asterisk command prompt, type
pjsip set logger on
wait for a registration retry, paste the Asterisk log for the attempt (including any responses) at pastebin.freepbx.org and post the link here.

Also, please post:
Does it register if you restart Asterisk? If not, does it register if you reboot the server?

I’m using SIP is it will work ?

The equivalent for chan_sip is
sip set debug on
but every post in this thread, including the title, was about pjsip. Did you suddenly switch? If so, why?

[2021-02-19 05:17:43] ERROR[31038]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo(“sip:y.y.y.y:5083;lr”, “(null)”, …): Name or service not known
[2021-02-19 05:17:43] WARNING[31038]: acl.c:890 resolve_first: Unable to lookup ‘sip:y.y.y.y::5083;lr’
[2021-02-19 05:17:43] WARNING[31038]: chan_sip.c:3475 proxy_update: Unable to locate host ‘sip:y.y.y.y::5083;lr’

It looks like you have a chan_sip trunk, which uses a different format for specifying outbound proxy (and also requires a tweak to the Register String).

Is this something that you started with and forgot to delete when you switched to pjsip, or did you never use pjsip at all, even though you titled your thread that way?

1 Like

I’m using PJSIP for webrtc extensions but my provider forced us to use SIP for trunk service .

Perhaps surprisingly , both chan_sip and chan_pjsip both use SIP, so ‘my provider forced us to use SIP for trunk service’ is a non-sequitur, you just need to condition pjsip correctly for your particular ‘provider’

1 Like

Hi Dicko
When i called the technical support they told us they don’t support PJSIP for trunk .( Please note we are in Middle East ) Many providers here not using PJSIP .
I know they booth using SIP but i try with PJSIP with no success .
Regards

If you want to try to salvage the chan_sip trunk, in Peer Details, include
outboundproxy=y.y.y.y
outboundproxyport=5083

For Register String, try:
[email protected]:MY-SUPPER-PASS:[email protected]:5083

Again, that’s a red herring, every provider that uses SIP can be used with pjsip, that they don’t document how is unfortunate, but post what they say for chan_sip and we can help you get into the 21st century :slight_smile:

WARNING[31038]: acl.c:1029 ast_ouraddrfor: Cannot connect to (null): Invalid argument

Can you help with PJSIP ? i know it is better .

My first post in this thread had pjsip settings. You stated that you tried them but it only registered once. Please post the log as requested and maybe we can help.

Or, if you want to keep trying with chan_sip, post screenshots of your trunk settings (mask username and secret, keep everything else intact).

Only if you post what your provider told you how to use asterisk with chan _sip

1 Like

The post details is for SIP .