Author Topic: Asterisk on 10.04 with IAX  (Read 11814 times)

fastie81

  • Veteran
  • ***
  • Posts: 136
  • SSDD
    • View Profile
Asterisk on 10.04 with IAX
« on: September 02, 2012, 10:32:51 pm »
Hi Guys

I have installed LMCE1004 and are testing the Asterisk setup.
Ok let me mention what I had a IAX connection to my VoIP provide on Trixbox and it work with no issue when I got my registration setting in.

So I wanted to see if I could get this working on LMCE.
It is a clean install of LMCE with no changes. I setup my connection to my VoIP provider and I get a confirmation from the provider that I am register to them over IAX.
"(Authenticated using the IAX2 protocol)"

However when I call, It just goes to Voice mail on the provider side. When I had this with Trixbox I need to put in the trunk option for it to worked (from-trunk). but I can't do this on LMCE.
So I am not sure if it is Asterisk that does not work or something that I have not done right.

Can any one please help me to get this working. Cause then I can move over to using LMCE.

I had an unknown error in the logs at some point put nothing anymore.
"NotifyHangup channel SIP/xxx.xxx.xxx.xxx-00000002, reason Unknown"

Thanks for your help

C

fastie81

  • Veteran
  • ***
  • Posts: 136
  • SSDD
    • View Profile
Re: Asterisk on 10.04 with IAX
« Reply #1 on: September 03, 2012, 08:52:47 am »
UPDATE:

I have now tried to setup SIP connection and again it shows that I am register.
But now when I call I get the number that I call does not exist.
in the logs I am getting the error..
05      09/03/12 18:42:32.036           NotifyHangup channel SIP/27.111.14.65-00000004, reason Unknown <0xb6362b70>

if I disable the Phone Line then I go to my provides voice mail.

again any help will be great.
Thanks
C

Foxi352

  • Veteran
  • ***
  • Posts: 52
    • View Profile
Re: Asterisk on 10.04 with IAX
« Reply #2 on: September 04, 2012, 09:48:04 am »
As i wrote in IRC:

Here is our open ticket for this http://svn.linuxmce.org/trac.cgi/ticket/1328 and here is the asterisk bug report https://issues.asterisk.org/jira/browse/ASTERISK-19720

At least for SIP this is a known upstream (asterisk) bug related to realtime db use.

I don't have any IAX provider to be able to test, but chances are that the problem is the same.

fastie81

  • Veteran
  • ***
  • Posts: 136
  • SSDD
    • View Profile
Re: Asterisk on 10.04 with IAX
« Reply #3 on: September 04, 2012, 10:37:55 am »
Hi

Thanks for your help, it looks like I got SIP working well it show up when I do "sip show peers"
But I am not sure if it works cause my MD does not want to play ball.. So I think I will have to look at getting my cisco 7912 on first..

Has any one got a 7912 or 7940 working on LMCE? I have got SIP on them now,
If any one have a quick how to that will be great.?
I am not bothered about getting them to work on SCCP but if got SCCP working all good..

Foxi if you want to test iax, I have a VoIP provider that gives you a free basic account. I can give you mine to test.. I will love to get IAX working cause I found it to be better here in NZ. We have really back echo on SIP.
Let me know if you have time

I will get back to you if that is ok when I get my Cisco devices on..

Thanks again

C

daballiemo

  • Guru
  • ****
  • Posts: 244
  • Full Blown Addict
    • View Profile
Re: Asterisk on 10.04 with IAX
« Reply #4 on: September 04, 2012, 09:19:18 pm »
Have a 7912 working as SCCP, used the 7910 template. Before connecting you have to bring in the mac range in the template as per  http://wiki.linuxmce.org/index.php/Cisco_7970
and of course take the range out of the template for the 7970 so it doesn't get detected as a 7970
HP N40L12.04 KVM with virt LCME8.10/10.04
MD: FoxConn NetBox 330I - Samsung LE 26 (1360* 768)
MD: M2NPV-VM dual core AMD 64/3800/2Gb/NV6150 - Samsung UE 55 C8700 (full hd, 3d)
MD: FoxConn NetBox 330I - LG 32ld350

fastie81

  • Veteran
  • ***
  • Posts: 136
  • SSDD
    • View Profile
Re: Asterisk on 10.04 with IAX
« Reply #5 on: September 04, 2012, 10:19:30 pm »
Hi daballiemo

Thanks for your reply.
I will give that a go tonight.. I will maybe try to create a new Device template for the 7912 and the 7940
Will keep you guys updated how I get on.

C

fastie81

  • Veteran
  • ***
  • Posts: 136
  • SSDD
    • View Profile
Re: Asterisk on 10.04 with IAX
« Reply #6 on: September 07, 2012, 09:09:00 pm »
UPDATE: So I got my 7912G working as suggested by daballiemo, Thanks for that. So I created a device Template and will try to  see if I can update the script so we can use more of the functions.

But now to go back to getting this setup in LMCE

So I tried what Foxie said by trying to make a call out, That works from the phone no problem, but still no call in
* IAX does NOT show up with "sip show peers", but can call out.
* SIP does show up with "sip show peers", but can't call out or in.

So I am not sure what ells I can try.
I am using a provider here in New Zealand, 2Talk.co.nz

Any have any other ideas I can try to get this working?

C

davegravy

  • Addicted
  • *
  • Posts: 551
    • View Profile
Re: Asterisk on 10.04 with IAX
« Reply #7 on: September 07, 2012, 09:38:00 pm »
UPDATE: So I got my 7912G working as suggested by daballiemo, Thanks for that. So I created a device Template and will try to  see if I can update the script so we can use more of the functions.

But now to go back to getting this setup in LMCE

So I tried what Foxie said by trying to make a call out, That works from the phone no problem, but still no call in
* IAX does NOT show up with "sip show peers", but can call out.
* SIP does show up with "sip show peers", but can't call out or in.

So I am not sure what ells I can try.
I am using a provider here in New Zealand, 2Talk.co.nz

Any have any other ideas I can try to get this working?

C

I'm about to do a reinstall and will be setting up my Canadian based IAX provider. I'll keep you posted on how it goes.

fastie81

  • Veteran
  • ***
  • Posts: 136
  • SSDD
    • View Profile
Re: Asterisk on 10.04 with IAX
« Reply #8 on: September 07, 2012, 09:39:15 pm »
a man that would be awesome.
Thanks


fastie81

  • Veteran
  • ***
  • Posts: 136
  • SSDD
    • View Profile
Re: Asterisk on 10.04 with IAX
« Reply #9 on: September 08, 2012, 12:31:00 am »
UPDATE: So I got my 7912G working as suggested by daballiemo, Thanks for that. So I created a device Template and will try to  see if I can update the script so we can use more of the functions.

But now to go back to getting this setup in LMCE

So I tried what Foxie said by trying to make a call out, That works from the phone no problem, but still no call in
* IAX does NOT show up with "sip show peers", but can call out.
* SIP does show up with "sip show peers", but can't call out or in.

So I am not sure what ells I can try.
I am using a provider here in New Zealand, 2Talk.co.nz

Any have any other ideas I can try to get this working?

C
Another UPDATE

Ok I found this error now that I have rebooted my Core.
I still using my IAX connection. called out no issue, well after I set the prefix, answer the call all is good..
but then I call in this is showing up
[Sep  8 10:23:51] ERROR[2202]: chan_iax2.c:4938 handle_call_token: Call rejected, CallToken Support required. If unexpected, resolve by placing address 202.180.76.166 in the calltokenoptional list or setting user {mynumber} requirecalltoken=no

and this is after I called out successfully..
done a show peers and it is still not showing it up
dcerouter*CLI> sip show peers
Name/username              Host                                    Dyn Forcerport ACL Port     Status     Realtime
0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline]

C



lemming86_au

  • Veteran
  • ***
  • Posts: 87
    • View Profile
    • Josh Hagger
Re: Asterisk on 10.04 with IAX
« Reply #10 on: September 09, 2012, 02:48:52 pm »
Hi fastie,

To view the status of an IAX trunk, use iax2 show peers instead.

Regards,
Josh

fastie81

  • Veteran
  • ***
  • Posts: 136
  • SSDD
    • View Profile
Re: Asterisk on 10.04 with IAX
« Reply #11 on: September 09, 2012, 10:01:29 pm »
Hi Josh

thanks for that..
It explains why I am not seeing anything..
Will give it a go tonight..

C

fastie81

  • Veteran
  • ***
  • Posts: 136
  • SSDD
    • View Profile
Re: Asterisk on 10.04 with IAX
« Reply #12 on: September 10, 2012, 08:33:55 am »
Hi

After doing iax2 shows peers, I see this
This is after I have call out.

dcerouter*CLI> iax2 show peers
Name/Username    Host                 Mask             Port          Status
{mynumber}/04384  202.180.76.166  (S)  255.255.255.255  4569          UNKNOWN
1 iax2 peers [0 online, 1 offline, 0 unmonitored]

but when I call is I get this

[Sep 10 18:28:10] ERROR[2069]: chan_iax2.c:4938 handle_call_token: Call rejected, CallToken Support required. If unexpected, resolve by placing address 202.180.76.166 in the calltokenoptional list or setting user {MyNumber} requirecalltoken=no

Now one thing I did notice is when I call out, it is supper choppy.
I am not sure if this is a cause.
Any help will be great.

Thanks
C

Foxi352

  • Veteran
  • ***
  • Posts: 52
    • View Profile
Re: Asterisk on 10.04 with IAX
« Reply #13 on: September 10, 2012, 10:12:54 am »
ssh to your core and try to run the following command:

 mysql -u root asterisk -e "update iax_devices set requirecalltoken='no';"

Don't go into phonelines on your webadmin after this command because this will overwrite that setting again.

Then try an incoming call and see if it works now. If yes i will see how to handle that ...

Serge

fastie81

  • Veteran
  • ***
  • Posts: 136
  • SSDD
    • View Profile
Re: Asterisk on 10.04 with IAX
« Reply #14 on: September 10, 2012, 10:27:11 am »
Hi Serge

I have run the command and still now go..

This is the out up when I try to call

dcerouter*CLI> iax2 show peers
Name/Username    Host                 Mask             Port          Status
{My Number}/04384  202.180.76.166  (S)  255.255.255.255  4569          UNKNOWN
1 iax2 peers [0 online, 1 offline, 0 unmonitored]
[Sep 10 20:22:42] ERROR[2059]: chan_iax2.c:4938 handle_call_token: Call rejected, CallToken Support required. If unexpected, resolve by placing address 202.180.76.166 in the calltokenoptional list or setting user {my Number}requirecalltoken=no

This looks the same as before..
Do I need to reload the router to something?
how can I see if it set the setting?
I don;t get any error

dcerouter_1030932:/home/fastie81# mysql -u root asterisk -e "update iax_devices set requirecalltoken='no';"
dcerouter_1030932:/home/fastie81#

Thank you for helping me with this..
C