Trunk for Deutsche Glasfaser?


Please confirm that the first line is exactly
and that you restarted Asterisk after saving the file.

If you can’t get sngrep to work, capture with tcpdump. Or, do you have a way to capture traffic at your router? Router/firewall make/model?

(Alex Dietz82) #42

Is it necessary that sngrep runs on the same system? Or can i use another PC with sngrep to capture the SIP communication in the Network?


Yes, but you can capture traffic on the Pi with tcpdump, copy the file to your PC and open it with Wireshark.

Possibly, the inbound and outbound issues are related, so maybe troubleshoot outbound first, since that’s easier.

Or, what kind of router / firewall do you have? It may have a packet capture feature that is easy to use.

(Alex Dietz82) #44

Okay. I tried a outbound call. What do xou need from the pcap file?
What i can see is that the SIP Server said 403 forbidden

PS: I have a mikrotik Router


Check that the SIP URI (and To header) have the dialed number in the same format as you use when calling via FritzBox.

Check that the From header has

If you still have trouble, paste the entire INVITE and the 403 response into a text editor, redact as desired and post it here.

(Alex Dietz82) #46


tM(aHMܦ2bx@E`ÖÆà@@È[À¨¹,ºÄÄÂb¼INVITE SIP/2.0
Via: SIP/2.0/UDP;rport;branch=z9hG4bKPja7fec776-8e4b-4be1-a581-dda2c40574d0
From: <sip:02864Phone@>;tag=7a3cc5e8-cff2-4587-ad79-83fd545cfb06
To: <>
Contact: <sip:02864Phone@>
Call-ID: 4ed316d0-78aa-4d4a-b1e9-3d722fa072fc
Cseq: 16575 INVITE
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Route: <>
Max-Forwards: 70
User-Agent: FPBX-
Content-Type: application/sdp
Content-Length: 226

o=- 412869137 412869137 IN IP4 94.31.XX.XX
c=IN IP4 94.31.XX.XX
t=0 0
m=audio 19326 RTP/AVP 0 8 3
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000


ܦ2bx@tM(aHMEk|¹,ºÀ¨ÄÄW\lSIP/2.0 100 Trying
Via: SIP/2.0/UDP 94.31.XX.XX:5060;received=;branch=z9hG4bKPja7fec776-8e4b-4be1-a581-dda2c40574d0;rport=5060
From: <sip:02864Phone@>;tag=7a3cc5e8-cff2-4587-ad79-83fd545cfb06
To: <>
Call-ID: 4ed316d0-78aa-4d4a-b1e9-3d722fa072fc
CSeq: 16575 INVITE


ܦ2bx@tM(aHME|è¹,ºÀ¨ÄÄv,{SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 94.31.XX.XX:5060;received=;branch=z9hG4bKPja7fec776-8e4b-4be1-a581-dda2c40574d0;rport=5060
From: <sip:02864Phone@>;tag=7a3cc5e8-cff2-4587-ad79-83fd545cfb06
To: <>;tag=aprqngfrt-ifdl663000gub
Call-ID: 4ed316d0-78aa-4d4a-b1e9-3d722fa072fc
CSeq: 16575 INVITE

Request ACK
Via: SIP/2.0/UDP 94.31.XX.XX:5060;rport;branch=z9hG4bKPja7fec776-8e4b-4be1-a581-dda2c40574d0
From: <sip:02864Phone@>;tag=7a3cc5e8-cff2-4587-ad79-83fd545cfb06
To: <>;tag=aprqngfrt-ifdl663000gub
Call-ID: 4ed316d0-78aa-4d4a-b1e9-3d722fa072fc
CSeq: 16575 ACK
Route: <>
Max-Forwards: 70
User-Agent: FPBX-
Content-Length: 0


I don’t understand why the From header has the PBX IP address, even though From Domain appears to be properly set in your trunk settings screenshot.

Please post new screenshots of trunk settings.

(Alex Dietz82) #48

Oh, yes. I had to change some settings.

The PJSIP Settings are now

Username: 02864Phone
Password: DG-Password
SIP Server:

Send Line in Registration; YES
Outbound Proxy:
Contact User: 02864Phone
From User: 02864Phone

But the two lines in pjsip.auth_custom_post.conf are not working.
I had to change every time the last Line in the manualy.
With these Settings the Trunk ist registered and i have no Errors in the PJSIP log

PS: A colleague has just pointed out to me that two numbers, two devices with one account with DG do not work. I’ll wait for the password for the second account. Then I’ll try it again.


In the meantime, you should be able to test by shutting down the FritzBox and using the same number on FreePBX.

I would set this to No unless you need that functionality (distinguish which DG trunk a call came in on). Note that you can still determine which number was called from the To header.

Try removing this and see if it makes a difference. If it’s needed, try
Outbound Proxy:\;lr
which will remove the Route header that may be causing trouble.

However, I’m pretty sure that the From domain is a problem, though it may not be the only problem.
Try adding
From Domain:
and see whether outbound calls get further. This parameter does not affect registration at all.

(Alex Dietz82) #50

Good morning Stewart.
Step 2 is done. Outbound Calls are ok now
And step 3 too. All phones in the Ringgroup are ringing.

Thank you so so much.
In the next few days I will write a short guide so that other users can quickly set the necessary settings.