Quantcast
Channel: Asterisk Forums
Viewing all 7460 articles
Browse latest View live

Asterisk not estabilishing inbound PSTN calls

$
0
0
Good morning everyone!

I'm from Brazil and I currently having many problems to provide a solution for my University's Final Project.

Currently I have the following:
Softphone/Analog Phone <<< >>> Asterisk <<< >>> SPA3000 <<< >>> PSTN line.

I configured and register both PSTN and LINE 1 ports on Asterisk and it's fine in this sense.
However, everytime that I try calling my softphone/analog phone through PSTN, the SPA3000 routes the call to the softphone/analogphone, it rings, answers, but the call has huge noises and drops after seconds. Sometimes it keeps rings before it drops.
The strangest thing is that the originator equipment that calls my PSTN number (Cellphone or telelphone), doesn't seem to estabilsh the call, even when the softphone answers it, because the originator keeps receiving the ringing tone.

I ran syslog in the pstn port and when the softphone answered and dropps after seconds, one of the outputs that I received in the log was: "x-asterisk-hangupcausecode=17"

Did anyone have similiar issues?
Does it look like Asterisk or SPA problems?

Regards

Statistics : Posted by alanxt • on Fri May 15, 2015 5:45 am • Replies 1 • Views 54

Get DTMF Input from an agent in the queue

$
0
0
Interpose a local channel and use the g option on that.

Statistics : Posted by Kashifsaleem • on Fri May 15, 2015 11:51 pm • Replies 1 • Views 106

how to use space as delimiter

$
0
0
i can do it in perl script

Quote:#!/usr/bin/perl

my $str = "rubence This is my name";
my ($name, $message) = split(/ /, $str, 2);;
print "$name\n";
print "$message\n";



but i dont understand to get $str value from dialplan and how to give two variables $name and $message back to dialplan . i found i can do it through agi but can anyone please help me how to use agi for this job ??

Statistics : Posted by rubence • on Sat May 16, 2015 1:38 pm • Replies 1 • Views 63

how to use space as delimiter

$
0
0
with cut function can i use space as delimiter ??

string = "rubence this is my name"

i want name = rubence

Set(name=${CUT("${string},' ',1)})

this is not working ...

Statistics : Posted by rubence • on Sat May 16, 2015 1:38 pm • Replies 1 • Views 63

Fail2Ban and unauthorized invites

$
0
0
RemoteAddress field isn't?

Statistics : Posted by genobe • on Fri May 08, 2015 5:47 am • Replies 2 • Views 142

Fail2Ban and unauthorized invites

$
0
0
Sorry I can't answer your question, I'm posting more details as I was about to post the same. However, I'm posting part of log instead. There is nothing in there for fail2ban to "grab" on. Wonder if anyone know what it is and how to get it stopped..

I'm about to give up here and instead create "white" list on router/firewall


Code: [2015-05-16 21:56:49] WARNING[2645] chan_sip.c: Timeout on be4213423f7329e7a8a8357aeadb3d18 on non-critical invite transaction.
[2015-05-16 21:57:05] WARNING[2645] chan_sip.c: Timeout on 11b22eb2b49ca8a20e356b67a6d5e92b on non-critical invite transaction.
[2015-05-16 21:57:07] WARNING[2645] chan_sip.c: Timeout on 3bbd4df9308b25e81e102d6079c33ab9 on non-critical invite transaction.
[2015-05-16 21:57:21] SECURITY[2650] res_security_log.c: SecurityEvent="ChallengeSent",EventTV="2015-05-16T21:57:21.447-0500",Severity="Informational",Service="SIP",EventVersion="1",AccountID="sip:as100@x.x.x.n",SessionID="0x7ff25c024938",LocalAddress="IPV4/UDP/23.114.87.129/5060",RemoteAddress="IPV4/UDP/23.92.80.40/5074",Challenge="25e290f7"
[2015-05-16 21:57:53] WARNING[2645] chan_sip.c: Timeout on 3b5ddc8db0fcc31cc10708770fc32a83 on non-critical invite transaction.
[2015-05-16 22:11:33] SECURITY[2650] res_security_log.c: SecurityEvent="ChallengeSent",EventTV="2015-05-16T22:11:33.126-0500",Severity="Informational",Service="SIP",EventVersion="1",AccountID="sip:2101@x.x.x.n",SessionID="0x7ff25c024938",LocalAddress="IPV4/UDP/x.x.x.n/5060",RemoteAddress="IPV4/UDP/155.94.64.74/5070",Challenge="231916ec"
[2015-05-16 22:12:05] WARNING[2645] chan_sip.c: Timeout on cbf29b7ea945d88c87b99be74f069f66 on non-critical invite transaction.
[2015-05-16 22:15:38] SECURITY[2650] res_security_log.c: SecurityEvent="ChallengeSent",EventTV="2015-05-16T22:15:38.812-0500",Severity="Informational",Service="SIP",EventVersion="1",AccountID="sip:6001@x.x.x.n",SessionID="0x7ff25c024938",LocalAddress="IPV4/UDP/x.x.x.n/5060",RemoteAddress="IPV4/UDP/192.111.149.58/5079",Challenge="039fe0a5"
[2015-05-16 22:16:10] WARNING[2645] chan_sip.c: Timeout on 195bb63382d8b9a5e124d7541f2aa947 on non-critical invite transaction.
[2015-05-16 22:18:42] SECURITY[2650] res_security_log.c: SecurityEvent="ChallengeSent",EventTV="2015-05-16T22:18:42.885-0500",Severity="Informational",Service="SIP",EventVersion="1",AccountID="sip:6001@x.x.x.n",SessionID="0x7ff25c024938",LocalAddress="IPV4/UDP/x.x.x.n/5060",RemoteAddress="IPV4/UDP/192.111.149.58/5078",Challenge="676db5ea"
[2015-05-16 22:19:14] WARNING[2645] chan_sip.c: Timeout on 955c75e6742c410cf089c0ccaf414d87 on non-critical invite transaction.
[2015-05-16 22:21:54] SECURITY[2650] res_security_log.c: SecurityEvent="ChallengeSent",EventTV="2015-05-16T22:21:54.243-0500",Severity="Informational",Service="SIP",EventVersion="1",AccountID="sip:6001@x.x.x.n",SessionID="0x7ff25c024938",LocalAddress="IPV4/UDP/x.x.x.n/5060",RemoteAddress="IPV4/UDP/192.111.149.58/5087",Challenge="4a795df6"
[2015-05-16 22:22:26] WARNING[2645] chan_sip.c: Timeout on 44c5d6c9a81dedc5831761d0ee5402bc on non-critical invite transaction.


Statistics : Posted by genobe • on Fri May 08, 2015 5:47 am • Replies 2 • Views 142

Fail2Ban and unauthorized invites

$
0
0
Someone is trying to place calls from my Asterisk box. They are trying to brute-force extensions.

Example log:
Code: <--- SIP read from UDP:155.94.64.250:5078 --->
INVITE sip:999900972595183136@MY_ASTERISK SIP/2.0
To: 999900972595183136<sip:999900972595183136@MY_ASTERISK>
From: 100<sip:100@MY_ASTERISK>;tag=5e3e6e24
Via: SIP/2.0/UDP 155.94.64.250:5078;branch=z9hG4bK-8bbc1963772ea7d4e0e9b53028509008;rport
Call-ID: 8bbc1963772ea7d4e0e9b53028509008
CSeq: 1 INVITE
Contact: <sip:100@155.94.64.250:5078>
Max-Forwards: 70
Allow: INVITE, ACK, CANCEL, BYE
User-Agent: sipcli/v1.8
Content-Type: application/sdp
Content-Length: 283

v=0
o=sipcli-Session 1486506575 1460040688 IN IP4 155.94.64.250
s=sipcli
c=IN IP4 155.94.64.250
t=0 0
m=audio 5079 RTP/AVP 18 0 8 101
a=fmtp:101 0-15
a=rtpmap:18 G729/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=ptime:20
a=sendrecv
<------------->
--- (12 headers 13 lines) ---
Sending to 155.94.64.250:5078 (no NAT)
Sending to 155.94.64.250:5078 (no NAT)
Using INVITE request as basis request - 8bbc1963772ea7d4e0e9b53028509008
No matching peer for '100' from '155.94.64.250:5078'

<--- Reliably Transmitting (no NAT) to 155.94.64.250:5078 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 155.94.64.250:5078;branch=z9hG4bK-8bbc1963772ea7d4e0e9b53028509008;received=155.94.64.250;rport=5078
From: 100<sip:100@MY_ASTERISK>;tag=5e3e6e24
To: 999900972595183136<sip:999900972595183136@MY_ASTERISK>;tag=as74036dec
Call-ID: 8bbc1963772ea7d4e0e9b53028509008
CSeq: 1 INVITE
Server: Asterisk PBX 11.16.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="MY_ASTERISK", nonce="7ca35cf2"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '8bbc1963772ea7d4e0e9b53028509008' in 32000 ms (Method: INVITE)
Retransmitting #1 (no NAT) to 155.94.64.250:5078:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 155.94.64.250:5078;branch=z9hG4bK-8bbc1963772ea7d4e0e9b53028509008;received=155.94.64.250;rport=5078
From: 100<sip:100@MY_ASTERISK>;tag=5e3e6e24
To: 999900972595183136<sip:999900972595183136@MY_ASTERISK>;tag=as74036dec
Call-ID: 8bbc1963772ea7d4e0e9b53028509008
CSeq: 1 INVITE
Server: Asterisk PBX 11.16.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="MY_ASTERISK", nonce="7ca35cf2"
Content-Length: 0


However, this does not get logged very well in security/notice/warning. Best I can see is this:
Code: SECURITY[3465] res_security_log.c: SecurityEvent="ChallengeSent",EventTV="1431085132-271760",Severity="Informational",Service="SIP",EventVersion="1",AccountID="sip:100@MY_ASTERISK",SessionID="0x7ff2c8030a78",LocalAddress="IPV4/UDP/MY_ASTERISK/5060",RemoteAddress="IPV4/UDP/155.94.64.250/5071",Challenge="54fbbac8"

WARNING[3853] chan_sip.c: Timeout on 00c515da631bbb644a6c5c056dcb0f8c on non-critical invite transaction.


How would I go about catching IP (and others to come) automatically with Fail2Ban? Thanks for any help in advance.

Statistics : Posted by genobe • on Fri May 08, 2015 5:47 am • Replies 2 • Views 142

multiple host setup for one sip trunk for backup

$
0
0
A sip trunk is used to connect to sip provider, which give me two host ip address- one for backup. I use one ip host address in sip trunk
sip.conf
Code: [ncell-out]
type=peer
host=<ip address 1>
context=adhearsion
description=Outbound Ncell Link
dtmfmode=rfc2833
nat=force_rport,comedia
disallow=all
allow=g729
insecure= port,invite
qualify=yes


How do i use other ip address in same trunk as a back up link? Or is there any better way to do it?

Statistics : Posted by guru_dev • on Sat May 16, 2015 10:16 pm • Replies 0 • Views 17

Asterisk 12.1.1 with pjsip not registering Cisco 7941

$
0
0
After running debug this is what I got:

<--- Received SIP request (683 bytes) from UDP:172.X.X.X:49162 --->
REGISTER sip:172.X.X.X SIP/2.0
Via: SIP/2.0/UDP 172.X.X.X:5060;branch=z9hG4bKe6bf3a86
From: <sip:10405@172.X.X.X>;tag=0023049a8xxxxxxxxf434118-2d3065ce
To: <sip:10405@172.X.X.X>
Call-ID: 0023049a-xxxxxxxx-16c11800-38b70df6@172.X.X.X
Max-Forwards: 70
Date: Tue, 05 May 2009 20:36:25 GMT
CSeq: 101 REGISTER
User-Agent: Cisco-CP7941G/8.5.2
Contact: <sip:10405@172.X.X.X:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-002304xxxxxx>";+u.sip!model.ccm.cisco.com="115"
Supported: (null),X-cisco-xsi-7.0.1
Content-Length: 0
Reason: SIP;cause=200;text="cisco-alarm:25 Name=SEP002304XXXXXX Load=SIP41.8-5-2S Last=initialized"
Expires: 3600


<--- Transmitting SIP response (478 bytes) to UDP:172.X.X.X:49162 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 172.X.X.X:5060;rport;received=172.X.X.X;branch=z9hG4bKe6bf3a86
Call-ID: 0023049a-xxxxxxxx-16c11800-38b70df6@172.X.X.X
From: <sip:10405@172.X.X.X>;tag=0023049xxxxxxxx23f434118-2d3065ce
To: <sip:10405@172.X.X.X>;tag=z9hG4bKe6bf3a86
CSeq: 101 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1396042718/1243b24bxxxxxxxx67f4a714789d6f24",opaque="294e3470xxxxxxxx",algorithm=md5,qop="auth"
Content-Length: 0

Statistics : Posted by krunner • on Fri Mar 28, 2014 12:53 pm • Replies 5 • Views 2313

Asterisk 12.1.1 with pjsip not registering Cisco 7941

$
0
0
Enable pjsip debug.

Statistics : Posted by krunner • on Fri Mar 28, 2014 12:53 pm • Replies 5 • Views 2313

Asterisk 12.1.1 with pjsip not registering Cisco 7941

$
0
0
I installed Asterisk 12.1.1 from source on CentOS 6.5 and initially configured it to work with SIP. I was able to get all devices working including X-lite, a Polycom vvx1500 and the Cisco 7941. Everything worked fine including video.

I recompiled Asterisk without chan_sip to get it working with only pjsip. I have since been able to get X-lite to X-lite audio working, the Polycom vvx1500 audio. The Cisco 7941 however is stuck registering. I used the following to configure pjsip.conf

;===============TRANSPORT

[simpletrans]
type=transport
protocol=udp
bind=0.0.0.0

;===============ENDPOINT TEMPLATES

[endpoint-basic](!)
type=endpoint
transport=simpletrans
context=internal
disallow=all
allow=ulaw

[auth-userpass](!)
type=auth
auth_type=userpass

[aor-single-reg](!)
type=aor
max_contacts=1

;===============EXTENSION 6001

[6001](endpoint-basic)
auth=auth6001
aors=6001

[auth6001](auth-userpass)
password=6001
username=6001

[6001](aor-single-reg)

Any suggestions?

Statistics : Posted by krunner • on Fri Mar 28, 2014 12:53 pm • Replies 5 • Views 2313

pjsip and identify

$
0
0
Hi, I have the same problem did you find a solution.

I have Cisco 7940 and Asterisk 13 and the Cisco 7940's won't register.

Thanks

Statistics : Posted by krunner • on Thu Apr 17, 2014 7:56 pm • Replies 3 • Views 958

pjsip and identify

$
0
0
Thanks for the response, I do have the filename in lowercase, I only capitalized it show separation. My issues seems to be with the syntax for identify. No matter what I put in the identify section, it isn't being recognized. I was able to get an X-lite phone working fine. However, Cisco 7940/7941 phones are not registering and I'm getting the message listed above.

Statistics : Posted by krunner • on Thu Apr 17, 2014 7:56 pm • Replies 3 • Views 958

pjsip and identify

$
0
0
Change the name to pjsip.conf

Statistics : Posted by krunner • on Thu Apr 17, 2014 7:56 pm • Replies 3 • Views 958

pjsip and identify

$
0
0
I am having problems getting phone registered, following is the debug output and portion of the pjsip.conf file:

Apr 17 20:45:23] DEBUG[44075]: res_pjsip_endpoint_identifier_ip.c:128 ip_identify: No identify sections to match against
[Apr 17 20:45:23] DEBUG[44075]: res_pjsip_endpoint_identifier_user.c:106 username_identify: Could not identify endpoint by username '11111'
[Apr 17 20:45:23] NOTICE[44075]: res_pjsip/pjsip_distributor.c:246 log_unidentified_request: Request from '<sip:11111@172.1.1.1>' failed for '172.1.1.2:49156' (callid: 0023049a-00000000-90befd10-49c8b602@172.1.1.2) - No matching endpoint found
<--- Transmitting SIP response (476 bytes) to UDP:172.1.1.2:49156 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 172.1.1.2:5060;rport;received=172.1.1.2;branch=z9hG4bKc19e3b2c
Call-ID: 0023049a-00000000-90befd10-49c8b602@172.1.1.2
From: <sip:11111@172.1.1.1>;tag=0023049a8bc8000484971540-8dcb8fcc
To: <sip:11111@172.1.1.1>;tag=z9hG4bKc19e3b2c
CSeq: 103 REGISTER
WWW-Authenticate:
realm="asterisk",nonce="1397781923/6ac047db6872bf48b818554d00000000",opaque="6871e28800000000",algorithm=md5,qop="auth"
Content-Length: 0

PJSIP.CONF

[11111]
type=endpoint
identify_by=username
username=11111
context=internal
transport=simpletrans
auth=11111
aors=11111
identify=identify

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

[11111]
type=aor
contact=sip:11111@172.1.1.2:5060
max_contacts=1

[identify]
type=identify
endpoint=11111
username=11111
match=11111
match=172.1.1.2

Statistics : Posted by krunner • on Thu Apr 17, 2014 7:56 pm • Replies 3 • Views 958

PJSIP and Cisco 79XX phones not registering

$
0
0
Hi, I have the same problem did you find a solution.

I have Cisco 7940 and Asterisk 13 and the Cisco 7940's won't register.

Thanks

Statistics : Posted by krunner • on Wed Oct 29, 2014 12:30 pm • Replies 2 • Views 582

PJSIP and Cisco 79XX phones not registering

$
0
0
I'm having a problem with a 7960 as well. Keep getting 401 Unauthorized. Tried switching to chan_sip as well. Still no good. Has anyone been able to get this to work lately?

Statistics : Posted by krunner • on Wed Oct 29, 2014 12:30 pm • Replies 2 • Views 582

PJSIP and Cisco 79XX phones not registering

$
0
0
Does pjsip support Cisco 79XX series phones. I have had no luck in getting these devices to register with pjsip. Has anyone out there been able to get these phones working with pjsip?

Statistics : Posted by krunner • on Wed Oct 29, 2014 12:30 pm • Replies 2 • Views 582

Rant: Phonebook Administration

$
0
0
This wasn't even something I bothered checking assuming it was such a basic feature that there was no way it wouldn't be supported with lots of options.

I am still in the denial stage, searching these forums for some thread explaining how they have just hidden all the address book features away!?

surely.. surely.. this must be a big issue for people? It seems inevitable that we must run a separate server to push phone config and add all the missing features which means I may as well be running asterisk instead.

Statistics : Posted by absolute • on Thu Apr 14, 2011 12:38 pm • Replies 16 • Views 12600

Rant: Phonebook Administration

$
0
0
I actually ended up writing a PHP script that accomplished this - quite badly written, as I stopped programming years ago - that used a combination of API calls in addition to many direct cURL calls to the "user" webpages to manipulate them into adding extensions - essentially just making posts to the website as if the user was actually interacting it with a web browser.

I ended up running it as a cron job each morning - it ended up taking about 2-3 hours to run, for 103 users.

As lprikockis posted though, this went from just hard to do to difficult when we added in a second Switchvox unit for another country; I've attempted to modify the script to deal with local extensions as it did before, and then query the API of the second Switchvox unit for extensions, and then add them in as external entries with their jabber ID, but I haven't fully got it running.

Whereas I was able to send a single query to add local extensions to a phone book (i.e., add 111, 112, 113, 114... all at the same time), adding external entries requires an individual HTTP call for each extension. Works okay on our main SV unit where we have 30 external on the secondary unit... but running it on the secondary unit results in 103 posts per each user on it... probably flooding it horribly.

If people are interested, I can post the HTTP query strings I use to script the addition of local and remote extensions, as it took a lot of scouring through the generated HTML/JS to extract them. The code itself is embedded in our Extranet, so I can't really post that.

Statistics : Posted by absolute • on Thu Apr 14, 2011 12:38 pm • Replies 16 • Views 12600
Viewing all 7460 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>