Hi I am using asterisk version 18.
I have setup sip.conf and I am originating two calls to two different end points, what I want is that I should be able to set NAT network IP to one end point [end_point_1] but different NAT ip to second end point [end_point_2].
I am setting the media_address=x.x.110.220 in the [end_point_2] and media_address=x.x.180.140 in [end_point_1] but when originating two calls it taking the IP defined on my eth only.
If I defined media_address=x.x.180.140 in [general] it send the same NAT IP to both end points [end_point_1] & [end_point_2].
How can I fix this issue ?
Please share insight.
Here is my sip.conf having mention [general] , [end_point_1] , [end_point_2].
cat sip.conf
[general]
context=public ; Default context for incoming calls. Defaults to 'default'
allowguest=yes ; Allow or reject guest calls (default is yes) ; Default context for incoming calls. Defaults to 'default'
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
udpbindaddr=0.0.0.0
websocket_enabled=true
tcpenable=no ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
transport=udp,ws,wss ; Set the default transports. The order determines the primary default transport.
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
qualify=yes
nat=comedia,force_rport
notifyringing = yes
notifyhold = yes
careinvite=no
allow=ulaw:20
allow=g729
rtcachefriends=yes ; Cache realtime friends by adding them to the internal list
rtsavesysname=yes ; Save systemname in realtime database at registration
rtupdate=yes ; Send registry updates to database using realtime? (yes|no)
rtautoclear=yes
registerattempts=0
autoframing=yes
[end_point_1]
type=friend
host=x.x.9.5 ;far end sip IP
port=5060 ;far end sip port
qualify=yes
disallow=all
;allow=opus
allow=ulaw
allow=g729
context=airtel
insecure=port,invite
directmedia=yes
nat=force_rport,comedia
canreinvite=no
jbenable=yes
jbforce=yes
jbmaxsize=100
jbresyncthreshold=1000
jbimpl=fixed
jblog=yes
media_address=x.x.180.140
[end_point_2]
type=friend
host=x.x.116.214
port=5060
qualify=yes
disallow=all
allow=ulaw
allow=alaw
context=default
insecure=port,invite
directmedia=yes
nat=force_rport,comedia
canreinvite=no
jbenable=yes
jbforce=yes
jbmaxsize=100
jbresyncthreshold=1000
jbimpl=fixed
jblog=yes
media_address=x.x.110.220
fromdomain=x.x.115.214