I have an asterisk 16.6.2 installed behind NAT and my client is also behind NAT but when I am dialing 100 extension from peer 8000 as per dial plan call should run MOH application
but before that it is giving below error, any idea what am I missing?
[Dec 27 07:50:31] ERROR: res_pjsip.c:3460 ast_sip_set_tpselector_from_transport_name: Unable to retrieve PJSIP transport ‘UDP-NAT’
Below are my pjsip configuration
rewrite_contact=yes ; necessary if endpoint does not know/register public ip:port
ice_support=yes ;This is specific to clients that support NAT traversal
;for media via ICE,STUN,TURN. See the wiki at:
;for a deeper explanation of this topic.
exten => 100,1,MOH(default,100)
At startup does the console output show anything regarding the UDP-NAT transport? Does it appear in the CLI when you use the “pjsip show transports” CLI command?
It is showing only UDP
Transport: <TransportId…> <BindAddress…>
Transport: transport-udp udp 0 0 0.0.0.0:5060
Objects found: 1
You can not have two transports bound to the same thing.
Oh I see…So do i need to disable UDP one?
Yes, or edit it to include NAT related options such as external_media_address, local_net, and external_signaling_address.
Now I disabled it but now
adsl-172-10-0-22*CLI> pjsip show transports
No objects found.
below is my config now
; UDP transport behind NAT
Did you check the console log at startup to see what happened when it attempted to load the configuration?
Nothing related to transport while reloading asterisk
Did you restart, or did you reload? You really need to restart when messing with transports.
I restarted asterisk’s service too
Yes logs saying ->
[Jan 2 12:16:36] ERROR res_pjsip/config_transport.c: Transport ‘transport-udp-nat’ could not be started: Address already in use
[Jan 2 12:16:36] ERROR res_sorcery_config.c: Could not create an object of type ‘transport’ with id ‘transport-udp-nat’ from configuration file ‘pjsip.conf’
Something is still bound to 0.0.0.0 port 5060 then.
Oh Ok, but how do I check or debug further more …May be i can see after increasing the level of debug…
From the perspective of PJSIP debug won’t really change it. We ask the system to bind to “0.0.0.0 port 5060” and it merely says something is already listening, it doesn’t state what. You have to figure that out yourself. For example: Is chan_sip loaded? That will by default bind to it.
Thanks, I dont know how I ignored chan_sip…so after reloading of chan_sip…it worked finally
Ideally chan_sip should not be loaded if I work with pjsip…right?
If you don’t plan on using chan_sip then there is no reason to have it loaded.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.