Solved

Asterisk: converting from sip to IAX2

Posted on 2007-11-14
25
1,045 Views
Last Modified: 2013-11-12
How do i beging to setup my asterisk server and phones to work with IAX2 instead of sip
0
Comment
Question by:jonnydollar
  • 14
  • 11
25 Comments
 
LVL 36

Accepted Solution

by:
grblades earned 500 total points
ID: 20283819
3 main steps

1) Open port UDP 4569 on any firewall.

2) Look in your sip.conf file and duplicate all the corresponding settings in the iax2.conf file.

So for example if you sip.conf contains :-
[6152]
type=friend
secret=xxxxxx
username=6152
callerid="your name" <6152>
host=dynamic
canreinvite=yes
disallow=all
allow=ulaw
allow=alaw
context=voipuk
mailbox=6152

then add the following to iax.conf :-
[6152]
type=friend
secret=xxxxx
regextn=6152
host=dynamic
context=voipuk
mailbox=6152

3) Edit your extensions.conf and replace and DIAL commands with a reference to SIP/ with IAX2/. For example replace 'Dial(SIP/6152,60,tT)' with 'Dial(IAX2/6152,60,tT)'.
0
 
LVL 36

Expert Comment

by:grblades
ID: 20283835
For step 3 you can get it to try dialing an IAX extension aswell. Its very usefull as you can have the same name but have SIP for hardware phones and IAX2 for software phones. So for example replace 'Dial(SIP/6152,60,tT)' with 'Dial(SIP/6152&IAX2/6152,60,tT)'
0
 

Author Comment

by:jonnydollar
ID: 20288699
so i can run sip and iax2 the same time?
0
 
LVL 36

Expert Comment

by:grblades
ID: 20288906
Yes no problem.
Thats what I do in the company. SIP is used by the desk phones and all calls try to dial the SIP and IAX2 extension so if people are out of the office they can run the software client and it will ring at the same time as their desk phone.
0
 

Author Comment

by:jonnydollar
ID: 20289089
ok

what i did was set up a duplicate extension for one account in iax conf. then did a dial iax2. and the open the udp port on the router. but still i get the one way voice. should i close those previous ports?

1001-2000 and 5060


sip.conf

[70]
type = friend
context = default
username = 70
callerid = "Kevin Grant" <Ext70>
host = dynamic
mailbox = 70@default


iax.conf

[70]
type = friend
context = default
username = 70
regextn = 70
callerid = "Kevin Grant" <Ext70>
host = dynamic
mailbox = 70@default

exten.conf

Exten => s,1,Dial(IAX2/70,20,rt)
exten => s,2,Voicemail(70@default)
0
 
LVL 36

Expert Comment

by:grblades
ID: 20289146
There isnt any way that you can get one way audio with the IAX2 protocol. There has to be a two way communication in order for you to be able to register and the audio goes over the same UDP session.

Depending on what side of the audio is missing I would check the pc mixer settings and that the microphone works for example.
0
 
LVL 36

Expert Comment

by:grblades
ID: 20289161
Dialing into asterisk to an extension such as the following is a very good way of testing for correct two way audio without having to make a call to a 2nd phone.
exten => 6501,1,Answer                     ; echo test
exten => 6501,n,Playback(demo-echotest)
exten => 6501,n,Echo
exten => 6501,n,Playback(demo-echodone)
exten => 6501,n,Hangup

0
 

Author Comment

by:jonnydollar
ID: 20289443
i am placed the code in my dialplan but i dont hear my voice come back
0
 
LVL 36

Expert Comment

by:grblades
ID: 20289475
If you dial and internal phone in which direction dont you get the audio?
0
 

Author Comment

by:jonnydollar
ID: 20289556
i get sound comming back to me but not the the reciver it seems
0
 
LVL 36

Expert Comment

by:grblades
ID: 20289609
Have you verified the microphone is working in the application?
Check the audio source is set correctly aswell.
0
 

Author Comment

by:jonnydollar
ID: 20289656
wow good call. looks like the drivers for the mic went out somehow. strange but thats does happen with this dell laptop from time to time. but it was a long time since i had to do it
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:jonnydollar
ID: 20289805
i used the code below yet still fro some reason my soft fone wont ring when a call is placed. any ideas ?

Exten => s,1,Dial(Sip/70,20,rt&IAX2/70,20,rt)
0
 
LVL 36

Expert Comment

by:grblades
ID: 20289829
It should be :-
Exten => s,1,Dial(Sip/70&IAX2/70,20,rt)
0
 

Author Comment

by:jonnydollar
ID: 20290317
ok i setup to dial plan to jus dial the iax ext but i still dont get the soft phone to ring. i use eyebeam if ur familar with it. perhaps there is something i need to do to have it register under that iax account.

Exten => s,1,Dial(IAX2/70,20,rt)
0
 
LVL 36

Expert Comment

by:grblades
ID: 20291045
Can you connect to asterisk (asterisk -r -vvv) and then start the software client. You should see a message saying it has registered.

Then type "iax2 show peers" and post the results.

Then please try and dial the extension and post the output which is displayed.
0
 
LVL 36

Expert Comment

by:grblades
ID: 20291061
I am thinking that perhaps the client has the account details set but is not configured to register. If this is the case it will connect to asterisk when it needs to make a call but otherwise wont have a connection so asterisk wont know what IP address to send the call to.
0
 

Author Comment

by:jonnydollar
ID: 20291600
ok so iax is the protocol by which the call is made via the client?
0
 
LVL 36

Expert Comment

by:grblades
ID: 20291619
Yes IAX (technically IAX2) is the protocol used in the same way that SIP and H323 are other protocols which can be used for VoIP.
0
 

Author Comment

by:jonnydollar
ID: 20291759
i tried what u said about the client and watched the output from the asterisk server it seems like the client was communicating over sip after all. I created a IAX account (90) and no sip 90 account and tried to register under that. but no dice


asterisk1*CLI>
    -- Registered SIP '70' at 24.244.159.180 port 6018 expires 3600
    -- Saved useragent "eyeBeam release 3004t stamp 16741" for peer 70
    -- Unregistered SIP '70'
asterisk1*CLI>
0
 
LVL 36

Expert Comment

by:grblades
ID: 20291838
You could give Diax a go. You can download it from http://www.laser.com/dante/diax/diax.html
Its what I use mainly because it does not need to be installed so it can be run off a memory stick for example.
0
 

Author Comment

by:jonnydollar
ID: 20292141
ok i will give that a try also. but let me ask you one other thing with iax. with the 90 account i created below in iax.conf do i need a duplicate 90 account in sip.conf? the error i get on my eyebeam client app. is

login failed: not found

[90]
type = friend
context = default
username = 90
regextn = 90
callerid = "test" <Ext90>
host = dynamic
mailbox = 90@default
0
 
LVL 36

Expert Comment

by:grblades
ID: 20292234
No you only need the entry in iax.conf.
You are missing the password from the iax config.
0
 

Author Comment

by:jonnydollar
ID: 20292305
oh is tha password mandatory?
0
 
LVL 36

Expert Comment

by:grblades
ID: 20292350
I am not sure but it would certenly be a very good idea to have one otherwise other people can connect to it.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

I recently purchased a Bluetooth headset called the Music Jogger (model BSH10). The control buttons on it look like this: One of my goals is to use it as the microphone and speakers for Skype calls. In that respect, it works well. However, I …
Implementing Avaya's One-X portal is pretty painless, until you want to deploy this to the Android and iPhone clients when these clients are outside of your network. The clients will also work within your local network. Here is our experience and so…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now