Connection 2 softfone through asterisk server

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
LVL 5
dinhchung82Asked:
Who is Participating?
 
José MéndezConnect With a Mentor Commented:
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
 
José MéndezCommented:
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
 
dinhchung82Author Commented:
Please help me , file is attached   vdc.zip
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
Ron MalmsteadConnect With a Mentor Information Services ManagerCommented:
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
 
José MéndezConnect With a Mentor Commented:
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
 
dinhchung82Author Commented:
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
 
dinhchung82Author Commented:
thanks, i understood, i am trying now

0
 
José MéndezCommented:
Remember to reload sip after changing SIP.conf

cli>sip reload
0
 
Ron MalmsteadInformation Services ManagerCommented:
...and.

After changing extensions.conf

cli> extensions reload
0
 
dinhchung82Author Commented:
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
 
dinhchung82Author Commented:
Thanks for all
0
 
José MéndezCommented:
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
 
Ron MalmsteadInformation Services ManagerCommented:
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
 
dinhchung82Author Commented:
Thanks xuserx2000 for your explanation
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.