Stewart1
(Stewart)
January 21, 2021, 9:12pm
41
Please confirm that the first line is exactly
[DG-SIP](+type=auth)
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?
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?
Stewart1
(Stewart)
January 21, 2021, 11:54pm
43
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.
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
Stewart1
(Stewart)
January 22, 2021, 4:46pm
45
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 [email protected]
If you still have trouble, paste the entire INVITE and the 403 response into a text editor, redact as desired and post it here.
INVITE
tM(aHMܦ2bx@E`ÖÆà@@È[À¨¹,ºÄÄÂb¼INVITE sip:dg.voip.dg-w.de SIP/2.0
Via: SIP/2.0/UDP 94.31.85.248:5060;rport;branch=z9hG4bKPja7fec776-8e4b-4be1-a581-dda2c40574d0
From: <sip:[email protected] >;tag=7a3cc5e8-cff2-4587-ad79-83fd545cfb06
To: <sip:[email protected] >
Contact: <sip:[email protected] :5060>
Call-ID: 4ed316d0-78aa-4d4a-b1e9-3d722fa072fc
Cseq: 16575 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Route: <sip:[email protected] :5060>
Max-Forwards: 70
User-Agent: FPBX-15.0.17.12(16.15.0)
Content-Type: application/sdp
Content-Length: 226
v=0
o=- 412869137 412869137 IN IP4 94.31.XX.XX
s=Asterisk
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
a=ptime:20
a=maxptime:150
a=sendrecv
Trying
ܦ2bx@tM(aHMEk|¹,ºÀ¨ÄÄW\lSIP/2.0 100 Trying
Via: SIP/2.0/UDP 94.31.XX.XX:5060;received=100.68.67.46;branch=z9hG4bKPja7fec776-8e4b-4be1-a581-dda2c40574d0;rport=5060
From: <sip:[email protected] :5060>;tag=7a3cc5e8-cff2-4587-ad79-83fd545cfb06
To: <sip:[email protected] >
Call-ID: 4ed316d0-78aa-4d4a-b1e9-3d722fa072fc
CSeq: 16575 INVITE
Forbidden
ܦ2bx@tM(aHME|è¹,ºÀ¨ÄÄv,{SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 94.31.XX.XX:5060;received=100.68.67.46;branch=z9hG4bKPja7fec776-8e4b-4be1-a581-dda2c40574d0;rport=5060
From: <sip:[email protected] :5060>;tag=7a3cc5e8-cff2-4587-ad79-83fd545cfb06
To: <sip:[email protected] >;tag=aprqngfrt-ifdl663000gub
Call-ID: 4ed316d0-78aa-4d4a-b1e9-3d722fa072fc
CSeq: 16575 INVITE
Request ACK
tM(aHMܦ2bx@E `íÆá@@ÊCÀ¨¹,ºÄÄÙ$
ACK sip:dg.voip.dg-w.de SIP/2.0
Via: SIP/2.0/UDP 94.31.XX.XX:5060;rport;branch=z9hG4bKPja7fec776-8e4b-4be1-a581-dda2c40574d0
From: <sip:[email protected] >;tag=7a3cc5e8-cff2-4587-ad79-83fd545cfb06
To: <sip:[email protected] >;tag=aprqngfrt-ifdl663000gub
Call-ID: 4ed316d0-78aa-4d4a-b1e9-3d722fa072fc
CSeq: 16575 ACK
Route: <sip:[email protected] :5060>
Max-Forwards: 70
User-Agent: FPBX-15.0.17.12(16.15.0)
Content-Length: 0
Stewart1
(Stewart)
January 22, 2021, 5:06pm
47
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.
Oh, yes. I had to change some settings.
The PJSIP Settings are now
Username: 02864Phone
Password: DG-Password
SIP Server: dg.voip.de-w.de
Send Line in Registration; YES
Outbound Proxy: sip:dg.voip.dg-w.de
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 pjsip.auth.com 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.
Stewart1
(Stewart)
January 22, 2021, 6:22pm
49
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: sip:dg.voip.dg-w.de\;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: dg.voip.dg-w.de
and see whether outbound calls get further. This parameter does not affect registration at all.
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.
1 Like
system
(system)
Closed
June 3, 2021, 11:04pm
51
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.