Asterisk error: Failed to authenticate on INVITE to - can't call - asterisk

I've installed Asterisk from the ViciBox iso (ViciBox_v.7.x86_64-7.0.4).
I'm using a softphone (BRIA by CounterPath) and I set it up on asterisk by vicidial.
I can correctly receive calls on the Bria soft phone calling the voip number.
The problem is that I can't make calls.
When I try to call in the asterisk console I have:
[May 31 14:19:56] Connected to Asterisk 11.25.1-vici currently running on vicibox7 (pid = 1476)
[May 31 14:20:01] == Manager 'sendcron' logged on from 127.0.0.1
[May 31 14:20:01] == Manager 'sendcron' logged off from 127.0.0.1
[May 31 14:20:01] == Manager 'sendcron' logged on from 127.0.0.1
[May 31 14:20:01] == Manager 'sendcron' logged off from 127.0.0.1
[May 31 14:20:06] == Manager 'sendcron' logged on from 127.0.0.1
[May 31 14:20:06] == Manager 'sendcron' logged off from 127.0.0.1
[May 31 14:20:28] == Using SIP RTP CoS mark 5
[May 31 14:20:28] -- Executing [0039**********#default:1] Goto("SIP/001-00000000", "to-Gloobobusiness,s,1") in new stack
[May 31 14:20:28] -- Goto (to-Gloobobusiness,s,1)
[May 31 14:20:28] -- Executing [s#to-Gloobobusiness:1] NoOp("SIP/001-00000000", "Chiamata in uscita sul trunk di gloonobusiness") in new stack
[May 31 14:20:28] -- Executing [s#to-Gloobobusiness:2] Dial("SIP/001-00000000", "SIP/s#Trunk_Gloobobusiness") in new stack
[May 31 14:20:28] == Using SIP RTP CoS mark 5
[May 31 14:20:28] -- Called SIP/s#Trunk_Gloobobusiness
[May 31 14:20:28] NOTICE[1558][C-00000000]: chan_sip.c:23309 handle_response_invite: Failed to authenticate on INVITE to '"cccenter" <sip:001#79.47.20.72>;tag=as6d2f2341'
[May 31 14:20:28] -- SIP/Trunk_Gloobobusiness-00000001 is circuit-busy
[May 31 14:20:28] == Everyone is busy/congested at this time (1:0/1/0)
[May 31 14:20:28] -- Auto fallthrough, channel 'SIP/001-00000000' status is 'CONGESTION'
My dialplan:
exten => _+39.,1,Goto(to-Gloobobusiness,s,1)
exten => _39.,1,Goto(to-Gloobobusiness,s,1)
exten => _0039.,1,Goto(to-Gloobobusiness,s,1)
[to-Gloobobusiness]
exten => s,1,NoOp(Chiamata in uscita sul trunk di gloonobusiness)
same => n,Dial(SIP/${EXTEN}#Trunk_Gloobobusiness)
[from-Gloobobusiness]
exten => s,1,NoOp(Chiamata in ingresso mando al 001)
same => n,Dial(SIP/001)

What is not clear for you in your debug output? You are trying to call ti
s#Trunk_Gloobobusiness
Not think any trunk happy with number s.

Related

Email header with multiple received fields: How can this happen and can this be used to fight SPAM

I often receive fishing /SPAM emails with multiple received fields.
First, I'd like to understand how one email header can have more than one received field.
Second, I'd like to know if I can use this to fight SPAM.
Here is an example:
Return-Path:
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on myhosting.com
X-Spam-Level:
X-Spam-Status: No, score=0.0 required=3.5 tests=HTML_MESSAGE autolearn=ham
version=3.3.2
X-Spam-ASN:
X-Original-To: my#email.rs
Delivered-To: my#email.rs
Received: from posta.abak.si (posta.abak.si [84.255.212.92])
by myhosting.com (Postfix) with ESMTPS id 522CA80DC8
for ; Wed, 8 May 2019 14:31:59 +0200 (CEST)
Authentication-Results: myhosting.com;
dmarc=none (p=NONE sp=NONE) smtp.from=mk.kema-on.net header.from=mk.kema-on.net;
spf=none (sender IP is 84.255.212.92) smtp.mailfrom=dime.mitreski#mk.kema-on.net smtp.helo=posta.abak.si
Received-SPF: none (myhosting.com: no valid SPF record)
Received: from localhost (localhost [127.0.0.1])
by posta.abak.si (Postfix) with ESMTP id 2C09E1E6A7D7
for ; Wed, 8 May 2019 14:35:06 +0200 (CEST)
Received: from posta.abak.si ([127.0.0.1])
by localhost (posta.abak.si [127.0.0.1]) (amavisd-new, port 10032)
with ESMTP id dw1MvahvfmXL for ;
Wed, 8 May 2019 14:35:05 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
by posta.abak.si (Postfix) with ESMTP id EB2B21E6A3C6
for ; Wed, 8 May 2019 14:30:12 +0200 (CEST)
X-Virus-Scanned: amavisd-new at posta.abak.si
Received: from posta.abak.si ([127.0.0.1])
by localhost (posta.abak.si [127.0.0.1]) (amavisd-new, port 10026)
with ESMTP id luUYSdWOdHLE for ;
Wed, 8 May 2019 14:30:12 +0200 (CEST)
Received: from IP-129-13.dataclub.eu (unknown [84.38.129.13])
by posta.abak.si (Postfix) with ESMTPA id B18CD1E6A7A6
for ; Wed, 8 May 2019 14:25:39 +0200 (CEST)
Content-Type: multipart/alternative; boundary="===============0253676305=="
MIME-Version: 1.0
Subject: Warning: you have (3) Undelivered messesges
To: my#email.rs
From: "Webmaster"
Date: Wed, 08 May 2019 15:25:37 +0300
Message-Id:
Message Body
Every mail server that processes an email adds its own Received field to the header. It is normal for emails to pass through several email servers when traveling across the internet from the sender's computer to the final destination.
https://www.rfc-editor.org/rfc/rfc5321#section-4.4
When an SMTP server receives a message for delivery or further
processing, it MUST insert trace ("time stamp" or "Received")
information at the beginning of the message content,
Looking at the first Received field,
Received: from IP-129-13.dataclub.eu (unknown [84.38.129.13])
by posta.abak.si (Postfix) with ESMTPA id B18CD1E6A7A6
for ; Wed, 8 May 2019 14:25:39 +0200 (CEST)
you will notice that it says which server it received the mail from (the "FROM" clause), and which server received it (the "BY" clause").
As you read through the list of Received fields in the header you posted, you will notice that they are all linked in this fashion.

Opendkim marking incomming messages as dkim=fail

I am configuring opendkim+postfix. It is working OK and sent messages are correctly signed but the incomming messages are all marked as dkim=fail reason="signature verification failed"
How con I debug this problem?
Return-Path: <sender#gmail.com>
Delivered-To: recipient#mydomain.com
Received: from localhost (mailserver [127.0.0.1])
by mydomain.com (Postfix) with SMTP id 4DDF93F966
for <recipient#mydomain.com>; Tue, 24 Oct 2017 13:56:43 +0200 (CEST)
DKIM-Filter: OpenDKIM Filter v2.11.0 mydomain.com 4DDF93F966
Authentication-Results: mydomain.com;
dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=#gmail.com header.b="jmdDmXQb"
Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.85.215.43; helo=mail-lf0-f43.google.com; envelope-from=sender#gmail.com; receiver=recipient#mydomain.com
DMARC-Filter: OpenDMARC Filter v1.3.2 mydomain.com 2DBE03F963
Authentication-Results: mail.mydomain.com; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: mail.mydomain.com; spf=pass smtp.mailfrom=sender#gmail.com
The syslog reports this which looks OK
Oct 24 14:08:39 mailz opendkim[3325]: 4A29F3F938: [209.85.215.45] [209.85.215.45] not internal
Oct 24 14:08:39 mailz opendkim[3325]: 4A29F3F938: not authenticated
Oct 24 14:08:39 mailz opendkim[3325]: 4A29F3F938: DKIM verification successful
But later it adds:
Oct 24 14:08:43 mailzener postfix/cleanup[3194]: 6CC243F95E: message-id=<CAMXuvOM+jKLkE=0FrQ+cSqFesmPQujpHoVsfH9G_URg9uYtm1g#mail.gmail.com>
Oct 24 14:08:43 mailzener opendkim[3325]: 6CC243F95E: no signing table match for 'sender#gmail.com'
Oct 24 14:08:43 mailzener opendkim[3325]: 6CC243F95E: bad signature data
My opendkim configuration file is this:
AutoRestart Yes
AutoRestartRate 10/1h
LogWhy Yes
Syslog Yes
SyslogSuccess Yes
Mode sv
Canonicalization relaxed/simple
ExternalIgnoreList refile:/etc/opendkim/TrustedHosts
#InternalHosts refile:/etc/opendkim/TrustedHosts
KeyTable refile:/etc/opendkim/KeyTable
SigningTable refile:/etc/opendkim/SigningTable
SignatureAlgorithm rsa-sha256
Socket inet:8891#localhost
PidFile /var/run/opendkim/opendkim.pid
UMask 022
UserID opendkim:opendkim
TemporaryDirectory /var/tmp
OversignHeaders From
LogWhy Yes
X-Header yes
MilterDebug 9
ResolverTracing Yes
As you can see from the Queue ID 4A29F3F938 vs 6CC243F95E, these are two different mails.
4A29F3F938 is incoming and is verifying OK. 6CC243F95E is outgoing, and I guess opendkim tries to sign the mail. You need to elaborate on your processing of the mail in the lines inbetween :)

asterisk PAMI Originate Call issue

Received an unknown call with DID
[rawContent:protected] =>
Event: Newexten
Privilege: call,all
Channel: SIP/701-000056ff
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 701
CallerIDName: 701
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: from-digital
Exten: xxxxxx
Priority: 2
Uniqueid: 1483958245.105223
Linkedid: 1483958245.105223
Extension: xxxxxx
Application: NoOp
AppData: Received an unknown call with DID set to xxxxx
Acordinly to this fragment call origination was successfull, your dialplan for context from-digital have application Noop with that message
That message is from your dialplan and have no any relation to asterisk internals.

Detect multiple keys in confbridge asterisk 11

How can I detect multiple keys in a conference in confbridge application. Right now I can only detect a single key number digit. How can I detect a 2 digit or 3 digit number for example 45 or 454.
Please help me.
Thanks
You can detect 4, record that detection, detect next digit(5), record it again.
Do that as many times as you need.
Yup, it's completely possible to have DTMF menus that are triggered based on multiple DTMF keys presses.
Example:
[general]
[user_profile]
type = user
admin = no
pin = 1111
marked = yes
startmuted = no
announce_user_count = yes
announce_user_count_all = 1
announce_join_leave = yes
[user_menu]
type = menu
1 = toggle_mute
201 = leave_conference
[default_bridge]
type = bridge
[default_user]
type = user
In this log snippet, you can see the user press '201' to leave the conference:
[Feb 21 22:28:16] VERBOSE[18929][C-00000001] pbx.c: -- Executing [user_profile#confbridge:1] NoOp("SIP/ast2_g722-00000001", "") in new stack
[Feb 21 22:28:16] VERBOSE[18929][C-00000001] pbx.c: -- Executing [user_profile#confbridge:2] ConfBridge("SIP/ast2_g722-00000001", "1,,user_profile,user_menu") in new stack
[Feb 21 22:28:26] VERBOSE[18929][C-00000001] file.c: -- <SIP/ast2_g722-00000001> Playing 'conf-onlyone.gsm' (language 'en')
[Feb 21 22:28:47] VERBOSE[18929][C-00000001] file.c: -- <SIP/ast2_g722-00000001> Playing 'confbridge-join.gsm' (language 'en')
[Feb 21 22:28:48] VERBOSE[18929][C-00000001] file.c: -- <Bridge/0x7fb3bc004528-input> Playing 'confbridge-join.gsm' (language 'en')
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin '2' received on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin passthrough '2' on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end '2' received on SIP/ast2_g722-00000001, duration 100 ms
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end accepted with begin '2' on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end passthrough '2' on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin '0' received on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin ignored '0' on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end '0' received on SIP/ast2_g722-00000001, duration 100 ms
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end passthrough '0' on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin '1' received on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin ignored '1' on SIP/ast2_g722-00000001
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end '1' received on SIP/ast2_g722-00000001, duration 100 ms
[Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end passthrough '1' on SIP/ast2_g722-00000001
[Feb 21 22:28:55] VERBOSE[18929][C-00000001] file.c: -- <Bridge/0x7fb3bc004528-input> Playing 'conf-hasleft.gsm' (language 'en')
[Feb 21 22:28:57] VERBOSE[18929][C-00000001] file.c: -- <Bridge/0x7fb3bc004528-input> Playing 'confbridge-leave.gsm' (language 'en')
[Feb 21 22:28:58] VERBOSE[18929][C-00000001] pbx.c: -- Executing [user_profile#confbridge:3] Hangup("SIP/ast2_g722-00000001", "") in new stack

Postfix: SASL authentication failure: No worthy mechs found

I configured postfix to send mail through a microsoft exchange server with SMTP authentication and TLS. In the log of the emails I see this error:
postfix / smtp [ 11191 ] : warning: SASL authentication failure: No worthy mechs found
postfix / smtp [ 11191 ] : B5BEB22019E : <my#mydomain.it> to = , relay = my.relay.host , delay = 0:07 , delays = 0.04/0.02/0.01/0 , dsn
= 4.7.0 , status = deferred ( SASL authentication failed , can not authenticate to server my.relay.host no mechanism available )
The postfix configuration is the default one , I added these lines:
relayhost = my.relay.host
smtp_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash :/ etc / postfix / sasl_passwd
smtpd_use_tls = yes
The libraries cyrus -sasl and cyrus -sasl -devel cyrus- sasl- ntlm are installed , if I do a telnet to the server microsoft get:
220 my.relay.host Microsoft ESMTP MAIL Service ready at Wed, November 27 2013 10:20:40 +0100
ehlo
250 - MY.RELAY.HOST Hello [ XXX.XXX.XXX.XXX ]
250 -SIZE 10485760
250-PIPELINING
250 - DSN
250 - ENHANCEDSTATUSCODES
250 -AUTH LOGIN
250 - 8BITMIME
250-BINARYMIME
250 CHUNKING
The administrator of the relay server tells me that authentication is NTLM , any ideas?
Thanks Stefano

Resources