jonas kellens
2009-Jun-27 09:33 UTC
[asterisk-users] 2 problems I can't solve without any help
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:XXXX at 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090627/b8bc993b/attachment.htm
Dana Harding
2009-Jun-29 18:02 UTC
[asterisk-users] 2 problems I can't solve without any help
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 ACCEPTWith -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_ipThis 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.