Hi!
I started to use pjsip to connect to a SIP trunk (German Telekom). Internal calls are no problem. In- and outgoing signalling is also no problem, but there is no audio with these calls.
The trunk is a bit special as it uses tcp for SIP, a proxy, and requires NAPTR and SRC to work for the name resolutions. My PBX is a bit special as it is sitting on the router and it sees the LAN and WAN, so NAT issues should not cause problems. It didn’t with chan_sip.
I have already looked at various pcap traces. When I enable rtp debugging in the cli, I see only incoming packets from the local phone. When I capture the traffic on the WAN side of the router, I actually see (and playback with wireshark) the external audio, but that does not arrive at Asterisk and the local phone. If I do not let Asterisk connect to a local phone and just playback MOH, the other side can hear it.
I am sure that I have overlooked something, but I can’t find out what that might be. Here’s my pjsip.conf:
[global]
type=global
max_initial_qualify_time=4
[transport-tcp]
type=transport
protocol=tcp
bind=0.0.0.0
;local_net=192.168.0.0/24
;local_net=127.0.0.1/32
;external_media_address=80.151.XXX.XXX
;external_signaling_address=80.151.XXX.XXX
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0
;local_net=192.168.0.0/24
;external_media_address=80.151.XXX.XXX
;external_signaling_address=80.151.XXX.XXX
[tcomsip_reg]
type=registration
transport=transport-tcp
outbound_proxy=sip:reg.sip-trunk.telekom.de
outbound_auth=tcomsip_auth
server_uri=sip:sip-trunk.telekom.de
client_uri=sip:+49YYYYYYYYYY@sip-trunk.telekom.de
contact_user=+49YYYYYYYYYY
;line=yes
;endpoint=tcomsip_endpoint
[tcomsip_aor]
type=aor
contact=sip:55xxxxxxxxxx@sip-trunk.telekom.de
outbound_proxy=sip:reg.sip-trunk.telekom.de
default_expiration=600
[tcomsip_identify]
type=identify
endpoint=tcomsip_endpoint
match=reg.sip-trunk.telekom.de
[tcomsip_auth]
type=auth
realm=sip-trunk.telekom.de
username=55xxxxxxxxxx
password=secret
auth_type=userpass
[tcomsip_endpoint]
type=endpoint
;direct_media=no
context=from-telekom
allow=!all,g722,alaw,ulaw
timers=no
from_domain=sip-trunk.telekom.de
;auth=tcomsip_auth
outbound_auth=tcomsip_auth
outbound_proxy=sip:reg.sip-trunk.telekom.de
aors=tcomsip_aor
callerid=""<+49YYYYYYYYYY>
from_user=+49YYYYYYYYYY
dtmf_mode=rfc4733
;disable_direct_media_on_nat=yes
;rtp_symmetric=yes
;force_rport=yes
;rewrite_contact=yes
[phone001]
type=endpoint
auth=phone001
callerid=Phone #1<1001>
;direct_media=no
call_group=1
pickup_group=1
aors=phone001
aggregate_mwi=yes
device_state_busy_at=1
allow_subscribe=yes
transport=transport-udp
context=from-internal
allow=!all,g722,alaw,ulaw
[phone001]
type=auth
auth_type=userpass
username=phone001
password=admin ; just kidding
[phone001]
type=aor
max_contacts=1
qualify_frequency=63
[phone002]
type=endpoint
auth=phone002
callerid=Phone #2<1002>
;direct_media=no
call_group=1
pickup_group=1
aors=phone002
device_state_busy_at=1
allow_subscribe=yes
transport=transport-udp
context=from-internal
allow=!all,g722,alaw,ulaw
[phone002]
type=auth
auth_type=userpass
username=phone002
password=admin
[phone002]
type=aor
max_contacts=1
qualify_frequency=61
At first glance there was nothing unusual in the the SIP traces, so my guess is that I am missing a “connection” in pjsip.