Re: [asterisk-users] 2 problems I can't solve without any help

2009-06-29 Thread Dana Harding
jonas kellens wrote:
 Problem 1 :
 Incoming conversations from the SIP-provider come into the
 [default]-context and to the 's'-extension.
 I am unable to change this, even if I have :

I have the same (or similar) issue with one of my ITSPs.
In my case, the problem seemed to be because they do some load balancing: 
after turning on sip debug and making numerous incoming calls, I noticed 
that the calls come from a number of different IP addresses.

The call was sent to the proper context (from-itsp,s,1) when the incoming IP 
address matched the host=ip.ad.re.ss in sip.conf - else it went to the 
default (default,s,1)

I don't think host= allows multiple hosts to be defined,  so I tried 
creating a new sip.conf entry for every IP address observed.   It worked, 
but is nasty looking and doesn't scale.   Instead I ended up doing:

sip.conf
[general]
context=default
register = mynumber:mypassw...@ip.ad.re.ss/itspname

[itsp]
; stuff recommended in ITSP's documentation for asterisk configuration

-=-=-

extensions.conf
[default]
exten = itspname,1,NoOp(incoming call from itsp)
exten = itspname,n,Goto(from-itsp,s,1)

[from-itsp]
exten = s,1,Dial(SIP/myphone)
; Need this for the times when the itsp calls from the same IP address as 
defined in sip.conf host= line
exten = itspname,1,Goto(from-itsp,s,1)
-=-=-

YMMV depending on how your ITSP handles the  /itspexten in your register 
= statement.You might need to use your account's number.


 Problem 2
 Setup :
 Grandstream -- Asterisk -- Endian_Firewall -- SIPprovider
 Problem :
 Called party can not here me (I'm on the Grandstream) while I can here
 the other side clearly (GSM/cell phone number).

First - does audio between Asterisk and the Grandstream work symmetrically? 
You can test it with any of:
- Phone another SIP client on the LAN (softphone like Zoiper will work if 
you don't have another hardphones around)
- use echotest  [exten = 555,1,Echo()]
- record/playback an audio file (voicemail, or Record()/Playback() )

I am not familiar with Endian,  find out what it does for logging and crank 
the verbosity up so you can see what packets are being 
accepted/dropped/never arrive.

 firewall :
 -A RH-Firewall-1-INPUT -p udp --dport 4569 -j ACCEPT
 -A RH-Firewall-1-INPUT -p tcp --dport 5060 -j ACCEPT
 -A RH-Firewall-1-INPUT -p udp --dport 5060 -j ACCEPT
 -A RH-Firewall-1-INPUT -p udp --dport 11000:11500 -j ACCEPT

With -A (as opposed to -I) any already existing rules that would drop this 
traffic will take precedence.

Since you are already behind the Endian_firewall -  flush your firewall 
rules on the asterisk box and set default policies to accept.
(lock it down again later after you've got the audio working)


 Configuration Endian :
 portforwarding :
 5060 and 11000:11500 to Asterisk_internal_ip

This should be okay,  watch the logging for any traffic coming from your 
ITSP's IP address(es) that is being dropped.

 outgoing traffic :
 coming from Asterisk_internal_ip : ports 5060 and 11000:11500 to RED
 ZONE (internet) are open !

11000-11500 is your own local rtp port range,  not the ITSP's port range. 
You can control what ports are used locally, but you have no control over 
what ports are available/used remotely.   If your ITSP is using, for 
example,  2-5 then your audio will never be heard on the far end 
because of this firewall rule.

Check your ITSP's support/documentation to see what port range they use, or 
allow ALL outgoing traffic from Asterisk_internal_ip.


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] 2 problems I can't solve without any help

2009-06-27 Thread jonas kellens
Problem 1 :

Incoming conversations from the SIP-provider come into the
[default]-context and to the 's'-extension.
I am unable to change this, even if I have :

sip.conf
[general]
;context=default; Default context for incoming calls

register = 092779077:x...@85.119.188.3

; incoming
[092779077]
type=user
host=85.119.188.3
context=from3starsnet

So I define no default context because I want to explicitly define it in
my user-configuration.

Though this is the only solution for incoming conversations :
[default]
exten = s,1,NoOp(call from 3StarsNet)
exten = s,n,Dial(SIP/grandstream,30)

I would like :
[from3starsnet]
exten = s,1,NoOp(call from 3StarsNet)
exten = s,n,Dial(SIP/grandstream,30)


Problem 2

Setup :
Grandstream -- Asterisk -- Endian_Firewall -- SIPprovider

Problem :
Called party can not here me (I'm on the Grandstream) while I can here
the other side clearly (GSM/cell phone number).

Making a call or receiving a call makes no difference.

Configuration Asterisk :
rtp.conf :
rtpstart=11000
rtpend=11500

firewall :
-A RH-Firewall-1-INPUT -p udp --dport 4569 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp --dport 5060 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5060 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 11000:11500 -j ACCEPT

Configuration Endian :
portforwarding :
5060 and 11000:11500 to Asterisk_internal_ip

outgoing traffic :
coming from Asterisk_internal_ip : ports 5060 and 11000:11500 to RED
ZONE (internet) are open !

Why is outgoing audio a problem ?
Help is much appreciated !!

Thanks for the feedback.
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users