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

SIP/2.0 401 Unauthorized response when dial 7777 to Asterisk

$
0
0
401 Unauthorized

The request requires user authentication. This response is issued by
UASs and registrars,

It is normal to get 401 and then retry with the right credentials.

Statistics : Posted by luedcortes • on Wed Nov 12, 2014 12:13 pm • Replies 2 • Views 43

SIP/2.0 401 Unauthorized response when dial 7777 to Asterisk

$
0
0
That is normal behaviour for a device which requires authentication. What happens next is what is important. If nothing happens, or the cycle repeats, it means that the gateway hasn't been told that it needs to use a password.

Note: canreinvite is deprecated and allowguest=yes is normally a bad idea.

Statistics : Posted by luedcortes • on Wed Nov 12, 2014 12:13 pm • Replies 2 • Views 43

SIP/2.0 401 Unauthorized response when dial 7777 to Asterisk

$
0
0
Hello:

I'm newbie in asterisk, please help me.

My context is as follows:
192.168.4.2 --> Asterisk 11.13.1 complied from source
192.168.4.4 --> Yeastar NeoGate TG100 GSM gateway

When I call from a GSM cell phone, my TG100 GSM gateway answers and dials extension 7777 (configured as a hotline on TG100) to asterisk server, but asterisk server sends me "SIP/2.0 401 Unauthorized" response, I think it's a matter of contexts but I didn't find the problem.

Below are sip.conf, extensions.conf and debug from 192.168.4.4 (TG100 GSM gateway).

Thanks in advance.

SIP.CONF
--------
[general]
context = incoming-call
allowguest = yes
srvlookup = no
udpbindaddr = 0.0.0.0
tcpenable = no
qualify = yes

[office](!)
type = friend
host = dynamic
context = from-office-call
dtmfmode = auto
disallow = all
allow = g722
allow = alaw
allow = ulaw

[201](office)
description = grandstream-gxp2160
secret = 201

[202](office)
description = grandstream-dp715
secret = 202

[203](office)
description = grandstream-dp710
secret = 203

[301](office)
description = grandstream-gxp2130
secret = 301

[401](office)
description = grandstream-gxp2160
secret = 401

[11111111]
description = audiocodes-fxo-port5
type = friend
host = 192.168.4.3
secret = 11111111
context = incoming-call
canreinvite = no
dtmfmode = auto
disallow = all
allow = g722
allow = alaw
allow = ulaw

[555555555]
description = yeastar-neogate-tg100
type = friend
host = 192.168.4.4
secret = 555555555
context = incoming-call
canreinvite = no
dtmfmode = auto
disallow = all
allow = g722
allow = alaw
allow = ulaw


EXTENSIONS.CONF
---------------
[globals]

[incoming-call]
exten => _11111111,1,Goto(main-menu,start,1)
exten => _555555555,1,Goto(main-menu,start,1)
exten => _7777,1,Goto(main-menu,start,1)

[outgoing-call]
exten => _[24]XXXXXXX,1,Dial(SIP/${EXTEN}@11111111)
exten =>_09XXXXXXX,1,Dial(SIP/${EXTEN}@555555555)

[from-office-call]
exten => 0,1,Goto(main-menu,start,1)
exten => 201,1,Dial(SIP/201)
exten => 202,1,Dial(SIP/202)
exten => 203,1,Dial(SIP/203)
exten => 301,1,Dial(SIP/301)
exten => 401,1,Dial(SIP/401)
include => outgoing-call

[main-menu]
exten => start,1,Answer()
same => Wait(5)
same => n,Background(enter-ext-of-person)
same => n,WaitExten(20)
exten => 1,1,Dial(SIP/201,20)
same => n,Playback(vm-nobodyavail)
same => n,Hangup()
exten => 2,1,Dial(SIP/202,20)
same => n,Playback(vm-nobodyavail)
same => n,Hangup()
exten => 3,1,Dial(SIP/203,20)
same => n,Playback(vm-nobodyavail)
same => n,Hangup()
exten => 4,1,Dial(SIP/301,20)
same => n,Playback(vm-nobodyavail)
same => n,Hangup()
exten => 5,1,Dial(SIP/401,20)
same => n,Playback(vm-nobodyavail)
same => n,Hangup()
exten => i,1,Playback(pbx-invalid)
same => n,Goto(main-menu,start,1)
exten => t,1,Playback(vm-goodbye)
same => n,Hangup()


DEBUG
-----
<--- SIP read from UDP:192.168.4.4:5060 --->
INVITE sip:7777@192.168.4.2:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.4.4:5060;branch=z9hG4bK0b7c4652;rport
Max-Forwards: 70
From: "999999999" <sip:999999999@192.168.4.4>;tag=as67354416
To: <sip:7777@192.168.4.2:5060>
Contact: <sip:999999999@192.168.4.4>
Call-ID: 12663beb04ae514f10c4b3a145368d5c@192.168.4.4
CSeq: 102 INVITE
User-Agent: TG100
Date: Wed, 12 Nov 2014 10:13:38 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 281

v=0
o=root 1426707418 1426707418 IN IP4 192.168.4.4
s=Asterisk PBX 1.6.2.6
c=IN IP4 192.168.4.4
t=0 0
m=audio 10048 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
<------------->
--- (14 headers 13 lines) ---
Sending to 192.168.4.4:5060 (no NAT)
Sending to 192.168.4.4:5060 (no NAT)
Using INVITE request as basis request - 12663beb04ae514f10c4b3a145368d5c@192.168.4.4
Found peer '555555555' for '999999999' from 192.168.4.4:5060

<--- Reliably Transmitting (no NAT) to 192.168.4.4:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.4.4:5060;branch=z9hG4bK0b7c4652;received=192.168.4.4;rport=5060
From: "999999999" <sip:999999999@192.168.4.4>;tag=as67354416
To: <sip:7777@192.168.4.2:5060>;tag=as16de6e5c
Call-ID: 12663beb04ae514f10c4b3a145368d5c@192.168.4.4
CSeq: 102 INVITE
Server: Asterisk PBX 11.13.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="72011a6b"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '12663beb04ae514f10c4b3a145368d5c@192.168.4.4' in 6400 ms (Method: INVITE)

<--- SIP read from UDP:192.168.4.4:5060 --->
ACK sip:7777@192.168.4.2:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.4.4:5060;branch=z9hG4bK0b7c4652;rport
Max-Forwards: 70
From: "999999999" <sip:999999999@192.168.4.4>;tag=as67354416
To: <sip:7777@192.168.4.2:5060>;tag=as16de6e5c
Contact: <sip:999999999@192.168.4.4>
Call-ID: 12663beb04ae514f10c4b3a145368d5c@192.168.4.4
CSeq: 102 ACK
User-Agent: TG100
Content-Length: 0

<------------->
--- (10 headers 0 lines) ---
Really destroying SIP dialog '6e9eab843b74d0860b108ed13a5d22c9@192.168.4.4' Method: OPTIONS
Really destroying SIP dialog '12663beb04ae514f10c4b3a145368d5c@192.168.4.4' Method: ACK
uc*CLI>

Statistics : Posted by luedcortes • on Wed Nov 12, 2014 12:13 pm • Replies 2 • Views 43

DTMF integration to Avaya

$
0
0
I think I am getting closer.

After taking some packet captures I can see a little more what is happening:

On asterisk 11.5.1 I see an RTP packet source port 2092 destine for 6374 RTP EVE
On asterisk 11.12.0 I see an RTP packet source port 2062 destine for 15840 Dynamic RTP Type 127

Initially I thought there maybe a difference in the configuration of rtp.conf but I can confirm that both are set as follows:
rtpstart=2048
rtpend=65535
(This is a default for Avaya sip trunks as far as I can see)

However I notice that defaults are rtpstart=5000 and rtpend=31000

Is there a valid range which is now implemented in later versions of asterisk or is anything valid?
Is there a command which shows what the RTP values are set to from the command line? It maybe that my settings in rtp.conf are being ignored as they are out of range in the later version.

Anyone seen rtp type 127 before? It looks like an error message.

Thanks

Statistics : Posted by londonnet • on Sat Oct 25, 2014 6:49 pm • Replies 15 • Views 657

DTMF integration to Avaya

$
0
0
If you are offering telephone events, check whether the Avaya is sending telephone events for DTMF.

Statistics : Posted by londonnet • on Sat Oct 25, 2014 6:49 pm • Replies 15 • Views 657

DTMF integration to Avaya

$
0
0
I have had the opportunity to perform some on site tests today and the problem persists. Asterisk version 11.5.1 will receive DTMF from and Avaya sip trunk but Asterisk Version 11.12.0 will not.

I have tried the exact same sip.conf file, bouncing the Avaya trunk etc with no result.

I have compared the output of "sip show settings" and the only difference I see is the version of asterisk, T.38 MaxDtgrm and Outbound reg retry 403:0

I turned on DTMF logging to the console and see no DTMF being received on asterisk 11.12.0
I enabled "sip set debug on" and the only reference I see in the messages that relate to DTMF are:
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|) which is the same on both server traces.

I have also captured a wire-shark trace of both servers which I will spend some time on seeing I can see why I am not getting DTMF

However I can not see why this is a problem with this version of Asterisk. Any ideas of where I can look for differences?

Statistics : Posted by londonnet • on Sat Oct 25, 2014 6:49 pm • Replies 15 • Views 657

DTMF integration to Avaya

$
0
0
Enable DTMF logging. Do a sip debug and check the DTMF method negotiated.

Statistics : Posted by londonnet • on Sat Oct 25, 2014 6:49 pm • Replies 15 • Views 657

DTMF integration to Avaya

$
0
0
Other than the config held in sip.conf I can't see that DTMF is configured in any other config file.

The only difference I see here is the version of Asterisk.

Does this look like a bug?

Statistics : Posted by londonnet • on Sat Oct 25, 2014 6:49 pm • Replies 15 • Views 657

DTMF integration to Avaya

$
0
0
I have rebuilt my asterisk server from 11.5 to 11.12 and now I am having issues with DTMF on my sip trunks from Avaya.

This shows itself by not accepting DTMF on conference bridge calls, I do not have any other menus.

If I connect directly to the asterisk server via x-lite, DTMF works just fine.

The sip.conf file is the same, what else can I check?

Thanks

Statistics : Posted by londonnet • on Sat Oct 25, 2014 6:49 pm • Replies 15 • Views 657

Digium's SIP trunk service and switchvox

$
0
0
Hi folks,

I recently setup a SIP-Trunk account with digium, and it's working fine. Configured it against asterisk, everything is gravy.

However, now I want to setup another account on my switchvox appliance. However, when I attempt to enter the username into the account ID section in the voip provider section, I get the error that the account ID is too long; can only be 32 characters. When I try to enter the user name into the Authentication User field, I get a generic "Invalid Authentication User" message when I try to save the provider.

Unfortunately, support on my switchvox appliance lapsed and I'm not signing it back up ( for a variety of reasons which boil down to "support was a bad value" ). Am I SOL here? Is there another way to configure this account? Or does the SIP Trunking service from Digium NOT work with the Switchvox Appliance ( again, from digium )?

Statistics : Posted by hobbes95356 • on Thu Nov 13, 2014 1:47 pm • Replies 0 • Views 20

mp3 support - Deprecated or not?

$
0
0
Hello! I was pleased to find this excellent installation guide, and even more pleased to see that there was an option for mp3 codec support:

Image

Although I ticked the box when configuring before compiling, I'm not having much luck - it connects and then drops the call. The last thing to appear on the debug log is: 489 Bad Event

Here's what I found:

[fromvoiper]
exten => 101,1,Answer()
same = n,Wait(1)
;same = n,Playback(/home/test/magazine.mp3) << Nope!
;same = n,ControlPlayback(/home/test/magazine.mp3) << Still nothing.
;same = n,MP3Player(/home/test/magazine.mp3) << Works, but no transport controls.
same = n,Hangup()

What I also found is that in this page from 2010 which I found by searching MP3Player, it says:

Quote:Use of the mpg123 for your music on hold is no longer recommended and is now officially deprecated. You should now use one of the native formats for your music on hold selections.


But in this page referring to Asterisk 13 it says:

Quote:MP3Player()
Synopsis
Play an MP3 file or M3U playlist file or stream.
Description
Executes mpg123 to play the given location,


Did it come back into favour? Am I "safe" to use it? And why aren't my mp3s playing with native controls, or appearing in the list below? Still a bit of a noob with all this, but was all going well until I got stuck here. I can always transcode if REALLY need be, but if there's a native method that avoids that, then all the better. Transport controls (skip, like ControlPlayback) are essential. Thanks!

Code:       ID  TYPE     NAME DESCRIPTION
-----------------------------------------------------------------------------------
      30 image      png (PNG Image)
       5 audio     g726 (G.726 RFC3551)
       3 audio     alaw (G.711 a-law)
       1 audio     g723 (G.723.1)
      19 audio    speex (SpeeX)
      20 audio    speex (SpeeX 16khz)
      21 audio    speex (SpeeX 32khz)
      23 audio     g722 (G722)
      31 video     h261 (H.261 video)
      32 video     h263 (H.263 video)
       7 audio    adpcm (Dialogic ADPCM)
      24 audio   siren7 (ITU G.722.1 (Siren7, licensed from Polycom))
      27 audio     g719 (ITU G.719)
      33 video    h263p (H.263+ video)
      34 video     h264 (H.264 video)
      18 audio     g729 (G.729A)
       8 audio     slin (16 bit Signed Linear PCM)
       9 audio     slin (16 bit Signed Linear PCM (12kHz))
      10 audio     slin (16 bit Signed Linear PCM (16kHz))
      11 audio     slin (16 bit Signed Linear PCM (24kHz))
      12 audio     slin (16 bit Signed Linear PCM (32kHz))
      13 audio     slin (16 bit Signed Linear PCM (44kHz))
      14 audio     slin (16 bit Signed Linear PCM (48kHz))
      15 audio     slin (16 bit Signed Linear PCM (96kHz))
      16 audio     slin (16 bit Signed Linear PCM (192kHz))
       2 audio     ulaw (G.711 u-law)
      17 audio    lpc10 (LPC10)
      26 audio  testlaw (G.711 test-law)
      39 audio     none (<Null> codec)
      25 audio  siren14 (ITU G.722.1 Annex C, (Siren14, licensed from Polycom))
       6 audio g726aal2 (G.726 AAL2)
      36 video      vp8 (VP8 video)
       4 audio      gsm (GSM)
      35 video    mpeg4 (MPEG4 video)
      22 audio     ilbc (iLBC)
      37  text      red (T.140 Realtime Text with redundancy)
      38  text     t140 (Passthrough T.140 Realtime Text)
      28 audio     opus (Opus Codec)
      29 image     jpeg (JPEG image)


Statistics : Posted by lardconcepts • on Thu Nov 13, 2014 2:55 pm • Replies 0 • Views 13

Force RTP Keep Alive upon connecting?

$
0
0
My asterisk installation is doing some strange activity when it tries to bridge two SIP legs (one from the provider, and the other another PBX server).

It does not initiate an RTP steam until the remote PBX sends a noise. And this happens when we try to dial outbound from the Remote PBX --> Asterisk --> SIP Provider. Dialing inbound works correctly.

I have a quick fix -- that is to set the RTPKeepAlive value to 1... so that after one second it sends an RTP packet, and that's enough to get things going. However, 1 second is not going to cut it because that's when the callee says "Hello". This causes much confusion and frustration because the callee simply hangs up after a while because we didn't know they answered.

Is there a way to send an RTP Keep Alive packet immediately upon answering? THat would probably be the best fix. I spent many days pinpointing this problem, trying to implement premature media, directRTPsetup, directmedia, etc... you name it.

Thanks.

Statistics : Posted by medicranger • on Thu Nov 13, 2014 3:02 pm • Replies 0 • Views 14

What's wrong in my asterisk configuration ?

$
0
0
Hi, first sorry if i do some english error , its not my natif language , i have a Voip account with a provider (Poivy(i paid that 13$)) and i want to use asterisk with this account for all supplementary option of asterisk (like callerID). I dont want to use asterisk as a client , i use Zoiper free as sip/iax client software.

I installed asterisk successfully in my VM workstation's Kali linux (debian 7) session,
i configured iax.conf , sip.conf and extensions.conf like this :


sip.conf :

Code: [9001]
type=peer
host=dynamic
username=900
secret=1234
context=outgoing


iax.conf :

Code: [Poivy]
type=peer
host=sip.poivy.com
username=My poivy username
secret=My poivy password


Extensions :

Code: [outgoing]
exten => _1NXXNXXXXXX,1,SetCallerID(2024561111)
exten => _1NXXNXXXXXX,n,Dial(IAX2/Poivy/${EXTEN})


when i log in with Zoiper free with my 9001/1234 sip account its registered but i cant make any call
Asterisk console when i try to make a outcall (I reload config) :

Code: root@gregchelli:~# asterisk -r
Asterisk 11.14.0, Copyright (C) 1999 - 2013 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 11.14.0 currently running on gregchelli (pid = 3221)
gregchelli*CLI> reload
[Nov 13 22:46:04] NOTICE[5990]: app_queue.c:7822 reload_queue_rules: queuerules.conf has not changed since it was last loaded. Not taking any action.
[Nov 13 22:46:04] NOTICE[5990]: cel_custom.c:95 load_config: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.
[Nov 13 22:46:04] NOTICE[5990]: chan_skinny.c:7736 config_load: Configuring skinny from skinny.conf
[Nov 13 22:46:04] NOTICE[5990]: pbx_ael.c:164 pbx_load_module: Starting AEL load process.
[Nov 13 22:46:04] NOTICE[5990]: pbx_ael.c:177 pbx_load_module: AEL load process: parsed config file name '/etc/asterisk/extensions.ael'.
[Nov 13 22:46:04] NOTICE[5990]: pbx_ael.c:180 pbx_load_module: AEL load process: checked config file name '/etc/asterisk/extensions.ael'.
[Nov 13 22:46:04] NOTICE[5990]: pbx_ael.c:187 pbx_load_module: AEL load process: compiled config file name '/etc/asterisk/extensions.ael'.
[Nov 13 22:46:04] NOTICE[5990]: pbx_ael.c:192 pbx_load_module: AEL load process: merged config file name '/etc/asterisk/extensions.ael'.
[Nov 13 22:46:04] NOTICE[5990]: pbx_ael.c:195 pbx_load_module: AEL load process: verified config file name '/etc/asterisk/extensions.ael'.
gregchelli*CLI> iax2 reload
[Nov 13 22:46:19] NOTICE[3389]: chan_sip.c:27871 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 9001
[Nov 13 22:46:19] NOTICE[3389]: chan_sip.c:27871 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 9001
[Nov 13 22:46:33] NOTICE[3389][C-00000003]: chan_sip.c:25649 handle_request_invite: Call from '900' (192.168.1.28:5060) to extension '6176611901' rejected because extension not found in context 'outgoing'.
gregchelli*CLI>


Statistics : Posted by gregchelli • on Thu Nov 13, 2014 3:55 pm • Replies 0 • Views 7

What's wrong in my asterisk configuration ?

$
0
0
If you want to call anywhere in the world (though international call charges may apply, you might want to ask your provider about that), your dialplan should have "exten => _.,n,Dial(IAX2/Poivy/${EXTEN})". This takes any length, everything you punch into your phone.

Alternatively, you could use "exten => _0.,n,Dial(IAX2/Poivy/${EXTEN:1})", which needs you to start dialing with a 0, then dial the actual number. "EXTEN:1" cuts out the 0 at the start. This is useful if you want to have more than one phone registered to your Asterisk server and be able to make calls between them without going through your provider.

Also, you can set your Caller ID in sip.conf, so your dialplan will be that one crucial line shorter. Image

Statistics : Posted by gregchelli • on Thu Nov 13, 2014 3:55 pm • Replies 10 • Views 217

What's wrong in my asterisk configuration ?

$
0
0
david55 wrote:If English is not your native language, I wonder why you are trying to use North American style numbers. Most other countries use 0 as their national number prefix.




Thanks a lot for your reply !


Yes im french Image
But my sip provider allow me to call all the world so i was belive that donest matter (probably a idiot thing)

Can you explain what i should change for using my configuration to call french number ?

In france international prefix is +33 and nation is 0
exemple : 0613305968

french number are 10 number and us 11 , so i should edit extensions.conf ?

thanks!

Statistics : Posted by gregchelli • on Thu Nov 13, 2014 3:55 pm • Replies 10 • Views 217

What's wrong in my asterisk configuration ?

$
0
0
If English is not your native language, I wonder why you are trying to use North American style numbers. Most other countries use 0 as their national number prefix.

Statistics : Posted by gregchelli • on Thu Nov 13, 2014 3:55 pm • Replies 10 • Views 217

What's wrong in my asterisk configuration ?

$
0
0
6176611901 is not an 11 digit number beginning with 1 (although its second and fifth digits are non-zero).

Your Asterisk dialplan only matches NANP, national numbers, using the default long distance carrier.

Statistics : Posted by gregchelli • on Thu Nov 13, 2014 3:55 pm • Replies 10 • Views 217

Contacts on Digium Phones

$
0
0
Howdy,

There's not a hard limit to either, but....

3000 contacts is too large for the internal contacts application to handle. It's going to probably cease to function properly as you approach 1000 or so. The number isn't definite. An alternative, if you needed a global phonebook that wasn't tied to the phone's built-in contacts application, would be to build a separate directory application on the phone that interacts with an external service you control that can maintain a full list. There's an example of such a thing here:
http://www.asteriskexchange.com/listings/1398

For subscriptions, the default # is 40. That number can be controlled by the contacts_max_subscriptions option. You can take that number up to 105 on a D70 (5 line keys other than the first plus 10 pages of 10 rapid dial keys). But, be aware that neither the phones (in any current version) nor versions of Asterisk prior to 13 support resource subscription lists. So doing tons of subscriptions gets exponentially worse quickly... 105^105 = a whole lot of NOTIFY packets to send out any time anyone has any device or presence state change.

Statistics : Posted by jusouschi • on Fri Nov 14, 2014 3:06 am • Replies 1 • Views 62

Contacts on Digium Phones

$
0
0
Hi,

Delivery of our 1100 Digium Phones is imminent.
I looked at how to implement a directory of our business via the contacts.xml file.
We have over 3000 contacts. It seems to me that the number of contacts is limited.

What is the maximum number of contacts and subscribe_id ?

Thanks in advance.
Regards

Statistics : Posted by jusouschi • on Fri Nov 14, 2014 3:06 am • Replies 1 • Views 62

Digium's SIP trunk service and switchvox

$
0
0
Switchvox supports 32 characters for this field, and the user name you received from DCS should have been 32 characters. Check and make sure you don't have any extra characters or spaces in your user name when you input into Switchvox.

Statistics : Posted by hobbes95356 • on Thu Nov 13, 2014 1:47 pm • Replies 1 • Views 80
Viewing all 7460 articles
Browse latest View live


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