Re: [asterisk-users] Local calls not possible when Internet connection down

2023-11-08 Thread Marek Greško
Hello,

I confirm server and phones are on the same subnet and the phones are able to 
resolve local domain also when internet connection os down. It seems to be the 
asterisk bug I referenced before. There seems to be some bolcking resolver in 
it.

I do not use database related to asterisk. This should be related to the srv 
record resolving. It seems quite random time to trigger the issue. When 
inspecting logs after internet problems started the issue appeared in one hour 
and several minutes. After restart of the asterisk it reappeared in less than 
half an hour. When trying to reproduce I was not able to reproduce for one hour 
and a half. So I decided to configure srv_lookups=no. I hope the issue is 
workarounded now.

But I think asterisk should be fixed. It should successfully start when the 
VoIP providers sip server is not reachable, should recover after it becomes 
available. And should work locally when it stops to be responding. The tweak of 
creating /etc/hosts entry for the sip server and disabling srv lookups should 
not be needed. I hope sometimes theese issues will be addressed.

Marek

On Wednesday, November 8th, 2023 at 15:53, John Harragin 
 wrote:

> Are the phones and the server in the same subnet? You might making note of 
> the IPs and just simply try pinging everything with the uplink disconnected. 
> Also, if you are using domain names for registration, it is possible a dns 
> server must be reachable.
>
> If you are using database for any of your call processing, an unreachable dns 
> server can also be the cause of trouble. For some reason, even if you are 
> using IP addressing, Mysql will try to resolve a connection and can hang 
> (there is a mysql parameter to not resolve addresses).
>
> On Wed, Nov 8, 2023 at 8:46 AM Marek Greško  
> wrote:
>
>> Hello,
>>
>> it did not seem the call hung. It seemed it never started. There was no 
>> dialplan execution on the asterisk side. It looked like phones were 
>> unregistered. Same shows the log posted previously.
>>
>> Marek
>>
>> Sent with Proton Mail secure email.
>>
>> --- Original Message ---
>> On Wednesday, November 8th, 2023 at 1:21, John Harragin 
>>  wrote:
>>
>>> Marek,
>>>
>>> See if calls hang in the system if you encounter another outage
>>> core show channels
>>>
>>> ...if so,
>>> core set verbose 3
>>> and see what instructions subsequent calls hang on.
>>>
>>>
>>>
>>> On Mon, Nov 6, 2023 at 4:44 PM Marek Greško marek.gre...@protonmail.com 
>>> wrote:
>>>
>>> > Hello,
>>> >
>>> > sure I have local DNS server and public resolving should not be needed 
>>> > for phone registrations. Running pjsip show endpojnt show the endpoints 
>>> > as not in use.
>>> >
>>> > When looking into logs I see only res_pjsip_outbound_registration.c: No 
>>> > response
>>> > received from sip provider. Nothing else.
>>> >
>>> > In phone log I see:
>>> > CC_eventProc(event=63(CC_EV_SIG_REGISTER_FAILED),
>>> > lid=0, par=0, par2=(nil))
>>> >
>>> > The phone is Cisco SPA525G2.
>>> >
>>> > Thanks.
>>> >
>>> > Marek
>>> >
>>> > --- Original Message ---
>>> > On Monday, November 6th, 2023 at 15:45, Joshua C. Colp jc...@sangoma.com 
>>> > wrote:
>>> >
>>> > On Mon, Nov 6, 2023 at 10:42 AM Marek Greško marek.gre...@protonmail.com 
>>> > wrote:
>>> >
>>> > > It looks like all phones get unregistered, but I am not aware of the 
>>> > > cause. Why are get not registered when there is a connectivity between 
>>> > > them and asterisk?
>>> >
>>> > Are the REGISTER requests reaching Asterisk (do they show up in a packet 
>>> > capture, do they show up in "pjsip set logger on")? It needs to be 
>>> > further isolated. How are the phones configured to reach Asterisk? If 
>>> > using a hostname, are they still able to resolve it?
>>> >
>>> > --
>>> > Joshua C. Colp
>>> > Asterisk Project Lead
>>> > Sangoma Technologies
>>> > Check us out at www.sangoma.com and www.asterisk.org
>>> >
>>> > --
>>> > _
>>> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>> >
>>> > Ch

Re: [asterisk-users] Local calls not possible when Internet connection down

2023-11-07 Thread Marek Greško
Hello,

it did not seem the call hung. It seemed it never started. There was no 
dialplan execution on the asterisk side. It looked like phones were 
unregistered. Same shows the log posted previously.

Marek





Sent with Proton Mail secure email.

--- Original Message ---
On Wednesday, November 8th, 2023 at 1:21, John Harragin 
 wrote:


> Marek,
> 
> See if calls hang in the system if you encounter another outage
> core show channels
> 
> ...if so,
> core set verbose 3
> and see what instructions subsequent calls hang on.
> 
> 
> 
> On Mon, Nov 6, 2023 at 4:44 PM Marek Greško marek.gre...@protonmail.com wrote:
> 
> > Hello,
> > 
> > sure I have local DNS server and public resolving should not be needed for 
> > phone registrations. Running pjsip show endpojnt show the endpoints as not 
> > in use.
> > 
> > When looking into logs I see only res_pjsip_outbound_registration.c: No 
> > response
> > received from sip provider. Nothing else.
> > 
> > In phone log I see:
> > CC_eventProc(event=63(CC_EV_SIG_REGISTER_FAILED),
> > lid=0, par=0, par2=(nil))
> > 
> > The phone is Cisco SPA525G2.
> > 
> > Thanks.
> > 
> > Marek
> > 
> > ------- Original Message ---
> > On Monday, November 6th, 2023 at 15:45, Joshua C. Colp jc...@sangoma.com 
> > wrote:
> > 
> > On Mon, Nov 6, 2023 at 10:42 AM Marek Greško marek.gre...@protonmail.com 
> > wrote:
> > 
> > > It looks like all phones get unregistered, but I am not aware of the 
> > > cause. Why are get not registered when there is a connectivity between 
> > > them and asterisk?
> > 
> > Are the REGISTER requests reaching Asterisk (do they show up in a packet 
> > capture, do they show up in "pjsip set logger on")? It needs to be further 
> > isolated. How are the phones configured to reach Asterisk? If using a 
> > hostname, are they still able to resolve it?
> > 
> > --
> > Joshua C. Colp
> > Asterisk Project Lead
> > Sangoma Technologies
> > Check us out at www.sangoma.com and www.asterisk.org
> > 
> > --
> > _
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> > 
> > Check out the new Asterisk community forum at: 
> > https://community.asterisk.org/
> > 
> > New to Asterisk? Start here:
> > https://wiki.asterisk.org/wiki/display/AST/Getting+Started
> > 
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> 
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> Check out the new Asterisk community forum at: https://community.asterisk.org/
> 
> New to Asterisk? Start here:
> https://wiki.asterisk.org/wiki/display/AST/Getting+Started
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Local calls not possible when Internet connection down

2023-11-07 Thread Marek Greško
Hello Joshua,

thanks for suggestion. I just found out the same solution several minutes ago. 
I also obtained the maintenance window, so I diasbled outgoing DNS and SIP. But 
I was not successful reproducing the bad state. So I ceased futher debugging 
attempts and set srv_lookups to no. We will see once the next massive internet 
outage out of my control happens, whether it helped.

Thanks again

Marek

--- Original Message ---
On Tuesday, November 7th, 2023 at 16:28, Joshua C. Colp  
wrote:

> On Tue, Nov 7, 2023 at 11:20 AM Marek Greško  
> wrote:
>
>> Hello,
>>
>> well I do not ask those who only guess, but those who know what is asterisk 
>> expected to do when internet connectivity goes down. I did not had a chance 
>> to make internet not to work yet, since it is needed. But inspecting dns 
>> logs I found out that there started to be resolving for _sip._tcp and 
>> _sip._udp records for the provider's server. So apparently making hosts 
>> record make asterisk happy when everything works, but when there is a 
>> communication problem then it falls back to searching for srv records. At 
>> least it seems to be so for now. Moreover I found out this old thread:
>
> The expectation is that Asterisk continues to work. That being said there is 
> one case (specifically using realtime with an identify section that 
> references a hostname) that can cause this specific behavior where PJSIP will 
> block.
>
> Are you in that scenario? If so you CAN disable SRV records on the identify 
> by setting "srv_lookups" to "no".
> --
>
> Joshua C. Colp
> Asterisk Project Lead
> Sangoma Technologies
> Check us out at www.sangoma.com and www.asterisk.org-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Local calls not possible when Internet connection down

2023-11-07 Thread Marek Greško
Hello,

well I do not ask those who only guess, but those who know what is asterisk 
expected to do when internet connectivity goes down. I did not had a chance to 
make internet not to work yet, since it is needed. But inspecting dns logs I 
found out that there started to be resolving for _sip._tcp and _sip._udp 
records for the provider's server. So apparently making hosts record make 
asterisk happy when everything works, but when there is a communication problem 
then it falls back to searching for srv records. At least it seems to be so for 
now. Moreover I found out this old thread:

https://community.freepbx.org/t/asterisk-become-mad-when-a-dns-problem-occur/4755/10

So the problem seems to be still present. So if asterisk is not able to resolve 
using it's dns resolver it breaks also local communication which is complete 
non-sense.

I am thinking of two possible workarounds:

1. If thre is a possibility to convince asterisk not to fallback to searching 
for srv records, it would be ideal. Is somebody aware of such options in pjsip?

2. If the first workaround is not feasible I can create rpz records for 
provider's A and SRV records.

When I will be able to shutdown internet or at least outbound DNS, I will try 
to make sure my findings are correct using tcpdump.

Thanks

Marek





Sent with Proton Mail secure email.

--- Original Message ---
On Tuesday, November 7th, 2023 at 0:46, Greg Troxel  wrote:


> Marek Greško marek.gre...@protonmail.com writes:
> 
> > But I am not sure why this is happening. I have sip providers hostname
> > in /etc/hosts file to prevent such situations. Should I reconfigure it
> > not to use hosts file but rather some RPZ on DNS server? Does asterisk
> > ignore hosts file? Or does it try to do some srv lookups? But in
> > either case, why does this influence local calls? Local domain should
> > really be resolvable.
> 
> 
> You should run tcpdump on 53 and 5353 in multiple places and figure out
> what it is doing, rather than asking us, who can only guess.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Local calls not possible when Internet connection down

2023-11-06 Thread Marek Greško
Hello,

the corresponding conf is:

pbx.example.lan



No
Yes
Yes
No
3600
No
No
No
3600
Normal
No
No

Marek

--- Original Message ---
On Tuesday, November 7th, 2023 at 0:22, Łukasz Grzywański 
 wrote:

> Could you show the phone configurations - section "Proxy and Registration"
>
> On Mon, 6 Nov 2023 at 23:13, Marek Greško  wrote:
>
>> Hello,
>>
>> you are probably right. It should somehow be related to DNS. I just found 
>> out this in the storm of previous messages:
>>
>> WARNING[13945] taskprocessor.c: The 'dns_system_resolver_tp' task processor 
>> queue reached 500 scheduled tasks.
>>
>> But I am not sure why this is happening. I have sip providers hostname in 
>> /etc/hosts file to prevent such situations. Should I reconfigure it not to 
>> use hosts file but rather some RPZ on DNS server? Does asterisk ignore hosts 
>> file? Or does it try to do some srv lookups? But in either case, why does 
>> this influence local calls? Local domain should really be resolvable.
>>
>> Thanks
>>
>> Marek
>>
>> --- Original Message ---
>> On Monday, November 6th, 2023 at 19:52, Marek Greško 
>>  wrote:
>>
>>> Hello,
>>>
>>> sure I have local DNS server and public resolving should not be needed for 
>>> phone registrations. Running pjsip show endpojnt show the endpoints as not 
>>> in use.
>>>
>>> When looking into logs I see only res_pjsip_outbound_registration.c: No 
>>> response
>>> received from sip provider. Nothing else.
>>>
>>> In phone log I see:
>>> CC_eventProc(event=63(CC_EV_SIG_REGISTER_FAILED),
>>> lid=0, par=0, par2=(nil))
>>>
>>> The phone is Cisco SPA525G2.
>>>
>>> Thanks.
>>>
>>> Marek
>>>
>>> --- Original Message ---
>>> On Monday, November 6th, 2023 at 15:45, Joshua C. Colp  
>>> wrote:
>>>
>>>> On Mon, Nov 6, 2023 at 10:42 AM Marek Greško  
>>>> wrote:
>>>>
>>>>> It looks like all phones get unregistered, but I am not aware of the 
>>>>> cause. Why are get not registered when there is a connectivity between 
>>>>> them and asterisk?
>>>>
>>>> Are the REGISTER requests reaching Asterisk (do they show up in a packet 
>>>> capture, do they show up in "pjsip set logger on")? It needs to be further 
>>>> isolated. How are the phones configured to reach Asterisk? If using a 
>>>> hostname, are they still able to resolve it?
>>>> --
>>>>
>>>> Joshua C. Colp
>>>> Asterisk Project Lead
>>>> Sangoma Technologies
>>>> Check us out at www.sangoma.com and www.asterisk.org
>>
>> --
>> _
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> Check out the new Asterisk community forum at: 
>> https://community.asterisk.org/
>>
>> New to Asterisk? Start here:
>> https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>
> --
>
> Pozdrawiam,
>
> Łukasz Grzywański
> Voice Architect
>
> Mok Yok IT Sp. z o.o.
> ul. Rzeźnicza 32/33, 50-130 Wrocław, Polska
> tel. +48 717227200, fax +48 717227299
> mob.: +48 517255333, e-mail: lukasz.grzywan...@mokyokit.com-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Local calls not possible when Internet connection down

2023-11-06 Thread Marek Greško
Hello,

you are probably right. It should somehow be related to DNS. I just found out 
this in the storm of previous messages:

WARNING[13945] taskprocessor.c: The 'dns_system_resolver_tp' task processor 
queue reached 500 scheduled tasks.

But I am not sure why this is happening. I have sip providers hostname in 
/etc/hosts file to prevent such situations. Should I reconfigure it not to use 
hosts file but rather some RPZ on DNS server? Does asterisk ignore hosts file? 
Or does it try to do some srv lookups? But in either case, why does this 
influence local calls? Local domain should really be resolvable.

Thanks

Marek

--- Original Message ---
On Monday, November 6th, 2023 at 19:52, Marek Greško 
 wrote:

> Hello,
>
> sure I have local DNS server and public resolving should not be needed for 
> phone registrations. Running pjsip show endpojnt show the endpoints as not in 
> use.
>
> When looking into logs I see only res_pjsip_outbound_registration.c: No 
> response
> received from sip provider. Nothing else.
>
> In phone log I see:
> CC_eventProc(event=63(CC_EV_SIG_REGISTER_FAILED),
> lid=0, par=0, par2=(nil))
>
> The phone is Cisco SPA525G2.
>
> Thanks.
>
> Marek
>
> --- Original Message ---
> On Monday, November 6th, 2023 at 15:45, Joshua C. Colp  
> wrote:
>
>> On Mon, Nov 6, 2023 at 10:42 AM Marek Greško  
>> wrote:
>>
>>> It looks like all phones get unregistered, but I am not aware of the cause. 
>>> Why are get not registered when there is a connectivity between them and 
>>> asterisk?
>>
>> Are the REGISTER requests reaching Asterisk (do they show up in a packet 
>> capture, do they show up in "pjsip set logger on")? It needs to be further 
>> isolated. How are the phones configured to reach Asterisk? If using a 
>> hostname, are they still able to resolve it?
>> --
>>
>> Joshua C. Colp
>> Asterisk Project Lead
>> Sangoma Technologies
>> Check us out at www.sangoma.com and www.asterisk.org-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Local calls not possible when Internet connection down

2023-11-06 Thread Marek Greško
Hello,

sure I have local DNS server and public resolving should not be needed for 
phone registrations. Running pjsip show endpojnt show the endpoints as not in 
use.

When looking into logs I see only res_pjsip_outbound_registration.c: No response
received from sip provider. Nothing else.

In phone log I see:
CC_eventProc(event=63(CC_EV_SIG_REGISTER_FAILED),
lid=0, par=0, par2=(nil))

The phone is Cisco SPA525G2.

Thanks.

Marek

--- Original Message ---
On Monday, November 6th, 2023 at 15:45, Joshua C. Colp  
wrote:

> On Mon, Nov 6, 2023 at 10:42 AM Marek Greško  
> wrote:
>
>> It looks like all phones get unregistered, but I am not aware of the cause. 
>> Why are get not registered when there is a connectivity between them and 
>> asterisk?
>
> Are the REGISTER requests reaching Asterisk (do they show up in a packet 
> capture, do they show up in "pjsip set logger on")? It needs to be further 
> isolated. How are the phones configured to reach Asterisk? If using a 
> hostname, are they still able to resolve it?
> --
>
> Joshua C. Colp
> Asterisk Project Lead
> Sangoma Technologies
> Check us out at www.sangoma.com and www.asterisk.org-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Local calls not possible when Internet connection down

2023-11-06 Thread Marek Greško
It looks like all phones get unregistered, but I am not aware of the cause. Why 
are get not registered when there is a connectivity between them and asterisk?

Marek

--- Original Message ---
On Monday, November 6th, 2023 at 15:10, Joshua C. Colp  
wrote:

> On Mon, Nov 6, 2023 at 10:06 AM Marek Greško  
> wrote:
>
>> Hello,
>>
>> I just realized that when my Internet connection goes down and I loose 
>> connectivity to VoIP SIP provider I loose ability to make local calls after 
>> some time. When I restart asterisk, I am able to make local calls for some 
>> time, but it then suddenly stops working again. I am using pjsip stack.
>>
>> What could be the cause of this?
>
> There is insufficient information to be able to answer this. Such as, what 
> actually happens when attempts are made? What shows on the console?
> --
>
> Joshua C. Colp
> Asterisk Project Lead
> Sangoma Technologies
> Check us out at www.sangoma.com and www.asterisk.org-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Local calls not possible when Internet connection down

2023-11-06 Thread Marek Greško
Hello,

I just realized that when my Internet connection goes down and I loose 
connectivity to VoIP SIP provider I loose ability to make local calls after 
some time. When I restart asterisk, I am able to make local calls for some 
time, but it then suddenly stops working again. I am using pjsip stack.

What could be the cause of this?

Thnaks

Marek-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk 18.14.0 vs 18.18.0 and chan_console/chan_alsa

2023-09-14 Thread Marek Greško
Hello Jerry,

when you run asterisk using su, ownership of audio device files does not get 
updated. When you login, you get the permissions. You can verify by ls -l and 
getfacl on the device file.

Marek

--- Original Message ---
On Thursday, September 14th, 2023 at 14:33, Jerry Geis  
wrote:

> On Wed, Sep 13, 2023 at 5:20 PM Jerry Geis  wrote:
>
>>>An issue[1] was already created by asterisk at phreaknet.org and they also 
>>>put
>>>a fix up for review and inclusion[2].
>>
>>>[1] https://github.com/asterisk/asterisk/issues/308
>>>[2] https://github.com/asterisk/asterisk/pull/309
>>
>> The change "seems" to be working.
>> Will test more tomorrow - had to leave.
>> THANKS!
>> Jerry
>
> Yes - this fix is working for me.
>
> Only issue I have now is, I used to run asterisk like this:
> su silentm -c "/usr/sbin/asterisk -fn"
> I also tried
> su silentm -l -c "/usr/sbin/asterisk -fn"
>
> these do not work for the chan_console. I have to actually login as silentm 
> and then run asterisks - to HEAR the audio.
> doing su above I do not hear the audio - but the CLI looks the same - no 
> errors.
>
> Thoughts?
>
> Jerry-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] MWI with PJSIP - unsollicitated works fine, solicitated doesn't

2021-11-19 Thread Marek Greško
Hello Michael,

I was also struggling with solicited MWI after moving to pjsip. My
problem was I was defining mailbox=111@extensioncontext. But the
correct context in the mailbox command is to be defined by context in
voicemail.conf. My voicemails were all defined in the context default
(see voicemail.conf) and the mailbox command should look like this:
mailbox=111@default.

Hope this helps. I do not know whether this is also your problem.

Marek


2021-11-14 16:38 GMT+01:00, Mike :
> Hi,
>
>
>
> Just  recently moved over from chan_sip to PJSIP and am slowly cleaning up
> whatever needs to be.
>
>
>
> I can't seem to make sollicitated MWI work, but unsollicitated works fine.
>
>
>
>
> I got my phones subscribing to mailbox@context (i.e. 100@whatever)
>
>
>
> I have my related AOR entry (realtime, in a DB) set to
> mailboxes=100@whatever . I can see it is set properly by using the command
> "pjsip show aor "
>
>
>
> But when I turn pjsip logger on, I see messages from the phones
> subscribing and SIP/2.0 401 Unauthorized messages back.
>
>
>
> If I put the same column in my realtime DB (mailboxes) for ENPOINT to the
> same value (100@whatever) then it works fine, MWI works on the phone.
>
>
>
> For a few reasons I'd like to get MWI working in sollicitated mode
> instead.  Is there a trick to it?
>
>
>
> I upgraded to Asterisk 18.8.0 just to see if a later patch fixed anything,
> so I am current.
>
>
>
>
>
>
>
>
>
>
>
>
>
> Michael
>
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Couldn't find auth 'provider'

2021-10-20 Thread Marek Greško
Hello,

I rewritten the auth section once more manually and disabled the stir
shaken modules and now it works. I do not expect stir shaken modules could
cause such issues so there should have been some unseen white characters in
the configuration of auth section or something like that. Strange the
section worked for registration.

Thanks for you effort.

Marek


ut 19. 10. 2021 o 20:22 Joshua C. Colp  napísal(a):

> On Tue, Oct 19, 2021 at 3:18 PM Marek Greško  wrote:
>
>> Hello,
>>
>> I am observing error:
>> res_pjsip/pjsip_configuration.c:2368 ast_sip_retrieve_auths: Couldn't
>> find auth 'provider'. Cannot authenticate.
>> res_pjsip_outbound_authenticator_digest.c:144
>> digest_create_request_with_auth: Endpoint: 'provider': Failed to set
>> authentication credentials
>>
>> I use config below. It reports the auth section is missing, but it is
>> apparently here.
>>
>> What am I doing wrong?
>>
>
> What does "pjsip show auths" in the CLI show? When PJSIP loads does it
> state an error with the configuration or any configuration? What is the
> contents of sorcery.conf (is it trying to pull auths from elsewhere)?
>
> --
> Joshua C. Colp
> Asterisk Technical Lead
> Sangoma Technologies
> Check us out at www.sangoma.com and www.asterisk.org
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Couldn't find auth 'provider'

2021-10-20 Thread Marek Greško
Hello,

pjsip show auths shows only phone accounts. nothing about provider. But
strange registration works and it uses the same auth section.

The sorcery.conf file contains:
[test_sorcery_section]
test=memory

[test_sorcery_cache]
test/cache=test
test=memory

I can see no relevant errors in /var/log/asterisk/messages file. Only some
unrelated stuff:
[Oct 19 19:55:18] Asterisk 18.2.0 built by mockbuild @
buildhw-x86-04.iad2.fedoraproject.org on a x86_64 running Linux on
2021-02-08 08:28:42 UTC
[Oct 19 19:55:18] NOTICE[4385] loader.c: 300 modules will be loaded.
[Oct 19 19:55:18] NOTICE[4385] cdr.c: CDR simple logging enabled.
[Oct 19 19:55:18] WARNING[4385] res_musiconhold.c: No music on hold classes
configured, disabling music on hold.
[Oct 19 19:55:18] WARNING[4385] res_phoneprov.c: Unable to find a valid
server address or name.
[Oct 19 19:55:20] NOTICE[4385] res_smdi.c: No SMDI interfaces are available
to listen on, not starting SMDI listener.
[Oct 19 19:55:20] ERROR[4385] ari/config.c: No configured users for ARI
[Oct 19 19:55:20] NOTICE[4385] confbridge/conf_config_parser.c: Adding
default_menu menu to app_confbridge
[Oct 19 19:55:20] NOTICE[4385] cel_custom.c: No mappings found in
cel_custom.conf. Not logging CEL to custom CSVs.
[Oct 19 19:55:20] WARNING[4385] loader.c: Some non-required modules failed
to load.
[Oct 19 19:55:20] ERROR[4385] loader.c: Failed to resolve dependencies for
res_stir_shaken
[Oct 19 19:55:20] ERROR[4385] loader.c: res_stir_shaken declined to load.
[Oct 19 19:55:20] ERROR[4385] loader.c: Failed to resolve dependencies for
res_pjsip_stir_shaken
[Oct 19 19:55:20] ERROR[4385] loader.c: res_pjsip_stir_shaken declined to
load.

Thanks

Marek


ut 19. 10. 2021 o 20:22 Joshua C. Colp  napísal(a):

> On Tue, Oct 19, 2021 at 3:18 PM Marek Greško  wrote:
>
>> Hello,
>>
>> I am observing error:
>> res_pjsip/pjsip_configuration.c:2368 ast_sip_retrieve_auths: Couldn't
>> find auth 'provider'. Cannot authenticate.
>> res_pjsip_outbound_authenticator_digest.c:144
>> digest_create_request_with_auth: Endpoint: 'provider': Failed to set
>> authentication credentials
>>
>> I use config below. It reports the auth section is missing, but it is
>> apparently here.
>>
>> What am I doing wrong?
>>
>
> What does "pjsip show auths" in the CLI show? When PJSIP loads does it
> state an error with the configuration or any configuration? What is the
> contents of sorcery.conf (is it trying to pull auths from elsewhere)?
>
> --
> Joshua C. Colp
> Asterisk Technical Lead
> Sangoma Technologies
> Check us out at www.sangoma.com and www.asterisk.org
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Couldn't find auth 'provider'

2021-10-19 Thread Marek Greško
Hello,

I am observing error:
res_pjsip/pjsip_configuration.c:2368 ast_sip_retrieve_auths: Couldn't find
auth 'provider'. Cannot authenticate.
res_pjsip_outbound_authenticator_digest.c:144
digest_create_request_with_auth: Endpoint: 'provider': Failed to set
authentication credentials

I use config below. It reports the auth section is missing, but it is
apparently here.

What am I doing wrong?

Thanks

Marek

; 

[global]
type = global
debug = no

[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0
external_media_address = x.x.x.x
external_signaling_address = x.x.x.x
local_net =192.168.1.0/255.255.255.0

[provider]
type = registration
transport = transport-udp
outbound_auth = provider
server_uri = sip:...
client_uri = sip:...
contact_user = username
retry_interval = 20
forbidden_retry_interval = 600
expiration = 120
;max_retries = 10

[provider]
type = auth
auth_type = userpass
username = username
password = password

[provider]
type = endpoint
context = provider-in
dtmf_mode = rfc4733
;direct_media = no
from_domain = provider.domain
force_rport = yes
rewrite_contact = yes
rtp_symmetric = yes
allow_subscribe = no
outbound_auth = provider
aors = provider
disallow = all
allow = alaw
allow = ilbc
allow = g729
allow = gsm
allow = g723

[provider]
type = aor
contact = sip:...
qualify_frequency = 15

[provider]
type = identify
endpoint = provider
match = ...
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] problems with natted phones

2021-09-11 Thread Marek Greško
Hello,

I already read the scenario you pointed to. It is not really the same.
as you can see in my rules I sent before I have CT in both directions.

Related to configuration error I am 99% sure the configuration is
correct. It was generated by automatic tool and then slightly edited
and reviewed by nftables guru. I just admit the there could be some
configuration error. Maybe some race condition in systemd - wrong
dependencies or something like that. I do not know. But I am sure once
I will find it (or suffer longer).

The reason many people use it and they will notice is invalid. I hit a
bug in PMTU dicovery several moths ago. And no one was complaining at
all. The bug is now fixed, so it is pretty probable it is a bug.

The reasoning that no expliot has been found in rtp for 20 year is
invalid. We are not talking about bugs in rtp. We are talking about
open ports and application local to asterisk server could use. So many
backdoors can be open. Believe me. It is not secure. Maybe it is
acceptable on a dedicated asterisk box, but not on a multi purpose
server.

Marek


2021-09-10 23:28 GMT+02:00, Duncan Turnbull :
>
>
>> On 11/09/2021, at 2:54 AM, Marek Greško  wrote:
>>
>> Hello,
>>
>> thanks you very much for your effort. Without your help I would never
>> realize the problem lies in the firewall.
>>
>> But what do you mean by the doubt that it is bug? You mean it should
>> be configured another way? I do not claim my configuration is correct.
>> I am also new to nftables. But I do not think opening the wide port
>> range is a solution. The nftables runs on the asterisk server itself.
>
> The reason I don’t use sip algs is because they have a have a function that
> isn’t required. And a complexity that messes things up. No exploit has yet
> been found for rtp for 20 years and it has been open to the world. For
> whatever reason you can’t get your head around this being a valid option so
> then you are jumping to a bug when you freely admit your lack of familiarity
>
>
> This may be your scenario
>
> https://unix.stackexchange.com/questions/461320/nf-conntrack-sip-does-not-work-sometimes-restarting-iptables-usually-fixes-it
>
> You are adding a dependency on the firewall that you don’t need using
> configuration you are not sure of. That is never a reliable situation to be
> in.
>
> Why would nftables have a bug? Many people use it around the world and it
> works well. What is the likelihood of a bug in this scenario
>
> The alternative is a misconfiguration, and you are not very familiar with
> the configuration and new to nftables. Which one is more likely?
>
> The above issue sounds like yours but it could be something else
>
> You can research and find the config error, or somehow you can prove a bug
> or you can remove the issue by just allowing rtp through
>
> All of these are your choices. To me the config error is most likely as I
> have very rarely found a bug. It’s almost always config
>
>>
>> Marek
>>
>>
>> 2021-09-10 1:19 GMT+02:00, Duncan Turnbull :
>>>
>>>
>>>>> On 10/09/2021, at 4:37 AM, Marek Greško  wrote:
>>>>
>>>> There are other systems running on the same hardware. It would just
>>>> leave open ports here.
>>>>
>>>> Do not compare SIP ALG on a closed source device to an opensource
>>>> software with active development. I had no such problems in the past
>>>> when using iptables. The nftables is a pretty new software, so some
>>>> bugs could be present and I accept. I just wanted to be sure I am not
>>>> doing anything wrong. Now I am pretty sure it is a bug.
>>>
>>> I very much doubt it’s a bug, but that’s your choice to pursue that
>>>
>>> You ask for help but perhaps you are not wanting to listen
>>>
>>> If you open your asterisk rtp ports in your firewall then you are
>>> following
>>> pretty much what everyone else does.
>>>
>>> Otherwise you are letting another device interfere with your Sip
>>> transactions and we have already shown that’s a bad idea. Makes no
>>> difference whether it’s open source or not.
>>>
>>> But up to you
>>>
>>>>
>>>> Thanks
>>>>
>>>> Marek
>>>>
>>>>
>>>> 2021-09-09 18:30 GMT+02:00, Administrator :
>>>>>
>>>>>> Le 09/09/2021 à 18:15, Marek Greško a écrit :
>>>>>> There is always some risk. If there is a solution that should work,
>>>>>> it
>>>>>> is best to use it. We just need the root cause, why it fail

Re: [asterisk-users] problems with natted phones

2021-09-10 Thread Marek Greško
Hello,

thanks you very much for your effort. Without your help I would never
realize the problem lies in the firewall.

But what do you mean by the doubt that it is bug? You mean it should
be configured another way? I do not claim my configuration is correct.
I am also new to nftables. But I do not think opening the wide port
range is a solution. The nftables runs on the asterisk server itself.

Marek


2021-09-10 1:19 GMT+02:00, Duncan Turnbull :
>
>
>> On 10/09/2021, at 4:37 AM, Marek Greško  wrote:
>>
>> There are other systems running on the same hardware. It would just
>> leave open ports here.
>>
>> Do not compare SIP ALG on a closed source device to an opensource
>> software with active development. I had no such problems in the past
>> when using iptables. The nftables is a pretty new software, so some
>> bugs could be present and I accept. I just wanted to be sure I am not
>> doing anything wrong. Now I am pretty sure it is a bug.
>
> I very much doubt it’s a bug, but that’s your choice to pursue that
>
> You ask for help but perhaps you are not wanting to listen
>
> If you open your asterisk rtp ports in your firewall then you are following
> pretty much what everyone else does.
>
> Otherwise you are letting another device interfere with your Sip
> transactions and we have already shown that’s a bad idea. Makes no
> difference whether it’s open source or not.
>
> But up to you
>
>>
>> Thanks
>>
>> Marek
>>
>>
>> 2021-09-09 18:30 GMT+02:00, Administrator :
>>>
>>>> Le 09/09/2021 à 18:15, Marek Greško a écrit :
>>>> There is always some risk. If there is a solution that should work, it
>>>> is best to use it. We just need the root cause, why it fails
>>>> sometimes.
>>>
>>> Like SIP ALG ? ;) Please explain which risk are existing if there is
>>> nothing listening on those ports ?
>>>
>>>>
>>>>
>>>> 2021-09-09 18:01 GMT+02:00, Antony Stone
>>>> :
>>>>> On Thursday 09 September 2021 at 17:56:10, Marek Greško wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I would not like to open whole range of udp ports for rtp.
>>>>> Why not?  What is the risk?
>>>>>
>>>>> What would possibly be listening on UDP ports 1 - 2 (the
>>>>> Asterisk
>>>>> default range) which an external scanner / attacker could make use of?
>>>
>>> --
>>> Daniel
>>>
>>> --
>>> _
>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>
>>> Check out the new Asterisk community forum at:
>>> https://community.asterisk.org/
>>>
>>> New to Asterisk? Start here:
>>>  https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>>
>>> asterisk-users mailing list
>>> To UNSUBSCRIBE or update options visit:
>>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>> --
>> _
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> Check out the new Asterisk community forum at:
>> https://community.asterisk.org/
>>
>> New to Asterisk? Start here:
>>  https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] problems with natted phones

2021-09-09 Thread Marek Greško
There are other systems running on the same hardware. It would just
leave open ports here.

Do not compare SIP ALG on a closed source device to an opensource
software with active development. I had no such problems in the past
when using iptables. The nftables is a pretty new software, so some
bugs could be present and I accept. I just wanted to be sure I am not
doing anything wrong. Now I am pretty sure it is a bug.

Thanks

Marek


2021-09-09 18:30 GMT+02:00, Administrator :
>
> Le 09/09/2021 à 18:15, Marek Greško a écrit :
>> There is always some risk. If there is a solution that should work, it
>> is best to use it. We just need the root cause, why it fails
>> sometimes.
>
> Like SIP ALG ? ;) Please explain which risk are existing if there is
> nothing listening on those ports ?
>
>>
>>
>> 2021-09-09 18:01 GMT+02:00, Antony Stone
>> :
>>> On Thursday 09 September 2021 at 17:56:10, Marek Greško wrote:
>>>
>>>> Hello,
>>>>
>>>> I would not like to open whole range of udp ports for rtp.
>>> Why not?  What is the risk?
>>>
>>> What would possibly be listening on UDP ports 1 - 2 (the Asterisk
>>> default range) which an external scanner / attacker could make use of?
>
> --
> Daniel
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] problems with natted phones

2021-09-09 Thread Marek Greško
There is always some risk. If there is a solution that should work, it
is best to use it. We just need the root cause, why it fails
sometimes.

Marek


2021-09-09 18:01 GMT+02:00, Antony Stone :
> On Thursday 09 September 2021 at 17:56:10, Marek Greško wrote:
>
>> Hello,
>>
>> I would not like to open whole range of udp ports for rtp.
>
> Why not?  What is the risk?
>
> What would possibly be listening on UDP ports 1 - 2 (the Asterisk
> default range) which an external scanner / attacker could make use of?
>
>
> Antony.
>
> --
> Too many people spend money they haven't earned
> to buy things they don't want,
> to impress people they don't like.
>
>  - Will Rogers
>
>Please reply to the list;
>  please *don't* CC
> me.
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] problems with natted phones

2021-09-09 Thread Marek Greško
Hello,

I would not like to open whole range of udp ports for rtp. I use
nf_conntrack_sip module for dynamically opening relevant ports. And
there is probably some bug in it.

Marek


2021-09-08 23:12 GMT+02:00, Administrator :
> Hi. Our rules:
>
> Le 08/09/2021 à 22:43, Marek Greško a écrit :
>> Hello,
>>
>> I did converted from iptables by automatical script and then rewritten
>> myself, because not everything was rewritten successfully.
>>
>> Relevant parts:
>>
>> table ip filter {
>>ct helper sip {
>>  type "sip" protocol udp
>>  l3proto ip
>>}
>>
>>chain PREROUTING {
>>  type filter hook prerouting priority filter; policy accept;
>>  udp port 5060 ct helper set "sip"
>>}
>>
>>chain INPUT {
>>  ...
>>  ct state invalid drop
>>  ct state related accept
>>  ct state established accept
>>  ...
>>  iifname "ppp0" jump i-inet
>>}
>
> set world_udp.eth0 {
>      type inet_service
>      flags interval
>      elements = { iax, sip, sip-tls, 1-3 }
>      }
>
> chain input {
>      type filter hook input priority 0; policy drop;
>      iif "eth0" ip daddr  udp dport
> @world_udp.eth0 counter packets 15394440 bytes 3738156190 accept
>      
>
> As you see we take care on RTP port range defined in rtp,conf
>
>>
>>chain OUTPUT {
>>  type filter hook output priority filter; policy accept;
>>  udp port 5060 ct helper set "sip"
>>  ...
>>}
> chain output {
>      type filter hook output priority 0; policy drop;
>      oif "eth0" ct state established,related,new counter
> packets 17542533 bytes 6033494909 accept
>
> our default policy is to drop so we add new in ct state
>
>>
>>chain i-inet {
>>  ...
>>  udp port 5060 jump r-sip
>>  ...
>>}
>>
>>chain r-sip {
>>  ip saddr 192.0.2.0/24 accept
>>}
>> }
>>
>> table ip mangle {
>>chain PREROUTING {
>>  type filter hook prerouting priority mangle; policy accept;
>>  ...
>>  udp sport 5060 ip dscp set 0x04
>>}
>>
>>chain OUTPUT {
>>  type route hook output priority mangle; policy accept;
>>  ...
>>  udp dport 5060 ip dscp set 0x04
>>  ...
>>}
>> }
>>
>> table ip6 filter {
>>ct helper sip {
>>  type "sip" protocol udp
>>  l3proto ip6
>>}
>>
>>... pretty the same, but I have no ipv6 internet connectivity, so
>> this should not match ...
>>
>> }
>>
>>
>> Is there something incorrect?
>>
>> Thanks
>>
>> Marek
>>
>>
>>
>> 2021-09-08 21:17 GMT+02:00, Duncan Turnbull :
>>>
>>>> On 9/09/2021, at 6:23 AM, Marek Greško  wrote:
>>>>
>>>> Hello,
>>>>
>>>> I confirm temporarily allowing all the udp communication from the nat
>>>> ip address solved the problem, so the problem lies in the nftables.
>>>> This is probably not the right forum to continue. Or is it? Does
>>>> anybody have wide experience with nftables and sip?
>>> If you publish your rule set then we could look. Did you write the rules?
>>> What have you checked so far?
>>>
>>>> Thanks
>>>>
>>>> Marek
>>>>
>>>>
>>>> 2021-09-07 10:40 GMT+02:00, Antony Stone
>>>> :
>>>>> On Monday 06 September 2021 at 23:05:27, Duncan Turnbull wrote:
>>>>>
>>>>>>>> On 7/09/2021, at 8:30 AM, Marek Greško  wrote:
>>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> it is only local nftables with nf_conntrack_sip on the asterisk
>>>>>>>> server. Probably a kernel bug? It did not trigger with previous
>>>>>>>> providers since they had working SIP ALG. Now I hear no audio in
>>>>>>>> both
>>>>>>>> directions because outgoing rtp stream from asterisk goes to private
>>>>>>>> address space and incoming stream is blocked. So the outgoing rtp
>>>>>>>> could not be learnt to send to nat addess.
>>>>>> Maybe a bug but that’s less li

Re: [asterisk-users] problems with natted phones

2021-09-08 Thread Marek Greško
Sorry did convert, not did converted :)

2021-09-08 22:43 GMT+02:00, Marek Greško :
> Hello,
>
> I did converted from iptables by automatical script and then rewritten
> myself, because not everything was rewritten successfully.
>
> Relevant parts:
>
> table ip filter {
>   ct helper sip {
> type "sip" protocol udp
> l3proto ip
>   }
>
>   chain PREROUTING {
> type filter hook prerouting priority filter; policy accept;
> udp port 5060 ct helper set "sip"
>   }
>
>   chain INPUT {
> ...
> ct state invalid drop
> ct state related accept
> ct state established accept
> ...
> iifname "ppp0" jump i-inet
>   }
>
>   chain OUTPUT {
> type filter hook output priority filter; policy accept;
> udp port 5060 ct helper set "sip"
> ...
>   }
>
>   chain i-inet {
> ...
> udp port 5060 jump r-sip
> ...
>   }
>
>   chain r-sip {
> ip saddr 192.0.2.0/24 accept
>   }
> }
>
> table ip mangle {
>   chain PREROUTING {
> type filter hook prerouting priority mangle; policy accept;
> ...
> udp sport 5060 ip dscp set 0x04
>   }
>
>   chain OUTPUT {
> type route hook output priority mangle; policy accept;
> ...
> udp dport 5060 ip dscp set 0x04
> ...
>   }
> }
>
> table ip6 filter {
>   ct helper sip {
> type "sip" protocol udp
> l3proto ip6
>   }
>
>   ... pretty the same, but I have no ipv6 internet connectivity, so
> this should not match ...
>
> }
>
>
> Is there something incorrect?
>
> Thanks
>
> Marek
>
>
>
> 2021-09-08 21:17 GMT+02:00, Duncan Turnbull :
>>
>>
>>> On 9/09/2021, at 6:23 AM, Marek Greško  wrote:
>>>
>>> Hello,
>>>
>>> I confirm temporarily allowing all the udp communication from the nat
>>> ip address solved the problem, so the problem lies in the nftables.
>>> This is probably not the right forum to continue. Or is it? Does
>>> anybody have wide experience with nftables and sip?
>> If you publish your rule set then we could look. Did you write the rules?
>> What have you checked so far?
>>
>>>
>>> Thanks
>>>
>>> Marek
>>>
>>>
>>> 2021-09-07 10:40 GMT+02:00, Antony Stone
>>> :
>>>> On Monday 06 September 2021 at 23:05:27, Duncan Turnbull wrote:
>>>>
>>>>>>> On 7/09/2021, at 8:30 AM, Marek Greško  wrote:
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> it is only local nftables with nf_conntrack_sip on the asterisk
>>>>>>> server. Probably a kernel bug? It did not trigger with previous
>>>>>>> providers since they had working SIP ALG. Now I hear no audio in
>>>>>>> both
>>>>>>> directions because outgoing rtp stream from asterisk goes to private
>>>>>>> address space and incoming stream is blocked. So the outgoing rtp
>>>>>>> could not be learnt to send to nat addess.
>>>>>
>>>>> Maybe a bug but that’s less likely than a config error. Time to debug
>>>>> your
>>>>> nftables.
>>>>
>>>> Try temporarily simply turning the firewall off - allow all traffic
>>>> through
>>>> (although leave in place any NAT rules).
>>>>
>>>> If you then find that RTP works, you know where the problem lies.
>>>>
>>>>
>>>> Antony.
>>>>
>>>> --
>>>> Perfection in design is achieved not when there is nothing left to add,
>>>> but
>>>> rather when there is nothing left to take away.
>>>>
>>>> - Antoine de Saint-Exupery
>>>>
>>>>   Please reply to the
>>>> list;
>>>> please *don't*
>>>> CC
>>>> me.
>>>>
>>>> --
>>>> _
>>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>>
>>>> Check out the new Asterisk community forum at:
>>>> https://community.asterisk.org/
>>>>
>>>> New to Asterisk? Start here:
>>>>  https://wiki.asterisk.o

Re: [asterisk-users] problems with natted phones

2021-09-08 Thread Marek Greško
Hello,

I did converted from iptables by automatical script and then rewritten
myself, because not everything was rewritten successfully.

Relevant parts:

table ip filter {
  ct helper sip {
type "sip" protocol udp
l3proto ip
  }

  chain PREROUTING {
type filter hook prerouting priority filter; policy accept;
udp port 5060 ct helper set "sip"
  }

  chain INPUT {
...
ct state invalid drop
ct state related accept
ct state established accept
...
iifname "ppp0" jump i-inet
  }

  chain OUTPUT {
type filter hook output priority filter; policy accept;
udp port 5060 ct helper set "sip"
...
  }

  chain i-inet {
...
udp port 5060 jump r-sip
...
  }

  chain r-sip {
ip saddr 192.0.2.0/24 accept
  }
}

table ip mangle {
  chain PREROUTING {
type filter hook prerouting priority mangle; policy accept;
...
udp sport 5060 ip dscp set 0x04
  }

  chain OUTPUT {
type route hook output priority mangle; policy accept;
...
udp dport 5060 ip dscp set 0x04
...
  }
}

table ip6 filter {
  ct helper sip {
type "sip" protocol udp
l3proto ip6
  }

  ... pretty the same, but I have no ipv6 internet connectivity, so
this should not match ...

}


Is there something incorrect?

Thanks

Marek



2021-09-08 21:17 GMT+02:00, Duncan Turnbull :
>
>
>> On 9/09/2021, at 6:23 AM, Marek Greško  wrote:
>>
>> Hello,
>>
>> I confirm temporarily allowing all the udp communication from the nat
>> ip address solved the problem, so the problem lies in the nftables.
>> This is probably not the right forum to continue. Or is it? Does
>> anybody have wide experience with nftables and sip?
> If you publish your rule set then we could look. Did you write the rules?
> What have you checked so far?
>
>>
>> Thanks
>>
>> Marek
>>
>>
>> 2021-09-07 10:40 GMT+02:00, Antony Stone
>> :
>>> On Monday 06 September 2021 at 23:05:27, Duncan Turnbull wrote:
>>>
>>>>>> On 7/09/2021, at 8:30 AM, Marek Greško  wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> it is only local nftables with nf_conntrack_sip on the asterisk
>>>>>> server. Probably a kernel bug? It did not trigger with previous
>>>>>> providers since they had working SIP ALG. Now I hear no audio in both
>>>>>> directions because outgoing rtp stream from asterisk goes to private
>>>>>> address space and incoming stream is blocked. So the outgoing rtp
>>>>>> could not be learnt to send to nat addess.
>>>>
>>>> Maybe a bug but that’s less likely than a config error. Time to debug
>>>> your
>>>> nftables.
>>>
>>> Try temporarily simply turning the firewall off - allow all traffic
>>> through
>>> (although leave in place any NAT rules).
>>>
>>> If you then find that RTP works, you know where the problem lies.
>>>
>>>
>>> Antony.
>>>
>>> --
>>> Perfection in design is achieved not when there is nothing left to add,
>>> but
>>> rather when there is nothing left to take away.
>>>
>>> - Antoine de Saint-Exupery
>>>
>>>   Please reply to the
>>> list;
>>> please *don't* CC
>>> me.
>>>
>>> --
>>> _
>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>
>>> Check out the new Asterisk community forum at:
>>> https://community.asterisk.org/
>>>
>>> New to Asterisk? Start here:
>>>  https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>>
>>> asterisk-users mailing list
>>> To UNSUBSCRIBE or update options visit:
>>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>> --
>> _
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> Check out the new Asterisk community forum at:
>> https://community.asterisk.org/
>>
>> New to Asterisk? Start here:
>>  https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
> --
> __

Re: [asterisk-users] problems with natted phones

2021-09-08 Thread Marek Greško
Hello,

I confirm temporarily allowing all the udp communication from the nat
ip address solved the problem, so the problem lies in the nftables.
This is probably not the right forum to continue. Or is it? Does
anybody have wide experience with nftables and sip?

Thanks

Marek


2021-09-07 10:40 GMT+02:00, Antony Stone :
> On Monday 06 September 2021 at 23:05:27, Duncan Turnbull wrote:
>
>> > On 7/09/2021, at 8:30 AM, Marek Greško  wrote:
>> >
>> > Hello,
>> >
>> > it is only local nftables with nf_conntrack_sip on the asterisk
>> > server. Probably a kernel bug? It did not trigger with previous
>> > providers since they had working SIP ALG. Now I hear no audio in both
>> > directions because outgoing rtp stream from asterisk goes to private
>> > address space and incoming stream is blocked. So the outgoing rtp
>> > could not be learnt to send to nat addess.
>>
>> Maybe a bug but that’s less likely than a config error. Time to debug your
>> nftables.
>
> Try temporarily simply turning the firewall off - allow all traffic through
> (although leave in place any NAT rules).
>
> If you then find that RTP works, you know where the problem lies.
>
>
> Antony.
>
> --
> Perfection in design is achieved not when there is nothing left to add, but
> rather when there is nothing left to take away.
>
>  - Antoine de Saint-Exupery
>
>Please reply to the list;
>  please *don't* CC
> me.
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] problems with natted phones

2021-09-06 Thread Marek Greško
Hello,

it is only local nftables with nf_conntrack_sip on the asterisk
server. Probably a kernel bug? It did not trigger with previous
providers since they had working SIP ALG. Now I hear no audio in both
directions because outgoing rtp stream from asterisk goes to private
address space and incoming stream is blocked. So the outgoing rtp
could not be learnt to send to nat addess.

Marek


2021-09-06 22:17 GMT+02:00, Duncan Turnbull :
>
>
>> On 7/09/2021, at 3:08 AM, Marek Greško  wrote:
>>
>> Hello,
>>
>> so when debugging RTP in asterisk there was no rtp income from the
>> remote site. I did check remote nat ip address and it was same as the
>> one in the pjsip show aors. So it is not due to ip address change. It
>> seems the local firewall sip module does not allow rtp stream to get
>> into. It was working previously with the other provider because of
>> working SIP ALG on their gateways. But now with this provider and
>> disabled SIP ALG it is not allowed. As I remeber in the past these
>> setups did work. What are your experiences on this?
>>
> You would need to provide a lot more explanation here. What is your
> firewall? I am assuming you configure it so find the configuration that’s
> blocking the ports and change it.
>
> My experience as before was that something is blocking rtp, now you know
> what that something is and it’s under your control so you need to check it’s
> configuration and fix it. I don’t use a sip firewall. If I have external sip
> clients I use a proxy.
>
>> Thanks
>>
>> Marek
>>
>>
>> 2021-09-06 11:50 GMT+02:00, Marek Greško :
>>> Sorry rtp set debug on showed something. So let try for the problem to
>>> arise again.
>>>
>>> Marek
>>>
>>>
>>> 2021-09-06 11:48 GMT+02:00, Marek Greško :
>>>> Hello,
>>>>
>>>>>> I would expect that when asterisk is aware of nat, it does not send
>>>>>> the rtp until it receives rtp from other side to learn the port, but
>>>>>> OK, no problem to accept the behavior.
>>>>>>
>>>>> That’s not how things work. You should google how sip rtp and Nat work
>>>>> as
>>>>> it
>>>>> will help you
>>>>
>>>> no problem if it is intended.
>>>>
>>>>>>
>>>>>>> The question is why your asterisk didn't learn the external address
>>>>>>> and
>>>>>>> port from the received rtp packet
>>>>>>>
>>>>>>> You can look at your logs with debug to see what decisions its
>>>>>>> making.
>>>>>>> You
>>>>>>> can see if different rtp ports have different results.
>>>>>>> Your phone provider has rtp on 5010 unsuccessfully and 5016
>>>>>>> successfully.
>>>>>>> Your asterisk uses rtp 13786 successfully and fails when using 18892.
>>>>>>> Is
>>>>>>> it
>>>>>>> possible your firewall is blocking port 18892 and so asterisk never
>>>>>>> sees
>>>>>>> the returned packet and can't learn from it?
>>>>>>
>>>>>> It is very unprobable. I see no reason for blocking the port. The
>>>>>> problem is asterisk never learns the correct port, so there is nothing
>>>>>> to block.
>>>>> It wasn’t what is probable, look at the asterisk logs and see what it’s
>>>>> actually doing. If asterisk never sees the reply then you will know
>>>>> something is blocking or stealing the port for some other service
>>>>
>>>> If it is stolen port for rtp, the next call would solve it, since it
>>>> will use different one, and it does not solve it.
>>>>
>>>>>>
>>>>>>>
>>>>>>> In any event you should put your debug on and look at your logs in
>>>>>>> asterisk
>>>>>>> to see what it sees and why it doesn't react to the rtp packet, if it
>>>>>>> gets
>>>>>>> it
>>>>>>
>>>>>> Could you point me how the debug should be conducted?
>>>>>
>>>>> Using the asterisk cli turn on debug for the peer and rtp and see what
>>>>> happens. Match it with the asterisk processes. You have to do this, you
>>>>> can
>>>>> look at cli or the log files, follow it through to see

Re: [asterisk-users] problems with natted phones

2021-09-06 Thread Marek Greško
Hello,

so when debugging RTP in asterisk there was no rtp income from the
remote site. I did check remote nat ip address and it was same as the
one in the pjsip show aors. So it is not due to ip address change. It
seems the local firewall sip module does not allow rtp stream to get
into. It was working previously with the other provider because of
working SIP ALG on their gateways. But now with this provider and
disabled SIP ALG it is not allowed. As I remeber in the past these
setups did work. What are your experiences on this?

Thanks

Marek


2021-09-06 11:50 GMT+02:00, Marek Greško :
> Sorry rtp set debug on showed something. So let try for the problem to
> arise again.
>
> Marek
>
>
> 2021-09-06 11:48 GMT+02:00, Marek Greško :
>> Hello,
>>
>>>> I would expect that when asterisk is aware of nat, it does not send
>>>> the rtp until it receives rtp from other side to learn the port, but
>>>> OK, no problem to accept the behavior.
>>>>
>>> That’s not how things work. You should google how sip rtp and Nat work
>>> as
>>> it
>>> will help you
>>
>> no problem if it is intended.
>>
>>>>
>>>>> The question is why your asterisk didn't learn the external address
>>>>> and
>>>>> port from the received rtp packet
>>>>>
>>>>> You can look at your logs with debug to see what decisions its making.
>>>>> You
>>>>> can see if different rtp ports have different results.
>>>>> Your phone provider has rtp on 5010 unsuccessfully and 5016
>>>>> successfully.
>>>>> Your asterisk uses rtp 13786 successfully and fails when using 18892.
>>>>> Is
>>>>> it
>>>>> possible your firewall is blocking port 18892 and so asterisk never
>>>>> sees
>>>>> the returned packet and can't learn from it?
>>>>
>>>> It is very unprobable. I see no reason for blocking the port. The
>>>> problem is asterisk never learns the correct port, so there is nothing
>>>> to block.
>>> It wasn’t what is probable, look at the asterisk logs and see what it’s
>>> actually doing. If asterisk never sees the reply then you will know
>>> something is blocking or stealing the port for some other service
>>
>> If it is stolen port for rtp, the next call would solve it, since it
>> will use different one, and it does not solve it.
>>
>>>>
>>>>>
>>>>> In any event you should put your debug on and look at your logs in
>>>>> asterisk
>>>>> to see what it sees and why it doesn't react to the rtp packet, if it
>>>>> gets
>>>>> it
>>>>
>>>> Could you point me how the debug should be conducted?
>>>
>>> Using the asterisk cli turn on debug for the peer and rtp and see what
>>> happens. Match it with the asterisk processes. You have to do this, you
>>> can
>>> look at cli or the log files, follow it through to see the rtp packet
>>> being
>>> received. Lots of debug advice on google.
>>
>> Asterisk cli did not show anything interesting. I tried pjsip set
>> logger verbose on, but no logs showed anywhere. What am I doing wrong?
>>
>> Marek
>>
>>
>>>>
>>>> Is my suspection that the problem could be caused by nat ip addres
>>>> changing reasonable? How should asterisk handle the situation?
>>> I can’t see anything to support that. Everything is looking normal
>>> except
>>> asterisk doesn’t appear to beseeing the rtp packet
>>>>
>>>> Thanks
>>>>
>>>> Marek
>>>>
>>>>
>>>>>
>>>>> Have fun, its all good learning.
>>>>>
>>>>>
>>>>>> On Sun, Sep 5, 2021 at 6:27 PM Marek Greško 
>>>>>> wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> regarding the ipv6, you see nothing about that it should be some type
>>>>>> of ipv6 tunnelling, because also MTU is lower than expected. You
>>>>>> should not see any ipv6 related communication in the sniff. Phone is
>>>>>> not aware of it.
>>>>>>
>>>>>> The asterisk's static public ip address is 198.51.100.1.
>>>>>> The remote provider's dynamic nat pool is 192.0.2.0/24. By provider
>>>>>> we
>>>>>> mean internet provider the rem

Re: [asterisk-users] problems with natted phones

2021-09-06 Thread Marek Greško
Sorry rtp set debug on showed something. So let try for the problem to
arise again.

Marek


2021-09-06 11:48 GMT+02:00, Marek Greško :
> Hello,
>
>>> I would expect that when asterisk is aware of nat, it does not send
>>> the rtp until it receives rtp from other side to learn the port, but
>>> OK, no problem to accept the behavior.
>>>
>> That’s not how things work. You should google how sip rtp and Nat work as
>> it
>> will help you
>
> no problem if it is intended.
>
>>>
>>>> The question is why your asterisk didn't learn the external address and
>>>> port from the received rtp packet
>>>>
>>>> You can look at your logs with debug to see what decisions its making.
>>>> You
>>>> can see if different rtp ports have different results.
>>>> Your phone provider has rtp on 5010 unsuccessfully and 5016
>>>> successfully.
>>>> Your asterisk uses rtp 13786 successfully and fails when using 18892.
>>>> Is
>>>> it
>>>> possible your firewall is blocking port 18892 and so asterisk never
>>>> sees
>>>> the returned packet and can't learn from it?
>>>
>>> It is very unprobable. I see no reason for blocking the port. The
>>> problem is asterisk never learns the correct port, so there is nothing
>>> to block.
>> It wasn’t what is probable, look at the asterisk logs and see what it’s
>> actually doing. If asterisk never sees the reply then you will know
>> something is blocking or stealing the port for some other service
>
> If it is stolen port for rtp, the next call would solve it, since it
> will use different one, and it does not solve it.
>
>>>
>>>>
>>>> In any event you should put your debug on and look at your logs in
>>>> asterisk
>>>> to see what it sees and why it doesn't react to the rtp packet, if it
>>>> gets
>>>> it
>>>
>>> Could you point me how the debug should be conducted?
>>
>> Using the asterisk cli turn on debug for the peer and rtp and see what
>> happens. Match it with the asterisk processes. You have to do this, you
>> can
>> look at cli or the log files, follow it through to see the rtp packet
>> being
>> received. Lots of debug advice on google.
>
> Asterisk cli did not show anything interesting. I tried pjsip set
> logger verbose on, but no logs showed anywhere. What am I doing wrong?
>
> Marek
>
>
>>>
>>> Is my suspection that the problem could be caused by nat ip addres
>>> changing reasonable? How should asterisk handle the situation?
>> I can’t see anything to support that. Everything is looking normal except
>> asterisk doesn’t appear to beseeing the rtp packet
>>>
>>> Thanks
>>>
>>> Marek
>>>
>>>
>>>>
>>>> Have fun, its all good learning.
>>>>
>>>>
>>>>> On Sun, Sep 5, 2021 at 6:27 PM Marek Greško 
>>>>> wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> regarding the ipv6, you see nothing about that it should be some type
>>>>> of ipv6 tunnelling, because also MTU is lower than expected. You
>>>>> should not see any ipv6 related communication in the sniff. Phone is
>>>>> not aware of it.
>>>>>
>>>>> The asterisk's static public ip address is 198.51.100.1.
>>>>> The remote provider's dynamic nat pool is 192.0.2.0/24. By provider we
>>>>> mean internet provider the remote phones are behind. We are not
>>>>> complaining about voip provider, we have no problem with that. Only
>>>>> communication between asterisk and remote phones behind some internet
>>>>> provider. This is the only conversation to look at.
>>>>> The phone private address is 192.168.100.235.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Marek
>>>>>
>>>>>
>>>>> 2021-09-05 1:11 GMT+02:00, Duncan Turnbull :
>>>>>>
>>>>>>
>>>>>>> On 5/09/2021, at 10:21 AM, Marek Greško  wrote:
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> could you please answer my previous question about anonymizing
>>>>>>> several
>>>>>>> parameters? I have the data ready, but will post after answer. I
>>>>>>> have
>>>>&g

Re: [asterisk-users] problems with natted phones

2021-09-06 Thread Marek Greško
Hello,

>> I would expect that when asterisk is aware of nat, it does not send
>> the rtp until it receives rtp from other side to learn the port, but
>> OK, no problem to accept the behavior.
>>
> That’s not how things work. You should google how sip rtp and Nat work as it
> will help you

no problem if it is intended.

>>
>>> The question is why your asterisk didn't learn the external address and
>>> port from the received rtp packet
>>>
>>> You can look at your logs with debug to see what decisions its making.
>>> You
>>> can see if different rtp ports have different results.
>>> Your phone provider has rtp on 5010 unsuccessfully and 5016 successfully.
>>> Your asterisk uses rtp 13786 successfully and fails when using 18892. Is
>>> it
>>> possible your firewall is blocking port 18892 and so asterisk never sees
>>> the returned packet and can't learn from it?
>>
>> It is very unprobable. I see no reason for blocking the port. The
>> problem is asterisk never learns the correct port, so there is nothing
>> to block.
> It wasn’t what is probable, look at the asterisk logs and see what it’s
> actually doing. If asterisk never sees the reply then you will know
> something is blocking or stealing the port for some other service

If it is stolen port for rtp, the next call would solve it, since it
will use different one, and it does not solve it.

>>
>>>
>>> In any event you should put your debug on and look at your logs in
>>> asterisk
>>> to see what it sees and why it doesn't react to the rtp packet, if it
>>> gets
>>> it
>>
>> Could you point me how the debug should be conducted?
>
> Using the asterisk cli turn on debug for the peer and rtp and see what
> happens. Match it with the asterisk processes. You have to do this, you can
> look at cli or the log files, follow it through to see the rtp packet being
> received. Lots of debug advice on google.

Asterisk cli did not show anything interesting. I tried pjsip set
logger verbose on, but no logs showed anywhere. What am I doing wrong?

Marek


>>
>> Is my suspection that the problem could be caused by nat ip addres
>> changing reasonable? How should asterisk handle the situation?
> I can’t see anything to support that. Everything is looking normal except
> asterisk doesn’t appear to beseeing the rtp packet
>>
>> Thanks
>>
>> Marek
>>
>>
>>>
>>> Have fun, its all good learning.
>>>
>>>
>>>> On Sun, Sep 5, 2021 at 6:27 PM Marek Greško  wrote:
>>>>
>>>> Hello,
>>>>
>>>> regarding the ipv6, you see nothing about that it should be some type
>>>> of ipv6 tunnelling, because also MTU is lower than expected. You
>>>> should not see any ipv6 related communication in the sniff. Phone is
>>>> not aware of it.
>>>>
>>>> The asterisk's static public ip address is 198.51.100.1.
>>>> The remote provider's dynamic nat pool is 192.0.2.0/24. By provider we
>>>> mean internet provider the remote phones are behind. We are not
>>>> complaining about voip provider, we have no problem with that. Only
>>>> communication between asterisk and remote phones behind some internet
>>>> provider. This is the only conversation to look at.
>>>> The phone private address is 192.168.100.235.
>>>>
>>>> Thanks
>>>>
>>>> Marek
>>>>
>>>>
>>>> 2021-09-05 1:11 GMT+02:00, Duncan Turnbull :
>>>>>
>>>>>
>>>>>> On 5/09/2021, at 10:21 AM, Marek Greško  wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> could you please answer my previous question about anonymizing several
>>>>>> parameters? I have the data ready, but will post after answer. I have
>>>>>> no clue whether I could disclose some important data not deleting
>>>>>> them.
>>>>>>
>>>>>> Regarding sdp, the address will be the internal one, since the phone
>>>>>> is behind nat and it is not aware of the nat. The provider's nat
>>>>>> device is configured as dump nat, no application tweaking is done. So
>>>>>> the asterisk will see the lan address in the sip.
>>>>>>
>>>>> There are two conversations to look at
>>>>> Provider to Asterisk
>>>>> Asterisk to Phone
>>>>> You need the 

Re: [asterisk-users] problems with natted phones

2021-09-06 Thread Marek Greško
Hello,



2021-09-06 2:51 GMT+02:00, Duncan Turnbull :
> Hi Marek
>
> I didn't understand your setup originally.
>
> Can you confirm this is correct:
>
> You provide asterisk for a number of remote phones. I assume they register
> to the asterisk
>
> Asterisk ( 198.51.100.1)  <==> Phone Provider ( 192.0.2.0/24 ) <==> Phone (
> 192.168.100.235 )
>
> Your call that fail is coming from asterisk to the phone offering G711A,
> G729, iLBC, GSM, G723 and rtp on port 18892

Exactly correct.

>
> Its unclear to me still whether the remote provider has a SIP device in
> front of the phones or just a firewall. The user agent for the reply is

It is just a firewall. I disabled SIP ALG on it. The nat is performed
probably somewhere in the provider's network. I see only ipv6 tunnel
to the provider's netwrork.

> A540 which I am not familiar with

The second phone is Cisco SPA502G. Same problems.

>
> The call that works shows the Asterisk sending to the internal ip until it
> receives rtp from the remote phone from which it learns its address and
> port and redirects the rtp to. This is fairly standard

I would expect that when asterisk is aware of nat, it does not send
the rtp until it receives rtp from other side to learn the port, but
OK, no problem to accept the behavior.


>
> For the case of the call that doesn't work, your asterisk receives the rtp
> with the external address but doesn't learn from it.

Yes exactly, but I do not undestand why. And why the reboot of the
provider's router helps to solve the problem for several days?

>
> You haven't provided the full call data  including the close down of the
> call and the registrations would have been helpful too but no matter.
>
> The question is why your asterisk didn't learn the external address and
> port from the received rtp packet
>
> You can look at your logs with debug to see what decisions its making. You
> can see if different rtp ports have different results.
> Your phone provider has rtp on 5010 unsuccessfully and 5016 successfully.
> Your asterisk uses rtp 13786 successfully and fails when using 18892. Is it
> possible your firewall is blocking port 18892 and so asterisk never sees
> the returned packet and can't learn from it?

It is very unprobable. I see no reason for blocking the port. The
problem is asterisk never learns the correct port, so there is nothing
to block.

>
> In any event you should put your debug on and look at your logs in asterisk
> to see what it sees and why it doesn't react to the rtp packet, if it gets
> it

Could you point me how the debug should be conducted?

Is my suspection that the problem could be caused by nat ip addres
changing reasonable? How should asterisk handle the situation?

Thanks

Marek


>
> Have fun, its all good learning.
>
>
> On Sun, Sep 5, 2021 at 6:27 PM Marek Greško  wrote:
>
>> Hello,
>>
>> regarding the ipv6, you see nothing about that it should be some type
>> of ipv6 tunnelling, because also MTU is lower than expected. You
>> should not see any ipv6 related communication in the sniff. Phone is
>> not aware of it.
>>
>> The asterisk's static public ip address is 198.51.100.1.
>> The remote provider's dynamic nat pool is 192.0.2.0/24. By provider we
>> mean internet provider the remote phones are behind. We are not
>> complaining about voip provider, we have no problem with that. Only
>> communication between asterisk and remote phones behind some internet
>> provider. This is the only conversation to look at.
>> The phone private address is 192.168.100.235.
>>
>> Thanks
>>
>> Marek
>>
>>
>> 2021-09-05 1:11 GMT+02:00, Duncan Turnbull :
>> >
>> >
>> >> On 5/09/2021, at 10:21 AM, Marek Greško  wrote:
>> >>
>> >> Hello,
>> >>
>> >> could you please answer my previous question about anonymizing several
>> >> parameters? I have the data ready, but will post after answer. I have
>> >> no clue whether I could disclose some important data not deleting
>> >> them.
>> >>
>> >> Regarding sdp, the address will be the internal one, since the phone
>> >> is behind nat and it is not aware of the nat. The provider's nat
>> >> device is configured as dump nat, no application tweaking is done. So
>> >> the asterisk will see the lan address in the sip.
>> >>
>> > There are two conversations to look at
>> > Provider to Asterisk
>> > Asterisk to Phone
>> > You need the packet captures of both.
>> >
>> > Your statements are mixing them up
>> >
>> > I don’t know what you mean by LAN addr

Re: [asterisk-users] problems with natted phones

2021-09-05 Thread Marek Greško
Hello,

regarding the ipv6, you see nothing about that it should be some type
of ipv6 tunnelling, because also MTU is lower than expected. You
should not see any ipv6 related communication in the sniff. Phone is
not aware of it.

The asterisk's static public ip address is 198.51.100.1.
The remote provider's dynamic nat pool is 192.0.2.0/24. By provider we
mean internet provider the remote phones are behind. We are not
complaining about voip provider, we have no problem with that. Only
communication between asterisk and remote phones behind some internet
provider. This is the only conversation to look at.
The phone private address is 192.168.100.235.

Thanks

Marek


2021-09-05 1:11 GMT+02:00, Duncan Turnbull :
>
>
>> On 5/09/2021, at 10:21 AM, Marek Greško  wrote:
>>
>> Hello,
>>
>> could you please answer my previous question about anonymizing several
>> parameters? I have the data ready, but will post after answer. I have
>> no clue whether I could disclose some important data not deleting
>> them.
>>
>> Regarding sdp, the address will be the internal one, since the phone
>> is behind nat and it is not aware of the nat. The provider's nat
>> device is configured as dump nat, no application tweaking is done. So
>> the asterisk will see the lan address in the sip.
>>
> There are two conversations to look at
> Provider to Asterisk
> Asterisk to Phone
> You need the packet captures of both.
>
> Your statements are mixing them up
>
> I don’t know what you mean by LAN address, that’s an ambiguous term. The ip
> your asterisk receives from the provider should be the providers external ip
> or in the sdp the external address of the media server which may or may not
> be the same device
>
>> In the working scenario it is sending rtp packets to the internal
>> address which is wrong, but after receiving cca 5 rtp packets from the
>> phone it somehow discovers correct nat ip/port and switches to it. In
>> non-working scenario it never switches and still sends to the lan
>> address. Strange there is no audio, even one direction. Another
>> strange thing is there are 2 phones (different vendors) behind the
>> same nat and the problem appearance on them is independent, sometimes
>> the first has problem, sometimes the second and sometimes both.
>>
>> The tcpdumps are made on the asterisk side. I have currently no means
>> of capturing on phone side.
>>
>> Marek
>>
>> 2021-09-04 23:56 GMT+02:00, Antony Stone
>> :
>>>> On Saturday 04 September 2021 at 22:13:32, Marek Greško wrote:
>>>>
>>>> Hello,
>>>>
>>>> I agree my knowledge of SIP itself is poor, but I have quite well
>>>> general tcp/ip understanding. What sip parameters should be
>>>> anonymized? How about tag, branch, call-id, cseq values?
>>>
>>> Show us your packet captures with meaningful addresses (not necessarily
>>> accurate ones, but at least unambiguous - see my previous suggestion re
>>> RFC5737) and we can help you to understand them and what they mean.
>>>
>>>
>>> Antony.
>>>
>>> --
>>> Heisenberg, Gödel, and Chomsky walk in to a bar.
>>> Heisenberg says, "Clearly this is a joke, but how can we work out if it's
>>> funny or not?"
>>> Gödel replies, "We can't know that because we're inside the joke."
>>> Chomsky says, "Of course it's funny. You're just saying it wrong."
>>>
>>>   Please reply to the
>>> list;
>>> please *don't* CC
>>> me.
>>>
>>> --
>>> _
>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>
>>> Check out the new Asterisk community forum at:
>>> https://community.asterisk.org/
>>>
>>> New to Asterisk? Start here:
>>>  https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>>
>>> asterisk-users mailing list
>>> To UNSUBSCRIBE or update options visit:
>>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>> --
>> _
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> Check out the new Asterisk community forum at:
>> https://community.asterisk.org/
>>
>> New to Asterisk? Start here:
>>  https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>

Re: [asterisk-users] problems with natted phones

2021-09-04 Thread Marek Greško
Hello,

I first tried to communicate to internet provider but without any
result. They told me I should find problem on my side. It does not
seem the provider is blocking SIP, since it is working for some time
and then stops. But I suspect the problem could be the NAT address
change. The provider offers only some IPv6 tunnel to his network and
the NAT is done probably on other property, I am not sure. But the
local provider's router does not possess any ipv4 address on the
external interface, only ipv6. I noticed the change now, when
anonymizing the tcpdumps. But the working scenario is after reboot, so
the ip address change is expected, but I cannot guarantee it does not
change in time. Maybe my previous expectation it is caused by asterisk
reboot was misleading. Could this be the cause? If yes, are there any
means how to overcome it on the asterisk side? I attached the
tcpdumps. Do you see something inconsistent in it?

By algorithms I meant when the router actively translates the sip
payload to change the lan addresses to the natted one.

Thanks

Marek

2021-09-05 0:40 GMT+02:00, Antony Stone :
> On Thursday 08 July 2021 at 20:57:30, Marek Greško wrote:
>
>> Hello,
>>
>> I have an asterisk setup using pjsip. Everything used to work
>> correctly until one remote site changed internet provider and thier
>> router does not support sip protocol algorithms.
>
> I'm slightly bothered by the word "algorithms" in that comment, but I do
> wonder whether it simply means that this is a connectivity provider
> (possibly
> a mobile phone network?) which actively blocks SIP.
>
> Some of them (in my experience) do this by blocking UDP port 5060, but
> others
> are more subtle about it, and (for example) block the authentication
> responses
> to a Register request, thereby meaning that UDP port 5060 is in general
> accessible, but any attempt to Register to it using SIP will fail.
>
> Have you asked the new Internet connectivity provider whether they support
> or
> block SIP across their network?
>
>
> Antony
>
> --
> "Remember: the S in IoT stands for Security."
>
>  - Jan-Piet Mens
>
>Please reply to the list;
>  please *don't* CC
> me.
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
21:39:47.710512 IP 192.0.2.1.32260 > 198.51.100.1.5060: SIP


21:39:49.950775 IP 198.51.100.1.5060 > 192.0.2.1.32260: SIP: INVITE 
sip:999@192.0.2.1:32260 SIP/2.0
INVITE sip:999@192.0.2.1:32260 SIP/2.0
Via: SIP/2.0/UDP 
198.51.100.1:5060;rport;branch=z9hG4bKPjf0991750-2e98-4f19-9749-c4eee08a4e37
From: ;tag=e842dd73-cda0-45f5-81a7-a8fcc1472ac9
To: 
Contact: 
Call-ID: 603c61b6-5679-452a-aafa-0436f8d8b672
CSeq: 19604 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
Max-Forwards: 70
User-Agent: Asterisk PBX 18.2.0
Content-Type: application/sdp
Content-Length:   376

v=0
o=- 121003081 121003081 IN IP4 198.51.100.1
s=Asterisk
c=IN IP4 198.51.100.1
t=0 0
m=audio 13786 RTP/AVP 8 18 97 3 4 101
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=20
a=rtpmap:3 GSM/8000
a=rtpmap:4 G723/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

21:39:50.022921 IP 192.0.2.1.32260 > 198.51.100.1.5060: SIP: SIP/2.0 100 Trying
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 
198.51.100.1:5060;rport=5060;branch=z9hG4bKPjf0991750-2e98-4f19-9749-c4eee08a4e37
From: ;tag=e842dd73-cda0-45f5-81a7-a8fcc1472ac9
To: ;tag=1427222172
Call-ID: 603c61b6-5679-452a-aafa-0436f8d8b672
CSeq: 19604 INVITE
Contact: 
User-Agent: A540 IP/42.247.00.000.000
Content-Length: 0


21:39:50.559818 IP 192.0.2.1.32260 > 198.51.100.1.5060: SIP


21:39:50.563295 IP 192.0.2.1.32260 > 198.51.100.1.5060: SIP


21:39:50.568182 IP 192.0.2.1.32260 > 198.51.100.1.5060: SIP: SIP/2.0 180 Ringing
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 
198.51.100.1:5060;rport=5060;branch=z9hG4bKPjf0991750-2e98-4f19-9749-c4eee08a4e37
From: ;tag=e842dd73-cda0-45f5-81a7-a8fcc1472ac9
To: ;tag=1427222172
Call-ID: 603c61b6-5679-452a-aafa-0436f8d8b672
CSeq: 19604 INVITE
Contact: 
Allow-Events: message-summary, refer, ua-profile, talk, check-sync
User-Agent: A540 IP/42.247.00.000.0

Re: [asterisk-users] problems with natted phones

2021-09-04 Thread Marek Greško
Hello,

could you please answer my previous question about anonymizing several
parameters? I have the data ready, but will post after answer. I have
no clue whether I could disclose some important data not deleting
them.

Regarding sdp, the address will be the internal one, since the phone
is behind nat and it is not aware of the nat. The provider's nat
device is configured as dump nat, no application tweaking is done. So
the asterisk will see the lan address in the sip.

In the working scenario it is sending rtp packets to the internal
address which is wrong, but after receiving cca 5 rtp packets from the
phone it somehow discovers correct nat ip/port and switches to it. In
non-working scenario it never switches and still sends to the lan
address. Strange there is no audio, even one direction. Another
strange thing is there are 2 phones (different vendors) behind the
same nat and the problem appearance on them is independent, sometimes
the first has problem, sometimes the second and sometimes both.

The tcpdumps are made on the asterisk side. I have currently no means
of capturing on phone side.

Marek

2021-09-04 23:56 GMT+02:00, Antony Stone :
> On Saturday 04 September 2021 at 22:13:32, Marek Greško wrote:
>
>> Hello,
>>
>> I agree my knowledge of SIP itself is poor, but I have quite well
>> general tcp/ip understanding. What sip parameters should be
>> anonymized? How about tag, branch, call-id, cseq values?
>
> Show us your packet captures with meaningful addresses (not necessarily
> accurate ones, but at least unambiguous - see my previous suggestion re
> RFC5737) and we can help you to understand them and what they mean.
>
>
> Antony.
>
> --
> Heisenberg, Gödel, and Chomsky walk in to a bar.
> Heisenberg says, "Clearly this is a joke, but how can we work out if it's
> funny or not?"
> Gödel replies, "We can't know that because we're inside the joke."
> Chomsky says, "Of course it's funny. You're just saying it wrong."
>
>Please reply to the list;
>  please *don't* CC
> me.
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] problems with natted phones

2021-09-04 Thread Marek Greško
Hello,

I agree my knowledge of SIP itself is poor, but I have quite well
general tcp/ip understanding. What sip parameters should be
anonymized? How about tag, branch, call-id, cseq values?

Thanks

Marek


2021-09-04 12:36 GMT+02:00, Duncan Turnbull :
>
>
>> On 4/09/2021, at 8:55 PM, Marek Greško  wrote:
>>
>> Ok,
>>
>> let substitute lan for 192.168.100.235, provider with 192.0.2.1 and
>> asterisk with 198.51.100.1.
>
> Can you provide the previous packet details with these addresses filled in
>>
>> In the working scenario understand that asterisk is not aware of the
>> providers ip address
> If the call goes provider - asterisk - phone then asterisk is absolutely
> aware of the provider ip. I think you need to get more familiar with sip and
> rtp
>
>> 192.0.2.1 in the sip protocol, and it should pick
>> it from the network layer. It is harder to calcutale port, so it
>> should probably listen for incoming rtp stream?
>
> The sdp in the sip packet tells the rtp ip and port to connect to
>> Until then it is just
>> sending to private address? But I thing it is futile, since it is
>> known from the sip protocol there is nat involved and thus the packets
>> are destined to nowhere.
>
> You need to realise that this works normally everyday all over the place so
> what you are imagining is incorrect
>>
>> But I still cannot imagine what goes wrong in non working scenario and
>> how the asterisk reboot (not every one and not sure this is the real
>> trigger). The sip communication seems identical to me. The provider's
>> router does not touch SIP now as observed after disabling SIP ALG.
>
> It is very unclear as to how you are justifying these statements. You don’t
> yet understand how sip and call setup with media works. If you provide the
> whole sip packet capture with the substituted ips it should be easier to
> point out where the error is
>
> You need to be really clear on what’s ip
> is what and where the conversations are captured
>
> It will become clear once you provide all the details
>
>
>>
>> Thanks
>>
>> Marek
>>
>> 2021-09-04 0:40 GMT+02:00, Antony Stone
>> :
>>> On Saturday 04 September 2021 at 00:34:49, Duncan Turnbull wrote:
>>>
>>>>>> On 4/09/2021, at 7:53 AM, Marek Greško  wrote:
>>>>>>
>>>>>> So you suspect something is messing up SIP protocol? Maybe the phone
>>>>>> itself is not working properly. The phone itself is not aware of the
>>>>>> internet address, so is sending lan private address in the sip
>>>>>> protocol.
>>>>
>>>> I doubt it’s the phone. You need to check your data again and ideally
>>>> explain what you mean by the names you have substituted for the ip
>>>> addresses
>>>
>>> My advice (regarding the IP addresses) is:
>>>
>>> - where you have https://tools.ietf.org/html/rfc1918 addresses, leave
>>> them
>>> as
>>> they are - you're not giving away any sensitive information by telling us
>>> about your internal addresses which can't be routed over the Internet
>>>
>>> - where you have public addresses and would prefer not to reveal what
>>> these
>>> are, substitute with https://tools.ietf.org/html/rfc5737 addresses
>>> instead.
>>>
>>> - always ensure that you substitute address A in the same way each time,
>>> and
>>> address B, etc.
>>>
>>>
>>> Antony.
>>>
>>> --
>>> You can spend the whole of your life trying to be popular,
>>> but at the end of the day the size of the crowd at your funeral
>>> will be largely dictated by the weather.
>>>
>>> - Frank Skinner
>>>
>>>   Please reply to the
>>> list;
>>> please *don't* CC
>>> me.
>>>
>>> --
>>> _
>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>
>>> Check out the new Asterisk community forum at:
>>> https://community.asterisk.org/
>>>
>>> New to Asterisk? Start here:
>>>  https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>>
>>> asterisk-users mailing list
>>> To UNSUBSCRIBE or update options visit:
>>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>> --
>> __

Re: [asterisk-users] problems with natted phones

2021-09-04 Thread Marek Greško
Ok,

let substitute lan for 192.168.100.235, provider with 192.0.2.1 and
asterisk with 198.51.100.1.

In the working scenario understand that asterisk is not aware of the
providers ip address 192.0.2.1 in the sip protocol, and it should pick
it from the network layer. It is harder to calcutale port, so it
should probably listen for incoming rtp stream? Until then it is just
sending to private address? But I thing it is futile, since it is
known from the sip protocol there is nat involved and thus the packets
are destined to nowhere.

But I still cannot imagine what goes wrong in non working scenario and
how the asterisk reboot (not every one and not sure this is the real
trigger). The sip communication seems identical to me. The provider's
router does not touch SIP now as observed after disabling SIP ALG.

Thanks

Marek

2021-09-04 0:40 GMT+02:00, Antony Stone :
> On Saturday 04 September 2021 at 00:34:49, Duncan Turnbull wrote:
>
>> > On 4/09/2021, at 7:53 AM, Marek Greško  wrote:
>> >
>> > So you suspect something is messing up SIP protocol? Maybe the phone
>> > itself is not working properly. The phone itself is not aware of the
>> > internet address, so is sending lan private address in the sip
>> > protocol.
>>
>> I doubt it’s the phone. You need to check your data again and ideally
>> explain what you mean by the names you have substituted for the ip
>> addresses
>
> My advice (regarding the IP addresses) is:
>
>  - where you have https://tools.ietf.org/html/rfc1918 addresses, leave them
> as
> they are - you're not giving away any sensitive information by telling us
> about your internal addresses which can't be routed over the Internet
>
>  - where you have public addresses and would prefer not to reveal what these
> are, substitute with https://tools.ietf.org/html/rfc5737 addresses instead.
>
>  - always ensure that you substitute address A in the same way each time,
> and
> address B, etc.
>
>
> Antony.
>
> --
> You can spend the whole of your life trying to be popular,
> but at the end of the day the size of the crowd at your funeral
> will be largely dictated by the weather.
>
>  - Frank Skinner
>
>Please reply to the list;
>  please *don't* CC
> me.
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] problems with natted phones

2021-09-03 Thread Marek Greško
So you suspect something is messing up SIP protocol? Maybe the phone
itself is not working properly. The phone itself is not aware of the
internet address, so is sending lan private address in the sip
protocol. I would expect asterisk itself is pairing the provider
address with the lan address. I was asked to disable all the SIP ALG
on the provider's router in the previous discussion. And it made a big
improvement in the experience.

Marek

2021-09-03 12:19 GMT+02:00, Duncan Turnbull :
> On Fri, Sep 3, 2021 at 8:47 PM Marek Greško  wrote:
>
>> Hello,
>>
>> I looked into tcpdumps. When problem starts (after some asterisk
>> reboot) the call looks like this:
>>
>> provider:25298 -> asterisk:5060
>> SIP: SIP/2.0 200 OK
>> Via: SIP/2.0/UDP asterisk:5060;rport=5060;branch=...
>> From: ;tag=...
>> To: ;tag=...
>> Call-ID: ...
>> CSeq: ... INVITE
>> Contact: 
>> Supported: replaces
>> Allow-Events: message-sumary, refer, ua-profile, talk, check-sync
>> Allow: INVITE, ACK, CANCEL, BYE, OPTIONS. INFO, SUBSCRIBE, NOTIFY, REFER,
>> UPDATE
>> Content-Type: application/sdp
>> Content-Length: ...
>>
>> v=0
>> o=... 5010 ... IN IP4 lan
>> s=Mapping
>>
> 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
>
>
>> c=IN IP4 lan
>> t=0 0
>> m=audio 5010 RTP/AVP 8 101
>> a=rtpmap:8 PCMA/8000
>> a=rtpmap:101 telephone-event/8000
>> a=fmtp:101 0-16
>> a=sendrcv
>> a=ptime:20
>>
>> asterisk:5060 -> provider:25298
>> Via: SIP/2.0/UDP asterisk:5060;rport=5060;branch=...
>> From: ;tag=...
>> To: ;tag=...
>> Call-ID: ...
>> CSeq: ... ACK
>> Max-Forwards: 70
>> User-Agent: Asterisk PBX 18.2.0
>> Content-Length: 0
>>
>> Then I see RTP packets:
>> asterisk:18892 -> lan:5010
>> provider:25420 -> asterisk:18892
>>
> 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
>
> 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
>
>
>>
>> I hear no audio. I heard stream towards the asterisk prior to SIP ALG
>> disabling. Now silence both directions. It should not be a codec
>> problem. After providers router reboot I can hear both directions but
>> it still seems weird:
>>
>> provider:32260 -> asterisk:5060
>> SIP: SIP/2.0 200 OK
>> Via: SIP/2.0/UDP asterisk:5060;rport=5060;branch=...
>> From: ;tag=...
>> To: ;tag=...
>> Call-ID: ...
>> CSeq: ... INVITE
>> Contact: 
>> Supported: replaces
>> Allow-Events: message-sumary, refer, ua-profile, talk, check-sync
>> Allow: INVITE, ACK, CANCEL, BYE, OPTIONS. INFO, SUBSCRIBE, NOTIFY, REFER,
>> UPDATE
>> Content-Type: application/sdp
>> Content-Length: ...
>>
>> v=0
>> o=... 5016 ... IN IP4 lan
>> s=Mapping
>> c=IN IP4 lan
>> t=0 0
>> m=audio 5016 RTP/AVP 8 101
>> a=rtpmap:8 PCMA/8000
>> a=rtpmap:101 telephone-event/8000
>> a=fmtp:101 0-16
>> a=sendrcv
>> a=ptime:20
>>
>> asterisk:5060 -> provider:32260
>> Via: SIP/2.0/UDP asterisk:5060;rport=5060;branch=...
>> From: ;tag=...
>> To: ;tag=...
>> Call-ID: ...
>> CSeq: ... ACK
>> Max-Forwards: 70
>> User-Agent: Asterisk PBX 18.2.0
>> Content-Length: 0
>>
>> Then I see several RTP packets:
>> asterisk:13786 -> lan:5016
>> provider:32327 -> asterisk:13786
>> for a while and the suddenly
>> asterisk:13786 -> provider:32327
>> provider:32327 -> asterisk:13786
>>
>> The user experience for that scenario is OK.
>>
>> I suspect some configuration error on asterisk side, since also for
>> working scenario I see RTP packets to the lan. But I cannot figure out
>> what it is. When I was using another provider which had working SIP
>> ALG I had no problem even without nat configuration on the asterisk
>> side.
>>
>> The experience is clearly better after disabling SIP ALG, but we still
>> face problems after asterisk side reboots.
>>
>> Could you point me for what should I look in the asterisk
>> configuration? And why the problems are gone after provider's router
>

Re: [asterisk-users] problems with natted phones

2021-09-03 Thread Marek Greško
Hello,

I looked into tcpdumps. When problem starts (after some asterisk
reboot) the call looks like this:

provider:25298 -> asterisk:5060
SIP: SIP/2.0 200 OK
Via: SIP/2.0/UDP asterisk:5060;rport=5060;branch=...
From: ;tag=...
To: ;tag=...
Call-ID: ...
CSeq: ... INVITE
Contact: 
Supported: replaces
Allow-Events: message-sumary, refer, ua-profile, talk, check-sync
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS. INFO, SUBSCRIBE, NOTIFY, REFER, UPDATE
Content-Type: application/sdp
Content-Length: ...

v=0
o=... 5010 ... IN IP4 lan
s=Mapping
c=IN IP4 lan
t=0 0
m=audio 5010 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrcv
a=ptime:20

asterisk:5060 -> provider:25298
Via: SIP/2.0/UDP asterisk:5060;rport=5060;branch=...
From: ;tag=...
To: ;tag=...
Call-ID: ...
CSeq: ... ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 18.2.0
Content-Length: 0

Then I see RTP packets:
asterisk:18892 -> lan:5010
provider:25420 -> asterisk:18892

I hear no audio. I heard stream towards the asterisk prior to SIP ALG
disabling. Now silence both directions. It should not be a codec
problem. After providers router reboot I can hear both directions but
it still seems weird:

provider:32260 -> asterisk:5060
SIP: SIP/2.0 200 OK
Via: SIP/2.0/UDP asterisk:5060;rport=5060;branch=...
From: ;tag=...
To: ;tag=...
Call-ID: ...
CSeq: ... INVITE
Contact: 
Supported: replaces
Allow-Events: message-sumary, refer, ua-profile, talk, check-sync
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS. INFO, SUBSCRIBE, NOTIFY, REFER, UPDATE
Content-Type: application/sdp
Content-Length: ...

v=0
o=... 5016 ... IN IP4 lan
s=Mapping
c=IN IP4 lan
t=0 0
m=audio 5016 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrcv
a=ptime:20

asterisk:5060 -> provider:32260
Via: SIP/2.0/UDP asterisk:5060;rport=5060;branch=...
From: ;tag=...
To: ;tag=...
Call-ID: ...
CSeq: ... ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 18.2.0
Content-Length: 0

Then I see several RTP packets:
asterisk:13786 -> lan:5016
provider:32327 -> asterisk:13786
for a while and the suddenly
asterisk:13786 -> provider:32327
provider:32327 -> asterisk:13786

The user experience for that scenario is OK.

I suspect some configuration error on asterisk side, since also for
working scenario I see RTP packets to the lan. But I cannot figure out
what it is. When I was using another provider which had working SIP
ALG I had no problem even without nat configuration on the asterisk
side.

The experience is clearly better after disabling SIP ALG, but we still
face problems after asterisk side reboots.

Could you point me for what should I look in the asterisk
configuration? And why the problems are gone after provider's router
reboot?

Thanks

Marek



2021-08-13 15:31 GMT+02:00, Duncan Turnbull :
>
>>Hello,
>>
>>it triggered again. Even disabling RTSp ALG did not help. My fantasy
>>ends here. It agains seems to be reboot triggered on asterisk side.
>>Not every one. But there was surely one before it was last working.
>>Reboot of the router on the phone side fixes the problem. Any other
>>suggestions?
>>
> This is where you use sngrep or tcpdump to look at whats actually
> happening on the asterisk box. sngrep is focussed on sip dialogs and is
> probably easier than tcpdump when you are just interested in sip
>
> If you use sngrep on the asterisk server sip port you will see the SIP
> packet flows for registration and call setups. You can check the
> addresses given out for rtp to respond to and the codecs. Is an address
> incorrect? Is a code incorrect? You will see in the session description
> protocol what codecs the client is requesting and what the replies are
>
> asterisk works well around the world with many nat scenarios so I
> imagine its either config or firewall. A firewall with ALGs is often
> problematic but your log suggests a lack of negotiation of agreed
> codecs.
>
> Good luck, you will learn some interesting things.
>
>
>
>>
>>Thanks
>>
>>Marek
>>
>>
>>2021-07-26 9:31 GMT+02:00, Marek Greško :
>>>  I currently disabled also RTSP ALG and rebooted the router. Fixed for
>>>  now. I do not know for how long.
>>>
>>>  Marek
>>>
>>>
>>>  2021-07-26 8:54 GMT+02:00, Marek Greško :
>>>>  Hmm, back to original problem. My happines was premature. Today one of
>>>>  the phones have no audio again. I see packets from lan segment again.
>>>>
>>>>  I double checked the router configuration. SIP ALG is disabled. There
>>>>  are also another ALGs present:
>>>>
>>>>  NAT ALG
>>>>  RTSP ALG
>>>>  PPTP ALG
>>>>  IPSEC ALG
>>>>
>>>>  Which of them are neede to be disab

Re: [asterisk-users] problems with natted phones

2021-08-10 Thread Marek Greško
Hello,

it triggered again. Even disabling RTSp ALG did not help. My fantasy
ends here. It agains seems to be reboot triggered on asterisk side.
Not every one. But there was surely one before it was last working.
Reboot of the router on the phone side fixes the problem. Any other
suggestions?

Thanks

Marek


2021-07-26 9:31 GMT+02:00, Marek Greško :
> I currently disabled also RTSP ALG and rebooted the router. Fixed for
> now. I do not know for how long.
>
> Marek
>
>
> 2021-07-26 8:54 GMT+02:00, Marek Greško :
>> Hmm, back to original problem. My happines was premature. Today one of
>> the phones have no audio again. I see packets from lan segment again.
>>
>> I double checked the router configuration. SIP ALG is disabled. There
>> are also another ALGs present:
>>
>> NAT ALG
>> RTSP ALG
>> PPTP ALG
>> IPSEC ALG
>>
>> Which of them are neede to be disabled?
>>
>> As of my observations these problems are triggered by reboots on
>> asterisk side. How could this be related? (I may be wrong.)
>>
>> Thanks
>>
>> Marek
>>
>>
>>
>> 2021-07-23 14:54 GMT+02:00, Marek Greško :
>>> I achieved a partial success adding --use-compact-form option.
>>>
>>> Marek
>>>
>>>
>>> 2021-07-23 13:47 GMT+02:00, Marek Greško :
>>>> Hello,
>>>>
>>>> your suggestion to turn off SIP ALG on provider's router was probably
>>>> correct. no problem until now. Thank you very much.
>>>>
>>>> I just found out another issue. I had a pjsue client in that network
>>>> which called specific number when turned on. It was working perfectly
>>>> with the old provider with working SIP ALG. But now with this provider
>>>> and SIP ALG disabled I am not able to make the call using pjsua
>>>> client.
>>>>
>>>> My pjsua config looks like this:
>>>> --id sip:ext@asterisk.domain
>>>> --registrar sip:asterisk.domain
>>>> --proxy sip:asterisk.domain
>>>> --outbound sip:asterisk.domain
>>>> --realm *
>>>> --username username
>>>> --password password
>>>> --null-audio
>>>> --no-tcp
>>>> --max-calls=1
>>>> --no-vad
>>>>
>>>> The pjsua client successfully registers but is unable to call.
>>>>
>>>> I see the following:
>>>> IP address change detected for account 1
>>>> (localip:5060-->nattedip:newport). Updating registration (using method
>>>> 4)
>>>> Temporary failure in sending Request msg INVITE/cseq=, will try
>>>> next server: Unsupported transport (PJSIP_EUNSUPTRANSPORT)
>>>>
>>>> What could be the problem? How can I convince pjsue to work correctly
>>>> behind nat?
>>>>
>>>> Thanks
>>>>
>>>> Marek
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 2021-07-10 11:08 GMT+02:00, Marek Greško :
>>>>> Hello,
>>>>>
>>>>> I just disabled. Currently it is working. I shloud give it some time
>>>>> to confirm the problem has gone. Maybe one month would be enough to
>>>>> confirm.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Marek
>>>>>
>>>>>
>>>>> 2021-07-09 20:11 GMT+02:00, Abdenasser Ghomri
>>>>> :
>>>>>> Yes just disable the SIP ALG and see if it helps, Thanks.
>>>>>>
>>>>>> Best Regards,
>>>>>>
>>>>>> On Fri, Jul 9, 2021, 09:10 Antony Stone <
>>>>>> antony.st...@asterisk.open.source.it> wrote:
>>>>>>
>>>>>>> On Friday 09 July 2021 at 08:47:46, Marek Greško wrote:
>>>>>>>
>>>>>>> > Hello,
>>>>>>> >
>>>>>>> > yes SIP ALG are anbled on the router. Should I disable?
>>>>>>>
>>>>>>> In my opinion, always.
>>>>>>>
>>>>>>> Antony.
>>>>>>>
>>>>>>> --
>>>>>>> I don't know, maybe if we all waited then cosmic rays would write
>>>>>>> all
>>>>>>> our
>>>>>>> software for us. Of course it might take a while.
>>>>>>>
>>>>>>>  - Ron Minnich, Los Alamos National Laboratory
>>>>>>>
>>>>>>>Please reply to
>>>>>>> the
>>>>>>> list;
>>>>>>>  please
>>>>>>> *don't*
>>>>>>> CC
>>>>>>> me.
>>>>>>>
>>>>>>> --
>>>>>>> _
>>>>>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com
>>>>>>> --
>>>>>>>
>>>>>>> Check out the new Asterisk community forum at:
>>>>>>> https://community.asterisk.org/
>>>>>>>
>>>>>>> New to Asterisk? Start here:
>>>>>>>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>>>>>>
>>>>>>> asterisk-users mailing list
>>>>>>> To UNSUBSCRIBE or update options visit:
>>>>>>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>>>>>
>>>>>
>>>>
>>>
>>
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] problems with natted phones

2021-07-26 Thread Marek Greško
I currently disabled also RTSP ALG and rebooted the router. Fixed for
now. I do not know for how long.

Marek


2021-07-26 8:54 GMT+02:00, Marek Greško :
> Hmm, back to original problem. My happines was premature. Today one of
> the phones have no audio again. I see packets from lan segment again.
>
> I double checked the router configuration. SIP ALG is disabled. There
> are also another ALGs present:
>
> NAT ALG
> RTSP ALG
> PPTP ALG
> IPSEC ALG
>
> Which of them are neede to be disabled?
>
> As of my observations these problems are triggered by reboots on
> asterisk side. How could this be related? (I may be wrong.)
>
> Thanks
>
> Marek
>
>
>
> 2021-07-23 14:54 GMT+02:00, Marek Greško :
>> I achieved a partial success adding --use-compact-form option.
>>
>> Marek
>>
>>
>> 2021-07-23 13:47 GMT+02:00, Marek Greško :
>>> Hello,
>>>
>>> your suggestion to turn off SIP ALG on provider's router was probably
>>> correct. no problem until now. Thank you very much.
>>>
>>> I just found out another issue. I had a pjsue client in that network
>>> which called specific number when turned on. It was working perfectly
>>> with the old provider with working SIP ALG. But now with this provider
>>> and SIP ALG disabled I am not able to make the call using pjsua
>>> client.
>>>
>>> My pjsua config looks like this:
>>> --id sip:ext@asterisk.domain
>>> --registrar sip:asterisk.domain
>>> --proxy sip:asterisk.domain
>>> --outbound sip:asterisk.domain
>>> --realm *
>>> --username username
>>> --password password
>>> --null-audio
>>> --no-tcp
>>> --max-calls=1
>>> --no-vad
>>>
>>> The pjsua client successfully registers but is unable to call.
>>>
>>> I see the following:
>>> IP address change detected for account 1
>>> (localip:5060-->nattedip:newport). Updating registration (using method
>>> 4)
>>> Temporary failure in sending Request msg INVITE/cseq=, will try
>>> next server: Unsupported transport (PJSIP_EUNSUPTRANSPORT)
>>>
>>> What could be the problem? How can I convince pjsue to work correctly
>>> behind nat?
>>>
>>> Thanks
>>>
>>> Marek
>>>
>>>
>>>
>>>
>>>
>>> 2021-07-10 11:08 GMT+02:00, Marek Greško :
>>>> Hello,
>>>>
>>>> I just disabled. Currently it is working. I shloud give it some time
>>>> to confirm the problem has gone. Maybe one month would be enough to
>>>> confirm.
>>>>
>>>> Thanks
>>>>
>>>> Marek
>>>>
>>>>
>>>> 2021-07-09 20:11 GMT+02:00, Abdenasser Ghomri
>>>> :
>>>>> Yes just disable the SIP ALG and see if it helps, Thanks.
>>>>>
>>>>> Best Regards,
>>>>>
>>>>> On Fri, Jul 9, 2021, 09:10 Antony Stone <
>>>>> antony.st...@asterisk.open.source.it> wrote:
>>>>>
>>>>>> On Friday 09 July 2021 at 08:47:46, Marek Greško wrote:
>>>>>>
>>>>>> > Hello,
>>>>>> >
>>>>>> > yes SIP ALG are anbled on the router. Should I disable?
>>>>>>
>>>>>> In my opinion, always.
>>>>>>
>>>>>> Antony.
>>>>>>
>>>>>> --
>>>>>> I don't know, maybe if we all waited then cosmic rays would write all
>>>>>> our
>>>>>> software for us. Of course it might take a while.
>>>>>>
>>>>>>  - Ron Minnich, Los Alamos National Laboratory
>>>>>>
>>>>>>Please reply to
>>>>>> the
>>>>>> list;
>>>>>>  please
>>>>>> *don't*
>>>>>> CC
>>>>>> me.
>>>>>>
>>>>>> --
>>>>>> _
>>>>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>>>>
>>>>>> Check out the new Asterisk community forum at:
>>>>>> https://community.asterisk.org/
>>>>>>
>>>>>> New to Asterisk? Start here:
>>>>>>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>>>>>
>>>>>> asterisk-users mailing list
>>>>>> To UNSUBSCRIBE or update options visit:
>>>>>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>>>>
>>>>
>>>
>>
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] problems with natted phones

2021-07-26 Thread Marek Greško
Hmm, back to original problem. My happines was premature. Today one of
the phones have no audio again. I see packets from lan segment again.

I double checked the router configuration. SIP ALG is disabled. There
are also another ALGs present:

NAT ALG
RTSP ALG
PPTP ALG
IPSEC ALG

Which of them are neede to be disabled?

As of my observations these problems are triggered by reboots on
asterisk side. How could this be related? (I may be wrong.)

Thanks

Marek



2021-07-23 14:54 GMT+02:00, Marek Greško :
> I achieved a partial success adding --use-compact-form option.
>
> Marek
>
>
> 2021-07-23 13:47 GMT+02:00, Marek Greško :
>> Hello,
>>
>> your suggestion to turn off SIP ALG on provider's router was probably
>> correct. no problem until now. Thank you very much.
>>
>> I just found out another issue. I had a pjsue client in that network
>> which called specific number when turned on. It was working perfectly
>> with the old provider with working SIP ALG. But now with this provider
>> and SIP ALG disabled I am not able to make the call using pjsua
>> client.
>>
>> My pjsua config looks like this:
>> --id sip:ext@asterisk.domain
>> --registrar sip:asterisk.domain
>> --proxy sip:asterisk.domain
>> --outbound sip:asterisk.domain
>> --realm *
>> --username username
>> --password password
>> --null-audio
>> --no-tcp
>> --max-calls=1
>> --no-vad
>>
>> The pjsua client successfully registers but is unable to call.
>>
>> I see the following:
>> IP address change detected for account 1
>> (localip:5060-->nattedip:newport). Updating registration (using method
>> 4)
>> Temporary failure in sending Request msg INVITE/cseq=, will try
>> next server: Unsupported transport (PJSIP_EUNSUPTRANSPORT)
>>
>> What could be the problem? How can I convince pjsue to work correctly
>> behind nat?
>>
>> Thanks
>>
>> Marek
>>
>>
>>
>>
>>
>> 2021-07-10 11:08 GMT+02:00, Marek Greško :
>>> Hello,
>>>
>>> I just disabled. Currently it is working. I shloud give it some time
>>> to confirm the problem has gone. Maybe one month would be enough to
>>> confirm.
>>>
>>> Thanks
>>>
>>> Marek
>>>
>>>
>>> 2021-07-09 20:11 GMT+02:00, Abdenasser Ghomri :
>>>> Yes just disable the SIP ALG and see if it helps, Thanks.
>>>>
>>>> Best Regards,
>>>>
>>>> On Fri, Jul 9, 2021, 09:10 Antony Stone <
>>>> antony.st...@asterisk.open.source.it> wrote:
>>>>
>>>>> On Friday 09 July 2021 at 08:47:46, Marek Greško wrote:
>>>>>
>>>>> > Hello,
>>>>> >
>>>>> > yes SIP ALG are anbled on the router. Should I disable?
>>>>>
>>>>> In my opinion, always.
>>>>>
>>>>> Antony.
>>>>>
>>>>> --
>>>>> I don't know, maybe if we all waited then cosmic rays would write all
>>>>> our
>>>>> software for us. Of course it might take a while.
>>>>>
>>>>>  - Ron Minnich, Los Alamos National Laboratory
>>>>>
>>>>>Please reply to the
>>>>> list;
>>>>>  please
>>>>> *don't*
>>>>> CC
>>>>> me.
>>>>>
>>>>> --
>>>>> _
>>>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>>>
>>>>> Check out the new Asterisk community forum at:
>>>>> https://community.asterisk.org/
>>>>>
>>>>> New to Asterisk? Start here:
>>>>>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>>>>
>>>>> asterisk-users mailing list
>>>>> To UNSUBSCRIBE or update options visit:
>>>>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>>>
>>>
>>
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] problems with natted phones

2021-07-23 Thread Marek Greško
I achieved a partial success adding --use-compact-form option.

Marek


2021-07-23 13:47 GMT+02:00, Marek Greško :
> Hello,
>
> your suggestion to turn off SIP ALG on provider's router was probably
> correct. no problem until now. Thank you very much.
>
> I just found out another issue. I had a pjsue client in that network
> which called specific number when turned on. It was working perfectly
> with the old provider with working SIP ALG. But now with this provider
> and SIP ALG disabled I am not able to make the call using pjsua
> client.
>
> My pjsua config looks like this:
> --id sip:ext@asterisk.domain
> --registrar sip:asterisk.domain
> --proxy sip:asterisk.domain
> --outbound sip:asterisk.domain
> --realm *
> --username username
> --password password
> --null-audio
> --no-tcp
> --max-calls=1
> --no-vad
>
> The pjsua client successfully registers but is unable to call.
>
> I see the following:
> IP address change detected for account 1
> (localip:5060-->nattedip:newport). Updating registration (using method
> 4)
> Temporary failure in sending Request msg INVITE/cseq=, will try
> next server: Unsupported transport (PJSIP_EUNSUPTRANSPORT)
>
> What could be the problem? How can I convince pjsue to work correctly
> behind nat?
>
> Thanks
>
> Marek
>
>
>
>
>
> 2021-07-10 11:08 GMT+02:00, Marek Greško :
>> Hello,
>>
>> I just disabled. Currently it is working. I shloud give it some time
>> to confirm the problem has gone. Maybe one month would be enough to
>> confirm.
>>
>> Thanks
>>
>> Marek
>>
>>
>> 2021-07-09 20:11 GMT+02:00, Abdenasser Ghomri :
>>> Yes just disable the SIP ALG and see if it helps, Thanks.
>>>
>>> Best Regards,
>>>
>>> On Fri, Jul 9, 2021, 09:10 Antony Stone <
>>> antony.st...@asterisk.open.source.it> wrote:
>>>
>>>> On Friday 09 July 2021 at 08:47:46, Marek Greško wrote:
>>>>
>>>> > Hello,
>>>> >
>>>> > yes SIP ALG are anbled on the router. Should I disable?
>>>>
>>>> In my opinion, always.
>>>>
>>>> Antony.
>>>>
>>>> --
>>>> I don't know, maybe if we all waited then cosmic rays would write all
>>>> our
>>>> software for us. Of course it might take a while.
>>>>
>>>>  - Ron Minnich, Los Alamos National Laboratory
>>>>
>>>>Please reply to the
>>>> list;
>>>>  please *don't*
>>>> CC
>>>> me.
>>>>
>>>> --
>>>> _
>>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>>
>>>> Check out the new Asterisk community forum at:
>>>> https://community.asterisk.org/
>>>>
>>>> New to Asterisk? Start here:
>>>>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>>>
>>>> asterisk-users mailing list
>>>> To UNSUBSCRIBE or update options visit:
>>>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>>
>>
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] problems with natted phones

2021-07-23 Thread Marek Greško
Hello,

your suggestion to turn off SIP ALG on provider's router was probably
correct. no problem until now. Thank you very much.

I just found out another issue. I had a pjsue client in that network
which called specific number when turned on. It was working perfectly
with the old provider with working SIP ALG. But now with this provider
and SIP ALG disabled I am not able to make the call using pjsua
client.

My pjsua config looks like this:
--id sip:ext@asterisk.domain
--registrar sip:asterisk.domain
--proxy sip:asterisk.domain
--outbound sip:asterisk.domain
--realm *
--username username
--password password
--null-audio
--no-tcp
--max-calls=1
--no-vad

The pjsua client successfully registers but is unable to call.

I see the following:
IP address change detected for account 1
(localip:5060-->nattedip:newport). Updating registration (using method
4)
Temporary failure in sending Request msg INVITE/cseq=, will try
next server: Unsupported transport (PJSIP_EUNSUPTRANSPORT)

What could be the problem? How can I convince pjsue to work correctly
behind nat?

Thanks

Marek





2021-07-10 11:08 GMT+02:00, Marek Greško :
> Hello,
>
> I just disabled. Currently it is working. I shloud give it some time
> to confirm the problem has gone. Maybe one month would be enough to
> confirm.
>
> Thanks
>
> Marek
>
>
> 2021-07-09 20:11 GMT+02:00, Abdenasser Ghomri :
>> Yes just disable the SIP ALG and see if it helps, Thanks.
>>
>> Best Regards,
>>
>> On Fri, Jul 9, 2021, 09:10 Antony Stone <
>> antony.st...@asterisk.open.source.it> wrote:
>>
>>> On Friday 09 July 2021 at 08:47:46, Marek Greško wrote:
>>>
>>> > Hello,
>>> >
>>> > yes SIP ALG are anbled on the router. Should I disable?
>>>
>>> In my opinion, always.
>>>
>>> Antony.
>>>
>>> --
>>> I don't know, maybe if we all waited then cosmic rays would write all
>>> our
>>> software for us. Of course it might take a while.
>>>
>>>  - Ron Minnich, Los Alamos National Laboratory
>>>
>>>Please reply to the
>>> list;
>>>  please *don't*
>>> CC
>>> me.
>>>
>>> --
>>> _
>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>
>>> Check out the new Asterisk community forum at:
>>> https://community.asterisk.org/
>>>
>>> New to Asterisk? Start here:
>>>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>>
>>> asterisk-users mailing list
>>> To UNSUBSCRIBE or update options visit:
>>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] problems with natted phones

2021-07-10 Thread Marek Greško
Hello,

I just disabled. Currently it is working. I shloud give it some time
to confirm the problem has gone. Maybe one month would be enough to
confirm.

Thanks

Marek


2021-07-09 20:11 GMT+02:00, Abdenasser Ghomri :
> Yes just disable the SIP ALG and see if it helps, Thanks.
>
> Best Regards,
>
> On Fri, Jul 9, 2021, 09:10 Antony Stone <
> antony.st...@asterisk.open.source.it> wrote:
>
>> On Friday 09 July 2021 at 08:47:46, Marek Greško wrote:
>>
>> > Hello,
>> >
>> > yes SIP ALG are anbled on the router. Should I disable?
>>
>> In my opinion, always.
>>
>> Antony.
>>
>> --
>> I don't know, maybe if we all waited then cosmic rays would write all our
>> software for us. Of course it might take a while.
>>
>>  - Ron Minnich, Los Alamos National Laboratory
>>
>>Please reply to the
>> list;
>>  please *don't*
>> CC
>> me.
>>
>> --
>> _
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> Check out the new Asterisk community forum at:
>> https://community.asterisk.org/
>>
>> New to Asterisk? Start here:
>>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>http://lists.digium.com/mailman/listinfo/asterisk-users
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] problems with natted phones

2021-07-09 Thread Marek Greško
To be more specific I was on the
https://wiki.asterisk.org/wiki/display/AST/Getting+Started already,
but I assume all the additional transport parameters are relevant only
when asterisk itself is behind nat. Is not it true?

Marek


2021-07-09 8:47 GMT+02:00, Marek Greško :
> Hello,
>
> yes SIP ALG are anbled on the router. Should I disable?
>
> Transport config looks like that:
>
> [transport-udp]
> type = transport
> protocol = udp
> bind = 0.0.0.0
> domain = mydomain.com
>
> Asterisk itself is not natted.
>
> Marek
>
>
> 2021-07-08 21:14 GMT+02:00, Michael L. Young :
>> El jue, 8 de jul. de 2021 a la(s) 14:58, Marek Greško
>> (mgres...@gmail.com)
>> escribió:
>>
>>
>>> The asterisk is connected to the internet with public static IP address.
>>>
>>> The pjsip config contains:
>>>
>>>
>> What does your transport config look like?
>>
>> Take a look at this wiki page:
>> https://wiki.asterisk.org/wiki/display/AST/Configuring+res_pjsip+to+work+through+NAT
>>
>> --
>> Michael L. Young
>> (elguero)
>>
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] problems with natted phones

2021-07-09 Thread Marek Greško
Hello,

yes SIP ALG are anbled on the router. Should I disable?

Transport config looks like that:

[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0
domain = mydomain.com

Asterisk itself is not natted.

Marek


2021-07-08 21:14 GMT+02:00, Michael L. Young :
> El jue, 8 de jul. de 2021 a la(s) 14:58, Marek Greško (mgres...@gmail.com)
> escribió:
>
>
>> The asterisk is connected to the internet with public static IP address.
>>
>> The pjsip config contains:
>>
>>
> What does your transport config look like?
>
> Take a look at this wiki page:
> https://wiki.asterisk.org/wiki/display/AST/Configuring+res_pjsip+to+work+through+NAT
>
> --
> Michael L. Young
> (elguero)
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] problems with natted phones

2021-07-08 Thread Marek Greško
Hello,

I have an asterisk setup using pjsip. Everything used to work
correctly until one remote site changed internet provider and thier
router does not support sip protocol algorithms.

It works for some time, but then suddenly audio stops working both
directions. When this happens I see RTP responses going out to the
local address of the natted phone, not to the natted address. The
problem appears for the phones independently.

The asterisk is connected to the internet with public static IP address.

The pjsip config contains:

[aor]
type=aor
qualify_frequency = 60
max_contacts=1
remove_existing = yes

[endpoint]
type = endpoint
context = internal
dtmf_mode = rfc4733
disallow = all
allow = alaw
allow = ilbc
allow = g729
allow = gsm
allow = g723
direct_media = no
allow_subscribe = yes
subscribe_context = blf
rewrite_contact = yes
rtp_symmetric = yes
force_rport = yes


Am I missing something? Why the communication breaks suddenly?

Thanks

Marek

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] pjsip presence on Cisco SPA525G2 with SPA500DS

2021-01-07 Thread Marek Greško
Hello,

could somebody drive me how could I make run presence reporting by BLF
feature on the Cisco SPA525G2 with SPA500DS on asterisk with pjsip
stack?

I am not able to configure asterisk side. When I run pjsip show
subscriptions inbound I see all subscriptions as dialog. Which as of
my understanding is not sufficient.

Moreover I suspect even I configure asterisk side successfully, the
SPA525G2 phones will not support it. Could somebody confirm if it is
working or not possible to achieve it using these phones?

Thanks.

Marek

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Caller cannot blind transfer

2021-01-05 Thread Marek Greško
Hello,

I am not sure whether this was correct solution, but I overcommed the
issue by defining context [gosub-stdexten] and including the same
definition of dialplan
exten => xx,1,Dial(PJSIP/xx,30,TtrKk)
exten => xy,1,GoSub(gosub-stdexten,s,1(xy,PJSIP/xy,30,TtrKk))
in it.

It seems the procedure runs in its own context gosub-stdexten. If you
are aware of any better solution I would be glad to here about.

Marek


2021-01-05 18:32 GMT+01:00, Marek Greško :
> Hello,
>
> I am unable to figure out why I am not able to blind transfer when I
> am the caller and I call the extension defined by gosub.
>
> When running asterisk -rvvv I can see:
>
> -- Channel PJSIP/-0009: Dialed ' number>@gosub-stdexten' does not exist.
>
> It is evident there has been added some weird context after the
> extension number. The gosub-stdexten is a name of Gosub Procedure. Why
> it used it as a context? Where is the context name read from?
>
> The extensions are defined as follows:
> exten => xx,1,Dial(PJSIP/xx,30,TtrKk)
> exten => xy,1,GoSub(gosub-stdexten,s,1(xy,PJSIP/xy,30,TtrKk))
>
> xx is a caller, xy is a callee
>
> The procedure gosub-stdexten itself looks like this:
>
>
> [gosub-stdexten]
> ;
> ; Standard extension macro:
> ;   ${ARG1} - Extension  (we could have used ${MACRO_EXTEN} here as well
> ;   ${ARG2} - Device(s) to ring
> ;   ${ARG3} - How long
> ;   ${ARG4} - Options
> ; Retrieve the Call Forward number if available.
> exten => s,1,Set(CFIM=${DB(CFIM/${ARG1})})
> ;
> ; Dial the appropriate number depending on whether the Call Forward
> exten => s,n,GotoIf($["${vmbox}"!=""]?s-NoCFIM,1)
> exten => s,n,Set(_vmbox=${ARG1})
> exten => s,n,GotoIf($["${CFIM}"!=""]?s-CFIM,1:s-NoCFIM,1)
> ;
> ; Pass call to VoiceMail with the appropriate greeting.
> ;exten => s,n,GosubIf($[${DIALSTATUS}=BUSY]?s-BUSY,1:s-NOANSWER,1)
> ; Hangup.
> exten => s,n,Hangup()
> ;
> ; Dial Call Forward number & return.
> exten => s-CFIM,1,Dial(Local/${CFIM}@,${ARG3},${ARG4})
> exten => s-CFIM,n,GosubIf($[${DIALSTATUS}=BUSY]?s-BUSY,1:s-NOANSWER,1)
> exten => s-CFIM,n,Hangup()
> ; Dial actual extension & return.
> exten => s-NoCFIM,1,Dial(${ARG2},${ARG3},${ARG4})
> exten => s-NoCFIM,n,GosubIf($[${DIALSTATUS}=BUSY]?s-BUSY,1:s-NOANSWER,1)
> exten => s-NoCFIM,n,Hangup()
> ;
> ; Unavailable voicemail message if there is no answer.
> exten => s-NOANSWER,1,GotoIf($["${vmbox}"=""]?3:2)
> exten => s-NOANSWER,2,VoiceMail(${vmbox}@|u)
> exten => s-NOANSWER,3,Return()
> ; Busy voicemail message for any DIALSTATUS other than NOANSWER (or
> ANSWER).
> exten => s-BUSY,1,GotoIf($["${vmbox}"=""]?3:2)
> exten => s-BUSY,2,VoiceMail(${vmbox}@|b)
> exten => s-BUSY,3,Return()
>
>
> How could I fix it? Should I forward the original context somehow into the
> exten => s-NoCFIM,1,Dial(${ARG2},${ARG3},${ARG4})
> ? And also maybe here
> exten => s-CFIM,1,Dial(Local/${CFIM}@,${ARG3},${ARG4})
> ?
>
> Thanks
>
> Marek
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Caller cannot blind transfer

2021-01-05 Thread Marek Greško
Hello,

I am unable to figure out why I am not able to blind transfer when I
am the caller and I call the extension defined by gosub.

When running asterisk -rvvv I can see:

-- Channel PJSIP/-0009: Dialed '@gosub-stdexten' does not exist.

It is evident there has been added some weird context after the
extension number. The gosub-stdexten is a name of Gosub Procedure. Why
it used it as a context? Where is the context name read from?

The extensions are defined as follows:
exten => xx,1,Dial(PJSIP/xx,30,TtrKk)
exten => xy,1,GoSub(gosub-stdexten,s,1(xy,PJSIP/xy,30,TtrKk))

xx is a caller, xy is a callee

The procedure gosub-stdexten itself looks like this:


[gosub-stdexten]
;
; Standard extension macro:
;   ${ARG1} - Extension  (we could have used ${MACRO_EXTEN} here as well
;   ${ARG2} - Device(s) to ring
;   ${ARG3} - How long
;   ${ARG4} - Options
; Retrieve the Call Forward number if available.
exten => s,1,Set(CFIM=${DB(CFIM/${ARG1})})
;
; Dial the appropriate number depending on whether the Call Forward
exten => s,n,GotoIf($["${vmbox}"!=""]?s-NoCFIM,1)
exten => s,n,Set(_vmbox=${ARG1})
exten => s,n,GotoIf($["${CFIM}"!=""]?s-CFIM,1:s-NoCFIM,1)
;
; Pass call to VoiceMail with the appropriate greeting.
;exten => s,n,GosubIf($[${DIALSTATUS}=BUSY]?s-BUSY,1:s-NOANSWER,1)
; Hangup.
exten => s,n,Hangup()
;
; Dial Call Forward number & return.
exten => s-CFIM,1,Dial(Local/${CFIM}@,${ARG3},${ARG4})
exten => s-CFIM,n,GosubIf($[${DIALSTATUS}=BUSY]?s-BUSY,1:s-NOANSWER,1)
exten => s-CFIM,n,Hangup()
; Dial actual extension & return.
exten => s-NoCFIM,1,Dial(${ARG2},${ARG3},${ARG4})
exten => s-NoCFIM,n,GosubIf($[${DIALSTATUS}=BUSY]?s-BUSY,1:s-NOANSWER,1)
exten => s-NoCFIM,n,Hangup()
;
; Unavailable voicemail message if there is no answer.
exten => s-NOANSWER,1,GotoIf($["${vmbox}"=""]?3:2)
exten => s-NOANSWER,2,VoiceMail(${vmbox}@|u)
exten => s-NOANSWER,3,Return()
; Busy voicemail message for any DIALSTATUS other than NOANSWER (or ANSWER).
exten => s-BUSY,1,GotoIf($["${vmbox}"=""]?3:2)
exten => s-BUSY,2,VoiceMail(${vmbox}@|b)
exten => s-BUSY,3,Return()


How could I fix it? Should I forward the original context somehow into the
exten => s-NoCFIM,1,Dial(${ARG2},${ARG3},${ARG4})
? And also maybe here
exten => s-CFIM,1,Dial(Local/${CFIM}@,${ARG3},${ARG4})
?

Thanks

Marek

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Sollicitated MWI not working

2021-01-02 Thread Marek Greško
Hello,

thanks for tip. You were absolutely right. I did not realize the
voicemail context is defined in voicemail.conf. After adding the
context to the mailboxes configuration in endpoint it started working
correctly.

Morever using tcpdump I found out that defining mailboxes in both aor
and endpoint you get 500 as a response (but sitll working). It should
be defined in only one of them. Strange it is working also for
unsolicited if defined only in aor.

I did not get solicited working in either hardware phone or twinkle.
The unsolicited one is working in both.

Marek


2021-01-02 14:35 GMT+01:00, Joshua C. Colp :
> On Sat, Jan 2, 2021 at 5:36 AM Marek Greško  wrote:
>
>> Hello,
>>
>> I configured MWI with pjsip.
>>
>> The aors section contains:
>>
>> mailboxes = 101@
>>
>> The endpoint section contains:
>>
>> context = internal
>> mailboxes = 101@
>>
>> The dialplan leaves the voicemail by:
>> exten => s-NOANSWER,2,VoiceMail(${vmbox}@|u)
>> or:
>> exten => s-BUSY,2,VoiceMail(${vmbox}@|b)
>>
>
> You need to specify a context in the "mailboxes" lines, in the form of
> 101@context. The context would depend on what you have configured in
> voicemail.conf. As you have not provided that, I can not say what with
> certainty. Specifying the context should resolve your issue with
> unsolicited MWI taking time to update.
>
> --
> Joshua C. Colp
> Asterisk Technical Lead
> Sangoma Technologies
> Check us out at www.sangoma.com and www.asterisk.org
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Sollicitated MWI not working

2021-01-02 Thread Marek Greško
Hello,

I configured MWI with pjsip.

The aors section contains:

mailboxes = 101@

The endpoint section contains:

context = internal
mailboxes = 101@

The dialplan leaves the voicemail by:
exten => s-NOANSWER,2,VoiceMail(${vmbox}@|u)
or:
exten => s-BUSY,2,VoiceMail(${vmbox}@|b)

When I configure clients to use unsollicitated MWI, it works, but
there are quite long delays in status display. So I decided to try
sollicitated MWI, but I am reaching some difficulties.

The twinkle client simply freezes on configuration. By the log I can
see it receives 401 on subscribe and then freezes. The SPA525G2 phone
automatically disables Message Waiting feature.

I tried selectively disabling mailboxes commands in both endpoint
(unsolliciteted stopped to work) and aors section but none of them
worked. I tried to change mailboxes = 101@ to mailboxes = 101 but also
without success.

I am not sure about both asterisk and client configuration.

At asterisk side is it allowed to have mailboxes allowed in both
endpoint and aor section? What is the connert mailbox format? Should
it be specified with @ or is it ok without it? Should the context
after the @ be specified? If so whoch one? The same as context command
in the endpoint? So should I change it to 101@internal? Since the
unsollicitated MWI is working I expect I could leave it as is. Am I
right?

At the phone side, what should be set up? I tried to set Message
Waiting to yes, setting my Voicemail Server to the same name as sip
registry server and I tried mailbox name without @ and with @. Both
without success.

Could you give me some advice how should I configure it correctly, please?

Will the sollicitated MWI help me to evercome the indication delay problem?

Thanks

Marek

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Voice broken during calls (again...)

2020-06-23 Thread Marek Greško
I interchanged LAN and LTE in the sentence.

Do you have some kind of NAT in fron of asterisk? Or is your asterisk
having public IP? Could you share sip.conf (without passwords)? One
LAN client, one LTE and general section.

Marek


2020-06-23 16:29 GMT+02:00, Luca Bertoncello :
> Am 23.06.2020 16:22, schrieb Marek Greško:
>> It seems your problems lie in something other. Most probably it is not
>> mtu problem. All my suspections are contradicted. If it is true you
>> have inter vlan voice quality problems, it is definitely something
>> different. Formerly I assumed you were trying only LTE vs LAN using
>> internet.
>
> I'm not sure what you mean with the last sentence...
> I tried to connect to my Asterisk via LAN or via DSL (either via LTE or
> other DSL).
> Then I noticed that if I call another peer in same network (= both peers
> via DSL or both peers in the same VLAN), the quality is very good,
> otherwise is very poor.
>
> But why should Asterisk have problem if the peers are in different
> networks it's for me a really big mistery...
>
> This evening I'll try to capture the pakets in a call between two peers
> connected to Asterisk via LTE, two peers connected in the same LAN and a
> peer connected via LTE and the other in LAN, then maybe it's possible to
> find the problem...
>
> But if you have any other idea, I'm very happy to hear it! ;)
>
> Thanks
> Luca Bertoncello
> (lucab...@lucabert.de)
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Voice broken during calls (again...)

2020-06-23 Thread Marek Greško
It seems your problems lie in something other. Most probably it is not
mtu problem. All my suspections are contradicted. If it is true you
have inter vlan voice quality problems, it is definitely something
different. Formerly I assumed you were trying only LTE vs LAN using
internet.

Marek


2020-06-23 15:50 GMT+02:00, Luca Bertoncello :
> Am 23.06.2020 15:43, schrieb Marek Greško:
>
> Hi
>
>>> Do you mean "my Linux-Box ignores ICMP packet unreachable" or
>>> "Deutsche
>>> Telekom ignores them"?
>>
>> I meant DT, but this was a speculation. I did not say they do. I
>> consider it highly improbable. Then I was asking whether you do. As
>> per configuration you sent you are not blocking icmp type 3 so this
>> should not be an issue.
>
> OK, so this should not be the problem...
> What can we check now?
> If you want, I can send my iptables-script. It is possible, that I have
> there an error causing this behaviour...
>
> Maybe someone in the list is an expert with iptables and can check it?
> I know this program, but I'm not really an expert...
>
> Thanks
> Luca Bertoncello
> (lucab...@lucabert.de)
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Voice broken during calls (again...)

2020-06-23 Thread Marek Greško
2020-06-23 15:02 GMT+02:00, Luca Bertoncello :
> Am 23.06.2020 14:49, schrieb Marek Greško:
>
> Hi Marek,
>
>> this could be ip address of the different interface on the same box. I
>> think it works like expected. The only exception would be if the sip
>> peer ignores the icmp packet unreachable. But I doubt this is the
>
> Do you mean "my Linux-Box ignores ICMP packet unreachable" or "Deutsche
> Telekom ignores them"?

I meant DT, but this was a speculation. I did not say they do. I
consider it highly improbable. Then I was asking whether you do. As
per configuration you sent you are not blocking icmp type 3 so this
should not be an issue.

>
>> case. Anyway you get problems also when calling to LTE phone without
>> using sip provider.
>
> I have problem calling someone outside my networks and I have problem if
> the peers are in different networks...
>
>> Let first concentrate on these calls LTE to LAN. Are you sure you do
>> not block incoming icmp unreachables? At least verify type 3 subtype 4
>> is enabled. If it is, I have no clue what is going on.
>
> Well, I limit incoming ICMP packets and I block some hosts (known
> crackers)...
> If you think, I can send you the script I use (with iptables) to manage
> my firewall, so you can check it...
> The only entries I have, having something to do with ICMP, are:
>
> --
> /bin/echo -n "Disable ICMP Redirect acceptance..."
> for f in /proc/sys/net/ipv4/conf/*/accept_redirects; do
>/bin/echo 0 > $f
> done
> /bin/echo "done."
> /sbin/iptables -A INPUT -i dsl0 -p icmp --icmp-type echo-request -m
> limit --limit 6/m --limit-burst 5 -j ACCEPT
> /sbin/iptables -A FORWARD -o dsl0 -p icmp -j ACCEPT
> --
>
> and of course other rules to allow ICMP pakets in the internal
> networks...
>
> Thanks a lot
> Luca Bertoncello
> (lucab...@lucabert.de)
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Voice broken during calls (again...)

2020-06-23 Thread Marek Greško
Hello,

this could be ip address of the different interface on the same box. I
think it works like expected. The only exception would be if the sip
peer ignores the icmp packet unreachable. But I doubt this is the
case. Anyway you get problems also when calling to LTE phone without
using sip provider.

Let first concentrate on these calls LTE to LAN. Are you sure you do
not block incoming icmp unreachables? At least verify type 3 subtype 4
is enabled. If it is, I have no clue what is going on.

Marek



Marek


2020-06-23 10:11 GMT+02:00, Luca Bertoncello :
> Am 23.06.2020 10:07, schrieb Marek Greško:
>
> Hi
>
>> this is a correct response:
>>
>> From 62.156.246.57 (62.156.246.57) icmp_seq=1 Frag needed and DF set
>> (mtu = 1492)
>>
>> So PMTU discovery is working. No problem here. You got correct message
>> to lower the packet size from 62.156.246.57. This is probably the last
>> hop before your site.
>
> No, the last hop is 62.156.246.65:
>
> lucabert@ns:~$ mtr -4nr bpi.d.lucabert.com
> Start: Tue Jun 23 10:10:16 2020
> HOST: ns.lucabert.de  Loss%   Snt   Last   Avg  Best  Wrst
> StDev
>1.|-- 185.242.112.1  0.0%100.4   1.1   0.3   4.4
> 1.2
>2.|-- 84.200.230.82  0.0%100.8   0.7   0.5   0.8
> 0.0
>3.|-- 87.190.233.113 0.0%101.6   1.7   1.4   2.5
> 0.0
>4.|-- 217.5.82.940.0%107.9   7.6   7.4   7.9
> 0.0
>5.|-- 217.5.82.940.0%107.7   7.5   7.2   7.7
> 0.0
>6.|-- 62.156.246.49  0.0%107.4   7.4   7.3   7.4
> 0.0
>7.|-- 62.156.246.65  0.0%107.6   7.6   7.4   7.8
> 0.0
>8.|-- 93.241.91.232  0.0%10   21.4  21.9  21.4  24.3
> 0.7
>
> Don't know where this 62.156.246.57 comes... :(
>
> Everyway: you think, my network works as expected? At least the part
> using DSL?
> Any idea, where could be the problem?
>
> Thanks a lot
> Luca Bertoncello
> (lucab...@lucabert.de)
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Voice broken during calls (again...)

2020-06-23 Thread Marek Greško
Hello,

this is a correct response:

From 62.156.246.57 (62.156.246.57) icmp_seq=1 Frag needed and DF set
(mtu = 1492)

So PMTU discovery is working. No problem here. You got correct message
to lower the packet size from 62.156.246.57. This is probably the last
hop before your site.

Marek



2020-06-23 9:40 GMT+02:00, Luca Bertoncello :
> Am 23.06.2020 09:28, schrieb Marek Greško:
>
> Hi
>
>> if you need clampmss then it is highly probable there is a PMTU
>> discovery problem. The clampmss does not work for UDP.
>
> Is there a way to check if I have this problem?
>
>> I probably counted the size incorrectly. So you are able to ping with
>> size 1464 and not with 1466. How about trying same ping sizes from the
>> internet towards your site? I mean trying to ping from sites with
>> higher MTU than yours without lower MTU links in the path.
>
> lucabert@ns:~$ ping -4 -M  do -s 1465 bpi.d.lucabert.com
> PING bpi.d.lucabert.com (93.241.91.232) 1465(1493) bytes of data.
>  From 62.156.246.57 (62.156.246.57) icmp_seq=1 Frag needed and DF set
> (mtu = 1492)
> ping: local error: Message too long, mtu=1492
> ping: local error: Message too long, mtu=1492
> ping: local error: Message too long, mtu=1492
> ^C
> --- bpi.d.lucabert.com ping statistics ---
> 4 packets transmitted, 0 received, +4 errors, 100% packet loss, time
> 3965ms
> pipe 2
>
> With paket size of 1464 it works...
>
>> You know MTU is a size of l2 frame, so using ipv6 you are able to use
>> higher payload sizes because of ip header size.
>
> OK, thanks!
> Luca Bertoncello
> (lucab...@lucabert.de)
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Voice broken during calls (again...)

2020-06-23 Thread Marek Greško
Hello,

if you need clampmss then it is highly probable there is a PMTU
discovery problem. The clampmss does not work for UDP.

I probably counted the size incorrectly. So you are able to ping with
size 1464 and not with 1466. How about trying same ping sizes from the
internet towards your site? I mean trying to ping from sites with
higher MTU than yours without lower MTU links in the path.

You know MTU is a size of l2 frame, so using ipv6 you are able to use
higher payload sizes because of ip header size.

Marek


2020-06-23 9:06 GMT+02:00, Luca Bertoncello :
> Am 23.06.2020 08:43, schrieb Luca Bertoncello:
>
> And another thing, I discovered right now...
>
>> Could you suggest me something to restrict the problem?
>> Currently, I think the problem can be:
>>
>> 1) on Asterisk
>> 2) on my Gateway/Firewall
>
> A couple of years ago I added this entry in my firewall:
>
> /sbin/iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS
> --clamp-mss-to-pmtu
>
> since I had the problem downloading data from an Internet site using my
> tablet.
> I found this site explaining that:
>
> https://lartc.org/howto/lartc.cookbook.mtu-mss.html
>
> I really forgot this entry, but now I checked all entries in my
> Firewall, and I see it, with my remark...
> Now, the last line of the HowTo:
>
> 
> # iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss
> 128
>
> This sets the MSS of passing SYN packets to 128. Use this if you have
> VoIP with tiny packets, and huge http packets which are causing chopping
> in your voice calls.
> 
>
> Could it be the problem? Right now I'm not at home, so I cannot test it,
> but maybe I can add an entry like:
>
> iptables -A FORWARD -p tcp -m multiport --ports 5060, SIP> --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 128
>
> and change the previous entry like:
>
> iptables -A FORWARD -p tcp -i intlan0 --tcp-flags SYN,RST SYN -j TCPMSS
> --clamp-mss-to-pmtu
>
> to limit the behaviour on the internal LAN...
>
> Your opinion?
>
> Thanks a lot!
> Luca Bertoncello
> (lucab...@lucabert.de)
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Voice broken during calls (again...)

2020-06-22 Thread Marek Greško
Hello,

there is no need to change canreinvite for provider configuration.

Do not change MTU. Probably there will be another problem. I expect
packet size 1466 would pass and higher will have the same result. It
would be interesting to make the same test from the outside towards
your asterisk with size 2 bytes larger the highest you are able to
ping.

Marek


2020-06-22 22:26 GMT+02:00, Luca Bertoncello :
> Am 22.06.2020 um 22:12 schrieb Marek Greško:
>
> Hi Marek
>
>> Would you mind repeating the test with canreinvite=no set for all you
>> phones and mobile phones?
>
> All my peers have already canreinvite=no...
> I only have canreinvite=yes on the SIP configuration on the Telekom part:
>
> [pbxluca]
> type=peer
> defaultuser=11...@t-online.de
> secret= xx
> dtmfmode=rfc2833
> host=tel.t-online.de
> context=luca_incoming
> outboundproxy=tel.t-online.de
> port=5060
> fromuser=035
> fromdomain=tel.t-online.de
> usereqphone=yes
> canreinvite=yes
> insecure=port,invite
> nat=no
> qualify=yes
> qualifyfreq=600
> disallow=all
> allow=alaw
> allow=ulaw
>
> Should I change canreinvite=no there?
>
>> What is your upload bitrate? Is it guaranteed?
>
> Currently 12Mbps. Guaranteed should be about 10Mbps...
>
>> I would try also to test the PMTU:
>>
>> Try:
>>
>> ping -M  do -s 2000 ${ip address of the sip server}
>>
>> You should receive icmp asking for lowering the packet size.
>
> root@bpi:/etc/asterisk# ping -M  do -s 2000 tel.t-online.de
> PING tel.t-online.de (217.0.128.133) 2000(2028) bytes of data.
> ping: local error: Message too long, mtu=1492
> ping: local error: Message too long, mtu=1492
> ping: local error: Message too long, mtu=1492
> ping: local error: Message too long, mtu=1492
> ping: local error: Message too long, mtu=1492
> ping: local error: Message too long, mtu=1492
> ^C
> --- tel.t-online.de ping statistics ---
> 6 packets transmitted, 0 received, +6 errors, 100% packet loss, time 5103ms
>
> Mmmm... it seems not good, isn't it?
>
> For information, here the output of ifconfig:
>
> dsl0: flags=4305  mtu 1492
> inet 93.241.x.y  netmask 255.255.255.255  destination 62.156.z.k
> inet6 fe80::9565:3024:4deb:ebc7  prefixlen 10  scopeid 0x20
> ppp  txqueuelen 3  (Point-to-Point Protocol)
> RX packets 852397  bytes 480197087 (457.9 MiB)
> RX errors 0  dropped 0  overruns 0  frame 0
> TX packets 967912  bytes 170822532 (162.9 MiB)
> TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
>
>> The LTE phones could have lower MTU and thus overcome PMTU problem.
>
> Should I reduce the MTU?!?
> Maybe I didn't understood what you mean...
>
> Thanks
> Luca Bertoncello
> (lucab...@lucabert.de)
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Voice "broken" during calls

2020-06-22 Thread Marek Greško
Missing packet from DT could be caused by MTU issue.

Marek


2020-06-18 5:41 GMT+02:00, Jeff LaCoursiere :
> Hello Luca,
>
> We are still playing with visualization of your data, but I didn't want
> you to wait any longer for some results.  I think I blame both DT and
> the Pi :)
>
> First, a look at the phone side of your Banana Pi.  The first thing we
> noticed is there were a LOT more packets in one direction (north towards
> DT) than the other (towards the phone):
>
> jeff@jasper:~/Personal/StratusTalk/wotinder/Luca/tmp$ tcpdump -nr
> testPhone.pcap src 192.168.200.10 | wc -l
> reading from file testPhone.pcap, link-type EN10MB (Ethernet)
> 7951
> jeff@jasper:~/Personal/StratusTalk/wotinder/Luca/tmp$ tcpdump -nr
> testPhone.pcap dst 192.168.200.10 | wc -l
> reading from file testPhone.pcap, link-type EN10MB (Ethernet)
> 3981
>
>
> Note there are almost twice as many packets headed out.  Our tool takes
> a shot at it:
>
> jeff@jasper:~/Personal/StratusTalk/wotinder/Luca/tmp$ wotinder -I
> testPhone.pcap
> input: testPhone.pcap
> 2020/06/16 10:47:16.047401 INVITE 192.168.200.10:25572 (Luca) ->
> 192.168.200.1:25572 (sip:035014649215)-(81b17560-c0a80101-0-1798,1)
> 2020/06/16 10:47:16.112866 DUPINVITE 192.168.200.10:25572 (Luca) ->
> 192.168.200.1:25572 (sip:035014649215)-(81b17560-c0a80101-0-1798,1)
> 2020/06/16 10:48:43.690647 BYE 192.168.200.1:25572(sip:035014649215)
> -> 192.168.200.10:25572(Luca)
>      Session: 81b17560-c0a80101-0-1798
>      RTP 1 -> 10030
>      Source total pkts: 7899 (avg err 15934.774414)
>      Dest total pkts: 3943 (avg err 8307.511719)
>
> The "average error" is the average departure from exactly 50hz, in
> microseconds.  Basically we are wanting to see a packet every 20,000us,
> and if it arrives early (because the last one was late) or late, then
> the absolute value of how far off it was is accumulated, and in the end
> averaged.  Its a bit misleading in this case, because there has clearly
> been packet loss in one direction, and I am still wrapping my head
> around why the error isn't much higher (some kind of bug in our packet
> loss penalties).
>
> It does show that from the BPi's perspective, the stream from the phone
> is NOT very steady.  The *average* error was almost a full packet length
> late (16,000us).  Now our tool spits out the raw data (time between
> packets in us) and we can quickly graph it.  I lined up the two legs,
> but of course you are only seeing half of the second one, and it makes
> an interesting visual:
>
>
> What on earth is causing the very regular spikes?  Roughly every second
> there seems to be a delay introduced, EVEN FROM THE PHONE ON THE LAN!
> This worries me that we have asked the Pi to do too much. Perhaps
> capturing the data and writing it while also running asterisk is causing
> something to back up regularly.  We do prefer to do this kind of
> analysis from a span port on a switch...
>
> But that doesn't explain the missing packets from DT.
>
> Similar results on that side:
>
> jeff@jasper:~/Personal/StratusTalk/wotinder/Luca/tmp$ tcpdump -nr
> testDSL.pcap src 91.49.58.181 | wc -l
> reading from file testDSL.pcap, link-type LINUX_SLL (Linux cooked)
> 8048
> jeff@jasper:~/Personal/StratusTalk/wotinder/Luca/tmp$ tcpdump -nr
> testDSL.pcap dst 91.49.58.181 | wc -l
> reading from file testDSL.pcap, link-type LINUX_SLL (Linux cooked)
> 4076
>
>
> I'm making an assumption that 91.49.58.181 is your side of the DSL, and
> the packets towards you seem to be missing a lot!  I can't explain that
> as a Pi issue *unless* something funny is happening on the kernel
> handling inbound public traffic.  You mention you are traffic shaping -
> that could easily be causing something like this. Running our tool on
> that trace:
>
> jeff@jasper:~/Personal/StratusTalk/wotinder/Luca/tmp$ wotinder -I
> DSL.pcap
> input: DSL.pcap
> 2020/06/16 10:47:16.196746 INVITE 91.49.58.181:25572
> (00493514977290) -> 217.0.27.53:5060
> (sip:035014649215)-(765cb6164b1c122a3b9c8303600ea367,10036)
> 2020/06/16 10:47:16.296309 DUPINVITE 91.49.58.181:25572
> (00493514977290) -> 217.0.27.53:5060
> (sip:035014649215)-(765cb6164b1c122a3b9c8303600ea367,10036)
> 2020/06/16 10:47:16.357971 DUPINVITE 91.49.58.181:25572
> (00493514977290) -> 217.0.27.53:5060
> (sip:035014649215)-(765cb6164b1c122a3b9c8303600ea367,10036)
> 2020/06/16 10:47:16.457280 DUPINVITE 91.49.58.181:25572
> (00493514977290) -> 217.0.27.53:5060
> (sip:035014649215)-(765cb6164b1c122a3b9c8303600ea367,10036)
> 2020/06/16 10:48:43.680671 BYE 217.0.27.53:5060(sip:035014649215) ->
> 91.49.58.181:25572(00493514977290)
>      Session: 765cb6164b1c122a3b9c8303600ea367
>      RTP 10036 -> 6300
>      Source total pkts: 7898 (avg err 15771.558594)
>      Dest total pkts: 3943 (avg err 6995.069824)
>
>
> The 

Re: [asterisk-users] Voice broken during calls (again...)

2020-06-22 Thread Marek Greško
Would you mind repeating the test with canreinvite=no set for all you
phones and mobile phones?

What is your upload bitrate? Is it guaranteed?

I would try also to test the PMTU:

Try:

ping -M  do -s 2000 ${ip address of the sip server}

You should receive icmp asking for lowering the packet size.

The LTE phones could have lower MTU and thus overcome PMTU problem.

Marek


2020-06-22 21:48 GMT+02:00, Luca Bertoncello :
> A thing I forgot to report...
> My Asterisk listen on an high port (*not* 5060), since I had many
> problems in the past with someone trying to use my Asterisk with brute
> force attack...
>
> I really don't think, this can be the problem, but better to report all...
>
> Regards
> Luca Bertoncello
> (lucab...@lucabert.de)
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Voice broken during calls (again...)

2020-06-22 Thread Marek Greško
Hello,

try pinging your sip peer ip address following way:

ping -n -M do -s 1300 -i 0.1 -c 100 ${ipaddress}

Post several lines and the statistics.

Were you also thinking about MTU problems? Not very probable, but one
never knows.

Marek


2020-06-22 17:18 GMT+02:00, Luca Bertoncello :
> Am 22.06.2020 um 17:01 schrieb Telium Technical Support:
>> I don't know if there was a prior email with more details, but
>>
>> Latency is as important as speed.  Have you checked latency between your
>> device and pop?  What about QoS at your location, and does your ITSP
>> support/respect QoS?
>
> That's a very good idea...
> Could you suggest me how can I check it?
> The Gateway is a Linux with Debian 9.
>
>> Could problem be inside your network?  Have you tested/optimized internal?
>
> Really difficult to believe... If I call another VoIP-phone in my
> network (using the "internal number") the quality is excellent.
>
> If I call my wife using the "external number", the quality is very bad...
>
> Thanks
> Luca Bertoncello
> (lucab...@lucabert.de)
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Voice "broken" during calls

2020-06-17 Thread Marek Greško
Hi Luca,

I suspect the problem is either the line quality, aggregation or some
other factor. I can see you allow alaw and ulaw codecs for DT and
alaw, ulaw and gsm for the second provider. This could be the
difference why you observe problems mainly on DT. The alaw and ulaw
codec require 64 kbps stream, but gsm requires only 13 kbps. If this
is true, your problems will most probably be gone right after
switching to the business contract. So happy tomorow.

Marek


2020-06-17 15:07 GMT+02:00, Luca Bertoncello :
> Am 17.06.2020 14:37, schrieb Karsten Wemheuer:
>
> Hi Karsten!
>
>> The product is "All-IP" and not the SIP trunk, right?
>> The call starts normally and after about 15 minutes the quality is
>> disturbed?
>
> No, current we have Magenta Zuhause. Tomorrow we'll change to
> DeutschlandLAN IP (business contract).
> The quality is disturbed from the first second...
>
> I had the problem, that the connection will be *dropped* after 15
> minutes, and I solved it with "session-timers = refuse"
>
> Bye
> Luca Bertoncello
> (lucab...@lucabert.de)
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] call replicating

2020-06-10 Thread Marek Greško
Hello,

provider responded the behavior is intentional from their side. So
this should be fixed in asterisk. The pjsip cleanly does not do any
unregistrations where it should.

Marek


2020-06-07 12:30 GMT+02:00, Marek Greško :
> Hello,
>
> I found the problem and also the workaround.
>
> Clearly, since it was working with chan_sip it should not be dialplan
> problem, but sip stack problem.
>
> I have line=yes set up. After asterisk restart the old registration is
> not unregistered and new one is registered with different line value.
> Then incoming invites and qualify requests are sent to all the
> registrations and there the problem lies.
>
> I am thinking of how could asterisk prevent such situations.
>
> 1. I think it should send unregistration requests on shutdown.
>
> 2. I think it should keep the database of active registrations and
> unregister and reregister all of them during startup in case some of
> them remain active after unclean shutdown.
>
> Also probably provider side should be fixed?
>
> Thanks for your insight.
>
> Marek
>
>
> 2020-06-05 19:29 GMT+02:00, Doug Lytle :
>> On 6/5/20 12:24 PM, Marek Greško wrote:
>>> How can this behavior been overriden? I do not expect this is problem
>>> on provider side, since it was working normally using chan_sip.
>>
>> Console output and dial plan snippets are always useful when diagnosing,
>>
>> Doug
>>
>>
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] call replicating

2020-06-07 Thread Marek Greško
Hello,

I found the problem and also the workaround.

Clearly, since it was working with chan_sip it should not be dialplan
problem, but sip stack problem.

I have line=yes set up. After asterisk restart the old registration is
not unregistered and new one is registered with different line value.
Then incoming invites and qualify requests are sent to all the
registrations and there the problem lies.

I am thinking of how could asterisk prevent such situations.

1. I think it should send unregistration requests on shutdown.

2. I think it should keep the database of active registrations and
unregister and reregister all of them during startup in case some of
them remain active after unclean shutdown.

Also probably provider side should be fixed?

Thanks for your insight.

Marek


2020-06-05 19:29 GMT+02:00, Doug Lytle :
> On 6/5/20 12:24 PM, Marek Greško wrote:
>> How can this behavior been overriden? I do not expect this is problem
>> on provider side, since it was working normally using chan_sip.
>
> Console output and dial plan snippets are always useful when diagnosing,
>
> Doug
>
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] call replicating

2020-06-05 Thread Marek Greško
Hello,

after migration from chan_sip to res_pjsip I get strange behavior when
receiving call from the outside world. When call is received, it is
replicated multiple times. Two of that calls get to the phone. So the
phone is ringing on both lines. When having only Dial function in
dialplan I am able to place call. But when creating some dialplan
procedures containing VoiceMail I get phone ringing for 1 second and
it stops. The caller is immediatelly directed to voicemail. It is
because the second (or third) call gets busy.

How can this behavior been overriden? I do not expect this is problem
on provider side, since it was working normally using chan_sip.

Thanks

Marek

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] pjsip subscribecontext support

2020-06-05 Thread Marek Greško
Hello,

great news. I did not find it because an underscore added compared to
chan_sip. Thank you very much. It is working.

Marek


2020-06-05 11:12 GMT+02:00, Joshua C. Colp :
> On Fri, Jun 5, 2020 at 6:02 AM Marek Greško  wrote:
>
>> Hello,
>>
>> I would like to ask about current state of subscribecontext in pjsip.
>> I found out some 6 years old discussion on that without any plans to
>> implement it in the future.
>>
>> I have phones in different contexts. I suspect, when I use its context
>> to subscribe, they will not see phones from the different contexts. Am
>> I right?
>>
>
> I don't recall when the option was implemented but it's present on the
> endpoint[1].
>
> [1]
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Configuration_res_pjsip#Asterisk16Configuration_res_pjsip-endpoint_subscribe_context
>
> --
> Joshua C. Colp
> Asterisk Technical Lead
> Sangoma Technologies
> Check us out at www.sangoma.com and www.asterisk.org
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] pjsip subscribecontext support

2020-06-05 Thread Marek Greško
Hello,

I would like to ask about current state of subscribecontext in pjsip.
I found out some 6 years old discussion on that without any plans to
implement it in the future.

I have phones in different contexts. I suspect, when I use its context
to subscribe, they will not see phones from the different contexts. Am
I right?

Marek

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users