Page 1 of 1

Problem to make call between two extensions

PostPosted: Wed Mar 30, 2011 5:03 pm
by Chacon24
Hello everybody, I have a problem when i try to make call between extensions is not working. This is the problem:


[Mar xx xx:xx:xx] NOTICE[11283]: chan_sip.c:15566 handle_request_invite: Call from '800' to extension '900' rejected because extension not found.
vicidial*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
900/900 xx.xx.xx.xx D xxxxx OK (121 ms)
800/800 xx.xx.xx.xx D N xxxxx OK (110 ms)
2 sip peers [Monitored: 2 online, 0 offline Unmonitored: 0 online, 0 offline]

And my features:

# OpenSuSE v.11.3 64-bit
# Asterisk v.1.4.39.1-vici
# DAHDI v.2.4.0
# LibPRI v.1.4.11.4
# Sangoma Wanpipe v.3.5.18
# Sangoma VoiceTime v.1.0.10
# MFCR2 via OpenR2 v.1.3.0
# VTiger CRM v.5.1.0
# ViciDial v.2.2.1
# ViciDial SVN Trunk v.2.4-295 Build 110103-1135
# ZoiperWeb v.2.4.0

Help me please.

PostPosted: Wed Mar 30, 2011 6:04 pm
by williamconley
you have demonstrated that you have two sip peers whose names are 800 & 900 ... but this has nothing to do with "dialing a number". That would be in "extensions.conf" or (more likely) an "included" configuration file.

Does your "extensions-vicidial.conf" have entries for these two extensions in it? (do you HAVE an extensions-vicidial.conf?)

PostPosted: Wed Mar 30, 2011 6:32 pm
by Chacon24
extensions-viciial.conf

; Phones direct dial extensions:

exten => 800,1,Dial(SIP/800|60|)
exten => 800,2,Goto(default,85026666666666800,1)

exten => 900,1,Dial(SIP/900|60|)
exten => 900,2,Goto(default,85026666666666900,1)

In extensions.conf i havent done anything, what should i do???

Tnanks in advance

PostPosted: Wed Mar 30, 2011 6:45 pm
by williamconley
when a call from a sip peer arrives, vicidial will dial the number requested in the extensions.conf context specified in the sip.conf context for that sip peer.

Next: since sip peer 800 is dialing 900, we need to see the sip context for "800" (in sip.conf or sip-vicidial.conf) to find the "context=xxxx" entry for that peer.

(one step at a time 8))

PostPosted: Wed Mar 30, 2011 6:54 pm
by Chacon24
In sip-vicidial.conf i have this:

[800]
username=800
secret=****
accountcode=800
callerid="*****" <>
mailbox=800
context=default
type=friend
host=dynamic

[900]
username=900
secret=****
accountcode=900
callerid="*****" <>
mailbox=900
context=default
type=friend
host=dynamic

and in sip.conf is default i havent made changes there

PostPosted: Wed Mar 30, 2011 7:50 pm
by williamconley
ok, so in theory the call from 800 (based on ip address and/or user/pass) will authenticate as peer 800 (not a good idea by the way, you should always start with text and have numbers, ie: cc800 or X800, and remember that this is NOT a number that will ever be "dialed" it is an "id" that must be specified).

after 800 authenticates as SIP/800, asterisk finds that it should be sent to "default". then it attempts to dial 900 (the extension requested) in [default] (the context= entry).

so in the asterisk cli:

Code: Select all
show dialplan 900@default

PostPosted: Wed Mar 30, 2011 8:14 pm
by Chacon24
vicidial*CLI> show dialplan 900@default
There is no existence of 900@default extension
vicidial*CLI>

:cry:

what can i do??

PostPosted: Wed Mar 30, 2011 9:05 pm
by williamconley
now we have to find out why:
exten => 900,1,Dial(SIP/900|60|)
exten => 900,2,Goto(default,85026666666666900,1)

is NOT in [default]

step 1: is "#include extensions-vicidial.conf" in "extensions.conf"?

step 2: is "include => vicidial-auto" in extensions.conf under [default]?

PostPosted: Thu Mar 31, 2011 12:37 pm
by Chacon24
Yes you were right, thank you.

I added:
exten => 900,1,Dial(SIP/900|60|)
exten => 900,2,Goto(default,85026666666666900,1)

In extensions.conf

Thank you

Now I have 2 additional questions, could you please help.

If I have 50 extensions, do I have to create the same for the 50 extensions or there is another way to do it.

The other question is how to create inbound calls, for example i have a number and if i dial in my asterisk i didnt receive any calls, what can i do???

PostPosted: Thu Mar 31, 2011 12:56 pm
by williamconley
You didn't answer this, you manually overrode the system to resolve it .. but now your problem directly relates to these questions (although manually placing them at least demonstrates that this IS the problem, but you have to manually add them all yourself or go back to these questions):
step 1: is "#include extensions-vicidial.conf" in "extensions.conf"?

step 2: is "include => vicidial-auto" in extensions.conf under [default]?


The other question is how to create inbound calls, for example i have a number and if i dial in my asterisk i didnt receive any calls, what can i do???
you should open another thread for this, really. inbound is covered in the manual. the biggest step is to convince your provider to SEND the calls to YOUR server. This can be done by registration, by a setting on their control panel, or talking to your salesguy ... depending on their setup. When you have managed THAT, and have activity in your SIP debug (any activity) when a call arrives at that phone number, then you can just change the context for that carrier to "trunkinbound" and vicidial will usually just do the rest.

PostPosted: Thu Mar 31, 2011 1:42 pm
by Chacon24
Sorry man, I have this configuration:

#include extensions-vicidial.conf" in "extensions.conf"
include => vicidial-auto" in extensions.conf under [default]

Just like you said, I only have to changes extensions.conf and add the extensions.

I will add a new thread for inbound, but what about add a lot extensions how can i do it instead of add one by one

PostPosted: Thu Mar 31, 2011 1:55 pm
by williamconley
in extensions-vicidial.conf, where these extensions are generated and listed, is the context that they are in [vicidial-auto]?

have you reloaded asterisk?

if all those are true, run that check again (show dialplan) because they should be listed at this point.

PostPosted: Fri Apr 01, 2011 1:34 pm
by Chacon24
Hello again, this is what i have when i reload asterisk and then show dialplan:

Code: Select all
[ Context 'vicidial-auto' created by 'pbx_config' ]
  '102' =>          1. Dial(SIP/gs102|60|)                        [pbx_config]
                    2. Goto(default|85026666666666102|1)          [pbx_config]
  '800' =>          1. Dial(SIP/800|60|)                          [pbx_config]
                    2. Goto(default|800|1)                        [pbx_config]
  '900' =>          1. Dial(SIP/900|60|)                          [pbx_config]
                    2. Goto(default|900|1)                        [pbx_config]

[edit: williamconley=changed format for viewing ease :)]

PostPosted: Fri Apr 01, 2011 3:16 pm
by williamconley
now try
Code: Select all
show dialplan 900@default


if vicidial-auto is included in default, the existing 900@vicidial-auto should also apply to default.

PostPosted: Fri Apr 01, 2011 3:54 pm
by Chacon24
I have this:

vicidial*CLI> show dialplan 900@default
[ Context 'default' created by 'pbx_config' ]
'900' => hint: SIP/900&DAHDI/1 [pbx_config]
1. Dial(sip/${EXTEN}|20|to) [pbx_config]
2. hangup() [pbx_config]
3. Hangup() [pbx_config]
4. Hangup() [pbx_config]
[ Included context 'vicidial-auto' created by 'pbx_config' ]
'900' => 1. Dial(SIP/900|60|) [pbx_config]
2. Goto(default|900|1) [pbx_config]

PostPosted: Fri Apr 01, 2011 4:15 pm
by williamconley
well, now you have a "900" in "default" (i'm not sure about that dahdi reference, though, or why you have more than one instance of 900 ... perhaps your edits are still in place?)

you could try dialing it again and see if you get something other than "extension not found".

PostPosted: Fri Apr 01, 2011 4:32 pm
by Chacon24
Thanks.

:D