Re: [asterisk-users] Asterisk 13 / chan_sip / registration after reject

2023-12-04 Thread Benoit Panizzon
Hello

> > How do I achieve the same with chan_sip?  
> We run a cron script each 10min who will check the registration state 
> and send a register if not registered.

Well it's a simple CPE which needs to be autoprovisioned via either a
tftp config file or TR69.

So that cronjob somehow would also need to be put on the device via one
of those mechanism. We check if there is a way.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Asterisk 13 / chan_sip / registration after reject

2023-12-04 Thread Benoit Panizzon
Hi List

We have some CPE which run an embedded asterisk 13 with chan_sip.

Unfortunately, when a registration is rejected, those stop trying.

I am familiar with pjsip which allows to configure:

auth_rejection_permanent=no

How do I achieve the same with chan_sip?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] DUNDI anyone?

2023-05-02 Thread Benoit Panizzon
Hi

Well it is well some time that my last DUNDI peer has become
unreachable.

I guess too many issues with spoofed numbers etc.

But I am wondering, do people, especially larger entities like telcos,
still use DUNDI?

I know that in some Hamradio communities, DUNDI is used to interconnect
PBXes, but that is with private phone number ranges, not connected to
the public.

Want some DUNDI peering? DM me :-)

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Ping

2023-02-28 Thread Benoit Panizzon
My last post did not make it back or to the archive... testing...

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Asterisk PJSIP setting don't fragment bit on UDP

2023-02-28 Thread Benoit Panizzon
Hi Gang

I noticed, that when I enable multiple codecs and rtp encrypting
(generating a large SDP) invites with credentials do not get through
anymore.

So sniffed the connection and found that the IP packets have the don't
fragment bit set, causing a VDSL router with 1472 MTU in the path to
reject them.

So it asterisk or the underlying OS the culpit?

nping --udp -g 5070 -p 5060 registrarIP --data-length 1472

sniffing both sides. nping issues packets without don't fragment bit.
Router fragments them, registrar receives two fragmented packets per one
sent packet.

So I guess it's asterisk which forcefully is setting don't fragment.

But I could not find any such setting regarding SIP.

Did I miss something? How do I make asterisk not set the don't fragment
bit on UDP?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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 16.16.1 crash upon receiving image 0 udptl t38 sdp

2022-08-25 Thread Benoit Panizzon
Hi Josh

> This was a security issue[1] which was solved.
> 
> [1] https://downloads.asterisk.org/pub/security/AST-2021-006.html

Thanks, filing Bugreport with Debian, hopefully they will push 16.16.2
to security updates.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Asterisk 16.16.1 crash upon receiving image 0 udptl t38 sdp

2022-08-23 Thread Benoit Panizzon
Hi List

I can reproduce Asterisk 16.16.1 segfaulting in this situation:

Asterisk configured with Application "ReceiveFax".

Incoming call with SDP:

v=0
o=prt-cbl-sbc1 1418830458 1418830459 IN IP4 157.161.X.X
s=sip call
c=IN IP4 157.161.X.X
t=0 0
m=audio 11828 RTP/AVP 9 8 101
a=rtpmap:9 g722/8000
a=rtpmap:8 pcma/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=ptime:20

Asterisk Answering to Invite with 200 OK + SDP

v=0
o=prt-cbl-sbc1 1418830458 1418830461 IN IP4 157.161.X.X
s=sip call
c=IN IP4 157.161.X.X
t=0 0
m=audio 11830 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

ReceiveFax invoking Re-Invite to t38:

v=0
o=prt-cbl-sbc1 1418830458 1418830462 IN IP4 157.161.X.X
s=sip call
c=IN IP4 157.161.X.X
t=0 0
m=image 11830 udptl t38
a=sendrecv
a=T38FaxVersion:0
a=T38MaxBitRate:14400
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxDatagram:425

Caller telling. I am unable to do t38 by setting image port to zero in
200 OK + SDP reply to T38 Invite:

v=0
o=prt-cbl-sbc1 1418830458 1418830460 IN IP4 157.161.10.229
s=sip call
c=IN IP4 157.161.10.254
t=0 0
m=image 0 udptl t38
a=sendrecv

I have found a Snom M9 and a Grandstream Phone behaving that way.

Upon receiving that 200 OK + SDP Asterisk is segfaulting!

Has anyone else observed said issue?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Asterix 16, PJSIP outbound registration, SRV or NAPTR lookup

2022-05-16 Thread Benoit Panizzon
Just stubled over another example which resolved my question.

> server_uri=sip:reg.example.com:5060
> client_uri=sip:testcont...@reg.example.com:5060

If you don't specify the port, asterisk DOES an SRV lookup.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Asterix 16, PJSIP outbound registration, SRV or NAPTR lookup

2022-05-16 Thread Benoit Panizzon
Hi Team

I'm working on a scenario, where the registrar offers multiple
instances that can handle registration:

_sip._udp.reg.example.com has SRV record 0 0 5060 reg01.example.com
_sip._udp.reg.example.com has SRV record 0 0 5060 reg02.example.com

It looks like specifying:

server_uri=sip:reg.example.com:5060
client_uri=sip:testcont...@reg.example.com:5060

in type=register does not work

In 'identity' there is a option srv_lookup=yes to make asterisk look up
all possible endpoints.

Did I do anything wrong, or is asterisk not doing any SRV lookup for
outbound traffic like registrations?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Voicemail: don't play vm-intro if custom intro is recorded.

2020-08-13 Thread Benoit Panizzon
Hi Gang

We migrated our voicemail system from asterisk 13 to 16 a couple of
months ago.

Right after the migration, we got the complaint that vm-intro is being
played when the customer had recorded a own announcement. So I assumed
we had replaced that file by a zero lenght one on the previous
installation and did the same to suppress that surplus intro.

Now I got the opposite complaint: If the customer did not record an own
announcement, there is only the start of the into being played. The
part "Please record your message after the tone" which resides in
vm-intro is missing.

I did try toggling the 's' option, but none fixes the behaviour.

Any hint how I get back the previous behavior being:

If customer recorded an own intro, only play the tone after the
customer intro.
If customer did not record an own intro, play the full intro.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] How to correctly fork a CDR for billing in a call forwarding scenario?

2020-01-28 Thread Benoit Panizzon
Hi Gang

I have not yet managed to find a solution to correctly generate CDRs
for this situation:

Alice calls Bob.
Bob has call forwarding delayed 20s to Charlie.
Charlie picks up immediately.

exten => bob,1,DBget(cfwdly=CFDLY/${exten}); $cfwdly contains charlie
same => n,Set(CDR(src)=${CALLERID(number)}) ; src 'alice'
same => n,Set(CDR(dst)=${exten})
same => n,Dial(bob,20)
same => n,ForkCDR
same => n,Set(CDR(src)=bob) ; 2nd cdr src shall contain 'bob'
same => n,Set(CDR(dst)=${cfwdly})
same => n,Set(CALLERID(number)=bob)
same => n,Dial(${cfwdly})

Now assume a call of 1 minute.

For billing purposes, I need 2 CDRS.

Billing to Alice: Call of 40 seconds to Bob.
Billing to Bob: Call of 40 seconds to Charlie.

I would expect that setting the custom variables as above and forking
the CDR would generate CDRS looking like this:

no;src;dst;duration;billed;status
1;alice;bob;60;40;answered
2;bob;charlie;40;40;answered

But that is not happening. Booth CDR contain the same source and
destination.

I have played around with the various ForkCDR(options) but none did
what I expected.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Get PJSIP Endpoint Information via REST or similar API?

2020-01-27 Thread Benoit Panizzon
Hi Gang

To get our customers more information on how they registered I am
looking for a elegant way to get an information like the CLI command:

pjsip show endpoint [endpoint]

I had a got on ARI, but that basically only returns the information if
an endpoint is online or not.

Is there a API to get similar detailed information as the cli
command?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Perl AGI: read variable with quotes

2020-01-27 Thread Benoit Panizzon
Hi Gang

Thank you for the replies.

I sorted this out. I got tricked by $AGI->verbose(Pai: $pai) which
cripples the output.

The variable passed on is complete. My regex to extract the phone
number from that variable was broken when there was a quoted string
before the URI.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Perl AGI: read variable with quotes

2020-01-24 Thread Benoit Panizzon
Hi Gang

I have stumbled of this problem.

I need the P-Asserted-Identity header in an AGI scrip.

In the Dial-Plan I do:

same => n,Set(PAI=${PJSIP_HEADER(read,P-Asserted-Identity)})

In the AGI I do:

my $pai = $AGI->get_variable(PAI);

This works fine, unless the PAI contains quotes:

P-Asserted-Identity: 

I get "" in the variable $pai.

P-Asserted-Identity: "John Doe" 

Is getting me $pai containing just "John".

Anyone a clue how I could get the whole header?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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 do not challenge 'options' without username. - silence 'notice' on console.

2020-01-23 Thread Benoit Panizzon
Hi Gang

Mitel PBX use 'options' without username to monitor the connection.

Therefore Asterisk PJSIP cannot match an unsername against an endpoint
and prints a notice on the console.

Is there a way to silence this kind of notice?

I wonder if identify_by 'header' could solve the issue to match method
'options', but I was not able to find any documentation about this.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] res_pjsip.c:3461 ast_sip_set_tpselector_from_transport_name: Unable to retrieve PJSIP transport 'transport-name'

2020-01-14 Thread Benoit Panizzon
Ok, answering myself...

It looks as if registered endpoints are cached in a way which
survives a full restart of asterisk.

So after deleting the transport, there was still a cached registered
endpoint present via that transport. As soon as the Registration
expired, the error also disappeared.

Is there a way to flush the registered endpoing cache?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] res_pjsip.c:3461 ast_sip_set_tpselector_from_transport_name: Unable to retrieve PJSIP transport 'transport-name'

2020-01-14 Thread Benoit Panizzon
Hi Gang

I gave up on running asterisk with two interfaces without it mixing up
the ip addresses.

So I have removed one transport definition from pjsip.conf

Now * keeps complaining:

res_pjsip.c:3461 ast_sip_set_tpselector_from_transport_name: Unable to retrieve 
PJSIP transport 'transport-name'

I did a grep on /etc/asterisk for that transport name. It's in any file
anymore.

Restarted asterisk. Error is still there.

Is there any kind of config cache somewhere which I need to clear?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Solved: Re: Asterisk 13.18.3 PJSIP. Wrong Port in Contact Header in Reply to REGISTER?

2020-01-13 Thread Benoit Panizzon
Well, not so solved unfortunately...

Now I am back to where I have the situation the Asterisk sends out 183
Media Progress from one interface, containing a Contact Header with the
local IP of the other interface breaking audio.

Is there any way to completely bind all IP Addresses within headers
sent out one interface to the IP of that interface?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Solved: Re: Asterisk 13.18.3 PJSIP. Wrong Port in Contact Header in Reply to REGISTER?

2020-01-13 Thread Benoit Panizzon
Hi Joshua

Thank you for your reply.

Indeed, Ubuntu only ships with this old version. Upgraded to 16.2. via
PPA. Problem persisted.

Well, I already mentioned that this is a machine with two physical
interfaces with different routes which on the 'external' side handles
SIP customer registrations and has an 'internal' IC Trunk to a
commercial Voice Switch via private IP Range.

I had the problem, that some of the packets sent out on the 'external'
side contained 'private' IP addresses in either signaling or SDP.

So I threw all options I could find into the config to bind
transports, endpoints, media and so on to the corresponding interface ip
address. First this looked good. I had the correct IP in every header
and SDP I expected.

well setting under transport:

external_signaling_address=[local IP]

Assuming this is the own interface IP that would be told to external
endpoints was obviously wrong.

In the end this caused the Proxy-SBC to believe it was not getting an
OK to it's forwarded registration and discard this session.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Asterisk 13.18.3 PJSIP. Wrong Port in Contact Header in Reply to REGISTER?

2020-01-10 Thread Benoit Panizzon
Hi List

I have been pondering over a problem to use an asterisk server behind
an SBC unable to successfully handle registrations.

Now I observed something strange which I suspect might be a bug on the
asterisk side.

The SBC originates is register from Port 6011 to Port 5060 on the
Asterisk.

The Contact Header of the REGISTER contains:

Contact: user@SBC-IP:6011

The Asterisk is sending the 200 OK to back from it's port 5060 to
SBC-IP:6011 nothing wrong with it. But when I looked at the Contact
Header, which indicates a successful 'binding' I see:

Contact: user@ASTERISK-IP:6011

It looks like the SBC discards this Contact header as invalid and
returning the 200 OK without contact to the registering client,
indicating an unsuccessful registration.

All other clients I have tried registering directly to asterisk seem to
ignore this port and just accept the 200OK. Only our SBC causes this
problem.

I have attempted rewrite_contact yes and no, both with the same result.

So from my point of view, Asterisk is putting the 'remote' port instead
of it's own SIP port into the Contact Header.

Can anyone confirm this is misbehavior be pjsip? Could this be a known
bug? A quick google search did not return any hits.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] SIP via TCP - new TCP session per call or use same session for multiple calls?

2019-12-27 Thread Benoit Panizzon
Hi List

I wonder how SIP via TCP is supposed to work. Not realy Asterisk
related, but I hope you experts might be able to help out :-)

One of our customers has a SIP device registering via a complex NAT. To
benefit from TCP Connection Tracking, he choose TCP instead of UDP.

So he expected, that an incoming call would be sent back to him on the
already open TCP connection, making it easy to get through that NAT.

This is not the case. Our SBC is attempting to initiate a new SIP TCP
connection towards the NAT Firewall of the customer thus getting
dropped because this is not the outgoing established connection opened
during the registration.

So, how should SIP via TCP work? Should one TCP session be used for all
signaling of potentially multiple concurrent calls, as expected by our
customer. Or is it usual to make one TCP session per call as observed?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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: How is asterisk choosing the IP address to put in the Contact header?

2019-11-29 Thread Benoit Panizzon
Short update...

After some more research I found:
https://community.asterisk.org/t/box-with-2-interfaces-wrong-one-chosen-in-contact-header/74705/3

And some more similar ones describing the same problem with chan_sip
and pjsip.

I attempted to set: external_signaling_address on my transports. Also
trying to trick them there could be NAT (there is none) by setting.
local_net=192.168.99.0/24

Asterisk is still sending the wrong IP Address in the Contact header of
183 or 200 messages.

Can anyone confirm this is a bug?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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: How is asterisk choosing the IP address to put in the Contact header?

2019-11-29 Thread Benoit Panizzon
Hi Gang

Server, two interfaces, routing to two different networks.

Two transports defined, each bound to the corresponding ip assigned to
the interface.

But still, especially when an 183 message is sent, the Contact header
does contain the wrong IP Address.

Is this a known issue 13.18.3? Or is there a way to make absolutely
sure the IP addresses within the Contact header is corresponding to
the endpoint the packet is sent out?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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 device_state_busy_at, how does this work?

2019-11-28 Thread Benoit Panizzon
Hi Joshua

> The option strictly controls device state. Any enforcement of a limit for
> calling does not exist, and is up to you to do using various methods.
> Device state could be queried and used, or GROUP[1] and GROUP_COUNT[2].
> 
> [1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+17+Function_GROUP
> [2]
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+17+Function_GROUP_COUNT

Yes, I had a shot at GROUP and GROUP_COUNT but somehow did not manage
to achieve efficient control of the channels.

I have hacked together an ugly solution.

I use an agi script for routing decision.

If the call originates from a Customer Device:
($tech,$device,$callid) = $chan_vars{'channel'} =~ m/([A-Za-z]*)\/(.*)?-(.*)/;

So $device contains the part I need to use in:

$AGI->get_variable("DEVICE_STATE(PJSIP/$device)");

If this returns BUSY, I send the call to HangUp(17)

On calls TO a Customer Device, I use the same $device to build the
destination URI: Dial(PJSIP/$destination@$device) and therefore I can
also query the state and figure out if I need to send the call to
HangUp(17).

One interesting observation. If the count of channels is not at the
limit (eg 2 of 2 => busy), so for example 3 out of 2 channels, the
status does not stay ab BUSY but goes back to IN_USE. Shouldn't that
still be busy? :-)

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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 device_state_busy_at, how does this work?

2019-11-28 Thread Benoit Panizzon
Hi Gang

According to:
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Configuration_res_pjsip#Asterisk12Configuration_res_pjsip-endpoint_device_state_busy_at

And endpoint should return busy if this number is reached.

We have PBX Trunks registering to the Asterisk.

So we want to limit the number of concurrent calls to a PBX and return
busy, if more than the configured number of channels are in use.

I set for example:

device_state_busy_at=4 to limit the trunk to 4 channels so 400kbit/s
can be assured by QOS measure.

But when testing, I noticed caller don't get busy.

pjsip show endpoints happily shows 5 of 4 channels in use.

Do I have to query the device state from the dialplan and manually
return busy?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Avoid transcoding if both ends support same coded

2019-11-26 Thread Benoit Panizzon
Hi Gang

I offer:

g722
g711a

g711a is mandatory. g722 is becoming more and more popular.

Now if a call originates from a device which support g722 and ends on a
device which does not. I see that asterisk is transcoding between g722
and g711a despite both ends supporting g711a.

Google tells me, that in this scenario asterisk should have selected
g711a as this is the codec common for both sides.

So why is my asterisk instance choosing to transcode instead of trying
to natively and even remotely bridge the calls?

I have nothing in the dial plan which would force asterisk to listen to
the audio and I have set direct_media=yes on both endpoints.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] bug in pjsip trust_id_outpound?

2019-11-26 Thread Benoit Panizzon
Hi Gang

If anyone else stumbles over the same Problem.

This is how I solved it for now:

On the IC Trunk:

trust_id_inbound=no => Makes sure the CallerID is taken from the From Header.
trust_id_outbound=yes => Does nothing useful, maybe a bug?
send_pai=no

On the incoming call, you have to pull the Privacy: header to figure
out the callerid presentation as asterisk is not setting this value if
you don't trust id inbound.

If the call is destined to a customer, you set CALLERPRES()=prohib
which makes sure, the From header is anonymized towards the customer.

If the call is destined to an IC, you have then to manually
PJSIP_HEADER(add) a P-Assertied-Identity and a Privacy Header correctly
setting the calling presentation. Asterisk is NOT doing this correctly.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] bug in pjsip trust_id_outpound?

2019-11-25 Thread Benoit Panizzon
Hi Team

I'm still struggling to get privacy settings passed on correctly.

The Asterisk is sitting between customers and IC trunks.

On the customer face, of course I have those settings:

trust_id_inbound=yes
trust_id_outbound=no

This ensures that presentation is set to probibited, if the customer is
setting Privacy: ID.
It also ensures that the From: header is set to anonymous, hiding the
callerID if the caller requested presentations prohib.

So far, towards the customer side, this works as expected.

Towards the IC, we need to correctly populate the Request, From,
P-Asserted Identity and Privacy header. Sending From: anonymous is not
allowed.

So I set:

trust_id_inbound=no
trust_id_outbound=yes

Unfortunately I have to set inbound trust to no, to make sure the
Asterisk takes callerID from the From: header and NOT from the
P-Asserted Identity Header.

I then call pull the Privacy: Header with PJSIP_HEADER and set caller
presentation correctly.

But with outbound calls I am facing a HUGE problem.

I have set trust_id_outbound=yes. So I am expecting Asterisk to
correctly set the From: header to CallerID(number) and if
CallerID(num-pres) ist set to prohib, to add a Privacy: ID header.

This is not happening. From: is set to anonymous with missing Privacy:
header with the result, that the IC partner on the other side is
blocking this call.

Any idea how I could deal with this? Why is trust_id_outbound=yes not
behaving as expected?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] On Register, run a script, validate source IP

2019-11-21 Thread Benoit Panizzon
Hi Jöran

> for me it sounds like you need an SBC.
> We use Kamailio in order to check users IP Addresses. There are modules
> like "permissions" in kamailio what could do this. As well there are pike
> checks, sanity checks and a bunch of other useful tools.

You are absolutely right. We are on a 'renewing our
infrastructure' project and on a 'proof of concept' and 'check all
needed functionality' on using Kamailio as a high availiable
registration and routing engine and Asterisk for Annoucements and
Voicemailbox Service.

But, I have no Kamailio experience yet and with the actual 'commercial'
TSP Voiceswitch in use, we have some very serious functionality /
signaling issues with SIP PBX customer trunk.

So as I have been working with Asterisk for quite some time now, I was
hoping to be able to find a quick fix for them using Asterisk, before I
try to figure out how you, for example register PBX Customers to
Kamailio. But turns out my project for which I estimated I would need
two days is going to take longer, as usual. :-)

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] trust_id_inbound=yes but take CallerID(Num) from From: not from PAI

2019-11-19 Thread Benoit Panizzon
Hi Gang

Next Problem which occurs.

In Switzerland this is the common using form SIP Signaling:

P-Asserted-Identity: Contains the provider provided and screened phone
number which is the 'legal' origin of the call. The origin which is to
be billed for the call. If the caller has a DDI Range, this is mostly
the main number of this range.

From: can contain almost anything. It can be any phone number from a
DDI range, or in a call forwarding scenario, the original calling
number, or if the customer has a clip-no-screening agreement just any
valid phone number he is entitled to send.

Now for privacy to be correctly handled. I did this config:

On the IC endpoint: trust_id_inbound=yes

Without this, Callerid(num-pres) ist not set to 'prohib'

On the Customer endpoint: trust_id_outbound=no

This ensures, asterisk replacing the From header with 'anonymous'
towards the customer if privacy is set.

Unfortunately setting those variables also affect the way where the
Callerid(num) variable is polulated from.

If trust_id_inbound=yes, this is set from the PAI, which is not the
phone I want to display to your customer.

Is there a way to trust_id_inbound but still take Callerid(Num) from
the From header?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Global number rewriting rules affecting ALL headers?

2019-11-19 Thread Benoit Panizzon
Quick update.

I guessed right.

I had put the call to the subrouting on the 'local' channel which is
created after the call is being redirecting.

If i put it on the calling channel and setting RDNIS to the correct
value, the corrected phone nuber is transmitted to the calling party
via Diversion header.

Similar, on the Local generated call from the remote 301, I could just
change CALLERID(RDNIS) to the correct value, causing this value to be
sent to the destination in the Diversion header correctly indicating
origin and cause of the redirection.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Global number rewriting rules affecting ALL headers?

2019-11-19 Thread Benoit Panizzon
Hi Joshua

I had a shot at your suggestion, bug still no success.

I fear the 181 is sent before the macro is called.

I want to change the Diversion Header in the 181 message sent back to
the caller to put the number it contains in the correct e164 format
(stripping the 0 and adding +41 for Switzerland) but just any 'dialplan
set' value would do for an example :-)

Could you please make an example how to do that?

PS: CONNECTED_LINE_CALLER_SEND_MACRO is depreciated and should be
replaced by: CONNECTED_LINE_CALLER_SEND_SUB

Do I have to call my routine [sub-routine] and end with ExitSub?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Global number rewriting rules affecting ALL headers?

2019-11-19 Thread Benoit Panizzon
Hi List

One more Problem I stumbled upon.

Using Asterisk in a TSP environement.

Incomming IC Calls are e164 and have a NPRN (Routing Number) prefixed.

Example: +419805561599
+41 country prefix
98055 Routing Prefix
61599 effective phone number 

Calls routed to Customers need to be put in the 'local' format.

061599

This is also the format of the From / To / Invite header recieved from
customers.

Phone Numbers originating from customers have again to get manipulated:

If this is a ported number to another TSP, the destination TSP NPRN has
to be inserted so it can correctly be routed in transit.

If it is a emergency phone number, a location based routing prefix has
to be added.

If it is a value added number, the NPRN of the operator AND and ID
designating the originator TSP of the call has to be prefixed for
billing.

In the Dialplan (also with help of some AGI Magic doing screening and
routing) it is easy to correctly set the Request User, From and To
Headers.
Setting the PAI correctly was also doable via a pre-dial handler.

But now I am stuck with the Diversion: header.

If the call is being redirected by a SIP 301 from a customer, asterisk
is setting a Diversion: Header in the 181 message alerting the caller
of the Diversion and I am absolutely at a loss how I can correctly
rewrite that phone number in this header.

So I start to wonder, if there is some mechanism within
asterisk on which I could apply correct phone number translations for
each endpoint which would apply to ALL possible headers.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Check other calls on same endpoint (validate / screen customer supplied Diversion / From header)

2019-11-18 Thread Benoit Panizzon
Hi Gang

Yes, big project on the rise to do things better / more flexible than
our existing commercial TSP switch.

During call screening process, we would like to allow customers to send
the original callingID in a attended call diversion scenario.

From the Voice Switch point of view, there are two call legs involved.
So on one call leg, I would like to check the callerID on the second
call leg. Is this doable?

Example:

Alice calls Bob who does picks up the call and puts it throught to
Charlie. Charlie shall see Alices CallerID:

Call Leg 1:
===
Invite: Bob
From: Alice
PAI: Bob

Call Leg 2:
===
Invite: Charlie
From: Alice
PAI: Bob
Diversion: Bob, Reason: Attended-Transfer

The screening on Leg 2 would normally not allow Alice to be sent as
Caller.
But if the sceening on Leg 2 would be able to look up Leg 1 and see the
co-existing call From: Alice To: Bob, it could allow Alice to be sent
out (and maybe add a missing Diversion and/or PAI header or also screen
the Diversion header).

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] On Register, run a script, validate source IP

2019-11-18 Thread Benoit Panizzon
Hi Sebastian

> That would require your script to update sip.conf dynamically and reload the 
> config for each time user wants to update their accepted location.

Hmm, maybe using asterisk realtime and attempting to put the config
into a database would be worth an approach. Until now we only use
realtime for the voicemail application.

So there isn't any way to have, for example a special dialplan
extension or similar executed on every register (and possibly
unregister to send an alert and maybe re-route traffic if a business
trunk customer goes offline)

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] pre-dial handler, how to access variables from calling channel?

2019-11-18 Thread Benoit Panizzon
Hi Tony

> See https://wiki.asterisk.org/wiki/display/AST/Variable+Inheritance

Thank you, exactly what I was looking for!

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] On Register, run a script, validate source IP

2019-11-18 Thread Benoit Panizzon
Hi Gang

To increase security against phished passwords and similar attacks, we
consider offering customers to define IP ranges (or GeoIP locations)
from which their dynamic registrations are being accepted.

I can already look at the source IP in the dial plan, so no issue with
validate an INVITE against a source IP.

But I would also like to prevent registrations from outside of this
client's specific allowed ip addresses as well, so the line cannot be
hijacked.

So I'm looking for something like

On Register:
If check_allowed_ip(auth_username) {
return;
} else {
Reply(403 Wrong IP for this user);
}

Any ideas how to do that? (Yes, I asked Google and found nothing
useful yet)

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] pre-dial handler, how to access variables from calling channel?

2019-11-15 Thread Benoit Panizzon
Hi List

Implementing screening and routing I have stumbled over this issue:

[pbx-router]
exten => s,1,NoOp(ROUTER FROM: ${CALLERID(Number)}  TO: ${DESTINATION})
same => n,Set(SOURCE=${CHANNEL(name)})
same => n,Set(PAI=${PJSIP_HEADER(read,P-Asserted-Identity)})
same => n,Set(FROM=${CALLERID(Number)})
same => n,Set(TO=${DESTINATION})
same => n,Set(DIVERSION=${PJSIP_HEADER(read,Diversion)})
same => n,AGI(router.agi)
same => n,GoTo(dial-out,s,1)

[predial-handler]; Manipulate Header on OUTBOUND channel
exten => screen-update,1,NoOp(PREDIAL FROM: ${CALLERID(Number)} TO: 
${DESTINATION} PAI: ${PAI})
same => n,Set(PJSIP_HEADER(update,P-Asserted-Identity)=${PAI})
same => n,Return

[dial-out]
exten => s,1,NoOp(DIAL FROM: ${CALLERID(Number)} TO: ${DESTINATION} PAI: ${PAI})
same => n,Dial(PJSIP/${DESTINATION},,b(predial-handler,screen-update,1))
same => n,HangUp()

router.agi does perform among other things like emergency
location routing: _screening_. It checks if the FROM and PAI sent from
the customer correspond to phone numbers assigned to that customer and
if not, replaces them with the correct values, also taking account
customers with clip-no-screening agreement (they can set 'From' maybe
also screened to some allowed number ranges, but PAI is 'Provider
provided, Network screened' therefore we MUST set this to the customers
real phone number)

I can correct ${CALLERID(number)} on the calling channel and this is
preserved on the outgoing channel.

But I have not yet found any 'easy' way to pass the corrected ${PAI}
Variable to the callee channel.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Two interfaces, pjsip, 180 ringing contains wrong contact IP

2019-11-14 Thread Benoit Panizzon
Hi Gang

I have stumbled over a strange issue with Asterisk 13.18.3

I have two interfaces, two different IP Addresses. One facing to the
internet, and one facing to am internal voice lan.

Therefore I defined two different transports and endpoints:

[transport-udp-internal]
type=transport
protocol=udp
bind=**INTERNAL-IP**:5060
tos=cs3
cos=3
allow_reload=yes

[transport-udp-external]
type=transport
protocol=udp
bind=**EXTERNAL-IP**:5060
tos=cs3
cos=3
allow_reload=yes

[internal]
type=endpoint
transport=transport-udp-internal
context=from-internal
[...]
rtp_symmetric=yes
direct_media=no
force_rport=yes
rewrite_contact=yes
media_address=***INTERNAL-IP***
bind_rtp_to_media_address=yes

[external]
type=endpoint
transport=transport-udp-external
context=from-external
[...]
rtp_symmetric=yes
direct_media=no
force_rport=yes
rewrite_contact=yes
media_address=***EXTERNAL-IP***
bind_rtp_to_media_address=yes

Dial Plan looks something like. This is more or less for testing
purposes, later this will be replaced by an AGI routing and digit
translation engine.

[from-external]
exten => _0x,1,NoOp(FROM: ${CALLERID(Number)} TO: ${EXTEN})
exten => _0x,n,Set(CALLERID(Number)=+41${CALLERID(Number):1})
exten => _0x,n,Set(DESTINATION=+41${EXTEN:1})
exten => _0x,n,NoOp(FROM: ${CALLERID(Number)} TO: ${DESTINATION})
exten => _0x,n,Dial(PJSIP/${DESTINATION}@internal)

The Dialogue observed is:

caller => INVITE => external IP (eip)
eip => 100 trying => caller

internal ip (iip) => INVITE => destination
destination => 100 trying => iip
destination => 180 Ringing => iip

eip => 180 ringing => caller
THIS contains a contact header with the INTERNAL IP
caller => PRACK => iip (unreachable ip)

What do I have to do, so the 180 ringing does contain the correct
external IP?
If I disable 100rel I stumble over the next one

As soon as the connection is established, the 200 OK sent to the
original caller also contains a contact header with the internal ip.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Dial(${PJSIP_DIAL_CONTACTS(Alice)} & ${PJSIP_DIAL_CONTACTS(Bob)}) how not to fail if one endpoint has no registered AOR?

2019-06-10 Thread Benoit Panizzon
> What about to put eveything in a variable and the remove the last 
> character if it equal &

Yes, I considered this...

What if you dial three endpoints and the middle one (or last one) is
empty? You would also need to remove the first & and any double &
within that string. Is it faisable with asterisk logic?

-Benoît-

-- 
_
-- 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] Dial(${PJSIP_DIAL_CONTACTS(Alice)} & ${PJSIP_DIAL_CONTACTS(Bob)}) how not to fail if one endpoint has no registered AOR?

2019-06-09 Thread Benoit Panizzon
Dear List

It's probably been more than a year now I switched from chan_sip to
pjsip. pjsip works much cleaner than chan_sip.

But!

I have come across a Problem I was not able to solve with Asterisk
Dialplan Logic.

With pjsip an endpoint can have multiple AOR, so you need to expand
them with ${PJSIP_DIAL_CONTACTS()} to be able to Dial() all of them
simultaneously.

But there are also situation where you need to Dial() not only one
endpoint, but multiple ones, even mixing technologies like IAX and SIP.

You can specify those multiple endpoints with the & separator in the
Dial() function.

Unfortunately if an pjsip endpoint has NO registered AORs,
${PJSIP_DIAL_CONTACTS()} returns an empty sting.

So consider:

same => n,Dial(IAX2/gu...@pbx.digium.com/s@default &
${PJSIP_DIAL_CONTACTS(Guest)})

If there is no Guest registered, the resulting string to dial passed to
Dial() is: "IAX2/gu...@pbx.digium.com/s@default &" which Dial complains
is not valid, because of a missing second line to dial after the &.

Well, I could try to expand all the PJSIP Endpoints in a perl AGI
script and then compose a variable to contain a valid string for
Dial(), but I would prefer to do this with Asterisk Logic.

(Yes, with only two endpoints this can somehow be done with Set(if and
compare for empty string), but the more endpoints to ring the more
complicated it is getting.

Anyone having figured an 'easy' way to do this? Or is there even an
alternative to ${PJSIP_DIAL_CONTACTS(Guest)} which would Dial all AOR,
and still work if no AOR is present?

Sidenote:

Set Variable IF(string emptry) constructions also return en empty sting
if the condition does NOT match, is there a reversed way to do it?
IF(string empty) SET variable= ?

-Benoît-

-- 
_
-- 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 vs chan_sip: Where is callerid(num) taken from?

2019-04-16 Thread Benoit Panizzon
Ok, just figured it out, looks like pjsip uses some reversed trust
logic...

PAI contains the network provided screened number, the one which can be
trusted and used for billing purposes and similar.

From contains the generic number, which should be displayed, but which
is user provided and therefore not very trustworthy.

So of course I want to trust the PAI (billing etc) and Display the From:
header on the called phone.

trust_id_inbound=yes

But this causes the PAI Number to be filled in callerID(number)
switching to 'no' causes the From Number, to be filled in
callerID(number).

Very odd!

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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 vs chan_sip: Where is callerid(num) taken from?

2019-04-16 Thread Benoit Panizzon
Dear List

We are renewing our voicemail server and by this occasion I am
migrating from chan_sip to pjsip.

I have come to a problem I have not experienced on other pjsip examples.

Switzerland was heavily SS7 based in the past.

So usually you have a Network provided A Number, which is mapped to the
PAI Header in SIP.
And there is the user provided phone number aka Generic Number, aka
Display Number, which is to be displayed to the destination and which
is transmitted in the From: Header.

So the From: Number is the one we want as source of the call in the
voicemail:

With chan_sip:

Set(Caller=${CALLERID(number)})

${Caller} contains the number from the From: header

With pjsip:

${Caller} contains the number from the PAI header

Any clue how I can change this pjsip behavior?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] RFC about SIP 'To' header after call diversion?

2018-11-27 Thread Benoit Panizzon
Hi List

I'm struggling to find the correct RFC which "exactly" defines how a SIP
Invite has to look like after a call has been diverted.

Especially what the content of the To: header field has to be.

Example call flow:

Alice calls Bob who diverts to Carol.

Alice => Bob

Invite: b...@example.com
From: al...@example.com
To: b...@example.com

Bob => Carol

Invite: ca...@example.com
From: al...@example.com
To: b...@example.com <= is this correct, or should that be carol?
Diversion: b...@example.com

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

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

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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] Weird 'hairpin' call rtp audio problem

2018-08-10 Thread Benoit Panizzon
Hi Joshua

> > The "rtp_keepalive" option can be used to have the RTP stack send an
> > RTP packet out. Try that and see what happens.  
> 
> Once again 'bullseye' that fixed the problem. Thank you!

Now a customer with and FreePBX 2.9.0 (Asterisk 1.8.20.1) ran into the
same issue with our SBC.

I told him to set rtpkeepalive=1 in sip.conf but I don't see this
version sending any comfort noise packets.

Isn't there any way to disable this nat detection feature completely
in asterisk? (nat=no does not seem to do the trick)

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Asterisk receiving 415 Unsupported Media Type upon T.38 invite behaving absolutely weird.

2018-06-22 Thread Benoit Panizzon
Hello

I am hunting Fax Problems.

Now I have come across a situation on which, I fear asterisk behaves in
a wrong manner..

A T.38 enabled ATA is connected to the asterisk and receiving a call
from a non T.38 capable endpoint.

The ATA is detecting the CED tone and initiating a T.38 re-invite.
Asterisk forwards that T.38 Re-invite to the non T.38 endpoint.

The non T.38 endpoint answers with 415 Unsupported Media.

From my point of view, Asterisk should now forward this to the ATA so
it can Fallback to G.711. But this does not happen.

What follows next is:

Asterisk issuing Bye to the non T.38 endpoint ending the call.
Asterisk answering 200 Ok to the ATA initiating T.38 (weird!)
Asterisk re-sending an invite T.38 to the NON T.38 endpoint after
ending the call (even weirder). That Endpoint is the outgoing trunk so
it challenges that invite with a 401 challenge, causing the asterisk to
also drop the other leg.

So what's going wrong here? (PCAP attached).

I know, most Endpoints to reply with 488 when fallback to g711 is
required. This one does send 415, which IMHO is also valid.

Any ideas?

Asterisk 13.14.1 in use.

-- 
-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__


415-on-T38-fallback.pcapng
Description: application/pcapng
-- 
_
-- 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] Is 100 trying mandatory? Can asterisk answer with 180 without prior 100 trying?

2018-03-20 Thread Benoit Panizzon
Hi Tryba

> A (very) dirty workaround would be to drop these packets with iptables
> (assuming Linux as OS), something like:
> 
> iptables -t raw -I OUTPUT -p udp -d ipaddrofpbx -m string --algo bm
> --from 0 --to 32 --string "SIP/2.0 100 " -j DROP
> 
> Don't try it with TCP :)

:-)

Indeed, this is what I did with a Mikrotik Firewall that is in front
of the * Server: Drop UDP packet with content starting with "SIP/2.0
100 Trying"

And this showed, that not the missing 100 Trying is tripping our SBC.
So I contacted the Vendor who had a quick look at the 181 Ringing which
is not being relayed and found that the issue was the Contact: Header
containing two line= attributes.

So I'm now trying to contact the vendor of that other PBX to figure
out, why it is sending two line= attributes as part of the contact
header.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Is 100 trying mandatory? Can asterisk answer with 180 without prior 100 trying?

2018-03-19 Thread Benoit Panizzon
Hey List

I sometimes use our asterisk server to do some debugging or other PBX
and SBC.

Now we have a case where a PBX is replying an incomming invite with 180
ringing immediately. It looks like the SBC does not accept this.

According to my understanding of the RFC 3261 any provisional (aka
1XX) reply should be good enough to make the sender stop re-sending
invites and accept this as a reply from the destination.

So 100 trying would be option and a reply could also be directly 180
ringing.

So maybe some RFC specialist could tell me how this is exactly supposed
to work of if I maybe missed some other RFC more clear about that topic.

To try to reproduce the problem with our SBC, is there a way to tell
the asterisk, preferably PJSIP, to directly answer with 180 ringing
without prior 100 trying?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Blacklist failed attempts

2018-03-01 Thread Benoit Panizzon
Hi

You could do somethink like this in Perl:

#!/usr/bin/perl -w
use strict;
use warnings;
my (@failhost);
my %currblocked;
my %addblocked;
my $action;

open (MYINPUTFILE, "/var/log/asterisk/messages") or die "\n", $!, "Does log 
file file exist\?\n\n";
 
while () {
my ($line) = $_;
chomp($line);
if ($line =~ m/\' failed for \'(.*?):\d+\' - No matching peer found/) {
push(@failhost,$1);
}
if ($line =~ m/\' failed for \'(.*?):\d+\' - Wrong password/) {
push(@failhost,$1);
}
}
 
my $blockedhosts = `/sbin/iptables -n -L asterisk`;
 
while ($blockedhosts =~ /(.*)/g) {
my ($line2) = $1;
chomp($line2);
if ($line2 =~ m/(\d+\.\d+\.\d+\.\d+)(\s+)/) {
$currblocked{ $1 } = 'blocked';
}
}

if (@failhost) {
_unique(@failhost);
while (my ($ip, $count) = each(%addblocked)) {
if (exists $currblocked{ $ip }) {
} else {
$action = `/sbin/iptables -I asterisk -s $ip -j REJECT`;
print "$ip blocked. $count attempts.\n";
}
}
} else {
#print "no failed registrations.\n";
}
 
sub count_unique {
my @array = @_;
my %count;
map { $count{$_}++ } @array;
map {($addblocked{ $_ } = ${count{$_}})} sort keys(%count);
}

Mind, this would NOT block attempts via IPv6. So I have stopped using that 
script, also reading the file over and over again is not very performant.

I have not opted to using my MirkroTik Firewall to block failed attempts, 
similar rules can also be make with iptables:

In the Mangle Ruleset:

 1;;; SIP Check Unauth
  chain=forward action=add-dst-to-address-list protocol=udp 
src-address-list=SIP-Servers address-list=sip-auth-fail 
address-list-timeout=10m 
  out-interface=IMP-PPPOE src-port=5060 content=SIP/2.0 401 Unauthorized 
log=no log-prefix=""

 2;;; tcp sip check auth fail
  chain=forward action=add-dst-to-address-list protocol=tcp 
src-address-list=SIP-Servers address-list=sip-auth-fail 
address-list-timeout=10m 
  out-interface=IMP-PPPOE src-port=5060 content=SIP/2.0 401 Unauthorized 
log=no log-prefix=""

And then you just block all source address from sip-auth-fail in your 
forwarding table. This works for IPv6 and IPv4.

(Als yes, depending on the speed of your link, this also could be ressource 
intensive on your firewall, as it does full packet inspection.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] How to enable TLS debugging or verbose logging with pjsip

2018-02-27 Thread Benoit Panizzon
Well, when testing with:

$ openssl s_client -connect tls-host:5061

I get a successfull TLS handshake and connection.

So I suppose asterisk is configured correctly with TLS.
I did re-check the cipher list and also this seems to match on the
SPA112 and Asterisk.

So I am puzzled why the SPA112 cannot connect via TLS. Any hints?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] How to enable TLS debugging or verbose logging with pjsip

2018-02-27 Thread Benoit Panizzon
Dear List

I try to get my clients to connect via TLS. First I did try Snom M9
phones. After looking at the Wireshark TLSv1 Handhake it became
obvious, that the M9 only supports old RC4 and similar ciphers, that are
not supported by openssl anymore.

So now I get my hands on a Cisco SPA112 ATA, which is also TLS capable
and does support a very nice long cipher list.

I use the same key and cert as for my webserver, which runs on the same
machine and thus has a valid CN in the cert. But anyway, the SPA112
does not check the Cert, as I found via google.

My transport looks like this:

[transport-tls]
type=transport
protocol=tls
bind=0.0.0.0:5061
cert_file=/etc/apache2/server.crt 
priv_key_file=/etc/apache2/server.key 
;cipher=ADH-AES256-SHA,ADH-AES128-SHA
method=tlsv1
tos=cs3
cos=3
allow_reload=yes

Wireshark states 'TLSv1 Handshake Error' from the Asterisk Server as
soon as the client has sent it's cipher list.

I have enabled core verbose and debug on the asterisk, but I see
nothing.

Is there a way to enable some sort of tls debugging on asterisk or
chan_pjsip?

PS: Side Question: Is there a way to specify media_encryption to be
optional? I try to solve one step at the time :-)

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Weird 'hairpin' call rtp audio problem

2018-02-02 Thread Benoit Panizzon
Hi Joshua

> The "rtp_keepalive" option can be used to have the RTP stack send an
> RTP packet out. Try that and see what happens.

Once again 'bullseye' that fixed the problem. Thank you!

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Weird 'hairpin' call rtp audio problem

2018-02-02 Thread Benoit Panizzon
Hello List

Asterisk 13.14.1 in use with pjsip stack.

On the remote side is a SBC which performs some 'nat' detection. I
suppose this means the SBC listens from where it is getting RTP data
and then replies to that ip.

As long as the asterisk is initiating the call this is fine, the
asterisk start sending RTP to the media IP of the SBC and the SBC is
sending media back.

Now I want to do a hairpin call, simulating call forward on no answer
(yes this is the situation I observed the problem first)

So incoming AND outgoing calls are via SBC.

exten => destination,1,Progress()
exten => same,n,Playtones(ring)
exten => same,n,Wait(5)
exten => same,n,Dial(PJSIP/sip:external@sbc)

What I now observe when I dissect this call via Wireshark (and set rtp
debug on etc).

Call to destination is established, up to the Wait(5) we have two way
RTP audio between the SBC and the Asterisk.

The external destination picks up the call. From what I see the media
ip addresses and ports are correct, no direct media is attempted. So
asterisk should 'simple bridge' oder 'native bridge' the call localy.

But for some reason, the asterisk server is NOT forwarding any rtp, nor
is the SBC forwarding any rtp it is getting from it's remote side which
is definitely sending rtp data. (yes I have access to the SBC and did
sniff both sides).

I fear, that both, the asterisk side and the sbc side are attempting
the same kind of nat detection and do not forward rtp until they
receive any packets.

I did probably try all possible permutations of:

direct_media=no
rtp_symmetric=yes
force_rport=yes

But still no audio.

Any hints on how to force asterisk to send the first rtp packet?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] What is the status of world wide e164 DUNDI

2018-02-02 Thread Benoit Panizzon
Hello List

I have a still two connected DUNDI peers, but they seem to flap from
time to time.

A couple of years ago I was able to look up quite some, mostly free
call numbers via DUNDI all over the world and I als saw incomming
lookups.

But not anymore. I wonder if I am stranded on a no longer world-wide
connected DUNDI island of me and the two remaining peers I have.

http://www.dundi.com/ only shows a default website.

My last request for peers on the DUNDI Mailinglist from March 2017 was
unanswered.

Is anybody still interconnected via DUNDI or has this service silently
died?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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 rtp_ipv6=yes but endpoint registered via ipv4 (IP4 contact infor)

2018-01-09 Thread Benoit Panizzon
Hi Jushua

> The rtp_ipv6 option is not needed, in current versions things will
> automatically be updated to reflect the signaling. Remove it and give
> it a try. The option itself actually had the bug that you are seeing.

Ok, commented out rtp_ipv6 in the config and did try again:

IPv6 Registered client.

c=IN IP6 2001:4060:1:4133:204:13ff:fe30:2a80

Reply from *

c=IN IP6 2001:4060:dead:beef::1

IPv4 registered client:

c=IN IP4 157.161.4.172

Reply from *

c=IN IP4 157.161.57.1

Perfect! It didn't occur to me to completely comment out that option as
I believed it was needed for rtp to work over ipv6.

Thank you for that exceptional quick help.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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 rtp_ipv6=yes but endpoint registered via ipv4 (IP4 contact infor)

2018-01-09 Thread Benoit Panizzon
Dear List

I fear I stumbled over a bug in asterisk 13.14.1.

My 'phones' are roaming around, sometimes some are connecting from ipv6
enabled networks, another time they are not.

If a connection is ipv6 I would prefer to use ipv6 to avoid ipv4-nat
problems.

I have not specified a transport in the endpoint section, so that the
appropriate transport which corresponds to the registration can be used.

Now I have noticed, if an phone is registered from an ipv4 only
endpoint and is performing an outgoing call, my asterisk server is
answering with an IP4 RTP IPv6 address:

Example:

<--- Received SIP request (1235 bytes) from UDP:157.161.4.172:5060 --->
[...]
v=0
o=MxSIP 0 20 IN IP4 157.161.4.172
s=SIP Call
c=IN IP4 157.161.4.172
t=0 0
m=audio 6018 RTP/AVP 9 8 97 91 101
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:97 CLEARMODE/8000
a=rtpmap:91 X-CLEAR-CHANNEL/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv

<--- Transmitting SIP response (914 bytes) to UDP:157.161.4.172:5060
--->
[...]
v=0
o=- 0 22 IN IP4 2001:4060:dead:beef::1
s=Asterisk
c=IN IP4 2001:4060:dead:beef::1
t=0 0
m=audio 16172 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv


Errr... how should my client @ 157.161.4.172 send udp to
2001:4060:dead:beef::1?

Also when I compare with a real IPv6 client I notice from the client:

c=IN IP6 2001:4060:1:4133:204:13ff:fe30:2a80

from the Asterisk:

c=IN IP4 2001:4060:dead:beef::1

Shouldn't that also be IP6 from the asterisk?

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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: identify endpoint by authentication username?

2018-01-09 Thread Benoit Panizzon
Hi George

> [global]
> endpoint_identifier_order = auth_username,username,ip,anonymous
> 
> [endpoint_x]
> identify_by = auth_username

Thank you, I missed that config option, works perfectly!

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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: identify endpoint by authentication username?

2018-01-09 Thread Benoit Panizzon
Dear fellow list readers

This is the situation:

ISDN Devices => Patton ISDN to SIP GW => Asterisk PJSIP

The Patton GW resides on a dynamic IP address, so I cannot really use
match=ip in the identify section.

The Patton does not send a line parameter.

The ISDN Devices behind the patton have different MSN and should be
able to send them in the From: Header, so the default endpoint
identification mechanism which matches the From username with the
endplaint fails.

So what are the options to solve that issue?

I see the asterisk sending out a challenge and getting a proper reply
from the patton, but then stills complains about the endpoint not
matching.

According to the manual there is no

type=identify
match=authentication_username

or similar.

Mit freundlichen Grüssen

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] To Header instead of Request URI based routing

2017-12-22 Thread Benoit Panizzon
Dear List

It looks like the common way to to sip signaling over a trunk is:

In the Request URI, return the 'Register' Contact.
In the To: Header, send the destination number.

Unfortunately, asterisk with pjsip (i did not try chan_sip) does
expect the dialed extension as request uri and does ignore what it is
getting in the To: header.

I could not find any hint in the documentation of this can be changed.

I found instructions for a work-around:

http://www.kempgen.net/voip/sip-request-uri-vs-to-header-routing.html

In the meantime: Is there a way to tell the asterisk with pjsip to use
the To: header to address an extension?

Kind regards

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] SOLVED! Re: pjsip subscribe (presence) always returns: No matching endpoint found

2017-12-02 Thread Benoit Panizzon
Hi List

Just in case someone else runs into the same problem migrating from
chan_sip to res_pjsip.

In chan sip you did define the voicemail variables in the peer section.

I did configure most of that stuff into the endpoint of pjsip,
including:

mailboxes=
voicemail_extension=

Well, after re-reading where each config could be specified I found
that those two can also be used in an aor section.

I moved them there, and now subscription to MWI works as expected with
my SNOM M9 phones, the 'hint' from the dial plan is being found.

-Benoît-

-- 
_
-- 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 subscribe (presence) always returns: No matching endpoint found

2017-12-02 Thread Benoit Panizzon
Hi Joshua

> The chan_pjsip module doesn't prevent that. You'd need to provide the
> full SUBSCRIBE now that it is actually finding the endpoint and coming
> in.

Ok, let's see if we can solve the mystery..

pjsip.conf

[endpt-home](!)
type=endpoint
disallow=all
allow=g722
allow=alaw
allow=gsm
ice_support=yes
context=from-home
allow_subscribe=yes
mwi_subscribe_replaces_unsolicited=yes

[11](endpt-home)
auth=11
aors=11
callerid=*scrubbed*
mailboxes=11
voicemail_extension=411

extensions.conf

[from-home]
exten => 11,hint,PJSIP/11

include=>local-extens
include=>trunk-out

This is the exact subscribe message and reply as recored by the Snom M9 Logging 
facility.

2017/12/02 11:58:00 [SIP-Reg:5]: SIP Tx udp:[2001:4060:dead:beef::1]:5060:
SUBSCRIBE sip:1...@woody.ch SIP/2.0
Via: SIP/2.0/UDP 
[2001:4060:dead:d1d0:204:13ff:fe30:228d]:2799;branch=z9hG4bK-88k838;rport
From: "Benoît Panizzon" ;tag=fg0ojl
To: "Benoît Panizzon" 
Call-ID: 6lrsku1p@snom
CSeq: 933701145 SUBSCRIBE
Max-Forwards: 70
Contact: 
;reg-id=1;+sip.instance=""
Supported: outbound, gruu
Event: message-summary
Accept: application/simple-message-summary
User-Agent: snom-m9/9.6.13-a
Authorization: Digest realm="asterisk",*** remaining line removed for this 
email ***
Expires: 60
Content-Length: 0

2017/12/02 11:58:00 [SIP-Reg:5]: MWI subscription on identity 1 failed. Retry 
in 60 seconds
2017/12/02 11:58:00 [SIP-Reg:5]: SIP Rx udp:[2001:4060:dead:beef::1]:5060:
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 
[2001:4060:dead:d1d0:204:13ff:fe30:228d]:2799;rport=2799;received=2001:4060:dead:d1d0:204:13ff:fe30:228d;branch=z9hG4bK-88k838
Call-ID: 6lrsku1p@snom
From: "Benoît Panizzon" ;tag=fg0ojl
To: "Benoît Panizzon" ;tag=z9hG4bK-88k838
CSeq: 933701145 SUBSCRIBE
Server: Asterisk PJSIP XP
Content-Length: 0

I did also try all those variants:

exten => 11,hint,PJSIP/1...@woody.ch
exten => 11,hint,PJSIP/sip:1...@woody.ch
exten => 11,hint,PJSIP/sip:11
exten => 1...@woody.ch,hint,PJSIP/11

Any 'hint' welcome on why MWI subscription just does not work on those SNOM M9 
phones.

-Benoît-

-- 
_
-- 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 Transfer 'Failed to parse destination uri'

2017-11-27 Thread Benoit Panizzon
Ok, answering myself:

Asterisk 13.14.1~dfsg-2+deb9u2

Apparently suffers the pjsip transfer bug described @

https://reviewboard.asterisk.org/r/4316/diff/

Specifying the full URI:

Transfer(PJSIP/sip:${DESTEXTEN}@trunk) does resolve the URI parsing
problem and is sending back the 302 message (which does not containg a
Diversion header, Jay promising, testing that next), but as described in
the Bug the Contact header is being messed up.

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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 Transfer 'Failed to parse destination uri'

2017-11-27 Thread Benoit Panizzon
Hi Richard

> That could be possible and would be a bug in chan_sip.

Ok, so I switched to PJSIP to see if this behaves differently

So ip do a

Transfer(PJSIP/${DESTNUMBER}@trunk)

And this results in:

Failed to parse destination URI '[destnumber scrubber]' for channel
PJSIP/trunk-0011

Do I have to specify the destination number differently when using
Transfer with pjsip that I used it in chan_sip?

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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 multiple transports for one endpoint (dual stack) ipv6

2017-11-25 Thread Benoit Panizzon
Hi List

I have stumbled over the next question google didn't answer.

I have a dual-stack environment, ipv6 and ipv4.

With chan_sip asterisk was listening on ipv6 and ipv4 simultaneously.

I did try to define to have pjsip listen to the ipv6 address including
ipv6 mapped ipv4 addresses:

[transport-udp]
type=transport
protocol=udp
bind=[::]:5061

Google told me, pjsip is not able to parse the ipv6 mapped ipv6
address, you have to listen to ipv4 separately.

So next try:

[transport-udp]
type=transport
protocol=udp
bind=[::]:5061
bind=0.0.0.0:5061

Well, this also does not work, only one address family is being bound.

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0:5061

[transport-udp6]
type=transport
protocol=udp
bind=[::]:5061

[phone]
type=endpoint
transport=transport-udp
transport=transport-udp6

Well, this sort of works, the phone is able to register, but qualify
does not work, as it seems to always try to use the 2nd transport
definition.

So how the heck do you define a endpoint listening to both ip versions
if you don't know if your roaming phone is going to connect from a ipv6
enable VoLTE Network without NAT problems, or is going to use the old
legacy ipv4 protocol? :-)

-Benoît-

-- 
_
-- 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] How to correctly set REDIRECTING to indicate diversion reason

2017-11-21 Thread Benoit Panizzon
Hi Richard

Thank you

> You need to set more redirecting information [1].
> 
> In sip.conf send_diversion=yes needs to be in effect.  You also need
> to setup
> the from party id information (at least the from number) to indicate
> where you
> are redirecting from.  You should also increment the redirecting
> count.
> 
> Richard
> 
> [1]
> https://wiki.asterisk.org/wiki/display/AST/Manipulating+Party+ID+Information

I'm back to chan_sip to get quicker progress in our test scenario as I
know this better than pjsip :-)

send_diversion=yes is the default if it is not set, so that's correctly
set.

I altered my test dialplan and got some success but also another weird
problem now:

exten => XX,1,NoOp(Call to ${EXTEN} from ${CALLERID(all)})
exten => XX,n,Progress
exten => XX,n,Ringing
exten => XX,n,Wait(10)
exten => XX,n,set(REDIRECTING(from-num)=${EXTEN})
exten => XX,n,set(REDIRECTING(reason)=cfnr)
exten => XX,n,Transfer(SIP/ZZ)

How everytime REDIRECTING is called, this causes a 181 call is being
forwarded to the caller, but containing no diversion information.

The Transfer (302 Moved Temporarily) contains two Diversion: headers,
one with reason=unknown and one with reason=no-answer which would be the
correct one.

I start to think I stumbled over a bug. Maybe using REDIRECTING() would
set the correct headers if I used DIAL to forward the call. But I don't
want to create a second call leg. So maybe Transfer already is setting
a Diversion: header with hardcoded reason 'unknown'.

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] How to correctly set REDIRECTING to indicate diversion reason

2017-11-20 Thread Benoit Panizzon
Hello List

Next question where google did not spit out an unsable answer.

When redirecting a call with Transfer, I would like to correctly
indicate the reason.

I did try this:

exten => XX,1,NoOp(Call to ${EXTEN} from ${CALLERID(all)})
exten => XX,n,Dial(SIP/ZZ)
exten => XX,n,set(REDIRECTING(reason)=cfb)
exten => XX,n,Transfer(SIP/YY)

I did try with 'reason' 'orig-reason' I added cfb with and only quotes,
I did try cfnr.

But the 302 message generated this way allways contains reason=unknown
in the diversion header.

Any hint welcome.

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Ringing (180) no SDP to progress(183) with SDP transition => no audio.

2017-11-20 Thread Benoit Panizzon
Dear List

I am testing various early audio scenarios with different voice IC's,
phones and pbxes.

In Switzerland, when you operate a value added number, you have to
announce the price of the call, usually in early audio, before the call
is established.

In 'dialplan' terms this would be:

exten => XX,1,Ringing
exten => XX,n,Wait(15)   
exten => XX,n,Progress
exten => XX,n,Playback(price-announce,noanswer)
exten => XX,n,Wait(5)
exten => XX,n,Answer 

I see the asterisk playing the early announcement audio in the rtp
stream. Some devices (arris EMTA) calling the asterisk also do play it
to the caller.

But!

Most other devices I have tested just keep playing the locally generated
ringtone despite getting an 183 with SDP and the announcement is never
to be heard by the caller.

If I do to force inband ringback tone, this works with all devices I
have tested so far.

exten => XX,1,Progress
exten => XX,n,Ringing
exten => XX,n,Wait(15)   
exten => XX,n,Playback(price-announce,noanswer)
exten => XX,n,Wait(5)
exten => XX,n,Answer

Is anything wrong with the transition of ringing without SDP (to have
the local device generating ringback tone) and then start sending early
audio with 183?

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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 subscribe (presence) always returns: No matching endpoint found

2017-11-19 Thread Benoit Panizzon
Hi Joshua

thank you for the quick reply

> Have you checked the Asterisk console when PJSIP is loaded to see if
> the endpoint did not load for some reason? Does it show up in "pjsip
> show endpoints"?

Yes, the endpoint shows up.

 Endpoint:  11/(scrubbed from mail)   Not 
in use0 of inf
 InAuth:  11/11
Aor:  11 1
  Contact:  11/sip:11@[2001:4060:dead:d1d0:204:13ff:fe 58af7d6822 Avail 
5.799
  Transport:  transport-udp udp  0  0  [::]:5061

I had the qualify statement at the wrong place, but that's sorted out now.

But still, subscribing to the hint results in a 404 error.

Acutualy, that subscribing is a bit odd, it's a snom M9 phone that is trying to 
subscribe to itself.
That does not make much sense in my opinion.

It just that chan_sip reported OK to this and chan_pjsip replies with 404.
Or is pjsip more intelligent and trying to prevent the phone from subscribing 
to itself?

-Benoit-

-- 
_
-- 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 subscribe (presence) always returns: No matching endpoint found

2017-11-19 Thread Benoit Panizzon
Hello List

I am in the progress of migrating from chan_sip to pjsip.

I fear I have missed something on how hints need to be specified for
pjsip.

For chan_sip I have configured sip.conf

subscribecontext = localuser


and in the dialplan I set:

[localuser]
exten => 11,hint,SIP/11

Now if a phone subscribes to '11' this works.

Now I try to get the same working for pjsip. I understood that for
pjsip the hit needs to be placed in the same context as the endpoint:

[11]
type=endpoint
transport=transport-udp
context=localuser
disallow=all
allow=g722
allow=alaw
allow=gsm
auth=11
aors=11
callerid=(remove in this example
qualify_frequency=10
mailboxes=11
voicemail_extension=411

And in the dialplan I changed:

[localuser]
exten => 11,hint,PJSIP/11

But I constantly get:

Request 'SUBSCRIBE' from '"Benoît Panizzon PJSIP" '
failed for '2001:4060:dead:d1d0:204:13ff:fe30:228d:2332' (callid:
ow21f3eg@snom) - No matching endpoint found

And I in the logger I see that the subscriber request is being rejected
with error 404.

Any hints what I'm doing wrong?

-Benoît-

-- 
_
-- 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] Queue, no announcement being played at all

2017-09-25 Thread Benoit Panizzon
Hi List

I have a very strange problem. I was using queues a while ago with an
asterisk 1.2 or so and announcements were working fine more or less out
of the box.

Now I am once again trying to set up a queue with Version 13.14.1 an
not matter what I do, I don't get the announcements to be played. MOH
is played, no problem. sound files are present.

core set verbose 99
core set debug 99

does not even show the slightest hint, that asterisk is trying to play
the announcements.

Did I miss some kind of 'master' switch?

Here is my queues.conf

[general]
persistentmembers = yes
monitor-type = MixMonitor
musicclass = default
announce = queue-markq
strategy=rrmemory
maxlen = 5
announce-frequency = 5
min-announce-frequency = 15
periodic-announce-frequency=60
announce-holdtime = yes
announce-position = yes
announce-to-first-user = yes
periodic-announce = queue-periodic-announce,your-call-is-important,please-wait

[scoutnet]
strategy=rrmemory
queue-youarenext = queue-youarenext
announce-to-first-user = yes
member => SIP/11,,Random Dude,SIP/11,no

From the Dialplan:

exten => [masked],1,Answer()
exten => [masked],n,Queue(scoutnet,C)

Any hint what I missed?

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] IAX2 via IPv6, no packets being sent!

2017-09-25 Thread Benoit Panizzon
Hello List

I have two IAX2 peers reachable with IPv6. They consider them self
unreachable.

If I do a 'iax2 set debug on', I see asterisk pretending to send POKE
packets to the IPv6 address of the peer.

If I sniff on the interface, I don't see those packets.

Is there a known issue?

Version 13.14.1 in use.

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] CallerID(num-pres) not set during incomming call

2017-09-18 Thread Benoit Panizzon
Hello List

I can set CALLERID(num-pres)=prohib on a sip channel and asterisk is
setting the headers more or less correctly (PAI Header is missing
maching the call untrackable, which is a bit odd).

But when asterisk is handling an incomming call from:

From: Anonymous
;tag=3714732606-1699825061

And then I query CALLERID(num-pres) it contains: allowed_not_screened

Well the call has a prohibited CallerID. Why is the variable not being
set accordingly?

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Now to set contact username and from username idependently

2017-09-08 Thread Benoit Panizzon
Hello

Finally I figured out, how our SBC does matches invites to
registrations with the Contact header.

But now I run into a Problem:

How do I set the contact header of an invite different to the From
header?


INVITE sip:called-id@URI SIP/2.0
Via: SIP/2.0/UDP IP:5060;branch=z9hG4bK495c70cc
Max-Forwards: 70
From: "SBC TEST" ;tag=as2c330ac5
To: 
Contact: 

in my 

[sip-provider]
type=peer
;fromuser=user-from-reg
;username=user-from-reg
secret=hidden
host=URI
outboundproxy=IP of Proxy

As soon as I set either fromuser or username, this also overwrites the
callerID and then of course the CallerID which should be sent over the
trunk is not correct anymore.

And of course because the CallerID can be different for each call (it's
a trunk) I cannot set it with CallerID= in the peer definition.

Am I missing something?

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Outbound Calls via Proxy to use Call ID from registration

2017-08-28 Thread Benoit Panizzon
Hello List

> I work at an SIP Provider and we have added and SBC in front of our
> Voice Switch to protect it.

Well using two peers for incomming and outgoing calls solve the
previous issue.

Now I have a new one.

The SBC in use needs to match incomming calls from the asterisk with
the call id used in the registration.

We have tested this with a couple of PBX, which do use the call ID used
during registration automatically for outbound invites.

Not so my asterisk server.

So I assumed that when I refer to a 'peer' definition in the register
statement, I could make asterisk understand, that the registration and
outgoing peers belong together and then use the same call ID.

But how do I refer to a peer in the registration statement?

I did try different variants of:

register => sip-user@sip-outbound

[sip-outbound]
username=sip-user
secret=go-fishing
type=peer
host=asterisk-pbs.example.com
outboundproxy=ip.address.of.proxy
insecure=invite,port
qualify=yes
dtfmmode=auto
canreinvite=yes
context=from-sip
nat=no
t38pt_udptl=yes

But that is not matching.

If course if I do:

register=>sip-u...@asterisk-pbs.example.com:go-fish...@ip.address.of.proxy

registration is successfull, but invites sent via dial
sip://callerid@sip-outbound do not match the call ID used during
registration.

Anyone a hint how to make asterisk properly use the call ID of the
registration?

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] Asterisk 1.6.2 how to debug T.38 udptl problems

2017-06-15 Thread Benoit Panizzon
Hi all

I know, a fairly old asterisk installation.

Is there any way to debug T.38 handshaking issues?

We have a C3 Voice Switch with link to the Asterisk server.

I see this Dialogue:

C3 => Asterisk
=> Invite g711
<= 200OK

C3 detects Fax and send re-invite

=> Invite T.38
Version:0
RateManagement:transferredTCF
MaxDatagram:512

So, this is only a very basic invite.

The Asterisk picks that up and replies with details:

<= 200 OK + SDP T.38

Version:0
BaxBitRate:14400
RateManagement:transferredTCF
MAxDatagramm:1400
UdpEC:t38UDPFEC

The C3 Switch then compares this whith it's capabilities and answers
with one more re-invite:

=> Invite + SDP T.38

Version:0
RateManagement:trasferredTCF
UdpEC:t38UDPFEC
MaxBitRate:14400
MaxDatagramm:512

Well so the C3 just tells the asterisk, that it only support 512 byte
datagramm, but everything else is the same.

The Asterisk replies to this invite with:

488 Not acceptable here.

Now I would like to find out what is not acceptable for the asterisk.

core set verbose 99 and debug 99 does not show any futher information.
udptl set debug on neither.

Any other way to debug the T.38 handshake?

Or does anyone have an idea over what the asterisk is stumbling?

-- 
-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] SIP Trunk over Proxy (matching ip of outbound proxy in incomming calls)

2017-05-22 Thread Benoit Panizzon
Hello List

I work at an SIP Provider and we have added and SBC in front of our
Voice Switch to protect it.

This requires all our SIP Trunk customers to register via a 'proxy'.

I struggle with Asterisk to work over a proxy.

This is what I have done so far.

register => usern...@sip.example.com:passw...@sbc.example.com

This works fine, asterisk is sending registrations via the SBC to the
voice switch defined by URI.

[username]
type=peer
secret=password
host=sip.example.com
outboundproxy=sbc.example.com
context=from-ISP-X

From the Dialplan that string is dialed:

Dial(SIP/username/${EXTEN})

This works fine, asterisk sends the call to the outboundproxy defined
in the sip.conf section of [username].

Before adding outboundproxy setting, incomming calls were
matched because they originated from the host and passed to the correct
context.

I have set allowguest=no to challenge all those sip attackers in
[default] who occasionaly managed to call internal extensions defined
there.

Now incomming calls do not originate from the ip of sip.example.com
anymore, but from the ip of sbc.example.com and are not set to the
context [from-ISP-X] but probably to [default] and challenged.

Of course, I could allow guests, but that would bring back the problem
of having unwanted calls from sip scanners.

So how do I tell the asterisk to also match calls from the ip of the
outbound proxy?

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- 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] t.38 fax over IAX2?

2016-01-25 Thread Benoit Panizzon
Hello

Let's assume we have this situation:

Call => SIP TSP => Asterisk1 => IAX2 => Asterisk2 => SIP/ATA => Fax

I have two Asterisk Servers in two branch offices, which are
interconnected by IAX2 and the Switch functionality.

Asterisk1 is connected to the public phone network via a SIP provider
which supports T.38

A fax is connected to a SIP T.38 capable ATA Box.

If that fax is connected to Asterisk1, then the call is transparently
routed and received by this ATA box in T.38 mode.

If the fax is connectd to Asterisk2, then there is a IAX Link between
the originating SIP T.38 Fax and the Destination which is also T.38
capable. But T.38 is refused by Asterisk1. Fax receptions falls back to
g711 (sometimes) and is unreliable behind Asterisk2.

Google hints to me, that T.38 fax reception over IAX2 is possible with
IAXMODEM. So I suppose udptl t.38 should also transparently be passed
between SIP and IAX2. But I find no way to configure t38 on a IAX2
channel.

Am I missing something?

-Benoît Panizzon-
-- 
I m p r o W a r e   A G-Leiter Commerce Kunden
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] How to log caller IP address in the CDR?

2012-10-05 Thread Benoit Panizzon
Hello

We had this situation:

Some bot-net did try to guess SIP logins and finally succeeded. The Asterisk 
Server was abused to call a large number of expensive destinations.

It is clear that the sip logins have been passed to various persons (probably 
posted on a forum somewhere inviting to do 'free calls').

Right after the affected password was changed, the message log shows which IP 
did try to make calls.
We also got a few snapshots of 'sip show channels' which show the ip addresses 
of active in call connections.
So basicly it is known, who abused the service. It was abused from multiple IP 
addresses at the same time.

Legal steps against the abusers have been taken, but to claim the costs of the 
damage they generated we would need to know exactly which calls originated 
from which IP address to put an exact sum of damage done by each of the 
abusers.

Well for this case it is too late now. But is there a way to get the IP 
Address of the SIP Client being logged in each CDR?

Kind regards

Benoit Panizzon

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] How to log caller IP address in the CDR?

2012-10-05 Thread Benoit Panizzon
Hi Joshua and all others who replied.

 exten = _X.,1,Set(CDR(userfield)=${CHANNEL(recvip)})

Thank you, that did it.

It's an asterisk 1.6.2.9 actualy. Are additional CDR fields like CDR(recvip) 
only possible from some newer release or do they have to be defined somewhere?

Well sure I now have set:

alwaysauthreject=yes

And got a script to scan the logfile all 15min to firewall IP addresses which 
excessively try to login.

You're always smarter after the incident :-/

Benoit Panizzon

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] Invite + decreasing sequence number = 500 Error?

2012-05-31 Thread Benoit Panizzon
Hi Matt

 It's not a bug - decrementing the CSeq header field value is directly in
 violation of RFC 3261.  From section 22.2:
 
When a UAC resubmits a request with its credentials after receiving a
401 (Unauthorized) or 407 (Proxy Authentication Required) response,
it MUST increment the CSeq header field value as it would normally
when sending an updated request.

I sent this to the developers of the C3 Softswitch.

They answered by quoting this part from RFC 3261, 8.1.3.5 Processing 4xx 
Responses:

   If a 401 (Unauthorized) or 407 (Proxy Authentication Required)
   response is received, the UAC SHOULD follow the authorization
   procedures of Section 22.2 and Section 22.3 to retry the request with
   credentials.
[...]
   In all of the above cases, the request is retried by creating a new
   request with the appropriate modifications.  This new request
   constitutes a new transaction and SHOULD have the same value of the
   Call-ID, To, and From of the previous request, but the CSeq should
   contain a new sequence number that is one higher than the previous.

Here it says it should, so a lower CSEQ is allowed and asterisk is wrong they 
say.

Well I'll quote them the _MUST_ part of section 22.2

Thanks

Benoit Panizzon
-- 
I m p r o W a r e   A G-
__

Zurlindenstrasse 29 Tel  +41 61 826 93 07
CH-4133 PrattelnFax  +41 61 826 93 02
Schweiz Web  http://www.imp.ch
__

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] Invite + decreasing sequence number = 500 Error?

2012-05-31 Thread Benoit Panizzon
Hi Olle

  violation of RFC 3261.  From section 22.2:
When a UAC resubmits a request with its credentials after receiving a
401 (Unauthorized) or 407 (Proxy Authentication Required) response,
it MUST increment the CSeq header field value as it would normally
when sending an updated request.
 
 This only applies to the same dialog. The question here is if it is the
 same dialog. If it is, then the server indeed has a bug.
 
 Check the Call-ID and the from tag of both requests.

Thanks, you pointed to the right place:

= Working Dialog =

Call-ID: 3D4B79B7@7f33ff47
CSeq: 165558315 INVITE

(Asterisk) SIP/2.0 401 Unauthorized

Call-ID: 3D4B79B7@7f33ff47
CSeq: 252045256 INVITE

(Asterisk) SIP/2.0 100 Trying

= Broken Dialog =

Call-ID: A220DA56@7f33ff47
CSeq: 897885804 INVITE

(Asterisk) SIP/2.0 401 Unauthorized

Call-ID: A220DA56@7f33ff47
CSeq: 24994731 INVITE

(Asterisk) SIP/2.0 500 Server error

Well as I see it, the C3 PBX just generates plain random CSeq Numbers.

Regards

Benoit Panizzon
-- 
I m p r o W a r e   A G-
__

Zurlindenstrasse 29 Tel  +41 61 826 93 07
CH-4133 PrattelnFax  +41 61 826 93 02
Schweiz Web  http://www.imp.ch
__

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


[asterisk-users] Invite + decreasing sequence number = 500 Error?

2012-04-16 Thread Benoit Panizzon
Hi out there

We have a strange Problem here with invites.

We observe this SIP conversation.

C3 PBX - Asterisk

Case 1. Sequence Numer always increasing:

= Invite
= 401 Unauthenticated
= Invite+auth with sequence number  previous Invite.
= 100 Trying etc. Works OK.

Case 2. Sequence Number decreasing.

= Invite
= 401 Unauthenticated
= Invite+auth with sequence number  previous Invite.
= 500 ERROR

I was browsing the SIP rfc and I cannot find any clue if in this case the 
sequence numbers must be increasing (the C3 PBX is wrong) or if I have sumbled 
over an asterisk bug.

Is there anyone who knows?

Benoit Panizzon
-- 
I m p r o W a r e   A G-
__

Zurlindenstrasse 29 Tel  +41 61 826 93 07
CH-4133 PrattelnFax  +41 61 826 93 02
Schweiz Web  http://www.imp.ch
__

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


[asterisk-users] chan_sip.c:3641 retrans_pkt: Retransmission timeout

2012-03-27 Thread Benoit Panizzon
Hello

We have a Genband C3 Switch and a couple of customers that operate asterisk 
PBXes connected via SIP Trunk. All of them still use some 1.6.X asterisk and 
this works fine.

One customer uses a 1.8 version and has a very strange problem:

Asterisk 1.8.10.0-1digium1~lucid built by pbuilder @ nighthawk on a x86_64 
running Linux on 2012-03-06 01:51:21 UTC

When a call reaches this asterisk the call get's dropped after a couple of 
seconds with this message:

[Mar 27 13:47:35] WARNING[29806]: chan_sip.c:3641 retrans_pkt: Retransmission 
timeout reached on transmission F47F6F67@7f33ff47 for seqno 907689273 
(Critical Response) -- See 
https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 6400ms with no response
[Mar 27 13:47:35] WARNING[29806]: chan_sip.c:3670 retrans_pkt: Hanging up call 
F47F6F67@7f33ff47 - no reply to our critical packet (see 
https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).

Well, the Wiki is not very helpfull, as the problems explained there do not 
seem to be the cause.

I sniffed the connection on the Asterisk Box itself and what I see is this 
flow of SIP messages:

C3 = Asterisk

= Invite +sdp
= 401 Unauthorized
= Ack
= Invite +sdp +auth
= 100 Trying
= 180 Ringing
= RTP Audio
= 200 OK +sdp
= Ack
= RTP Audio
= 200 OK +sdp
= Ack
= 200 OK +sdp
= Ack
= 200 OK +sdp
= Ack
= Bye
= Ack
= Bye
= Ack
= Bye
= Ack

Well apparently the C3, from my point of view sends correct Acks to the 
Asterisk, but somehow the Asterisk ignores them.

I did try to get more information with debug and verbose level set to '99', 
but I don't see more messages

Does anyone have a clue, why acks could be not accepted by asterisk 1.8.10.0 ?

The other way round (asterisk = c3) the calls work fine.

Regards

Benoit Panizzon
-- 
I m p r o W a r e   A G-
__

Zurlindenstrasse 29 Tel  +41 61 826 93 07
CH-4133 PrattelnFax  +41 61 826 93 02
Schweiz Web  http://www.imp.ch
__

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


[asterisk-users] Prevent Asterisk from setting CALLERID(name) or unsetting CALLERID(name)

2011-07-21 Thread Benoit Panizzon
Hi all

We use a Genband Safari C3 Softswitch and have an attached Asterisk for some 
special funktions like SPOT Filtering.

Now then a call comes from PSTN to a SIP subscriber, the invite looks like:

From: sip:
+4179***@157.161.10.190:5060;user=phone;tag=7f33ff47+1+68530003+e1367280

If the device is a Snom M9 (or many others) in the absence of a CALLERID(name) 
the CALLERID(num) is displayed.

If the same invite reaches the Asterisk server. Strangely the CALLERID(name) 
is set to the same Value as the CALLERID(num).

Now the CALLERID(num) is being changed (localized) during processing of the 
call on the asterisk server.

If now the call get's connected to a SIP customer.

From: +4179*** sip:079***@157.161.10.37;tag=as40775516

So a SIP customer get's a non localized number on his display (which is 
CALLERID(name)).

Is there a way to get asterisk not to invent a CALLERID(name) if there is 
none?

Id did try to set ${CALLERID(name)=} but that resulted in From:  sip... 
and the displaying of this empty string on the subscribers phone.

Is there a way to completely remove the CALLERID(name) like 
(UNSET({CALLERID(name))?

Kind regards

Benoit Panizzon
-- 
I m p r o W a r e   A G-
__

Zurlindenstrasse 29 Tel  +41 61 826 93 07
CH-4133 PrattelnFax  +41 61 826 93 02
Schweiz Web  http://www.imp.ch
__


smime.p7s
Description: S/MIME cryptographic signature
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] cseq decreasing = 500 Server Error

2011-07-14 Thread Benoit Panizzon
Hello

We have quite a strange phenomena in a genband c3 = asterisk 1.6.2.15 SIP 
interconnection. (also reproduced with an 1.8 asterisk)

The Sequence:

c3 = Asterisk

Let's assume X  Y

We get:

 INVITE (cseq X)
 403 Unauthorized (cseq X)
 INVITE+AUTH (cseq Y)
 ACK (cseq Y)
 TRYING (cseq Y)
 180 Ringing (cseq Y)
 200 OK (cseq)

Not the C3 sometimes sends lower cseq on the second invite (X  Y) and for an 
identical invite we get:

 INVITE (cseq X)
 403 Unauthorized (cseq X)
 INVITE+AUTH (cseq Y)
 500 Server Error

We analyzed about 50 calls of which about half resulted in a 500 Server Error. 
The only common thing with those who failed was cseq of the second invite 
being lower than the first.

From my point of view, this should not be a problem as the second call should 
be independent.

Any others observing this problem or able to explain this observation?

Mit freundlichen Grüssen

Benoit Panizzon
-- 
I m p r o W a r e   A G-
__

Zurlindenstrasse 29 Tel  +41 61 826 93 07
CH-4133 PrattelnFax  +41 61 826 93 02
Schweiz Web  http://www.imp.ch
__


smime.p7s
Description: S/MIME cryptographic signature
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] SIP Diversion RDNIS - how to get reason parameter?

2011-05-20 Thread Benoit Panizzon
Hi out there

To play the correct announcement in app_voicemail I whould be able to read the 
SIP Diversion Reason which ist sent by another PBX:

Invite contains:

Diversion: sip:+41315995003@157.161.10.190;reason=no-
answer;privacy=off;counter=1

Asterisk Logs:

RDNIS for this call is is +41315995003 (reason no-answer;privacy=off;counter=1)

From what I see in the source of chan_sip the variable ${SIPDIVERSIONREASON} 
should be set, but it is empty...
Also ${PRIDIVERSIONREASON} is empty...

I'm using: Asterisk 1.6.2.5-0ubuntu1.3

Any hints?

-Benoit-

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] SIP Diversion RDNIS - how to get reason parameter?

2011-05-20 Thread Benoit Panizzon
Hi Olivier

 Are those PBXs directly connected to each other through a SIP trunk ?

Yes, and the reason is definitely transmitted in the SIP header and also 
parsed by asterisk and displayed in debug output.

After reading a bit more in chan_sip.c (I'm not a coder) I fear the result is 
just put in a temporary variable __SIPDIVERSIONREASON but not in a variable 
useable in the dialplan.

Kind regards

Benoit Panizzon
-- 
I m p r o W a r e   A G-
__

Zurlindenstrasse 29 Tel  +41 61 826 93 07
CH-4133 PrattelnFax  +41 61 826 93 02
Schweiz Web  http://www.imp.ch
__

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] Early audio SIP sequence order question

2011-02-11 Thread Benoit Panizzon
Hi Kevin

I just found something interresting:

http://www.faqs.org/rfc/rfc3960.txt

  1. Unless a 180 (Ringing) response is received, never generate
 local ringing.

  2. If a 180 (Ringing) has been received but there are no incoming
 media packets, generate local ringing.

  3. If a 180 (Ringing) has been received and there are incoming
 media packets, play them and do not generate local ringing.

So, yes, this most probably is an asterisk bug, if it's not a config issue I 
haven't figured out yet. Shall I submit a bug report?

And indeed, if you dial more than one endpoint and more than one is sending 
early audio, which one do you forward? I think nobody tought about that 
issue. Well as long as one is being forwarded that would be ok for our 
case :-)

Kind regards

Benoit Panizzon
-- 
I m p r o W a r e   A G-
__

Zurlindenstrasse 29 Tel  +41 61 826 93 07
CH-4133 PrattelnFax  +41 61 826 93 02
Schweiz Web  http://www.imp.ch
__

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


[asterisk-users] Early audio SIP sequence order question

2011-02-10 Thread Benoit Panizzon
Hello

We have quite some problems with early audio with our asterisk 1.6.2.15

What we observe is:

Asterisk - Carrier PBX

Asterisk:Invite(+sdp) = Carrier

Carrier starts to send RTP Audio (ignored by Asterisk)

Asterisk = Carrier:100 Trying
Asterisk = Carrier:180 Ringing

Asterisk signals Ringing to the caller which in turn generated the ringing 
tone (still ignoring the early audio sent by the carrier).

Asterisk = Carrier:200 OK(+sdp)
Asterisk:ACK = Carrier

Asterisk starts to send RTP Audio to Carrier

Only now Asterisk starts playing Audio to the caller.

This causes quite troubles, as the price of a value added number is announced 
in early audio in switzerland, giving the caller a chance to hang up before 
the call is established. But the caller connected to asterisk does not hear 
that early audio announcement.

Is this an asterisk bug, or should the carrier have signaled 183 Session 
Progress instead of 180 Ringing?

Kind regards

Benoit Panizzon
-- 
I m p r o W a r e   A G-
__

Zurlindenstrasse 29 Tel  +41 61 826 93 07
CH-4133 PrattelnFax  +41 61 826 93 02
Schweiz Web  http://www.imp.ch
__

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] Early audio SIP sequence order question

2011-02-10 Thread Benoit Panizzon
Hi Faisal

 http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial

Thank you, but I seem to miss the option which tells asterisk to pass audio 
even if no 183 or 200 is received.

No, we don't set the 'r' Flag while dialing out.

So, my question ist sill the same.

Sould asterisk pass audio of it didn't yet receive a 183 or 200 message, or is 
the carrier doing wrong in sending early audio without 183?

Kind regards

Benoit Panizzon
-- 
I m p r o W a r e   A G-
__

Zurlindenstrasse 29 Tel  +41 61 826 93 07
CH-4133 PrattelnFax  +41 61 826 93 02
Schweiz Web  http://www.imp.ch
__

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


[asterisk-users] app_voicemail.c how to enable debugging?

2010-12-21 Thread Benoit Panizzon
Hi

Looking at the source of app_voicemail.c there are many statements like:

ast_debug(1, %s doesn't exist, doing what we can\n, 
prefile);

Where do I have to enably this to be showed in the console or logged to a file 
by logger. core set debug does not seem to help here.

Well, my actual problem is, that if a customer has recorded his own greeting, 
he usualy tells the caller to record his message after the tone, so 
app_voicemail should not play the intro.

spool/mailbox/unavail.gsm
vm-intro.gsm
beep.gsm

but only

spool/mailbox/unavail.gsm
beep.gsm

In case there is an unavailable message. Where do I have to poke at the 
source?

Kind regards

Benoit Panizzon
-- 
I m p r o W a r e   A G-
__

Zurlindenstrasse 29 Tel  +41 61 826 93 07
CH-4133 PrattelnFax  +41 61 826 93 02
Schweiz Web  http://www.imp.ch
__

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


[asterisk-users] VoiceMail customizing

2010-11-11 Thread Benoit Panizzon
Hello

We would like to customize the voicemail menues.

So the intro should not be played if some user has recorded an own greeting 
message and we would also like to remove some options from the menue.

Is this all hardcoded or is it somehow possible to redefine the voice menues 
and the order how messages are played via voicemail.conf?

Mit freundlichen Grüssen

Benoit Panizzon
-- 
I m p r o W a r e   A G-
__

Zurlindenstrasse 29 Tel  +41 61 826 93 07
CH-4133 PrattelnFax  +41 61 826 93 02
Schweiz Web  http://www.imp.ch
__

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] Asterisk Voicemail Realtime and 'VirtualBoxing'

2010-11-09 Thread Benoit Panizzon
Hello

I'm about to set up a voicemail system for multiple wholesale customers.

So I use a realtime mysql config for the mailboxes.

All single mailboxes have their information about the number, emailaddress, 
password in the database. This works fine.

Now the notification emails of course should be customized per wholesale 
customer.

I added a 'mandate' table to the database and get this field by an AGI script 
before calling VoiceMail to get the correct language and context name for 
this particular mailbox. Let's call them company1 and company2

Then I do:

exten = s,n,AGI(getmandate.agi)
exten = s,n,Set(CHANNEL(language)=${MANDATELANG})
exten = s,n,VoiceMail(0${CALLERID(rdnis):2...@${mandate},u)

in voicemail.conf I have:

[company1]
serveremail=voicem...@company1.example.com
tz=european
emailsubject=[Customer 1 VM]: Neue Nachricht nummer ${VM_MSGNUM} von 
${VM_CIDNUM} in mailbox ${VM_MAILBOX}.
emailbody=some more blabla

[company2]
serveremail=com...@company2.example.com
tz=european
emailsubject=[COMBOX]: New Message from ${VM_CIDNUM} in mailbox ${VM_MAILBOX}.
emailbody=some other blabla

Unfortunately the email settings per voicemail context are ignored, those from 
the [general] section are being used.

As far as I found out, I could also put emailsubject and emailbody in the 
database, but this would massively increase the size of the database and as 
this is not information which will often change this does not need to be 
realtime.

Is there a way to have the email settings per voicemail context together with 
a realtime vm config?

Mit freundlichen Grüssen

Benoit Panizzon
-- 
I m p r o W a r e   A G-
__

Zurlindenstrasse 29 Tel  +41 61 826 93 07
CH-4133 PrattelnFax  +41 61 826 93 02
Schweiz Web  http://www.imp.ch
__

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] Choppy sound while converting alaw to ulaw

2007-09-05 Thread Benoit Panizzon
Hi there

I europe alaw is usual. I have a SIP Phone which perferes ulaw.

When my * box has to transcode alaw to ulaw the sound get's one way choppy. 
(alaw = ulaw is choppy, ulaw = alaw is fine).

I managed to fix the issue by forcing my SIP phone to use alaw only, but is 
this a know issue with asterisk 1.2.13?

-Benoit-

___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

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

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


[asterisk-users] Scratchy Audio with Asterisk 1.2.4 over IAX on FreeBSD?

2007-03-29 Thread Benoit Panizzon
Hi all

We run an * 1.2.4 under FreeBSD with ztdummy kernel module.
zttest reports 99.9something % of accuracy, so timing should be fine.

SIP connections work fine, but we have a strange problem with IAX2 
connections.

When an IAX2 call originates from the FreeBSD Asterisk to another Asterisk, 
the sound is scratchy (sounds a bit like a 50Hz ground loop).

It's not a problem of the 'other' asterisk, as the problem could be reproduced 
with * 1.2.5/Linux and * 1.4.2/Linux.

If the IAX2 call originates from another * to the FreeBSD one, the sound is 
clear.

Format used is alaw. (ulaw also shows that problem, gsm doesn't work at all, 
but that could be a codec problem of the 1.2.4 gsm implementation)

Playing around with the IAX jitterbuffer settings does not affect the 
scratching sound in any way.

Any idea what the cause could be?

Mit freundlichen Grüssen

Benoit Panizzon
-- 
I m p r o W a r e   A G-System Services
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__


pgp43UfsQDxE3.pgp
Description: PGP signature
___
--Bandwidth and Colocation provided by Easynews.com --

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


[asterisk-users] Zapateller not playing audio via SIP Trunk?

2007-03-20 Thread Benoit Panizzon
Hi All

I'm tracing a very strange problem which I could reproduce with different 
versions up to 1.2.5 (sorry, didn't update to a newer one yet).

Scenario 1: Problem does not occure.
=
Sip Phone registered directly to the Asterisk.

exten = i,1,Zapateller()
exten = i,n,Playback(invalid,noanswer)
exten = i,n,Hangup()

Works like expected. I dial an invalid number, hear the SIT tone and then the 
Announcement.

Scenario 2: Problem does occure.
===

SIP 'trunk' to another SIP PBX (or another Asterisk).

exten = i,1,Zapateller()
exten = i,n,Playback(invalid,noanswer)
exten = i,n,Hangup()

Does not work, Zapateller seams to be 'hanging' forever without playing any 
audio.

exten = i,1,Zapateller(answer)
exten = i,n,Playback(invalid,noanswer)
exten = i,n,Hangup()

Well, this does work, but the customer would have to pay as a CDR is 
generated. We want Early Audio.

exten = i,1,Playback(invalid,noanswer)
exten = i,n,Hangup()

Strangely, this again works, so it is not a 183 Proccessing (Early Audio) 
problem, but seams to be a Zapateller Application Problem...

exten = i,1,Playback(invalid,noanswer)
exten = i,n,Zapateller()
exten = i,n,Hangup()

Early Audio Announcement is played, but then again as soon as Zapateller is 
executed, it 'hangs'.

Any idea what causes Zapateller to hang if it should play early audio via a 
SIP Trunk?

Mit freundlichen Grüssen

Benoit Panizzon
-- 
I m p r o W a r e   A G-System Services
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__


pgpGEbnans9YI.pgp
Description: PGP signature
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Zapateller not playing audio via SIP Trunk?

2007-03-20 Thread Benoit Panizzon
 exten = i,1,Zapateller()

Same happens if I use PlayTones(info) instead of ZapaTeller().
Same happens if I use Progress() before ZapaTeller or Playtones.

Mit freundlichen Grüssen

Benoit Panizzon
-- 
I m p r o W a r e   A G-System Services
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__


pgpQrWdA1exvv.pgp
Description: PGP signature
___
--Bandwidth and Colocation provided by Easynews.com --

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


[asterisk-users] Multiple 'routes' to extension in different contextes. How to influence search oder?

2006-10-16 Thread Benoit Panizzon
Hi all

I share my Asterisk Server with a few friends. It is connected to PSTN, and 
various SIP Providers.

I offer Free Calls to my friends, but myself I would like to be able to make 
calls to non free destinations via my PSTN Line.

Now I do this in my dialplan:

---
[myself]
; National Destinations
exten = _0z.,1,Dial(SIP/someisp/${EXTEN});
exten = _0z.,n,Dial(Zap/g1/${EXTEN});

; International Destinations
exten = _00z.,1,Dial(SIP/someisp/${EXTEN});
exten = _00z.,n,Dial(Zap/g1/${EXTEN});

include = freedestinations;

[freedestinations]
; Local Free Destionations
exten = _0800.,1,Dial(Zap/g1/${EXTEN});

; International Free Destionations
exten = _0049.,1,Dial(SIP/FWD/*${EXTEN}:2);
--

Now I get into this situation. I would like to call a german Free Numer: 
0049800xxx

This is best matched in the context [freedestinations], and also the cheapest. 
My Telco charges a fee to call free destionations abroad.
But still: exten = _00z. is being matched.

Is there a way to solve this in a clever way? I have started just copying all 
[freedestination] extensions into [myself] but every time I have to change 
anything I have to change it everywhere.

Regards

Benoit Panizzon
-- 
I m p r o W a r e   A G-System Services
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__


pgpGgtYqDAfGn.pgp
Description: PGP signature
___
--Bandwidth and Colocation provided by Easynews.com --

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


[asterisk-users] BRI: Asterisk disconnecting on 'call diverted' message?

2006-09-20 Thread Benoit Panizzon
Hi All

I'm tracing a strange BRI Q.931 Problem with Asterisk 1.2.4.

I call a number which is diverted to another number.
Asterisk seams to take this divertification message as a hangup message:

BRI Trace:

-- Executing Dial(IAX2/magma-1, Zap/g7/0418103734|90) in new stack
2 -- Making new call for cr 134
-- Requested transfer capability: 0x00 - SPEECH
2  Protocol Discriminator: Q.931 (8)  len=38
2  Call Ref: len= 1 (reference 6/0x6) (Originator)
2  Message type: SETUP (5)
2  [2 042  032  802  902  a32 ]
2  Bearer Capability (len= 5) [ Ext: 1  Q.931 Std: 0  Info transfer 
capability: Speech (0)
2   Ext: 1  Trans mode/rate: 64kbps, circuit-mode 
(16)
2   Ext: 1  User information layer 1: A-Law (35)
2  [2 182  012  812 ]
2  Channel ID (len= 3) [ Ext: 1  IntID: Implicit, Other Spare: 0, Preferred 
Dchan: 0
2 ChanSel: B1 channel
2  ]
2  [2 6c2  0c2  412  812  302  362  312  382  312  312  352  372  312  312 ]
2  Calling Number (len=14) [ Ext: 0  TON: Subscriber Number (4)  NPI: 
ISDN/Telephony Numbering Plan (E.164/E.163) (1)
2Presentation: Presentation permitted, user 
number passed network screening (1) '06181157**' ]
2  [2 702  0a2  a12  342  312  382  312  302  332  372  332  342 ]
2  Called Number (len=12) [ Ext: 1  TON: National Number (2)  NPI: 
ISDN/Telephony Numbering Plan (E.164/E.163) (1) '418103734' ]
-- Called g7/0418103734
2  Protocol Discriminator: Q.931 (8)  len=7
2  Call Ref: len= 1 (reference 134/0x86) (Terminator)
2  Message type: SETUP ACKNOWLEDGE (13)
2  [2 182  012  892 ]
2  Channel ID (len= 3) [ Ext: 1  IntID: Implicit, Other Spare: 0, Exclusive 
Dchan: 0
2 ChanSel: B1 channel
2  ]
2 -- Processing IE 24 (cs0, Channel Identification)
2  Protocol Discriminator: Q.931 (8)  len=7
2  Call Ref: len= 1 (reference 134/0x86) (Terminator)
2  Message type: CALL PROCEEDING (2)
2  [2 272  012  fb2 ]
2  Notification indicator (len= 3): Ext: 1  Call is diverting (123)

Why is the number being diverted to not advertized? On the SS7 Trunk the 
number is presented and I see that presentation is allowed.

2 -- Processing IE 39 (cs0, Notification Indicator)
-- Zap/4-1 is proceeding passing it to IAX2/magma-1
2  Protocol Discriminator: Q.931 (8)  len=57
2  Call Ref: len= 1 (reference 134/0x86) (Terminator)
2  Message type: DISCONNECT (69)

Why this disconnect? If I connect a ISDN Phone directly to the BRI I don't get 
disconnected but get the message from the telco that the destination is 
unreachable at the moment. Why is this audio not passed to the caller?

2  [2 082  022  8a2  9b2 ]
2  Cause (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location: 
Network beyond the interworking point (10)
2   Ext: 1  Cause: Unknown (27), class = Normal Event (1) ]
2  [2 1c2  1d2  912  a12  1a2  022  022  722  b92  022  012  232  302  112  
302  0f2  a12  0d2  812  032  462  522  2e2  a22  062  812  012  002  822  
012  012 ]
2  Facility (len=31, codeset=0) [ 2 0x91, 0xa1, 0x1a, 0x02, 0x02, 'r', 0xb9, 
0x02, 0x01, 0x23, '0', 0x11, '0', 0x0f, 0xa1, 0x0d, 0x81, 0x03, 'FR', 0x2e, 
0xa2, 0x06, 0x81, 0x01, 0x00, 0x82, 0x01, 0x012  ]
2  [2 1e2  022  8a2  882 ]
2  Progress Indicator (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 
0   Location: Network beyond the interworking point (10)
2Ext: 1  Progress Description: Inband 
information or appropriate pattern now available. (8) ]
2  [2 1e2  022  8a2  822 ]
2  Progress Indicator (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 
0   Location: Network beyond the interworking point (10)
2Ext: 1  Progress Description: Called 
equipment is non-ISDN. (2) ]
2  [2 282  082  462  522  2e2  202  302  2e2  302  302 ]
2  Display (len= 8) [ FR. 0.00 ]
2 -- Processing IE 8 (cs0, Cause)
2 -- Processing IE 28 (cs0, Facility)
2 Handle Q.932 ROSE Invoke component
2 -- Processing IE 30 (cs0, Progress Indicator)
2 -- Processing IE 30 (cs0, Progress Indicator)
2 -- Processing IE 40 (cs0, Display)
-- Channel 0/1, span 2 got hangup request
-- Zap/4-1 is circuit-busy
2 NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Disconnect Indication, 
peerstate Disconnect Request
2  Protocol Discriminator: Q.931 (8)  len=8
2  Call Ref: len= 1 (reference 6/0x6) (Originator)
2  Message type: RELEASE (77)
2  [2 082  022  812  9b2 ]
2  Cause (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location: 
Private network serving the local user (1)
2   Ext: 1  Cause: Unknown (27), class = Normal Event (1) ]
-- Hungup 'Zap/4-1'


Mit freundlichen Grüssen

Benoit Panizzon
-- 
I m p r o W a r e   A G-System Services
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01

[asterisk-users] Voicemail, how to localize date in email notifications?

2006-08-30 Thread Benoit Panizzon
Hi all

Two questions.

We have a multi language voicemail setup.

Unfortunately I did not find a way to localize the email notification sent to 
the customer. How can one do this? For the moment messages are hard-coded in 
german.

The System Locale is 'C'.

emaildateformat=%A, %d %B %Y um %H:%M:%S

produces English Day and Month Names within our email sent in german. Can this 
be changed without altering the System Locale?

Mit freundlichen Grüssen

Benoit Panizzon
-- 
I m p r o W a r e   A G-System Services
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__


pgpfvVHtTQjlN.pgp
Description: PGP signature
___
--Bandwidth and Colocation provided by Easynews.com --

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


  1   2   >