PJSIP outbound proxy issue


(Egypt) #1

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


#2

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


#3

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

(Egypt) #4

I try the same registered once but go offline again .


#5

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?


(Egypt) #6

I’m using SIP is it will work ?


#7

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?


(Egypt) #8

[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’


#9

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?


(Egypt) #10

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


#11

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’


(Egypt) #12

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


#13

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:
MY-USER@domain.site:MY-SUPPER-PASS:MY-USER@y.y.y.y:5083


#14

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:


(Egypt) #15

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


(Egypt) #16

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


#17

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).


#18

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


(Egypt) #19

The post details is for SIP .


(Egypt) #20

Dial-plans incoming Outgoing-sip Trunk-general