Asterisk: converting from sip to IAX2

How do i beging to setup my asterisk server and phones to work with IAX2 instead of sip
jonnydollarAsked:
Who is Participating?
 
grbladesConnect With a Mentor Commented:
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
 
grbladesCommented:
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
 
jonnydollarAuthor Commented:
so i can run sip and iax2 the same time?
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
grbladesCommented:
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
 
jonnydollarAuthor Commented:
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
 
grbladesCommented:
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
 
grbladesCommented:
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
 
jonnydollarAuthor Commented:
i am placed the code in my dialplan but i dont hear my voice come back
0
 
grbladesCommented:
If you dial and internal phone in which direction dont you get the audio?
0
 
jonnydollarAuthor Commented:
i get sound comming back to me but not the the reciver it seems
0
 
grbladesCommented:
Have you verified the microphone is working in the application?
Check the audio source is set correctly aswell.
0
 
jonnydollarAuthor Commented:
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
 
jonnydollarAuthor Commented:
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
 
grbladesCommented:
It should be :-
Exten => s,1,Dial(Sip/70&IAX2/70,20,rt)
0
 
jonnydollarAuthor Commented:
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
 
grbladesCommented:
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
 
grbladesCommented:
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
 
jonnydollarAuthor Commented:
ok so iax is the protocol by which the call is made via the client?
0
 
grbladesCommented:
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
 
jonnydollarAuthor Commented:
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
 
grbladesCommented:
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
 
jonnydollarAuthor Commented:
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
 
grbladesCommented:
No you only need the entry in iax.conf.
You are missing the password from the iax config.
0
 
jonnydollarAuthor Commented:
oh is tha password mandatory?
0
 
grbladesCommented:
I am not sure but it would certenly be a very good idea to have one otherwise other people can connect to it.
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.