[General] VoIP For Home Usage

Majed B. majedb at gmail.com
Mon Aug 3 00:04:46 +03 2009


Asterisk resolves my domain name when putting it in externip so I
don't need to define an IP.

I was just curious on how you had it update it :) (In case I needed it
in the future)

Today I went to dewaniya and tried to connect to my PBX from there but
it didn't work :/ I get a time-out on the connection.

On Sun, Aug 2, 2009 at 11:22 PM, Ahmad Al-Ibrahim<ahmad at koutbo6.com> wrote:
> Majed,
>
> Try using your WAN IP in the externip and see how it goes. I made a call
> with a friend in Argentina for 30 minutes. Voice is crystal clear!
>
> Use the following python script to update your sip_nat.conf, I suggest
> backup up the target file, the script is going to write on it.
>
> You need to download PyDNS package from
> http://pydns.sourceforge.net/
>
> I have this script running every 5 mins.
>
> --- begin ---
>
> #!/usr/bin/python
>
> import os
> import time
> import DNS
> hostname='your_host_name'
> server='208.67.222.222' # using OpenDNS to resolve
> localnet='192.168.1.0/24' # your LAN
> file_path='/etc/asterisk/sip_nat.conf'
> try:
>    request = DNS.Request(name=hostname, server=server, qtype='A')
>    response = request.req()
>    ip_address = response.answers[0]['data']
>    f = open(file_path, 'w')
>    f.write('nat=yes\n')
>    f.write('externip=%s\n' % ip_address)
>    f.write('localnet=%s\n' % localnet)
>    f.close()
>    time.sleep(2)
>    # soft sip reload without dropping calls
>    os.system('asterisk -r -x "sip reload"')
> except:
>    pass
>
> --- end ---
>
> Regards,
>
> Ahmad Al-Ibrahim
>
> Majed B. wrote:
>> Ahmad,
>>
>> How did you add the scripts? Can you provide the details please?
>>
>> I got mine to work with my friend in the US using the settings I used
>> for NATting in my previous emails.
>> Instead of using an IP, I'm using a sub domain under my domain name
>> which automatically gets updated by my firewall (IPcop). My dynamic
>> DNS domain name is handled by no-ip.com.
>>
>> Keep us updated on OpenVox's usage: Installing, configuring, sound
>> quality, ...etc.
>>
>> Good luck!
>>
>> On Sun, Aug 2, 2009 at 8:39 PM, Ahmad Al-Ibrahim<ahmad at koutbo6.com> wrote:
>>> I got it to work finally.
>>> with
>>> nat=yes
>>> externip=<router WAN IP>
>>> localnet=192.168.1.0/24
>>> and added scripts to update externip in /etc/asterisk/sip_nat.conf value
>>> every 5 minutes and reload sip without killing active calls using
>>> asterisk -r -x "sip reload"
>>> from shell
>>>
>>> I'm gonna install OpenVox card tomorrow inshalla!
>>>
>>> Thanks for your help guys.
>>>
>>> Regards,
>>>
>>> Ahmad Al-Ibrahim
>>>
>>> Ahmad Al-Ibrahim wrote:
>>>> I've assigned single port to RTP without luck.
>>>>
>>>> Regards,
>>>>
>>>> Ahmad Al-Ibrahim
>>>>
>>>> On Fri, 31 Jul 2009 07:36:13 -0700 (PDT), Faisal AlAbhoul
>>>> <kuwait at q8net.com>
>>>> wrote:
>>>>> Like Bashar said Zain wont give you a real IP, instead they bridge your
>>>>> device with the real ip at their end, i have found that while trying to
>>>> fix
>>>>> my brother's router to host online games.
>>>>>
>>>>> Ahmad, try to allocate a single port to RTP instead of a range, this
>>>> might
>>>>> help as i have done it on my ClarkConnect router.
>>>>>
>>>>> --- On Fri, 7/31/09, Bashar Al-Abdulhadi <bashar at kuwaitnet.net> wrote:
>>>>>
>>>>> From: Bashar Al-Abdulhadi <bashar at kuwaitnet.net>
>>>>> Subject: Re: [General] VoIP For Home Usage
>>>>> To: "General OpenSource Discussion" <general at oskw.org>
>>>>> Date: Friday, July 31, 2009, 5:19 PM
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Zain NAT's your mobile connection maybe thats causing the issue ?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Ahmad Al-Ibrahim wrote, On 07/31/2009 01:12 PM:
>>>>>
>>>>>   Majed, I went through most of the articles, my case is th last and the
>>>>> worst case, where asterisk is behind NAT, and the mobile is behind NAT
>>>>> in other network.
>>>>>
>>>>> tcpdump shows RTP packets sent from asterisk to the mobile without a
>>>>> response from the mobile.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Ahmad Al-Ibrahim
>>>>>
>>>>> Majed B. wrote:
>>>>>
>>>>>
>>>>>     Ahmad, the issue has already been addressed before and is documented
>>>>> with solutions. The first 3 hits should have the proper solution for
>>>>> you/us:
>>>>>
>>>>> http://www.google.com/search?q=asterisk+nat
>>>>>
>>>>> Let me know which one works out!
>>>>>
>>>>> I just installed IPcop on my HP T5700 ThinClient (which has support
>>>>> for my SpeedTouch USB DSL Modem)!!! So I should be able to get
>>>>> Asterisk running online in 2 days or so. Inshallah....
>>>>>
>>>>> On Fri, Jul 31, 2009 at 3:58 AM, Ahmad Al-Ibrahim<ahmad at koutbo6.com>
>>>> wrote:
>>>>>
>>>>>       Majed,
>>>>>
>>>>> Yes, that was the first thing I've tried without success, after that I
>>>>> configured the PBX to be on DMZ. I will let you know once it is solved.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Ahmad Al-Ibrahim
>>>>>
>>>>> Majed B. wrote:
>>>>>
>>>>>
>>>>>         Ahmad: Did set port-forwarding rules from your gateway to
>>>> Asterisk?
>>>>> According to what I read, these ports should be redirected to the
>>>>> Asterisk box:
>>>>>
>>>>> 5060 (tcp/udp)
>>>>> 10000-20000 (udp)
>>>>>
>>>>> On Fri, Jul 31, 2009 at 3:31 AM, Faisal AlAbhoul<kuwait at q8net.com> wrote:
>>>>>
>>>>>
>>>>>           Thats the drawbacks of SIP 2.0 over NAT. Try to use IAX2
>>>>>           protocol, its very
>>>>> NAT-Friendly but hardly any software clients for mobile phones support
>>>> IAX
>>>>> or IAX2.
>>>>>
>>>>> I see you didnt install G729, you can download the opensource G729 and
>>>>> simply place it in modules directory. The G711 is actually the alaw and
>>>>> ulaw
>>>>> codec, perfect for LAN telephony and FAX over VoIP.
>>>>>
>>>>>
>>>>>
>>>>>       _______________________________________________
>>>>> General mailing list
>>>>> General at oskw.org
>>>>> http://oskw.org/mailman/listinfo/general_oskw.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>   _______________________________________________
>>>>> General mailing list
>>>>> General at oskw.org
>>>>> http://oskw.org/mailman/listinfo/general_oskw.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -----Inline Attachment Follows-----
>>>>>
>>>>> _______________________________________________
>>>>> General mailing list
>>>>> General at oskw.org
>>>>> http://oskw.org/mailman/listinfo/general_oskw.org
>>>> _______________________________________________
>>>> General mailing list
>>>> General at oskw.org
>>>> http://oskw.org/mailman/listinfo/general_oskw.org
>>>>
>>> _______________________________________________
>>> General mailing list
>>> General at oskw.org
>>> http://oskw.org/mailman/listinfo/general_oskw.org
>>>
>>
>>
>>
>
> _______________________________________________
> General mailing list
> General at oskw.org
> http://oskw.org/mailman/listinfo/general_oskw.org
>



-- 
       Majed B.




More information about the General mailing list