cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
1014
Views
5
Helpful
4
Replies

SIP INVITE SDP Manipulation

Hi Experts

Please i need help how to change the sip invite SDP from private addresses to public address

below INVITE  was received from a UAC to CUBE , and for CUBE to be able to communicate with UAC RTP i need to modify the invite SDP with the Public IP of the sender , the fact is that the sender public IP is variable every time , is there a way to use a domain name in SDP and not IP , or is there another solution ?

UAC ( INVITE with SDP ) ---> CUBE (Media flow through) ----> PBX

Received:
INVITE sip:144@onesixty.asuscomm.com: SIP/2.0
Via: SIP/2.0/UDP 172.26.8.2:58935;rport;branch=z9hG4bKPj323a30ffddc74ab1a8e1815032308a04
Max-Forwards: 70
From: <sip:141@onesixty.asuscomm.com>;tag=48c273a4b7474d069f13b23c87535ed0
To: <sip:144@onesixty.asuscomm.com>
Contact: <sip:141@172.26.8.2:58935;ob>
Call-ID: 77a693fc76ca4d1c8a0593b9f54be493
CSeq: 11208 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: MicroSIP/3.21.3
Content-Type: application/sdp
Content-Length: 334

v=0
o=- 3872849008 3872849008 IN IP4 172.26.8.2
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4002 RTP/AVP 8 0 101
c=IN IP4 172.26.8.2
b=TIAS:64000
a=rtcp:4003 IN IP4 172.26.8.2
a=sendrecv
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ssrc:1311914170 cname:41c16f0b42cd2797

4 Replies 4

TechLvr
Spotlight
Spotlight

@Hesham Mohamed El Sayed You are reposting this question. 

Can you share your CUBE config?
Is your CUBE behind a firewall? 
Where do you see the Public IP of Microsip?

Yes my cube is behind firewall and i need to update the received invite sdp with the public ip of the sender which can be found in via header  

Try sip-profile 100 if you want to modify 172.26.8.2 to 15.236.40.101 (found in your other posts)
Try sip-profile 200 if you want to modify172.26.8.2 IP to a FQDN. Replace microsip.example.com with the one you want to use.

voice class sip-profiles 100
response ANY sip-header VIA modify "172.26.8.2" "15.236.40.101"
request ANY sip-header VIA modify "172.26.8.2" "15.236.40.101"
response ANY sip-header Contact modify "172.26.8.2" "15.236.40.101"
request ANY sip-header Contact modify "172.26.8.2" "15.236.40.101"
response ANY sdp-header Audio-Connection-Info modify "172.26.8.2" "15.236.40.101"
request ANY sdp-header Audio-Connection-Info modify "172.26.8.2" "15.236.40.101"
response ANY sdp-header Connection-Info modify "172.26.8.2" "15.236.40.101"
request ANY sdp-header Connection-Info modify "172.26.8.2" "15.236.40.101"
response ANY sdp-header Session-Owner modify "172.26.8.2" "15.236.40.101"
request ANY sdp-header Session-Owner modify "172.26.8.2" "15.236.40.101"

 

voice class sip-profiles 200
response ANY sip-header VIA modify "172.26.8.2" "microsip.example.com"
request ANY sip-header VIA modify "172.26.8.2" "microsip.example.com"
response ANY sip-header Contact modify "172.26.8.2" "microsip.example.com"
request ANY sip-header Contact modify "172.26.8.2" "microsip.example.com"
response ANY sdp-header Audio-Connection-Info modify "172.26.8.2" "microsip.example.com"
request ANY sdp-header Audio-Connection-Info modify "172.26.8.2" "microsip.example.com"
response ANY sdp-header Connection-Info modify "172.26.8.2" "microsip.example.com"
request ANY sdp-header Connection-Info modify "172.26.8.2" "microsip.example.com"
response ANY sdp-header Session-Owner modify "172.26.8.2" "microsip.example.com"
request ANY sdp-header Session-Owner modify "172.26.8.2" "microsip.example.com"