Author Topic: incoming voip calls [BT UK]SOLVED  (Read 6058 times)

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: incoming voip calls [BT UK]
« Reply #15 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

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: incoming voip calls [BT UK]
« Reply #16 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


colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: incoming voip calls [BT UK]
« Reply #17 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
« Last Edit: February 04, 2009, 10:06:44 pm by colinjones »

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: incoming voip calls [BT UK]
« Reply #18 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






 

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: incoming voip calls [BT UK]
« Reply #19 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.
"Change is inevitable. Progress is optional."
-- Anonymous


maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: incoming voip calls [BT UK]
« Reply #20 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

   


colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: incoming voip calls [BT UK]
« Reply #21 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)

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: incoming voip calls [BT UK]
« Reply #22 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 !

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: incoming voip calls [BT UK]
« Reply #23 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 :)

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: incoming voip calls [BT UK]
« Reply #24 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

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: incoming voip calls [BT UK]
« Reply #25 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

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: incoming voip calls [BT UK]
« Reply #26 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.
"Change is inevitable. Progress is optional."
-- Anonymous


maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: incoming voip calls [BT UK]
« Reply #27 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

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: incoming voip calls [BT UK]
« Reply #28 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!

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: incoming voip calls [BT UK]
« Reply #29 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...