SDP Wrong Contact Header

Hello,

My box have two interface that are team0.lan and team0.sipprovider.

team0.lan=1.1.1.1
team0.sipprovider=2.2.2.2
When call comes from sipprovider (inbound call) I took capture. I see “Contact: sip:1.1.1.1:5060” in the capture but it have to be “Contact: sip:2.2.2.2:5060”. My counfiguration and capture below.
How can I fix this issuse.

SIP/2.0 200 OK
Via: SIP/2.0/UDP 55.55.55.55:5060;rport=5060;received=55.55.55.55;branch=z9hG4bK+cf0744e47998cd9dfe34a07a300b4c181+sip+1+b7a697bf
Call-ID: 134f906b689485d9e6e119a502bd8879@55.55.55.55
From: “09077811406” sip:05077411400@55.55.55.55;tag=55.55.55.55+1+77b1338f+f12eb25e
To: sip:09628155007@2.2.2.2;tag=1dfd61ce-8556-4668-bbb7-94f0b5018c26
CSeq: 1 INVITE
Server: Asterisk PBX 13.22.0
Contact: sip:1.1.1.1:5060
Allow: OPTIONS, SUB

;sipprovider PJSIPTrunk
[sipprovider]
type=endpoint
direct_media=no
transport=transport-udp-sipprovider
context=from-trunk
disallow=all
allow=alaw
allow=ulaw
aors=sipprovider
from_domain=55.55.55.55
language=tr
dtmf_mode=info
media_address=2.2.2.2
bind_rtp_to_media_address=yes
rtp_symmetric=yes

[sipprovider]
type=aor
qualify_frequency=30
qualify_timeout=45.0
authenticate_qualify=no
contact=sip:55.55.55.55:5060

[sipprovider]
type=identify
endpoint=sipprovider
match=55.55.55.55

[transport-udp-sipprovider]
type=transport
protocol=udp
bind=2.2.2.2:5060

How about posting the whole signaling and not only the 200 Ok message…?

Im not the best in trouble shooting, also not the worst, but with just a 200 Ok message, you have to be a god to solve this…

Lets see if a god posts… Or you could provide more information…

Does the below log give you an idea?
INVITE sip:094874874126@2.2.2.2:5060 SIP/2.0
Via: SIP/2.0/UDP 55.55.55.55:5060;branch=z9hG4bK+c9291ed018ad36d49ed2eba256b58bc01+sip+1+a8aed359
From: “09425874126” sip:09425874126@55.55.55.55:5060;tag=55.55.55.55+1+b30f869c+bb80e95e
To: sip:094874874126@2.2.2.2:5060
CSeq: 1 INVITE
Expires: 180
Content-Length: 245
Call-Info: sip:55.55.55.55:5060;method=“NOTIFY;Event=telephone-event;Duration=2000”
Contact: sip:55.55.55.55:5060;transport=udp
Content-Type: application/sdp
Call-ID: 0b757627996ec886f104d42fe861a4ea@55.55.55.55
Max-Forwards: 66
Min-SE: 28800
Allow: INVITE,ACK,PRACK,SUBSCRIBE,BYE,CANCEL,NOTIFY,INFO,REFER,UPDATE
Accept: application/sdp, application/dtmf-relay

v=0
o=- 135219372354873 135219372354873 IN IP4 10.220.102.3
s=-
c=IN IP4 10.220.102.3
t=0 0
m=audio 26420 RTP/AVP 8 0 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=ptime:20

SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 55.55.55.55:5060;rport=5060;received=55.55.55.55;branch=z9hG4bK+c9291ed018ad36d49ed2eba256b58bc01+sip+1+a8aed359
Call-ID: 0b757627996ec886f104d42fe861a4ea@55.55.55.55
From: “09425874126” sip:09425874126@55.55.55.55;tag=55.55.55.55+1+b30f869c+bb80e95e
To: sip:094874874126@2.2.2.2;tag=5fecd630-9f88-42a9-bf33-39204472a5de
CSeq: 1 INVITE
Server: Asterisk PBX 13.22.0
Contact: sip:1.1.1.1:5060
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, REFER, MESSAGE
Content-Length: 0

SIP/2.0 200 OK
Via: SIP/2.0/UDP 55.55.55.55:5060;rport=5060;received=55.55.55.55;branch=z9hG4bK+c9291ed018ad36d49ed2eba256b58bc01+sip+1+a8aed359
Call-ID: 0b757627996ec886f104d42fe861a4ea@55.55.55.55
From: “09425874126” sip:09425874126@55.55.55.55;tag=55.55.55.55+1+b30f869c+bb80e95e
To: sip:094874874126@2.2.2.2;tag=5fecd630-9f88-42a9-bf33-39204472a5de
CSeq: 1 INVITE
Server: Asterisk PBX 13.22.0
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, REFER, MESSAGE
Contact: sip:1.1.1.1:5060
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 177

v=0
o=- 916974905 916974907 IN IP4 1.1.1.1
s=Asterisk
c=IN IP4 1.1.1.1
t=0 0
m=audio 16080 RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=ptime:20
a=maxptime:150
a=sendrecv

There must be a reason why the provider thinks that the number called can be reached at sip:094874874126@2.2.2.2:5060…

Do you register at your provider? What his the source address of that registration?

@jcolp
After the a lot of test, I look that when Asterisk receive INVITE request, it send RINGING message. This message’s header have Contact parameter. This parameter have to be 2.2.2.2(interface that is between my box and my sipprovider) but it is 1.1.1.1 (my lan interface). When I changed the my box’s default gatwey from lan interface to sipprovider interface contact is 2.2.2.2.
Asterisk choise this contact parameter which interface that is default route. Is this an issue.

Why was I tagged? If I have anything to add to a post or wish to participate I will.

1 Like