[asterisk-users] 2 problems I can't solve without any help
Dana Harding
dharding at nucleus.com
Mon Jun 29 13:02:18 CDT 2009
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:mypassword at 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, 20000-50000 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.
More information about the asterisk-users
mailing list