Hi, due to a lightning and the death of my Patton sn4112 POTS-to-VoIP-gateway, I changed my internet-access to a business-account with VoIP and a fixed IP. I got a modem/bridge and my IP is bridged to the WAN-port of my pfsense-router. Two LAN-subnets are also connected to the router 192.168.129.0/24 and 192.168.130.0/24. My asterisk 16.28.0~dfsg-0+deb11u4 resides on a RaspberryPI4 at 192.168.130.7. Portforwarding is enabled on the router for 5060 udp+tcp, 10000-20000 udp and 4569 udp from the WAN-Interface to my asterisk at192.168.130.7. see “Netzwerk-Übersicht…png”
Asterisk does a registration at my ISPs VoIP-server siptrunk.a1.net, 193.81.5.1, every 170 sec and it seems OK.
When I call my home# from my mobile, the call comes in and my phone rings. But when I pick up the phone, I have no audio in both directions and there is no RTP-traffic. see “incoming_packetcapture…txt”
The other problem is outbound calling. If I want to call my mobile from “home”, I get “Service Unavailable” on the phone. In packetcapture I see “400 BAD REQUEST” as answer to my INVITE. What’s so bad about it? see “outgoing_packetcapture…txt”
Any is very much appreciated.
TIA, Karl
Please provide your pjsip.conf and the full log, with verbosity at least three and with “pjsip set logger on” in effect. If not using chan_pjsip, please explain why.
Your Asterisk version is no longer supported by the Asterisk project.
There is no caller ID (From user, or other traditional means) in your INVITE.
The From user is neither a caller ID nor an account code; it is empty.
It is strange that the the User-Agent header is being reflected back by the provider.
For the incoming one, your INVITEs and responses have been truncated at start of the message body. Without a message body, it is not possible to know how to handle media.
Comments about logging and configuration files apply to this case, as well.
Hi david, nice to have you answer so fast!!!
I have to leave office now for 3-5 hours, so I send at least my pjsip.conf pjsip.conf.txt (2.9 KB)
I know that my asterisk is not very new, but I had already compiled asterisk 20, which did not work due to a typo as I later found out. So I installed asterisk from the raspi-repo again. I think I will try again with version 20asap.
Can you tell me the file and packet, where you found these strange things. I haven’t worked with asterisk for three years, so I am not too good at it now.
I have already tried an outgoing call again and enclose the console output in “console.txt” console.txt (27.1 KB)
How do I know if I use chan_pjsip?
I have to leave now, but will send you further info in a few hours.
Thx and bye, Karl
I am also from Austria and did quite a few Asterisk Setups with A1.
One important thing first: if the A1 password in your pjsip.conf posted here is the real one, please remove it as soon as possible. Since A1 only allows calls from their networks it should not be so dangerous, but who knows. Believe me, the last thing you need are thousands of fraudulent calls at your cost.
Checking your config I would try to add
rtp_keepalive=1
force_rport=yes
to your A1 endpoint definition. If then there is still no audio, the cause is most likely at your firewall. Also make sure the rtp ports you forward at your firewall are the same as defined in rtp.conf.
And for security reasons, please only forward the ports when they come from the A1 network. Or even better: as soon as you have everything running, try to remove all port forwardings. I usually never need them.
For outgoing calls, I could unfortunately not see a reason by now why it doesn’t work. But I will come back if I have an idea.
Looking further into everything I think I remember that A1 needs to have your phone number (username) in the contact header. At the moment it looks like you are sending “asterisk”, which is the default.
Try to add
contact_user=+your phone number
to the A1 endpoint.
Also I would add
direct_media=no
to your phones endpoint definitions. Just to make sure they will not try to send audio to somewhere on their own. .
Hi guys,
thank you for your help. I have compiled asterisk 20.8.1 today, but had the same problems. I found out, that I still had a typo (in pjsip.conf local_net) and now internal calls work with audio and incoming call are OK too. The problem with outgoing calls persists. @TheNextDay
Nice to have a fellow Austrian here in the forum and thanks for your tips. I have added contact_user and direct_media as you told me. To me the contact in my INVITE looks good (it shows my username@my WAN-IP-Address). But I still get the 400 BAD REQUEST. :-((
Can you please have a look at the packet-capture outgoing-call_rejected.txt (5.3 KB)
I’ve also added the console output with logging on 2024-06-23_console_outbound.txt (22.0 KB)
If you have another hint, I would be very glad to to try it.
thx and servus, Karl
Okay, now maybe something comes into place that @david551 mentioned before. Your From: Header looks strange. I didn’t notice that yesterday.
It looks like this in your console output:
So basically you only have a display name set. A1 doesn’t accept that.
So I looked further and found in your file this debug line
Executing [00664<my mobile#>@z:2] Set("PJSIP/25-0000000f", "CALLERID(all)=+43<my landline#>@siptrunk.a1.net") in new stack
Which makes me think that you are setting your outgoing callerid the wrong way. Maybe you are adding the domain there? if yes, you shouldn’t.
Try to do it like this in your outgoing dialplan (just an example - I always prefer to set display name and number seperate)
exten => _X.,1,Set(CALLERID(num)=+43......) # without any @domain!
exten => _X.,2,Set(CALLERID(name)=+43.....) # without any @domain!
exten => _X.,3,Dial(.........)
If that doesn’t help, maybe you could post relevant parts of your extensions.conf.
Heureka! That’s it. You were right, I had included the domain in setting the CALLERID. Only thing I changed compared to your suggestion - I used …Set(CALLERID(all)=+43…
Thank you very much, you saved me. My boss wanted to kick me out and my wife started talking about divorce
BTW: I think, A1 should inform their customers of how parameters have to be. I am still waiting for an answer from them although their business support is working 24x7.
Again - thank you very much!
Servus, Karl
PS: I owe you a beer or wine or coffee!