LinuxMCE Forums

General => Users => Topic started by: maybeoneday on January 26, 2009, 09:08:44 pm

Title: incoming voip calls [BT UK]SOLVED
Post by: maybeoneday on January 26, 2009, 09:08:44 pm
Hi all,
I've set up  a sipgate voip account thro' wizard in web admin, and checked the settings against the wiki.

Can call out from direct dial, but cannot dial in , or rather there's no indication a call is coming in.
Have opened udp5060-5080 in firewall, enabled  the soft phones in freepbx, without success.

Freepbx is showing following errors

1-COULD NOT RELOAD FOP SERVER

Could not reload the FOP operator panel server using the bounce_op.sh script. Configuration changes may not be reflected in the panel display.
Added 11 minutes ago
(freepbx.reload_fop)

2-FAILED TO COPY FROM MODULE AGI-BINcopy
(/usr/share/asterisk/agi-bin/recordingcheck): failed to open stream: Permission denied
copy(/usr/share/asterisk/agi-bin/fixlocalprefix): failed to open stream: Permission denied
copy(/usr/share/asterisk/agi-bin/dialparties.agi): failed to open stream: Permission denied
copy(/usr/share/asterisk/agi-bin/list-item-remove.php): failed to open stream: Permission denied
copy(/usr/share/asterisk/agi-bin/checksound.agi): failed to open stream: Permission denied
copy(/usr/share/asterisk/agi-bin/directory): failed to open stream: Permission denied
copy(/usr/share/asterisk/agi-bin/enumlookup.agi): failed to open stream: Permission denied

Added 11 minutes ago
(retrieve_conf.CPAGIBIN)


3-SYMLINK FROM MODULES FAILED
retrieve_conf failed to sym link the /etc/asterisk/iax.conf file from modules
Added 11 minutes ago
(retrieve_conf.SYMLINK)


any advice /suggestions would be greatly appreciated

TIA,
Ian











Title: Re: incoming voip calls
Post by: colinjones on January 26, 2009, 11:03:57 pm
Outbound only is a common problem that usually indicates that you have not set up your network correctly for SIP. The other one is a call is placed but no sound. The actual SIP protocol is relatively easy to map through - but SIP is only signalling and just initiates the call, there is no voice traffic passed through it. The voice traffic is passed on a completely separate session set up by the SIP connection. Problem is, the source and destination ports are pretty much random. So unless your core is actually exposed on the Internet with a public IP address (many do just that, it is perfectly safe), then your broadband router is not going to pass these voice connections through. One way that is often recommended is to setup the config to allow ports 10000-20000 to be used, and then port forward all of these on your router through to your core. Its a brute force approach that sounds dangerous but in fact it isn't really, esp if you have no other devices on your "external" network (which you shouldn't by the way!)
Title: Re: incoming voip calls
Post by: maybeoneday on January 26, 2009, 11:56:34 pm
Hi colinjones,
many thanks for reply,allthough now I'm really confused  (not hard   ;)   )

"no other devices on your "external" network (which you shouldn't by the way!)"..........why?

my windoze lappy is on external (so it has no interaction with lmce & can connect to printer, so  is my daughter's lappy, and son's gaming box ,for same reasons),  and has no problem, with exactly  the same voip setup and no extra ports opened on b/band router: which is what led me to believe it was a config problem, either on the inbound route or  the user/embedded phone setup, on the core.

"So unless your core is actually exposed on the Internet with a public IP address"......how?,


TIA,
kind (&confused)regards,
Ian
Title: Re: incoming voip calls [BT UK]
Post by: maybeoneday on January 28, 2009, 04:55:03 pm
UPDATE

complete lmce reinstall.........onlysetup voip ..sipgate.co.uk ,    firewall is disabled ,as is BT homehub firewall

I can dial out from embedded orbiter phone & no problem with connection or voice,the
trunk is registered in Freepbx and on sipgate as active

Dial IN via PSTN  ....immediate cutoff
Dial in via cell   three tones then cutoff

This must be  some very basic error I'm making , so ANY comments , advice, etc would be very much appreciated,

TIA
Ian
Title: Re: incoming voip calls [BT UK]
Post by: Zaerc on January 28, 2009, 07:46:38 pm
Any errors in the logs this time around?
Title: Re: incoming voip calls [BT UK]
Post by: maybeoneday on January 28, 2009, 11:51:04 pm
Hi Zaerc,
thanks for reply,
(sorry should have put these in last post)

errors in freepbx status page now read,
1-COULD NOT RELOAD FOP SERVER

Could not reload the FOP operator panel server using the bounce_op.sh script. Configuration changes may not be reflected in the panel display.                                 
Added 7 hours, 9 minutes ago
(freepbx.reload_fop)

 ie exactly same


2-disappeared

3-SYMLINK FROM MODULES FAILED
retrieve_conf failed to sym link the /etc/asterisk/sip.conf file from modules
Added 9 minutes ago
(retrieve_conf.SYMLINK)

ie changed from     "............  the /etc/asterisk/iax.conf file from modules"

(there's also a warning about default sql password and no email for notifications, which were also present before)


Shed any light ?

TIA

Ian
Title: Re: incoming voip calls [BT UK]
Post by: maybeoneday on January 30, 2009, 09:30:32 pm
bump  .....sorry,
ian
Title: Re: incoming voip calls [BT UK]
Post by: maybeoneday on February 03, 2009, 02:02:32 pm
Hi all,

brand new dvd RC2 install,nothing added (vdr in initial wizard)
Firewall on modem/router disabled

freepbx status panel =>


SYMLINK FROM MODULES FAILED
retrieve_conf failed to sym link the /etc/asterisk/extensions.conf file from modules
Added 9 minutes ago
(retrieve_conf.SYMLINK)


WTF....!***! is happening ?

this  is before any voip/lines/phones etc have been altered,

after a full week -and I mean at least 60 hours- I'm at a compleat loss, has anyone any ideas  PLEASE !



thanks in advance,
Ian
Title: Re: incoming voip calls [BT UK]
Post by: colinjones on February 03, 2009, 09:41:40 pm
I think those messages and the one on FOP are normal (I remember getting them, anyway!) so red herring...

I haven't responded because its a while since I did this and I am by no means an expert. You would be far better to entice a response from Zaerc, as he is. Maybe get onto the IRC channel and chat to him, he is only 1 hour ahead (CET), so it should be easy for you.

From me, if you are still having the issue with being able to place calls but not receive them, then that is definitely a networking issue. SIP and the media channels do NOT like NATs. This is a very common issue for the reasons I explained. The far end initiates a call through SIP (which you have correctly NAT'd to your core), so both ends are expecting a call setup. But the far end actually initiates the media channel, and it does so by selecting an ephemeral/tcphigh (random, free, > port 1024) port number at its end and the ephemeral port given to it by your core, during the SIP session, as the destination port. Of course, the VoIP server on your core is now expecting an inbound media connection on that port, but your broadband router knows nothing about it!! So the session ACKs will come in to your router's external IP address on this port and the router will think "so what? Drop!" This is why it is messy. There is no easy way to tell the router to expect this connection and NAT it. There are lots of different ways to achieve it, but I will give you the simplest and dirtiest.

So long story short: You will need to do a little research for this stuff. There is an Asterisk config file somewhere on your system where you can specify the maximum range of ports that SIP is allowed to choose the near-end ephemeral port from. By default the kernel will choose a new port between 1024-65535, you can then limit this. The suggested range is 10,000-20,000 from memory, and I suspect that this might actually be already set in that file by default in 0710. If not, set it.

Then setup a NAT/virtual server/PAT (whatever your broadband router calls it) to address translate any inbound connections on ports 10,000-20,000, to your core on the same port (ie, it will translate the IP address and leave the port number intact). This will get the connections through.

There is just one more option that I recall. Again, somewhere on your Asterisk a config file dictates how part of the SIP negotiation is done. This basically means that when your server talks to a remote SIP server, it will tell that SIP server either "use this IP address for me" or "read my IP address from the session". This is important, because if your SIP server uses the former option, it will be telling the remote SIP server to connect to it using your core's external IP address, which is almost certainly a non-public IP address such as 192.168.1.5, for instance. Thus the remote server will not be able to connect. You need to use the latter option (if this isn't the default, can't remember) as this will tell the remote SIP server, when initiating the media channel, to use the source address in the SIP packets as the destination address for the media channel(s). When the SIP packets leave your core, then will of course have your non-public IP address still. However, once they pass through your broadband router and get NAT'd, they will get your correct public IP address. This is the one that the remote SIP server will read and use to connect back to you the media channel.

Naturally, all of this is vastly easier if you have a static IP address from your ISP. If not, there are other options to make dynamic IPs more stable, but I will only dredge up that memory if you indeed have that issue.
Title: Re: incoming voip calls [BT UK]
Post by: Zaerc on February 03, 2009, 10:18:11 pm
...
I haven't responded because its a while since I did this and I am by no means an expert. You would be far better to entice a response from Zaerc, as he is. Maybe get onto the IRC channel and chat to him, he is only 1 hour ahead (CET), so it should be easy for you.
...

If I knew I would have pitched in already, and I'm by no means an expert on asterisk/freepbx,  barely managed to get my own telecom going.
Title: Re: incoming voip calls [BT UK]
Post by: maybeoneday on February 03, 2009, 10:25:12 pm
Hi colin,

MANY thanks for response,...I was starting to despair,

I think you're right about the messages being red herrings, from what I've read searching freepbx/ asterix etc forums...

ERRR,  would it be easier to asssign the core to a dmz on the modem/ router,and forward the ports on the core, rather than  map thro' the core and then the router.

QUOTE from bthomehub help file


"On this page you can assign the public IP address of your internet connection to a specific device on your local network. A DMZ (DeMilitarized Zone) host is a computer on your network that can be accessed from the internet regardless of Network Address Translation (NAT), port forwarding and firewall settings of the Hub.
Warning    Setting up a DMZ has serious impact on your Hub and you should only setup a DMZ if you understand the consequences:

    * The BT Broadband Talk service will stop working until you disable the DMZ
    * Your Hub will no longer receive automatic upgrades
    * The device assigned to the DMZ will no longer be protected by the Hub's firewall
    * Any dynamic DNS services you might have setup will stop working
    * You will not be able to join the BT FON Wi-Fi Community

 

You might want to setup a DMZ if:

    * You do not want to use the Network Address Translation engine of your BT Home Hub
    * This device is running server applications (Web server,...) and you want it to be accessible from the internet. You can also achieve this by creating a port mapping for the specified server, as described in Game & Application Sharing
    * This device has to be considered as the unique access point to your local network (DMZ).'

Am I right in thinking that the windoze laptops , on the 'external' net would then,
 a) be completely out of the equation and,
 b) still be protected by the routers firewall  ?

thanks for your patience,
regards,
Ian








Title: Re: incoming voip calls [BT UK]
Post by: colinjones on February 03, 2009, 11:07:16 pm
Hi colin,

MANY thanks for response,...I was starting to despair,

I think you're right about the messages being red herrings, from what I've read searching freepbx/ asterix etc forums...

ERRR,  would it be easier to asssign the core to a dmz on the modem/ router,and forward the ports on the core, rather than  map thro' the core and then the router.

QUOTE from bthomehub help file


"On this page you can assign the public IP address of your internet connection to a specific device on your local network. A DMZ (DeMilitarized Zone) host is a computer on your network that can be accessed from the internet regardless of Network Address Translation (NAT), port forwarding and firewall settings of the Hub.
Warning    Setting up a DMZ has serious impact on your Hub and you should only setup a DMZ if you understand the consequences:

    * The BT Broadband Talk service will stop working until you disable the DMZ
    * Your Hub will no longer receive automatic upgrades
    * The device assigned to the DMZ will no longer be protected by the Hub's firewall
    * Any dynamic DNS services you might have setup will stop working
    * You will not be able to join the BT FON Wi-Fi Community

 

You might want to setup a DMZ if:

    * You do not want to use the Network Address Translation engine of your BT Home Hub
    * This device is running server applications (Web server,...) and you want it to be accessible from the internet. You can also achieve this by creating a port mapping for the specified server, as described in Game & Application Sharing
    * This device has to be considered as the unique access point to your local network (DMZ).'

Am I right in thinking that the windoze laptops , on the 'external' net would then,
 a) be completely out of the equation and,
 b) still be protected by the routers firewall  ?

thanks for your patience,
regards,
Ian


Didn't read all of the quote as it appears very specific. However, yes if you can set it up using your bb router's DMZ function so that the core's external interface shadows your public IP address, then that would negate the need to NAT, as the Asterisk interface is public (like using a broadband bridge instead of router). I suspect, though, you will still need either to tell the bb router which ports to map to that DMZ, or which ports not to map there, otherwise all the inbound connections will end up at the core. Which, whilst completely safe as the core has a firewall, may not be exactly what you want...
Title: Re: incoming voip calls [BT UK]
Post by: maybeoneday on February 03, 2009, 11:27:58 pm
Hi colin,
I've set core up in dmz, and it now shows public ip address, but  I'm knackered,- will fresh install and forward ports /install voip tommorrow and report back,
many thanks,
Ian
Title: Re: incoming voip calls [BT UK]
Post by: colinjones on February 03, 2009, 11:36:39 pm
Its only 10:30pm you nanna! Chat then :)
Title: Re: incoming voip calls [BT UK]
Post by: cht_winston on February 04, 2009, 09:02:38 am
Hi Ian,

We use Sipgate as the VOIP provider in our installations so hopefully the following suggestion will help you.

From Freepbx goto "Inbound Routes". Click on your Sipgate entry. The DID no. will probably reflect the local number provided to you by Sipgate. Change this to your 7-digit account no. Click submit and then apply the changes.

Regards

Winston
Convergent Home Technologies Ltd.
Title: Re: incoming voip calls [BT UK]
Post by: maybeoneday on February 04, 2009, 10:50:05 am
Hi Colin,

GUILTY AS CHARGED     ;D ;D

but after 12hrs plus ,text had started to do the disney thing , and was swirling beautifully across the screen,
(I really must change my tobacco supplier) will catch you after this latest install,

Hi Winston, thx for tip,

do you notice any difference between isp's.....i.e   BT vs cable     I'm startin to suspect some BT skullduggery,  hey just 'cos I'm paranoid , doesn't mean they're not out to get me   !       ;)

kind regards,
Ian
Title: Re: incoming voip calls [BT UK]
Post by: maybeoneday on February 04, 2009, 02:34:36 pm
 ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D

INCOMING    !!!!!        almost there......

on outgoing calls no probs sound in/out both ends
incoming calls  mic works   speakers don't  

 ANY THOUGHTS GUYS ???.....could you look over setup below and point out anything wrong/unnecessary b4 I put it on wiki ?


I can confirm  that the error messages  are still present in freepbx admin panel

[update......set core as dmz .....no internet....( dns still pointing at router (?) wireless lappy ok & firewall ok(shields up)...SO now setup as follows;
1) static ip on core 
2)firewall rules added on core
                       udp 5060-5080  0     0    core_input
                       udp 10000-20000     0   192.168.1.254    (modem/router)
update.....reload router


3)router (BThomeHUB)

        a)app sharing=> new app (sipserver) => assign to core
        b)app  sharing => modify => sipserver=>add  mapping   udp 5060 to5080    5060
                                                                                udp 10000 to 20000   10000

                  back out to google/whatever .....   backin to admin and check settings

                                                                                                                      thanks Colin

4) setup voip on core  (follow  http://wiki.linuxmce.org/index.php/VoIP_with_XS4ALL      thanks Zaerc)

in Freepbx  => trunks=> sipgate=>check all settings use sipID and sipP/wd                   thanks Winston



many thanks guys........."maybeoneday"....soon,

kindest regards
Ian

Title: Re: incoming voip calls [BT UK]
Post by: colinjones on February 04, 2009, 10:03:23 pm
Your post, Ian, is very "raw"! Don't quiet follow some of it. But will make a few comments...

I'm pretty sure that you do not need to setup rules on your core - when the process starts 'listening' at a port, this effectively allows communication on that port.
Firewall rules on the core are active as soon as you create/edit them, no need to reload.
I think you only need 5060 NAT'd
I think you will find the media channels are all TCP not UDP - update that rule on your router - this is probably why you are getting no sound on remote initiated calls. The TCP media channel connection from you to the remote end is successful because it is outbound initiated so requires no rules. But the media channel from the remote end to you (ie the sound) is remote initiated and thus cannot connect because there is no valid TCP rule...

Also, you are mapping 10,000-20,000 to only one internal port - 10,000. This is definitely wrong! You need to map them to the same port, because this is exactly what the core is expecting and listening on. During the SIP negotiation, the remote end tells your core that it will initiate a connection on, say, port 12,345.. that is what the core will listen for. You are then mapping the inbound port 12,345 to internal port 10,000. Miss. You probably have to tell your router port 0 so that it maintains the port mapping. ie you want a NAT not a PAT.

Suggest you update this and the TCP, and try again. Failing that, perhaps try UDP after all
Title: Re: incoming voip calls [BT UK]
Post by: maybeoneday on February 04, 2009, 11:33:16 pm
Hi colin,
sorry about the last post ,


I've removed the rules on the core, now read,


udp     4569 to 0     0         core_input         Delete
udp    5060 to 0    0       core_input       Delete
udp    2000 to 0    0       core_input       Delete
tcp    2000 to 0    0       core_input       Delete
tcp    3877 to 3877    3877    192.168.80.1    port_forward       Delete
udp    5060 to 5060    5060    192.168.80.1    port_forward       Delete


the router  rule is actually a range , changed to tcp,


tcp  10000-20000  translate to     10000-20000
udp  5060-5080    translate to    5060-5080


RESULT = exactly same , ie no  local audio on  remote initiated call   ???

any ideas ?

thankks for your patience,

Ian






 
Title: Re: incoming voip calls [BT UK]
Post by: Zaerc on February 04, 2009, 11:47:37 pm
That is strange indeed, you can try running alsamixer in a terminal and see if there is anything muted and unmute it if there is.
Title: Re: incoming voip calls [BT UK]
Post by: maybeoneday on February 05, 2009, 01:57:27 pm
Hi  all,

the present state of play:

firewall    .....router/modem......disabled
             ......hybrid            ....disabled


Result=............still same, orbiter announces call , outgoing audio ok , NO INCOMING AUDIO

Hmmm, my simplistic logic says it's not  a network/nat/firewall problem.......true/false ?


Alsamixer is showing nothing muted,  (altho  headphones colum doesn't show a volume colum,nor can i get it to) audio cds play fine, outgoing calls from orbiter,100% OK


freepbx admin


-COULD NOT RELOAD FOP SERVER

Could not reload the FOP operator panel server using the bounce_op.sh script. Configuration changes may not be reflected in the panel display.                                 
Added 1 days , 9 minutes ago          ................((last clean install))
(freepbx.reload_fop)





-SYMLINK FROM MODULES FAILED
retrieve_conf failed to sym link the /etc/asterisk/sip.conf file from modules
Added 40 minutes ago.........((when I reebooted))
(retrieve_conf.SYMLINK)

(there's also the warning about default sql password and no email for notifications, which were also present before)


My gut feeling now , with no foundation whatsoever, is that the error  is somehow to do with this symlink/sip.conf file,

yours,
in totally f******g clueless desparation,
Ian

   

Title: Re: incoming voip calls [BT UK]
Post by: colinjones on February 05, 2009, 08:27:09 pm
No, I'd definitely say it still is a NAT/network problem, personally. The SIP session is working but the media sessions are not. And the fact that it is only inbound strengthens my suspicion. For some reason I feel like your NATs aren't working properly....

The only suggestions I can make at this point are:

1) Using something like netstat and grep out the TCP sessions for an outbound call and then an inbound call and compare. They should be the same (one connection in each direction), but I think you might find only one connection outbound for the inbound initiated call. If so, then definitely a network issue.

2) Look into the option I was talking about for telling the remote SIP server to use the TCP source address for initiating media sessions (rather than the IP address that your SIP server provides during the SIP session, as this will be a private, non-routeable address, so the SIP server will be unable to connect)
Title: Re: incoming voip calls [BT UK]
Post by: maybeoneday on February 05, 2009, 09:29:30 pm
Hi colin,

thanks for all the help,I've just  tinkered with netstat,but I'm way out of my depth (as I'm sure you've noticed   ;)     ) and I have no idea of the commands to enter :/to search/to redirect to file so I can look thro/ ......while at the same time making/receiving a call...
              SOooooo    unless you're up for some heavy duty handholding ,- I'm going to go away  and sulk, -get my nose into  Rute ,  http://rute.2038bug.com/index.html.gz , and try and  get up to speed.. :'(

many thanks for your help,
Ian
 I'll be back !
Title: Re: incoming voip calls [BT UK]
Post by: colinjones on February 05, 2009, 09:49:53 pm
I can only handhold upto my own level of (in)competence!

Start by typing

man netstat

And read the manual entry. Essentially, you want to list all the connections coming out of/into the asterisk process. So you can use "ps aux | less" to list all your processes, page through and make a note of the PID (process ID) of any processes that look like they maybe to do with Asterisk. I cannot remember the exact options for netstat, but lets just say they are "-ao", then you can type:

netstat -ao | grep <PID>

And substitute the <PID> with each PID you recorded. This should list any current connections (takes a while to show the UDP ones so wait). Once you find a candidate (should be obvious with the remote end being Internet addresses, and the PID being the same one that the 5060 connection originates/terminates on) you can then compare incoming and outgoing calls in session.

BTW - I am still deeply troubled by the TCP/UDP question. I think I made a big mistake and got them the wrong way around. UDP is typically used when real time delivery is essential but packet loss is tollerable - hence for media protocols. Whereas TCP is used for non-time-critical, but highly reliable delivery conversations. Thus the 5060 SIP session is the TCP one and the 10,000-20,000 ports are the UDP ones! You should take another look at your rules on the router and core :)
Title: Re: incoming voip calls [BT UK]
Post by: maybeoneday on February 05, 2009, 11:11:14 pm
hi colin

udp/tcp   .....    according to provider they should all be udp but

I've just found  TCPview (windows) which shows in real time ports being used on supplied windows softphone

sipgateXLite.exe:2692   UDP   laptop:45352   *:*      
sipgateXLite.exe:2692   UDP   laptop:45337   *:*      
sipgateXLite.exe:2692   UDP   laptop:5060   *:*      
sipgateXLite.exe:2692   TCP   laptop.home:2124   global.counterpath.net:http   CLOSE_WAIT


on connection  (in and out)
sipgateXLite.exe:2692   UDP 8000
sipgateXLite.exe:2692   UDP 8001   

I've found Netactview   http://netactview.sourceforge.net/download.html#instructions which hopefully will do same,
I'm just working out how to use it!

thanks again colin, hopefully I'll be able to give you some usefull feedback later
regards,
Ian
Title: Re: incoming voip calls [BT UK]
Post by: colinjones on February 05, 2009, 11:26:26 pm
OK, I checked into it, SIP can use UDP or TCP (among other tranport protocols) so you should NAT both to be sure.

RTP (the media channel) also can use a range of protocols, but TCP is very rare apparently - this should be NAT'd with UDP.

Col.

http://en.wikipedia.org/wiki/Session_Initiation_Protocol
Title: Re: incoming voip calls [BT UK]
Post by: Zaerc on February 05, 2009, 11:55:54 pm
One more thing to check/try, in the web-admin go to Advanced>Configuration>Phones setup, this should take you to the FreePBX interface.  Then go to Trunks and select the trunk you're using on the right, scroll down to "Incoming Settings" and under "USER Details" there are some settings you may need to fiddle with, an important one seems to be "nat=yes" but IIRC there are also ways to specify your "outside" or "internet" IP number there.  My current settings don't have this but you may need to have them set, unfortunately I can't remember what keyword(s) they were :( if I remember or figure that out I'll post them.  I hope that maybe helps a bit, as colinjones made me think me of those settings in one of his earlier posts here...  Maybe the UDP packages are indeed only routed one way but that is a wild stab in the dark on my part as I'm not sure how you'd be able to get a connection at all then.
Title: Re: incoming voip calls [BT UK]
Post by: maybeoneday on February 06, 2009, 12:29:01 am
Hi guys,
many thanks, again,...... more reading :-\

I'm going to freshen up and settle in for a long night, will post any results later,

regards,
Ian
Title: Re: incoming voip calls [BT UK]
Post by: colinjones on February 06, 2009, 12:29:08 am
Here is an excerpt from my old config that I used to use successfully. Obviously, different providers require different things, but this might give you a feel for the types of things that go in there:

Code: [Select]
Peer:
allow=g729
canreinvite=no
dtmfmode=rfc2833
fromdomain=sip.internode.on.net
fromuser=0290432720
host=sip.internode.on.net
insecure=very
secret=<passwordremoved>
type=peer
username=0290432720


User:
context=from-trunk
host=sip.internode.on.net
secret=<passwordremoved>
type=user
username=0290432720

context 0290432720
0290432720:<passwordremoved.@sip.internode.on.net

then for a different provider -

Code: [Select]
allow=g729
canreinvite=no
dtmfmode=rfc2833
fromdomain=sip00.mynetfone.com.au
fromuser=09212417
host=sip00.mynetfone.com.au
insecure=very
secret=<passwordremoved>
type=peer
username=09212417


context=from-trunk
host=sip00.mynetfone.com.au
secret=<passwordremoved>
type=user
username=09212417


09212417:<passwordremoved>@sip00.mynetfone.com.au

Zaerc's advice on "nat=yes" definitely rings a bell for me. But from a config file rather than in the web admin. Asterisk has loads of config files, and I believe that option was in the one where I set the option saying to use the packet's IP address. It may even be the option itself - certainly looks like it, there were other commands in there as well I needed to do with the same thing. Can't remember! I have a feeling that it was Zaerc that put me onto this in the first place, so you might want to search his previous posts on the subject!
Title: Re: incoming voip calls [BT UK]
Post by: colinjones on February 06, 2009, 12:30:59 am
Don't forget, the NAT issue with SIP is extremely common, it isn't just a LMCE thing. Try googling "sip nat asterisk"... I found a lot of articles and posts this way. Many were just general or old, but some really gave me the pointers to understanding the NATing issue and the options to deal with them...
Title: Re: incoming voip calls [BT UK]
Post by: Zaerc on February 06, 2009, 01:18:42 am
Found the externip=<your-ip> option on the old version of the XS4ALL VoIP page: http://wiki.linuxmce.org/index.php?title=VoIP_with_XS4ALL&oldid=6780 (just knew I could find it somewhere, and woah that sure brings back memories of fail and dispair).
Title: Re: incoming voip calls [BT UK]
Post by: colinjones on February 06, 2009, 01:27:54 am
That's the one! And externhost if you have dynamic IPs...
Title: Re: incoming voip calls [BT UK]
Post by: maybeoneday on February 06, 2009, 01:49:04 am
Hi zaerc, colin,

sorry for being thick BUT,

externip=.....     routers external IP or providers IP or is this purely static ip's provided by ISP?
externhost=...... again router/provider?

sorry guys but I'm tottally punch drunk,

regards,
Ian     
Title: Re: incoming voip calls [BT UK]
Post by: colinjones on February 06, 2009, 02:12:39 am
If you have a static IP from your ISP then you don't need externhost (which is good)

Whatever the external/public IP address is that will access your core. So if you have a router and are NAT'ing back to your core (which is what we have been discussing), then yes, the external IP address your broadband router is assign by your ISP.
Title: Re: incoming voip calls [BT UK]
Post by: maybeoneday on February 06, 2009, 02:54:52 am
I REALLY am sorry  colin,
quote
Whatever the external/public IP address is that will access your core. So if you have a router and are NAT'ing back to your core (which is what we have been discussing), then yes, the external IP address your broadband router is assign by your ISP.


OoooK.... but surely that is subject to change  (altho not often)....which as I understand ( ;D) it , (is the whole reason for all this bollox anyway ),and will then need updating if/when the ISP decides to change the address?

.......or have I missed something essential ....such as a  a   dynamic dns service  ??

regards,
 Ian
Title: Re: incoming voip calls [BT UK]
Post by: colinjones on February 06, 2009, 03:14:55 am
If you have a static IP from your ISP then you don't need externhost (which is good)

This is the bit you missed - I'm proceeding on the basis that you have a static IP address. In other words, your IP address never changes, its assigned to you permanently. You need to check if that is the case first. If so, then the instructions are as given... use externip.

If not, you should seriously consider asking your ISP for a static address. This makes alsorts of things so much easier... this included.

Failing that, yes, set up a dyn dns service, then enter your fully qualified DNS domain name with the externhost option... you will need to read up on this as you need to set other options, too, like a refresh period that Asterisk uses to re-resolve your DNS name to an IP address in case it changes... this method isn't as reliable tho...
Title: Re: incoming voip calls [BT UK]
Post by: maybeoneday on February 06, 2009, 04:12:25 am
Hi colin,and zaerc

please accept my most humble and embarrassed apologies,

all BT domestic adsl is on dynamic addressing,

EDIT  warning .....rant about to start

UNLESS a further fee (£5  10$  pcm)for a static address is extorted;-alternatively one can use their thoughtfully provided own brand voip, which costs almost the same as normal ptsn calls,the quality is crap, and it specifically precludes using any other provider, has limited own brand, expensive hardware,and unless it's deactivated will not allow my spa3102 ata to work.- oh , by the way,forget about any sort of pbx-
I'm allready locked in to their BS monopoly -  with no realistic  alternative  (so much for local loop unbundling !),  - no dsl without a ptsn line for example,(line rental? - what's that all about ?)-
so I WILL NOT pay the money grubbing , couldn't care less bastards one penny more than I absolutely have to !!!

rant over

So tommorrow, rather, later today I'll start again , going the dyndns route,

ONCE AGAIN ...

.................APOLOGIES for being such a pillock,
.................MANY THANKS for your patience , time and effort,

kindest regards,
Ian

Title: Re: incoming voip calls [BT UK]
Post by: Zaerc on February 06, 2009, 12:10:01 pm
Well that sucks, and I suspect that it will still be possible with the right settings, but at least you gave it one hell of a try...
Title: Re: incoming voip calls [BT UK]
Post by: maybeoneday on February 06, 2009, 01:28:08 pm
Hi Zaerc,

quote
"(just knew I could find it somewhere, and woah that sure brings back memories of fail and dispair)"

 :'( :'( :'(..... ;D

it's all knowledge I suppose.. ;)  BTW,

 I'm now following

 http://www.freepbx.org/support/documentation/howtos/howto-resolving-audio-problems


but am getting no response to:

 touch /etc/asterisk/sip_nat.conf     and   ls-al sip_nat.conf   (bash:command not found)

to check ownership and permissions,have you any ideas o master  ?      ;)


tia,
Ian
Title: Re: incoming voip calls [BT UK]SOLVED
Post by: maybeoneday on February 06, 2009, 02:53:44 pm
Hi constant readers,

the title says it all really, have finally got  2way audio on incoming calls

 ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D and once more  ;D


(nearly pooped myself when my own voice finally came back at me !  )

CAVEAT  early days ! 


notes
1) still showing errors in Fpbx admin panel
2) tried without checking ownership permissions..............find out where mce puts asterisk files   (agi-bin for eg)
3 test checkip.pl   for updating asterisk record of external ip
4)test to f***

@Colin & Zaerc ..... ;D   many thanks guys    ;D   feel as tho we've climbed everest together    !   BTW.. if I write up a dummies guide(for me and any other windows refugee s )  will you guys proof it ?


Kindest regards,
Ian


Edit       F***   British TelecoN
Title: Re: incoming voip calls [BT UK]
Post by: Zaerc on February 07, 2009, 12:59:55 pm
Glad to hear you got it sorted, that must be a huge relief.  What did you have to do to get it working in the end now?

...
but am getting no response to:

 touch /etc/asterisk/sip_nat.conf     and   ls-al sip_nat.conf   (bash:command not found)
...

Just to clear that up, there should be a space between "ls" and -al", so the command should be: ls -al sip_nat.conf
Title: Re: incoming voip calls [BT UK]SOLVED
Post by: maybeoneday on February 07, 2009, 03:00:17 pm
Hi Zaerc,
 thanks for that,

I followed 

http://www.freepbx.org/support/documentation/howtos/howto-resolving-audio-problems

almost letter for letter:off the top of my head,(am away from home today) there were a couple of differences , mainly substituting externhost for  externip, externrefresh for fromdomain,  in sip_nat conf

an entry into hosts file for Dyndns setting  and specifying rtp range in rtp.conf file,

theres also a checkip.pl file for updating  sip_nat conf

firewall rules  10001 to 20000  udp        5060 to 5080 to 5060

I'm halfway thro  the dummies hand holding  wiki, 'cos I'm stil tryng to clarify how it should have been done from the beginning ,to save anyone else the time/headache  ;D

many thanks,
Ian