* You are viewing Posts Tagged ‘secret password’

IAX Trunk issue.

I’m testing a few IAX trunk scenarios in a controlled lab. From server2 extension 5000 (Server IP Address 172.16.200.212) I dial 6001 which goes across the IAX trunk to server 1 (IP address 172.16.200.210). Instead of ringing the 6001 phone, it plays tt-weasels (the s extension). When I dial 6099 it also plays tt-weasels as it’s supposed to, but it’s not the tt-weasels under its extension. It also dials the s extension.

I only placed the s extension in the dial plan to verify that the traffic was going across the IAX trunk and hitting the correct context.

Any help would be greatly appreciated.

Thanks Mitch

Asterisk-1

IP Address 172.16.200.210

SIP.CONF

[6001]
type=friend
host=dynamic
context=internal_users
secret=xxxxxxx
nat=yes

[6002]
type=friend
host=dynamic
context=internal_users
secret=xxxxxxx
nat=yes

extensions.conf

[internal_users]
exten => 6000,1,Answer()
exten => 6000,2,Playback(hello-world)
exten => 6000,3,Hangup()
exten => 6001,1,Dial(SIP/6001)
exten => 6002,1,Dial(SIP/6002)
exten => 6099,1,Playback(tt-weasels)
exten => 6099,n,HangUp
exten => _5XXX,1,Dial(${IAXTrunk}/${EXTEN})
same => n,Hangup()
exten => s,1,Answer()
exten => s,n,Playback(tt-weasels)
exten => s,n,Hangup()

IAX.conf

[trunk-1]
type=friend
username=trunk-1
trunk=yes
requiretoken=no
secret=password
host=172.16.200.212
context=internal_users
auth=plaintext
disallow=all
;allow=ulaw
;allow=alaw
allow=gsm

Asterisk-2

IP Address 172.16.200.212

sip.conf

[5000]
type=friend
context=phones
host=dynamic
disallow=all
allow=ulaw
secret=xxxxxxx

extensions.conf

[phones]
exten => _60XX,1,Dial(IAX2/trunk-1)
exten => _X.,1,Dial(IAX2/trunk-1)
exten => 5000,1,Dial(SIP/${EXTEN})
exten => 5000,n,Hangup
same => n,Hangup()
exten => 5099,1,Playback(tt-monkeys)
exten => 5099,n,HangUp

iax.conf

[trunk-1]
type=friend
username=trunk-1
trunk=yes
requiretoken=no
secret=password
host=172.16.200.210
context=phones
auth=plaintext
disallow=all
;allow=ulaw
;allow=alaw
allow=gsm

Asterisk 1.8 Manager Perl Script Problem

Hi All,

Trying to upgrade some call servers, in the lab making sure all my
applications work, ran into an issue with some manager perl scripts
that pull and reset database info, it seems the command and result
responses have changed but I’m not sure how to resolve. My scripts
are using CPAN Asterisk::Manager; and are working fine on asterisk
1.2.32 but not on Asterisk 1.8.6.0.

Here is the abbreviated script where 1.2.32 is astman1 and 1.8.6.0 is astman2:

#!/usr/bin/perl -w
use strict;
use warnings;
use Getopt::Long;
use Asterisk::Manager;

##setup manager connections##
my $astman1 = new Asterisk::Manager;
$astman1->user(‘username’);
$astman1->secret(‘password’);
$astman1->host(’10.10.14.101′);
$astman1->connect || die $astman1->error . “n”;

my $astman2 = new Asterisk::Manager;
$astman2->user(‘username’);
$astman2->secret(‘password’);
$astman2->host(’10.10.14.102′);
$astman2->connect || die $astman2->error . “n”;

##query databases for cnam count##
$astman1->sendcommand(Action => ‘DBGet’, Family => ‘cnam’, Key => ‘count’);
my @result1 = $astman1->sendcommand(Event => ‘DBGetResponse’);
my $cnamcount1 = “0$result1[7]“;

$astman2->sendcommand(Action => ‘DBGet’, Family => ‘cnam’, Key => ‘count’);
my @result2 = $astman2->sendcommand(Event => ‘DBGetResponse’);
my $cnamcount2 = “0$result2[7]“;

##total cnam count##
my $cnamtotal = ($cnamcount1+$cnamcount2);

##reset cnam count to 0##
$astman1->sendcommand(Action => ‘DBPut’, Family => ‘cnam’, Key =>
‘count’, Val => ’0′);
my @result101 = $astman1->sendcommand(Event => ‘DBGetResponse’);
my $cnamreset1 = $result101[1];

$astman2->sendcommand(Action => ‘DBPut’, Family => ‘cnam’, Key =>
‘count’, Val => ’0′);
my @result102 = $astman2->sendcommand(Event => ‘DBGetResponse’);
my $cnamreset2 = $result102[1];

##disconnect the manager connections##
$astman1->disconnect;
$astman2->disconnect;

print “Total CNAM Count for last month is $cnamtotalnn”;

Unable to register an endpoint after upgrading from 1.4.2.20 to 1.8.3.1

Hello,
I’ve just upgrade from 1.4.2.20 to 1.8.3.1 and some kind of endpoint
aren’t able to register. Message is:
[Jul 16 01:26:15] NOTICE[25443]: chan_sip.c:23511
handle_request_register: Registration from ‘‘ failed for
‘X.X.X.X:5060′ – No matching peer found

sip.conf

[user637801]
type=friend
context=FROMuser637805
host=dynamic
secret=password
dtmfmode=rfc2833
disallow=all
allow=g729
allow=ulaw
allow=alaw
nat=yes
canreinvite=no
call-limit=2

REGISTER sip:Y.Y.Y.Y SIP/2.0.
From: ;tag=e00028-c0a800fd-13c4-50029-508b5-41d85fb5-508b5.
To:
.
Call-ID: e162cc-c0a800fd-13c4-50029-508b5-18c6cea7-508b5.
CSeq: 2 REGISTER.
Via: SIP/2.0/UDP 192.168.100.2:42904;branch=z9hG4bK-508b5-13aa048e-5ff4a5b9.
Max-Forwards: 70.
Expires: 60.
Authorization: Digest
username=”user637801″,realm=”asterisk”,nonce=”7bf18d37″,uri=”sip:Y.Y.Y.Y”,response=”ce8847cf30a69e1c7735de86a82c3e6e”,algorithm=MD5.
Contact: .
Content-Length: 0.

SIP/2.0 100 Trying.
Via: SIP/2.0/UDP
192.168.100.2:42904;branch=z9hG4bK-508b5-13aa048e-5ff4a5b9;received=X.X.X.X.
From: ;tag=e00028-c0a800fd-13c4-50029-508b5-41d85fb5-508b5.
To:
.
Call-ID: e162cc-c0a800fd-13c4-50029-508b5-18c6cea7-508b5.
CSeq: 2 REGISTER.
Server: ASTERISK.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY,
INFO, PUBLISH.
Supported: replaces, timer.
Content-Length: 0.

SIP/2.0 403 Forbidden (Bad auth).
Via: SIP/2.0/UDP
192.168.100.2:42904;branch=z9hG4bK-508b5-13aa048e-5ff4a5b9;received=X.X.X.X.
From: ;tag=e00028-c0a800fd-13c4-50029-508b5-41d85fb5-508b5.
To:
;tag=as710c9007.
Call-ID: e162cc-c0a800fd-13c4-50029-508b5-18c6cea7-508b5.
CSeq: 2 REGISTER.
Server: ASTERISK.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY,
INFO, PUBLISH.
Supported: replaces, timer.
Content-Length: 0.

I think the problem is that REGISTER packet has:
sip:user637801, instead of sip:user637801@Y.Y.Y.Y

This works in 1.4 version but not in 1.8; it maybe more restrict?
I can’t add @Y.Y.Y.Y in end point’s configuration; is there any option
to put in peer configuration to allow this registration?
Thanks
Imanol

SIP 401

Hi
 
I am trying to get 2 accounts from voipblaster to talk to each other.
Calls withing voipblaster network is free. If I configure two sip clients with
the two accounts it works fine
however with Asterisk I am getting SIP 401
 
In my Sip.conf file I under general
 
register = user:password@sip.voipblaster.com
 
then I have a sip peer
 
 
[FreeCall](default)
type= friend
context= incoming
username = kiks2010
secret = password
host= sip.voipblast.com
fromuser = kiks2010
fromdomain = sip.voipblast.com
insecure=very
qualify=yes
 
these are the sip debug logs
 
v=0
o=kiks2010 1287592622 1287592622 IN IP4 77.72.168.99
s=SIP Call
c=IN IP4 77.72.168.99
t=0 0
m=audio 11538 RTP/AVP 8 101<------------->