Cannot Pick up Incoming Calls

Sandan

Joined
Feb 3, 2009
Messages
15
Likes
0
Points
0
#1
I've read through all the posts I can find here and the docs and I know I'm close but close isn't enough.

Elastix/Asterisk isn't seeing the inbound calls. I get "the number you dialed not in service", the call never makes it to my pbx to be routed. If I reboot my old Asterisk server calls work fine.

It appears I am messing up uje registration with Broadvoice but I can't figure out how.

Host Username Refresh State Reg.Time
sip.broadvoice.com:5060 480xxxxxxx 23 Registered Thu, 05 Feb 2009 14:05:51
Registry String = 480xxxxxxx:password@sip.broadvoice.com/480xxxxxxx

User Context = 480xxxxxxx

username=480xxxxxxx
user=480xxxxxxx
type=user
secret=password
nat=yes
insecure=very
host=sip.broadvoice.com
fromdomain=sip.broadvoice.com
allow=ulaw&alaw

Am real confused. As some others have found outgoing is fine. In monitoring asterisk with "asterisk -rvvvvvvvv" I get nothing on inbound which makes me think my registration is buggered
 

Sandan

Joined
Feb 3, 2009
Messages
15
Likes
0
Points
0
#2
Sorry for the smily, that's what it decided to display for : + p
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#3
"the number you dialed not in service" is almost certainly coming from your elastix box and probably because you don't have an inbound route set to handle it, I suggest you set up a catchall inbound route before you go further.
 

Sandan

Joined
Feb 3, 2009
Messages
15
Likes
0
Points
0
#4
That helps narrow it down.

I thought I did have a catch all route but I need to recheck with that in mind.

Would the Asterisk console see anything in that case ? As it didn't I assumed the message from from the telecom.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#5
You'll get the most information by

set verbosity 99
set debug 99

from CLI

lot's of stuff and it goes fast, sometimes it's easier to examine /var/log/asterisk/full (post partum)
 

rafael

Joined
May 14, 2007
Messages
1,454
Likes
1
Points
0
#6
or you can read /var/log/asterisk/full live with tail:
tail -f /var/log/asterisk/full
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#7
absolutely,

or tail -1000 /var/log/asterisk/full|less for the last 1000 lines in a search-able fashion.
(I believe you still need to set the verbosity and debug level in the CLI first though)

add

sip debug ip sip.broadvoice.com

at the CLI for even more detail

and I hate those idiotic smileys too!!
 

Sandan

Joined
Feb 3, 2009
Messages
15
Likes
0
Points
0
#8
Yep I know tail, been working on Linux boxes for years.

However the debug out was shall we say a tad confusing, might as well have been written in Greek.

Try to create a new catch all route this morning
 

Sandan

Joined
Feb 3, 2009
Messages
15
Likes
0
Points
0
#9
Ok I 'think' this confirms the call is getting through but not being routed.

[Feb 6 10:53:57] DEBUG[6466] rtp.c: Ooh, format changed from unknown to ulaw
[Feb 6 10:53:57] DEBUG[6466] rtp.c: Created smoother: format: 4 ms: 20 len: 160
[Feb 6 10:53:57] VERBOSE[6466] logger.c: -- <SIP/4802402959-09a9abb0> Playing 'ss-noservice' (language 'en')
[Feb 6 10:54:02] DEBUG[2698] chan_sip.c: Allocating new SIP dialog for (No Call-ID) - OPTIONS (No RTP)
[Feb 6 10:54:02] DEBUG[2698] chan_sip.c: = Found Their Call ID: 6879c79d78dd49144f9a0fa734ff0092@192.168.10.22 Their Tag Our tag: as23ff6755
[Feb 6 10:54:02] DEBUG[2698] chan_sip.c: Stopping retransmission on '6879c79d78dd49144f9a0fa734ff0092@192.168.10.22' of Request 102: Match Found
[Feb 6 10:54:02] VERBOSE[2698] logger.c: Really destroying SIP dialog '6879c79d78dd49144f9a0fa734ff0092@192.168.10.22' Method: OPTIONS
[Feb 6 10:54:02] DEBUG[6466] channel.c: Set channel SIP/4802402959-09a9abb0 to write format ulaw
[Feb 6 10:54:02] DEBUG[6466] pbx.c: Launching 'PlayTones'
[Feb 6 10:54:02] VERBOSE[6466] logger.c: -- Executing [s@from-sip-external:6] PlayTones("SIP/4802402959-09a9abb0", "congestion") in new stack
[Feb 6 10:54:02] DEBUG[6466] channel.c: Set channel SIP/4802402959-09a9abb0 to write format slin
[Feb 6 10:54:02] DEBUG[6466] channel.c: Scheduling timer at 160 sample intervals
[Feb 6 10:54:02] DEBUG[6466] pbx.c: Launching 'Congestion'
[Feb 6 10:54:02] VERBOSE[6466] logger.c: -- Executing [s@from-sip-external:7] Congestion("SIP/4802402959-09a9abb0", "5") in new stack
[Feb 6 10:54:02] DEBUG[6466] channel.c: Driver for channel 'SIP/4802402959-09a9abb0' does not support indication 8, emulating it
[Feb 6 10:54:02] DEBUG[6466] channel.c: Set channel SIP/4802402959-09a9abb0 to write format ulaw
[Feb 6 10:54:02] DEBUG[6466] channel.c: Set channel SIP/4802402959-09a9abb0 to write format slin
[Feb 6 10:54:02] DEBUG[6466] channel.c: Scheduling timer at 160 sample intervals
[Feb 6 10:54:02] DEBUG[6466] channel.c: Internal timing is disabled (option_internal_timing=0 chan->timingfd=20)
[Feb 6 10:54:02] DEBUG[6466] channel.c: Generator got voice, switching to phase locked mode
[Feb 6 10:54:02] DEBUG[6466] channel.c: Scheduling timer at 0 sample intervals
[Feb 6 10:54:02] DEBUG[6466] channel.c: Internal timing is disabled (option_internal_timing=0 chan->timingfd=20)
Now I need to figure out why, I added a few lines around the relevant one in case there was usful info there
 

Sandan

Joined
Feb 3, 2009
Messages
15
Likes
0
Points
0
#10
Found more info in log, is pretty meaningless to me except I think it shows the call being answered.

[Feb 6 10:53:55] VERBOSE[6466] logger.c: -- Executing [s@from-sip-external:2] Set("SIP/4802402959-09a9abb0", "TIMEOUT(absolute)=15") in new stack
[Feb 6 10:53:55] VERBOSE[6466] logger.c: -- Channel will hangup at 2009-02-06 17:54:10 UTC.
[Feb 6 10:53:55] DEBUG[6466] pbx.c: Launching 'Answer'
[Feb 6 10:53:55] VERBOSE[6466] logger.c: -- Executing [s@from-sip-external:3] Answer("SIP/4802402959-09a9abb0", "") in new stack
[Feb 6 10:53:55] DEBUG[6466] devicestate.c: Notification of state change to be queued on device/channel SIP/4802402959
[Feb 6 10:53:55] DEBUG[2570] devicestate.c: No provider found, checking channel drivers for SIP - 4802402959
[Feb 6 10:53:55] DEBUG[2570] chan_sip.c: Checking device state for peer 4802402959
[Feb 6 10:53:55] DEBUG[2570] devicestate.c: Changing state for SIP/4802402959 - state 4 (Invalid)
[Feb 6 10:53:55] DEBUG[2684] app_queue.c: Device 'SIP/4802402959' changed to state '4' (Invalid) but we don't care because they're not a member of any queue.
[Feb 6 10:53:55] DEBUG[6466] chan_sip.c: SIP answering channel: SIP/4802402959-09a9abb0
[Feb 6 10:53:55] DEBUG[6466] chan_sip.c: Setting framing from config on incoming call
[Feb 6 10:53:55] DEBUG[6466] chan_sip.c: ** Our capability: 0xc (ulaw|alaw) Video flag: True
[Feb 6 10:53:55] DEBUG[6466] chan_sip.c: ** Our prefcodec: 0x0 (nothing)
[Feb 6 10:53:55] DEBUG[6466] chan_sip.c: -- Done with adding codecs to SDP
[Feb 6 10:53:55] DEBUG[6466] channel.c: Internal timing is disabled (option_internal_timing=0 chan->timingfd=20)
[Feb 6 10:53:55] DEBUG[6466] chan_sip.c: Done building SDP. Settling with this capability: 0xc (ulaw|alaw)
[Feb 6 10:53:55] DEBUG[6466] pbx.c: Launching 'Wait'
[Feb 6 10:53:55] VERBOSE[6466] logger.c: -- Executing [s@from-sip-external:4] Wait("SIP/4802402959-09a9abb0", "2") in new stack
[Feb 6 10:53:55] DEBUG[2698] chan_sip.c: = Found Their Call ID: 1830210-83@147.135.32.221 Their Tag 1345 Our tag: as76f3a0f2
[Feb 6 10:53:55] DEBUG[2698] chan_sip.c: **** Received ACK (6) - Command in SIP ACK
[Feb 6 10:53:55] DEBUG[2698] chan_sip.c: Stopping retransmission on '1830210-83@147.135.32.221' of Response 1: Match Found
[Feb 6 10:53:55] DEBUG[2698] chan_sip.c: Auto destroying SIP dialog '00053281-d2600003-5705fbdc-537d5f81@192.168.10.192'
[Feb 6 10:53:55] DEBUG[2698] chan_sip.c: Destroying SIP dialog 00053281-d2600003-5705fbdc-537d5f81@192.168.10.192
[Feb 6 10:53:55] VERBOSE[2698] logger.c: Really destroying SIP dialog '00053281-d2600003-5705fbdc-537d5f81@192.168.10.192' Method: REGISTER
[Feb 6 10:53:57] DEBUG[6466] pbx.c: Launching 'Playback'
[Feb 6 10:53:57] VERBOSE[6466] logger.c: -- Executing [s@from-sip-external:5] Playback("SIP/4802402959-09a9abb0", "ss-noservice") in new stack
[Feb 6 10:53:57] DEBUG[6466] channel.c: Set channel SIP/4802402959-09a9abb0 to write format gsm
[Feb 6 10:53:57] DEBUG[6466] rtp.c: Ooh, format changed from unknown to ulaw
[Feb 6 10:53:57] DEBUG[6466] rtp.c: Created smoother: format: 4 ms: 20 len: 160
[Feb 6 10:53:57] VERBOSE[6466] logger.c: -- <SIP/4802402959-09a9abb0> Playing 'ss-noservice' (language 'en')
 

wiseoldowl

Joined
Aug 19, 2008
Messages
251
Likes
0
Points
0
#11
Sandan said:
Registry String = 480xxxxxxx:password@sip.broadvoice.com/480xxxxxxx

User Context = 480xxxxxxx

username=480xxxxxxx
user=480xxxxxxx
type=user
secret=password
nat=yes
insecure=very
host=sip.broadvoice.com
fromdomain=sip.broadvoice.com
allow=ulaw&alaw
Okay, let's start from scratch. What do you have in you PEER settings? In most cases where people have trouble with incoming calls, we find that the USER settings aren't necessary and aren't even being used. I would suggest you start over from scratch with your trunk configuration, and this time concentrate on your PEER details, but make sure there is a context=from-trunk statement in there. Your registry string looks fine, but make sure you have an Inbound Route for DID 480xxxxxxx and no CID. Also you probably want a disallow=all ABOVE your allow= statement (and if the CLI keeps showing strange messages about codecs, try making a separate line for each allowed codec, e.g. disallow=all followed by allow=ulaw and allow=alaw (not saying the way you did it is wrong, just trying to eliminate possibilities of problems here). One other thing, the insecure statement has changed in Asterisk 1.4, you should now use insecure=port,invite instead of insecure=very.

One thing is for sure, you can work on this for weeks and it will never work without a proper context= statement, which in this case will probably need to be in the PEER settings (since they are probably treating you as an extension rather than a trunk, in which case only the peer settings are used).
 

Sandan

Joined
Feb 3, 2009
Messages
15
Likes
0
Points
0
#12
Trunk Name Broadvoice

username=480xxxxxxx
user=phone
type=peer
secret=xxxxx
qualify=yes
nat=yes
insecure=very
host=sip.broadvoice.com
fromuser=480xxxxxxx
fromdomain=sip.broadvoice.com
disallow=all
 

Sandan

Joined
Feb 3, 2009
Messages
15
Likes
0
Points
0
#13
wiseoldowl wrote:
context=from-trunk [/quote]

Ok I know this is dumb question but exactly what do you mean.

In my existing Asterisk setup [done by long gone buddy] "context=from-broadvoice" is in the peer setup, are you saying I need that ?

I assumed it was a custom named context in Asterisk, I don't understand what the 'from-broadvoice" means. Does it have to be a name of the provider or the name of the trunk or .... ?

I know this sounds dumb but I am clearly lacking some contextual knowledge [if you pardon the pun]
 

wiseoldowl

Joined
Aug 19, 2008
Messages
251
Likes
0
Points
0
#14
Sandan said:
Trunk Name Broadvoice

username=480xxxxxxx
user=phone
type=peer
secret=xxxxx
qualify=yes
nat=yes
insecure=very
host=sip.broadvoice.com
fromuser=480xxxxxxx
fromdomain=sip.broadvoice.com
disallow=all
Okay, try this in your PEER settings (and fill in the xxx's appropriately):

user=480xxxxxxx
username=480xxxxxxx
type=peer
secret=xxxxx
qualify=yes
nat=yes
insecure=port,invite
host=sip.broadvoice.com
fromuser=480xxxxxxx
fromdomain=sip.broadvoice.com
disallow=all
allow=ulaw&alaw
context=from-trunk

Temporarily remove everything from your USER context and USER settings.

The context= statement tells Asterisk where to send incoming calls. You will understand this better as you get more familiar with Elastix, FreePBX and Asterisk, but for now all you need to know is that in FreePBX incoming calls almost always go to the from-trunk context. Of course if you are using raw Asterisk then you can name contexts whatever you want, but in FreePBX and Elastix it's from-trunk (unless for some reason you need to insert some "shim code" in extensions_custom.conf, and you don't need to worry about that yet).
 

Sandan

Joined
Feb 3, 2009
Messages
15
Likes
0
Points
0
#15
Found this in log, more to follow in a few mins

T38 state changed to 0 on channel <none>
[Feb 6 13:09:10] DEBUG[2698] chan_sip.c: We're settling with these formats: 0xc (ulaw|alaw)
[Feb 6 13:09:10] DEBUG[2698] chan_sip.c: Checking SIP call limits for device 4802402959
[Feb 6 13:09:10] DEBUG[2698] chan_sip.c: Updating call counter for incoming call
[Feb 6 13:09:10] NOTICE[2698] chan_sip.c: Call from '4802402959' to extension '4802402959' rejected because extension not found.
[Feb 6 13:09:10] DEBUG[2698] chan_sip.c: Updating call counter for incoming call
 

Sandan

Joined
Feb 3, 2009
Messages
15
Likes
0
Points
0
#16
I also found the following.

If I put "context=from-broadvoice" into the peer definition, Broadvoice rejects the call and transfers it to my alternate phone #. Peer [outgoing] is named 'broadvoice'.

All other combination of that have the same # not in service result
 

Sandan

Joined
Feb 3, 2009
Messages
15
Likes
0
Points
0
#17
Ah now I see what you are asking for
 

Sandan

Joined
Feb 3, 2009
Messages
15
Likes
0
Points
0
#18
And the crowd goes wild.

Thank you sir, you are a lifesaver.

The trick is nothing in the user context. I was fooled by my old raw asterisk setup, I didn't do it but have been using it for a couple of years. Now I can ditch it.

Thanks once again
 

wiseoldowl

Joined
Aug 19, 2008
Messages
251
Likes
0
Points
0
#19
You're welcome. Glad you got it working!
 

wiseoldowl

Joined
Aug 19, 2008
Messages
251
Likes
0
Points
0
#20
One other hint, if you have any problem with incoming or outgoing touch tones, try adding:

dtmf=auto
dtmfmode=inband

You may have to play around with those a bit but the main thing is that when you dial out you want to be able to control other IVR's and when people call you they need to be able to control your IVR (if you use one). But those two settings have worked well with other providers.
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,938
Messages
130,959
Members
17,632
Latest member
moaulool
Top