<div dir="ltr"><div dir="ltr">On Fri, Sep 3, 2021 at 8:47 PM Marek Greško <<a href="mailto:mgresko8@gmail.com">mgresko8@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
I looked into tcpdumps. When problem starts (after some asterisk<br>
reboot) the call looks like this:<br>
<br>
provider:25298 -> asterisk:5060<br>
SIP: SIP/2.0 200 OK<br>
Via: SIP/2.0/UDP asterisk:5060;rport=5060;branch=...<br>
From: <sip:111@asterisk>;tag=...<br>
To: <sip:999@provider>;tag=...<br>
Call-ID: ...<br>
CSeq: ... INVITE<br>
Contact: <sip:999@lan:5060><br>
Supported: replaces<br>
Allow-Events: message-sumary, refer, ua-profile, talk, check-sync<br>
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS. INFO, SUBSCRIBE, NOTIFY, REFER, UPDATE<br>
Content-Type: application/sdp<br>
Content-Length: ...<br>
<br>
v=0<br>
o=... 5010 ... IN IP4 lan<br>
s=Mapping<br>
</blockquote><div>This bit here tells where the rtp has to go to. I don't think you want it to be IP4 lan. It would be a lot more helpful if you had the ip address but the use of the word LAN suggests its a private IP which asterisk is not going to be able to route to<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">c=IN IP4 lan<br>
t=0 0<br>
m=audio 5010 RTP/AVP 8 101<br>
a=rtpmap:8 PCMA/8000<br>
a=rtpmap:101 telephone-event/8000<br>
a=fmtp:101 0-16<br>
a=sendrcv<br>
a=ptime:20<br>
<br>
asterisk:5060 -> provider:25298<br>
Via: SIP/2.0/UDP asterisk:5060;rport=5060;branch=...<br>
From: <sip:111@asterisk>;tag=...<br>
To: <sip:999@provider>;tag=...<br>
Call-ID: ...<br>
CSeq: ... ACK<br>
Max-Forwards: 70<br>
User-Agent: Asterisk PBX 18.2.0<br>
Content-Length: 0<br>
<br>
Then I see RTP packets:<br>
asterisk:18892 -> lan:5010<br>
provider:25420 -> asterisk:18892<br></blockquote><div>As above for RTP to work they have to go to/from the end points. Asterisk is sending to 18892 instead of the provider 25420</div><div><br></div><div>Why is your provider sending you an sdp with rtp with a private ip address? Or are they sending the right address and your ALG or something else is changing it? Ask your provider what they are sending you? Then find out who/what is messing up the SDP<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I hear no audio. I heard stream towards the asterisk prior to SIP ALG<br>
disabling. Now silence both directions. It should not be a codec<br>
problem. After providers router reboot I can hear both directions but<br>
it still seems weird:<br>
<br>
provider:32260 -> asterisk:5060<br>
SIP: SIP/2.0 200 OK<br>
Via: SIP/2.0/UDP asterisk:5060;rport=5060;branch=...<br>
From: <sip:111@asterisk>;tag=...<br>
To: <sip:999@provider>;tag=...<br>
Call-ID: ...<br>
CSeq: ... INVITE<br>
Contact: <sip:999@lan:5060><br>
Supported: replaces<br>
Allow-Events: message-sumary, refer, ua-profile, talk, check-sync<br>
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS. INFO, SUBSCRIBE, NOTIFY, REFER, UPDATE<br>
Content-Type: application/sdp<br>
Content-Length: ...<br>
<br>
v=0<br>
o=... 5016 ... IN IP4 lan<br>
s=Mapping<br>
c=IN IP4 lan<br>
t=0 0<br>
m=audio 5016 RTP/AVP 8 101<br>
a=rtpmap:8 PCMA/8000<br>
a=rtpmap:101 telephone-event/8000<br>
a=fmtp:101 0-16<br>
a=sendrcv<br>
a=ptime:20<br>
<br>
asterisk:5060 -> provider:32260<br>
Via: SIP/2.0/UDP asterisk:5060;rport=5060;branch=...<br>
From: <sip:111@asterisk>;tag=...<br>
To: <sip:999@provider>;tag=...<br>
Call-ID: ...<br>
CSeq: ... ACK<br>
Max-Forwards: 70<br>
User-Agent: Asterisk PBX 18.2.0<br>
Content-Length: 0<br>
<br>
Then I see several RTP packets:<br>
asterisk:13786 -> lan:5016<br>
provider:32327 -> asterisk:13786<br>
for a while and the suddenly<br>
asterisk:13786 -> provider:32327<br>
provider:32327 -> asterisk:13786<br>
<br>
The user experience for that scenario is OK.<br>
<br>
I suspect some configuration error on asterisk side, since also for<br>
working scenario I see RTP packets to the lan. But I cannot figure out<br>
what it is. When I was using another provider which had working SIP<br>
ALG I had no problem even without nat configuration on the asterisk<br>
side.<br>
<br>
The experience is clearly better after disabling SIP ALG, but we still<br>
face problems after asterisk side reboots.<br>
<br>
Could you point me for what should I look in the asterisk<br>
configuration? And why the problems are gone after provider's router<br>
reboot?<br>
<br>
Thanks<br>
<br>
Marek<br>
<br>
<br>
<br>
2021-08-13 15:31 GMT+02:00, Duncan Turnbull <<a href="mailto:duncan@e-simple.co.nz" target="_blank">duncan@e-simple.co.nz</a>>:<br>
><br>
>>Hello,<br>
>><br>
>>it triggered again. Even disabling RTSp ALG did not help. My fantasy<br>
>>ends here. It agains seems to be reboot triggered on asterisk side.<br>
>>Not every one. But there was surely one before it was last working.<br>
>>Reboot of the router on the phone side fixes the problem. Any other<br>
>>suggestions?<br>
>><br>
> This is where you use sngrep or tcpdump to look at whats actually<br>
> happening on the asterisk box. sngrep is focussed on sip dialogs and is<br>
> probably easier than tcpdump when you are just interested in sip<br>
><br>
> If you use sngrep on the asterisk server sip port you will see the SIP<br>
> packet flows for registration and call setups. You can check the<br>
> addresses given out for rtp to respond to and the codecs. Is an address<br>
> incorrect? Is a code incorrect? You will see in the session description<br>
> protocol what codecs the client is requesting and what the replies are<br>
><br>
> asterisk works well around the world with many nat scenarios so I<br>
> imagine its either config or firewall. A firewall with ALGs is often<br>
> problematic but your log suggests a lack of negotiation of agreed<br>
> codecs.<br>
><br>
> Good luck, you will learn some interesting things.<br>
><br>
><br>
><br>
>><br>
>>Thanks<br>
>><br>
>>Marek<br>
>><br>
>><br>
>>2021-07-26 9:31 GMT+02:00, Marek Greško <<a href="mailto:mgresko8@gmail.com" target="_blank">mgresko8@gmail.com</a>>:<br>
>>> I currently disabled also RTSP ALG and rebooted the router. Fixed for<br>
>>> now. I do not know for how long.<br>
>>><br>
>>> Marek<br>
>>><br>
>>><br>
>>> 2021-07-26 8:54 GMT+02:00, Marek Greško <<a href="mailto:mgresko8@gmail.com" target="_blank">mgresko8@gmail.com</a>>:<br>
>>>> Hmm, back to original problem. My happines was premature. Today one of<br>
>>>> the phones have no audio again. I see packets from lan segment again.<br>
>>>><br>
>>>> I double checked the router configuration. SIP ALG is disabled. There<br>
>>>> are also another ALGs present:<br>
>>>><br>
>>>> NAT ALG<br>
>>>> RTSP ALG<br>
>>>> PPTP ALG<br>
>>>> IPSEC ALG<br>
>>>><br>
>>>> Which of them are neede to be disabled?<br>
>>>><br>
>>>> As of my observations these problems are triggered by reboots on<br>
>>>> asterisk side. How could this be related? (I may be wrong.)<br>
>>>><br>
>>>> Thanks<br>
>>>><br>
>>>> Marek<br>
>>>><br>
>>>><br>
>>>><br>
>>>> 2021-07-23 14:54 GMT+02:00, Marek Greško <<a href="mailto:mgresko8@gmail.com" target="_blank">mgresko8@gmail.com</a>>:<br>
>>>>> I achieved a partial success adding --use-compact-form option.<br>
>>>>><br>
>>>>> Marek<br>
>>>>><br>
>>>>><br>
>>>>> 2021-07-23 13:47 GMT+02:00, Marek Greško <<a href="mailto:mgresko8@gmail.com" target="_blank">mgresko8@gmail.com</a>>:<br>
>>>>>> Hello,<br>
>>>>>><br>
>>>>>> your suggestion to turn off SIP ALG on provider's router was probably<br>
>>>>>> correct. no problem until now. Thank you very much.<br>
>>>>>><br>
>>>>>> I just found out another issue. I had a pjsue client in that network<br>
>>>>>> which called specific number when turned on. It was working perfectly<br>
>>>>>> with the old provider with working SIP ALG. But now with this<br>
>>>>>> provider<br>
>>>>>> and SIP ALG disabled I am not able to make the call using pjsua<br>
>>>>>> client.<br>
>>>>>><br>
>>>>>> My pjsua config looks like this:<br>
>>>>>> --id sip:ext@asterisk.domain<br>
>>>>>> --registrar sip:asterisk.domain<br>
>>>>>> --proxy sip:asterisk.domain<br>
>>>>>> --outbound sip:asterisk.domain<br>
>>>>>> --realm *<br>
>>>>>> --username username<br>
>>>>>> --password password<br>
>>>>>> --null-audio<br>
>>>>>> --no-tcp<br>
>>>>>> --max-calls=1<br>
>>>>>> --no-vad<br>
>>>>>><br>
>>>>>> The pjsua client successfully registers but is unable to call.<br>
>>>>>><br>
>>>>>> I see the following:<br>
>>>>>> IP address change detected for account 1<br>
>>>>>> (localip:5060-->nattedip:newport). Updating registration (using<br>
>>>>>> method<br>
>>>>>> 4)<br>
>>>>>> Temporary failure in sending Request msg INVITE/cseq=...., will try<br>
>>>>>> next server: Unsupported transport (PJSIP_EUNSUPTRANSPORT)<br>
>>>>>><br>
>>>>>> What could be the problem? How can I convince pjsue to work correctly<br>
>>>>>> behind nat?<br>
>>>>>><br>
>>>>>> Thanks<br>
>>>>>><br>
>>>>>> Marek<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> 2021-07-10 11:08 GMT+02:00, Marek Greško <<a href="mailto:mgresko8@gmail.com" target="_blank">mgresko8@gmail.com</a>>:<br>
>>>>>>> Hello,<br>
>>>>>>><br>
>>>>>>> I just disabled. Currently it is working. I shloud give it some time<br>
>>>>>>> to confirm the problem has gone. Maybe one month would be enough to<br>
>>>>>>> confirm.<br>
>>>>>>><br>
>>>>>>> Thanks<br>
>>>>>>><br>
>>>>>>> Marek<br>
>>>>>>><br>
>>>>>>><br>
>>>>>>> 2021-07-09 20:11 GMT+02:00, Abdenasser Ghomri<br>
>>>>>>> <<a href="mailto:ghomri.nasser@gmail.com" target="_blank">ghomri.nasser@gmail.com</a>>:<br>
>>>>>>>> Yes just disable the SIP ALG and see if it helps, Thanks.<br>
>>>>>>>><br>
>>>>>>>> Best Regards,<br>
>>>>>>>><br>
>>>>>>>> On Fri, Jul 9, 2021, 09:10 Antony Stone <<br>
>>>>>>>><a href="mailto:Antony.Stone@asterisk.open.source.it" target="_blank">Antony.Stone@asterisk.open.source.it</a>> wrote:<br>
>>>>>>>><br>
>>>>>>>>> On Friday 09 July 2021 at 08:47:46, Marek Greško wrote:<br>
>>>>>>>>><br>
>>>>>>>>> > Hello,<br>
>>>>>>>>> ><br>
>>>>>>>>> > yes SIP ALG are anbled on the router. Should I disable?<br>
>>>>>>>>><br>
>>>>>>>>> In my opinion, always.<br>
>>>>>>>>><br>
>>>>>>>>> Antony.<br>
>>>>>>>>><br>
>>>>>>>>> --<br>
>>>>>>>>> I don't know, maybe if we all waited then cosmic rays would write<br>
>>>>>>>>> all<br>
>>>>>>>>> our<br>
>>>>>>>>> software for us. Of course it might take a while.<br>
>>>>>>>>><br>
>>>>>>>>> - Ron Minnich, Los Alamos National Laboratory<br>
>>>>>>>>><br>
>>>>>>>>> Please reply to<br>
>>>>>>>>> the<br>
>>>>>>>>> list;<br>
>>>>>>>>> please<br>
>>>>>>>>> *don't*<br>
>>>>>>>>> CC<br>
>>>>>>>>> me.<br>
>>>>>>>>><br>
>>>>>>>>> --<br>
>>>>>>>>><br>
>>>>>>>>> _____________________________________________________________________<br>
>>>>>>>>> -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a><br>
>>>>>>>>> --<br>
>>>>>>>>><br>
>>>>>>>>> Check out the new Asterisk community forum at:<br>
>>>>>>>>><a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
>>>>>>>>><br>
>>>>>>>>> New to Asterisk? Start here:<br>
>>>>>>>>><a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
>>>>>>>>><br>
>>>>>>>>> asterisk-users mailing list<br>
>>>>>>>>> To UNSUBSCRIBE or update options visit:<br>
>>>>>>>>><a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
>>>>>>>><br>
>>>>>>><br>
>>>>>><br>
>>>>><br>
>>>><br>
>>><br>
>><br>
>>--<br>
>>_____________________________________________________________________<br>
>>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
>><br>
>>Check out the new Asterisk community forum at:<br>
>> <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
>><br>
>>New to Asterisk? Start here:<br>
>><a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
>><br>
>>asterisk-users mailing list<br>
>>To UNSUBSCRIBE or update options visit:<br>
>><a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
><br>
><br>
> --<br>
> _____________________________________________________________________<br>
> -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
><br>
> Check out the new Asterisk community forum at:<br>
> <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
><br>
> New to Asterisk? Start here:<br>
> <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
><br>
> asterisk-users mailing list<br>
> To UNSUBSCRIBE or update options visit:<br>
> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
<br>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
<a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div></div>