?
Solved

Connection 2 softfone through asterisk server

Posted on 2011-05-03
14
Medium Priority
?
651 Views
Last Modified: 2012-06-21
Hi folks,

i am studying about asterisk and try to build simple scenario :

+ install 1 asterisk server on 1 machine
+ install 2 soft- phone on 2 machines using SIP

After installing successfully, i config step by step like below:

Step 1 :  config sip.conf --> 2 softphone can connect Asterisk server
Step 2:   config extenstion.conf --> try to call between 2 softphone but it is not successully
i expect that give extenstion for soft-phone 1 is 1234 and give extenstion for sof-phone 2 is 5678

Any one have any help to share ?
Thanks
0
Comment
Question by:dinhchung82
  • 6
  • 5
  • 3
14 Comments
 
LVL 20

Expert Comment

by:José Méndez
ID: 35691594
please post the sip.conf and extensions.conf and I will try to help. Also debug Asterisk as follows:

# rasterisk | tee debug.txt

cli> core set debug 9
cli> sip set debug on

make a call that fails

cli> exit

Paste the resulting file that we named debug.txt
0
 
LVL 5

Author Comment

by:dinhchung82
ID: 35691858
Please help me , file is attached   vdc.zip
0
 
LVL 25

Assisted Solution

by:Ron Malmstead
Ron Malmstead earned 200 total points
ID: 35691994
If this is a learning experience, I would set the config as minimal as possible and go from there.
The problem in your dialplan...you have your SIP definitions using the Default context, but in extensions.conf  ...under the default context, there are no config lines ...for example  ..."include=>internal".

;---SIP.CONF
[general]
context = default  
allowoverlap = no  
udpbindaddr = 0.0.0.0  
tcpenable = no  
tcpbindaddr = 0.0.0.0  
srvlookup = yes  

[1000]
type = friend
secret = digium
host = dynamic
rfc2833compensate = yes  


[1001]
type = friend
secret = digium
host = dynamic
rfc2833compensate = yes

;-----Extensions.conf



[default]

include => internal


[internal]

exten => 1XXX,1,Dial(SIP/${EXTEN})
exten => 1XXX,n,Hangup()
0
Reclaim your office - Try the MB 660 headset now!

High level of background noise often makes it difficult for employees to concentrate fully on their jobs – or to communicate clearly on calls. The MB 660 headset helps you create a disruption free workspace.  

 
LVL 20

Assisted Solution

by:José Méndez
José Méndez earned 1800 total points
ID: 35692014
This is the cause:

'pre14-asterisk' to extension '500' rejected because extension not found in context 'default'

Your user pre14-asterisk lacks a line in SIP.conf. Add this one:

context=demo

Context demo is where I saw an extension 500 that plays back a file.

Let me know if it helps
0
 
LVL 5

Author Comment

by:dinhchung82
ID: 35692049
sorry , i have a question before try all your suggestion.

how to i link our softphone with extenstions , it means that

pre14-asterisk have extention is 1234
pre15-asterisk have extension is 5678

Thanks
0
 
LVL 20

Accepted Solution

by:
José Méndez earned 1800 total points
ID: 35692096
When you configure the extensions, for example 1234, you can set your block as follows

exten => 1234,1,Dial(SIP/PRE14-asterisk)

This is how you associate an extension to a device.

You can also do

exten => pre14-asterisk,1,Dial(SIP/PRE14-asterisk)

And then you would need a caller device capable of dialing letters, like a softphone where you can actually enter pre14-asterisk@<asterisk ip-address>
0
 
LVL 5

Author Comment

by:dinhchung82
ID: 35692113
thanks, i understood, i am trying now

0
 
LVL 20

Expert Comment

by:José Méndez
ID: 35692125
Remember to reload sip after changing SIP.conf

cli>sip reload
0
 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 35692186
...and.

After changing extensions.conf

cli> extensions reload
0
 
LVL 5

Author Comment

by:dinhchung82
ID: 35695482
Hi all,

let i summary all your suggestions:

1. try with new sip.conf and extensions.conf  --> still error  and i have question for this meaning of

exten => 1XXX,1,Dial(SIP/${EXTEN})
exten => 1XXX,n,Hangup()


2. try with context=demo --> it is okie  

3. try to use  exten => 1234,1,Dial(SIP/PRE14-asterisk) as explains ...  -> it is perfect

with my verions , extensions reload doen't work.

Thanks for all your help



 
0
 
LVL 5

Author Closing Comment

by:dinhchung82
ID: 35695532
Thanks for all
0
 
LVL 20

Expert Comment

by:José Méndez
ID: 35695624
To reload the exentions.conf fileL
cli> dialplan reload

Open a new question about the pattern matching and I will help you debug that

exten => 1XXX,1,Dial(SIP/${EXTEN})
exten => 1XXX,n,Hangup()
0
 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 35699077
It's actually supposed to be like this...

exten => _1XXX,1,Dial(SIP/${EXTEN})
exten => _1XXX,n,Hangup()



My mistake....
You need the underscores '_' when using pattern matching.



0
 
LVL 5

Author Comment

by:dinhchung82
ID: 35699128
Thanks xuserx2000 for your explanation
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How To Create Custom / Distinctive Ring Tones on Polycom Phones Purpose and Overview When creating a custom ring tone, you have simple aspirations: to make your phone cooler than everyone else's. Perhaps you need a louder ringer. Perhaps you w…
Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
Integration Management Part 2
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question