Call through SIP server and Poxy Server

Hi every one
I have two server asterisk, I use server A as a Sip server, Server B as a proxy server
I register server 2 extension:1000 and 2000 on server A, when I call from 2000 to 1000, I want call follow like this: 2000–> server A—> server B → server A—> 1000
but when I call server B have notice:
Failed to authenticate on INVITE to '“2000” sip:2000@172.17.17.52;tag=as7007d314’
** – SIP/172.17.17.54-000001ac is circuit-busy**
** Everyone is busy/congested at this time (1:0/1/0)**
** – Auto fallthrough, channel ‘SIP/2000-000001ab’ status is ‘CONGESTION’**
This is my config on 2 server

Server A:
[mayle]
exten => 4000,1,Dial(SIP/1000,60)
exten => 1000,1,goto(trunkto54,${EXTEN},1)
[trunkto54]
exten => 1000,1,dial(SIP/3000@172.17.17.54,30)
exten => 4000,1,goto(mayle,4000,1)

Server B:
[trunk52]
exten => 3000,1,goto(next,4000,1)
[next]
exten =>4000,1,dial(SIP/${EXTEN}@172.17.17.52,45)

Have any body help me, where am I wrong ???
Thanks every body

chan_sip is deprecated, unsupported, and scheduled for removal in the Autumn 2023 release of Asterisk!

It is not possible to address failed to authenticate, or proxying issues, without sight of the channel driver configuration (sip.conf, in this case)>

This is an unauthenticated call, using default options, to 172.17.17.54. What is 172.17.17.54? This is not the right way of using a proxy.

Hi David
This is my config in sip.config

SERVER B
[trunkto52]
host=172.17.17.52
type=peer
port=5060
disallow=all
allow=ulaw
allow=alaw
insecure=invite,port
nat=no
dtmfmode=rfc2833
context=trunk52
tos_audio=ef
qualify=yes
canreinvite=no

SERVER A

[trunkto54]
host=172.17.17.54
type=peer
port=5060
disallow=all
allow=ulaw
allow=alaw
insecure=invite,port
nat=no
dtmfmode=rfc2833
context=trunk54
tos_audio=ef
qualify=yes
canreinvite=no

[1000]
fromuser=1000
type=friend
host=dynamic
secret=fti*fpt!
context=mayle
disallow=all
allow=ulaw,alaw

[2000]
fromuser=2000
type=friend
host=dynamic
secret=fti*fpt!
context=mayle
disallow=all
allow=ulaw,alaw

You haven’t specified a proxy.

You still haven’t explained the relevance of …45.

type, for the phones, should be peer, not friend. This will cause a problem if the caller ID matches on the outgoing call matches a device name on the remote system. (I believe PJSIP doesn’t have this distinction, so it is important to avoid a caller ID/device name clash.)

insecure=invite does nothing without secret=. insecure=port is rarely needed. canreinvite is a deprecated form of directmedia. It is very rare that you need to force nat to no.

Hi David
45 í time wait i set up for a call
I change my paradigm to test
From server B call to server A ok
From server A call to server B note ok
when i use sngrep tool to check i see sip invite from server A havan’t line:Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSGE, OPTIONS, INFO, SUBSCRIBE but invite from server B to A have this line

Can you talk me where am i wrong
thanks!!!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.