Sip Trunk Deutsche Telekom


(Joshua C. Colp) #21

Discourse apparently modified what I said. The correct format to add is:

\;transport=tcp

#22

ok, thanks, now it looks like this
sip:551134788732@reg.sip-trunk.telekom.de:5060;transport=tcp

CLI shows:
[2019-11-11 16:28:25] WARNING[28479]: pjsip:0 <?>: tsx0x7fde84e78 .Failed to send Request msg OPTIONS/cseq=35129 (tdta0x7fde84003d70)! err=320047 (No answer record in the DNS response (PJLIB_UTIL_EDNSNOANSWERREC))
[2019-11-11 16:28:25] ERROR[28479]: res_pjsip.c:3167 endpt_send_request: Error 320047 ‘No answer record in the DNS response (PJLIB_UTIL_EDNSNOANSWERREC)’ sending OPTIONS request to endpoint
[2019-11-11 16:28:26] WARNING[28479]: pjsip:0 <?>: tsx0x7fde84e78 .Failed to send Request msg REGISTER/cseq=7017 (tdta0x7fde84003d70)! err=320053 (DNS “Name Error” (PJLIB_UTIL_EDNS_NXDOMAIN))
[2019-11-11 16:28:26] WARNING[28479]: res_pjsip_outbound_registration.c:751 schedule_retry: No response received from ‘sip:xxxxxxxxxxxx@reg.sip-trunk.telekom.de:5060;transport=tcp’ on registration attempt to ‘sip:+49zzzzzzzz@sip-trunk.telekom.de’, retrying in ‘60’


(Joshua C. Colp) #23

Nothing stands out, so it may be a limitation of the PJSIP SRV support in Asterisk 13 holding it back.


#24

Thanks a lot Joshua! I still got the wrong DNS query

_sip._udp.reg.sip-trunk.telekom.de: type SRV, class IN

I guess we have to stick with the chan_sip trunk for now and work on a pjsip solution. And this seems to require Asterisk 16. So I have to setup a new freePBX system and prepare a migration.


(Joshua C. Colp) #25

Using the following:

server_uri=sip:reg.sip-trunk.telekom.de\;transport=tcp

With no “transport” specified worked as expected.

|[Nov 11 15:38:16] DEBUG[6809]: pjproject: <?>: |         sip_resolve.c .Starting async DNS SRV query: target=_sip._tcp.reg.sip-trunk.telekom.de, transport=TCP, port=0|

|—|---|
|[Nov 11 15:38:16] DEBUG[6809]: pjproject: <?>: |_sip._tcp.reg.sip-trun .Starting async DNS SRV query_job: target=_sip._tcp.reg.sip-trunk.telekom.de:5060|
|[Nov 11 15:38:16] DEBUG[6809]: pjproject: <?>: | resolver.c .Nameserver 172.16.1.1:53 state changed Active --> Probing|
|[Nov 11 15:38:16] DEBUG[6809]: pjproject: <?>: | resolver.c .Transmitting 52 bytes to NS 0 (172.16.1.1:53): DNS SRV query for _sip._tcp.reg.sip-trunk.telekom.de: Success|
|[Nov 11 15:38:16] DEBUG[6809]: pjproject: <?>: | tsx0x7f5370012288 .State changed from Null to Calling, event=TX_MSG|
|[Nov 11 15:38:17] DEBUG[6808]: pjproject: <?>: | resolver.c Received 280 bytes DNS response from 172.16.1.1:53|
|[Nov 11 15:38:17] DEBUG[6808]: pjproject: <?>: | resolver.c Nameserver 172.16.1.1:53 state changed Probing --> Active|
|[Nov 11 15:38:17] DEBUG[6808]: pjproject: <?>: |_sip._tcp.reg.sip-trun SRV query_job for _sip._tcp.reg.sip-trunk.telekom.de completed, 3 of 3 total entries selected:|
|[Nov 11 15:38:17] DEBUG[6808]: pjproject: <?>: |_sip._tcp.reg.sip-trun 0: SRV 0 5 5060 n-ipr-a01.sip-trunk.telekom.de (217.0.26.67)|
|[Nov 11 15:38:17] DEBUG[6808]: pjproject: <?>: |_sip._tcp.reg.sip-trun 1: SRV 1 5 5060 n-ipr-a02.sip-trunk.telekom.de (217.0.26.69)|
|[Nov 11 15:38:17] DEBUG[6808]: pjproject: <?>: |_sip._tcp.reg.sip-trun 2: SRV 10 5 5060 d-ipr-a01.sip-trunk.telekom.de (217.0.26.131)|
|[Nov 11 15:38:17] DEBUG[6808]: pjproject: <?>: |_sip._tcp.reg.sip-trun Server resolution complete, 3 server entry(s) found|
|[Nov 11 15:38:17] DEBUG[6808]: pjproject: <?>: | tcpc0x7f52d400db58 TCP client transport created|
|[Nov 11 15:38:17] DEBUG[6808]: pjproject: <?>: | tcpc0x7f52d400db58 TCP transport 172.16.10.11:40903 is connecting to 217.0.26.67:5060…|


#26

That actually gives me some hope. Unfortunately I don’t know how to unset the transport.

pjsip settings general:
Transport 0.0.0.0-tcp
I can’t deselect or unset this in the GUI

Update:
I just tried it by disabling the tcp transport under SIP Settings - Chan PJSIP Settings
CLI and tcpdump shows the same


(Joshua C. Colp) #27

Did you also remove the port? What’s the actual entry in the PJSIP configuration file?


#28

Yes, I also tried removing the port. Didn’t help.

Going through the generated pjsip config files I found so far:

/etc/asterisk/pjsip.transports.conf includes pjsip.transports_custom.conf, which is empty for now

/etc/asterisk/pjsip.registration.conf lists the trunk
[telekom-pjsip]
type=registration
transport=
outbound_auth=telekom-pjsip
retry_interval=60
max_retries=10
expiration=3600
auth_rejection_permanent=yes
contact_user=+49zzzzzzzz
server_uri=sip:xxxxxxxxxxxx@reg.sip-trunk.telekom.de;transport=tcp
client_uri=sip:+49zzzzzzzz@sip-trunk.telekom.de
outbound_proxy=sip:reg.sip-trunk.telekom.de

/etc/asterisk/pjsip.identify.conf
[telekom-pjsip]
type=identify
endpoint=telekom-pjsip
match=217.0.0.0/13

/etc/asterisk/pjsip.endpoint.conf (and there we have the problem, transport=udp)
[telekom-pjsip]
type=endpoint
transport=udp
context=from-pstn-toheader-de-do
disallow=all
allow=g722,g726,alaw,ulaw,gsm
aors=telekom-pjsip
language=en
outbound_proxy=sip:reg.sip-trunk.telekom.de
outbound_auth=telekom-pjsip
from_domain=sip-trunk.telekom.de
t38_udptl=no
t38_udptl_ec=none
fax_detect=no
t38_udptl_nat=no
dtmf_mode=rfc4733

[dpma_endpoint]
type=endpoint
context=dpma-invalid

auth looks good, so I continue with
/etc/asterisk/pjsip.aor.conf (seems to use the server port from the trunks pjsip settings general)
[telekom-pjsip]
type=aor
qualify_frequency=60
contact=sip:xxxxxxxxxxxxx@reg.sip-trunk.telekom.de:5060
outbound_proxy=sip:reg.sip-trunk.telekom.de

/etc/asterisk/pjsip.conf

[global]
type=global
user_agent=FPBX-13.0.190.19(13.7.1)
default_outbound_endpoint=dpma_endpoint
#include pjsip_custom_post.conf

How to solve the wrong transport setting in pjsip.endpoint.conf? I’d put “transport=tcp” in pjsip.endpoint_custom.conf like this
[telekom-pjsip]
transport=tcp
but I expect this not to work, since it will be overwritten after the inclusion by “transport=udp” in pjsip.endpoint.conf


(Joshua C. Colp) #29

You’d need to set it on the outbound_proxy instead. I did not know you had one set.


#30

I could only get rid of “transport=udp” in /etc/asterisk/pjsip.endpoint.conf by setting transport tcp in general sip settings pjsip settings within the GUI, resulting in

[user@pbx]# grep -ri “transport=” /etc/asterisk/pjsip*
/etc/asterisk/pjsip.aor.conf:outbound_proxy=sip:reg.sip-trunk.telekom.de;transport=tcp
/etc/asterisk/pjsip.endpoint.conf:transport=0.0.0.0-tcp
/etc/asterisk/pjsip.endpoint.conf:outbound_proxy=sip:reg.sip-trunk.telekom.de;transport=tcp
/etc/asterisk/pjsip.registration.conf:transport=0.0.0.0-tcp
/etc/asterisk/pjsip.registration.conf:server_uri=sip:xxxxxxxxxxxxx@reg.sip-trunk.telekom.de:5060;transport=tcp
/etc/asterisk/pjsip.registration.conf:outbound_proxy=sip:reg.sip-trunk.telekom.de;transport=tcp