Voice is missing in two way sip calling

I have created two Pjsip endpoints in asterisk and have created a dialplan for them such that both of them can call each other. One of the endpoint is connected using zoiper on my system , but I am using zoiper in my mac and the asterisk is running on a different server which is ubuntu in the system. the other endpoint is connected with zoiper in my phone. both the softphones are connected to the same network (through wifi). The call is connecting between the endpoints but voice is not coming at any end , the number of recieved packets at the both ends is showing 0. I also tried doing nat configuration but still the same problem is coming.
But I recently added direct_media=no and nat=yes in my endpoints and since then after doing pjsip show endpoints it is showing no objects found

`[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0:5060
local_net=10.0.0.0/19
local_net=127.0.0.1/32
external_media_address=52.31.152.254
external_signaling_address=52.31.152.254

endpoint_internal
type=endpoint
context=from-internal
disallow=all
allow=ulaw

auth_userpass
type=auth
auth_type=userpass

aor_dynamic
type=aor
max_contacts=1

demo-alice
auth=demo-alice
transport=transport-udp
direct_media=no
rtp_symmetric=yes
nat=yes
aors=demo-alice
demo-alice
password=123456
username=demo-alice
demo-alice

demo-bob
auth=demo-bob
nat=yes
transport=transport-udp
direct_media=no
rtp_symmetric=yes
aors=demo-bob
demo-bob
password=123456
username=demo-bob
demo-bob

`

“nat=yes” is not a valid option, which would cause the endpoint to not load. It’s logged as such in the Asterisk console and logging.

You’d also need to provide SIP traces using “pjsip set logger on” with descriptions of the IP networks in use so they can be identified in the logging.

thank you , I removed nat=yes and checked the sip loggers. I found that the rtp was taking the ip of my private asterisk server and one of my endpoints connected on the same system was also having the same issue. So i removed local_net address and now everything works fine.
It looks like this now. It solved my problem

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0:5060
external_media_address=52.31.152.254
external_signaling_address=52.31.152.254

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