Steve
2005-Jun-02 14:54 UTC
[Asterisk-Users] CLUELESS NEWBIE needs help making an outbound sip call to PSTN
I'm going to try and ask this again and keep it short and as too the point as I can while still providing enough info to be of use. PLEASE advise if I am going about this wrong or asking too much. I'm seriously doing my BEST to throughly read the docs and try a bunch of things BEFORE coming here to ask and possibly annoy. If is documentation that explains thsi process in terms that someone new can grab onto quickly I'm missing it! OK here goes again :-) I have complied an asterisk system and got it going from scratch and all works great except I cannot make an outbound sip-to-PSTN call and do not fully understand how to configure it. I've been folowing some examples and keep running into this stumbling block: As soon as I add (to sip.conf) this section: [siprovider.com] type=peer host=sipprovider.com fromuser=2135551212 secret=2135551212 authname=2135551212 fromdomain=siprovider.com I no longer can recieve ANY inbound calls from the PSTN via my sip provider. I've tried many variations of attempting to get this section (I think it's referred to a 'sip channel) into my sip.conf all which give the same result..... All inbound calls from PSTN TO this account FAIL. I have tried with the dialplan in context [default] with a test dialplan and with a 'blank' dial plan. every way I try this, inbound calls via SIP and my SIP provider stop reaching my asterisk box. If I remove the above shown section leaving only the register => 2135551212:2135551212@sipproviderexample.com all works great and calls come in from the PSTN to my asterisk box and people can get around my menu just fine and dial internal SIP extension numbers. This of course leaves me with no SIP [brackted] section of which to use for outbound calls of which I'd love to eventually get working. Am I doing this right at all???? or am I headed completely in the wrong direction here? I also tried this with a FREE Stanaphone account and get a very similar but strange result.... IN both cases adding this section to sip.conf result in my calls terminating at the SIP provider voicemail system instead of coming into my asterisk box here. A side note: Not that it really matters but here's what I get from my provider if I try to dial into my PSTN number from the PSTN: Standard unavailable voicemail message as if not registered in. -and->From Stanaphone:a 'strange' voice message that gives you the option to either #1 change my outgoing unavailable message or #2 press ANY key besides #1 to hangup. Any help or pointers would be GREATLY appreciated!!!!! I compiled and Installed Asterisk about 10 days or so ago and am running version: CVS-Nv1-0-7-05/19/05-11:22:20 built by root@Vontage on a i686 running Linux Thanks!!! Having a BLAST! Steve Gladden
Kevin Bockman
2005-Jun-02 15:53 UTC
[Asterisk-Users] CLUELESS NEWBIE needs help making an outbound sip call to PSTN
> I have complied an asterisk system and got it going from scratch and all > works great except I cannot make an outbound sip-to-PSTN call and do not > fully understand how to configure it. > > Steve GladdenTo get an example setup for your provider, try searching google: <provider> site:lists.digium.com If you go onto your provider's website, they usually have an example configuration for you. If you can't find an example that works, post the sip.conf entry, the appropriate section of extensions.conf, and the console output. Kevin
Rich Adamson
2005-Jun-03 06:39 UTC
[Asterisk-Users] CLUELESS NEWBIE needs help making an outbound sip call to PSTN
> I'm going to try and ask this again and keep it short and as too the > point as I can while still providing enough info to be of use. > PLEASE advise if I am going about this wrong or asking too much. > I'm seriously doing my BEST to throughly read the docs and try a bunch of > things BEFORE coming here to ask and possibly annoy. > If is documentation that explains thsi process in terms that someone new > can grab onto quickly I'm missing it! > > OK here goes again :-) > > > I have complied an asterisk system and got it going from scratch and all > works great except I cannot make an outbound sip-to-PSTN call and do not > fully understand how to configure it. > > I've been folowing some examples and keep running into this stumbling > block: > > As soon as I add (to sip.conf) this section: > > [siprovider.com] > type=peer > host=sipprovider.com > fromuser=2135551212 > secret=2135551212 > authname=2135551212 > fromdomain=siprovider.com > > > I no longer can recieve ANY inbound calls from the PSTN via my sip > provider. > > I've tried many variations of attempting to get this section (I think it's > referred to a 'sip channel) into my sip.conf all which give the same > result..... > > All inbound calls from PSTN TO this account FAIL. > > I have tried with the dialplan in context [default] > with a test dialplan and with a 'blank' dial plan. > > every way I try this, inbound calls via SIP and my SIP provider stop > reaching my asterisk box. > > If I remove the above shown section leaving only the > register => 2135551212:2135551212@sipproviderexample.com > > all works great and calls come in from the PSTN to my asterisk box and > people can get around my menu just fine and dial internal SIP extension > numbers.Let's see if I can at least help out with the understanding part (and I'm doing this from memory, and not currently using any sip providers). First, change your context name ([siprovider.com]) to something different to avoid confusion as to that context name and the host=sipprovider.com statement. Might try something like [sipprovider-com]. The sipprovider.com _must_ resolve to a valid IP address using DNS in your example above. The register statement does nothing more then tell your provider that your on line, and to use whatever is at the end of the statement (/1234) as the extension number to execute in your dialplan when sending you an inbound call. Since you have nothing at the end of the register statement, your inbound calls must be processed via the exten=>s approach (which you apparently are doing). When dialing an outbound sip call (via your sip provider), the Dial() statement can use the form: exten => _1XXXXXXXXXX,1,Dial(SIP/myOutContext) where the myOutContext would look something like: [myOutContext] type=peer ; for outbound calls (other parameters as needed to authenticate an outbound call) For inbound sip calls (via your sip provider), use a context something like: [myInContext] type=user ; for inbound calls context=InboundSip (other parameters as needed to authenticate or qualify the inbound call) Look carefully at the list of valid parameters for type=user verses type=peer in /usr/src/asterisk/configs/sip.conf.sample paying close attention to what's listed in each colume. (Note: authname= is not listed in the current sip.conf.sample file.) With most itsp's, you should be able to process outbound calls by simply using the exten => _1XXXXXXXXXX,1,Dial(SIP/myOutContext) without the register. (This sort of varies by itsp though.) Try it and debug that before going on to incoming calls. Once outgoing calls are accepted, then add the [myInContext] section. Look closely at the results from 'sip debug' when an inbound call is placed. If there is a problem with context, authentication, etc, the debug output will give you a pretty good clue what is not right. Also, read the comments in the sample config file carefully. For example: "For incoming calls only. Example: FWD (Free World Dialup) We match on IP address of the proxy for incoming calls since we can not match on username (caller id)" You might find that your outbound calls are sent to one IP address (host=) while inbound calls come from a different IP address. That's not uncommon for any reasonable sized itsp. So, you may need multiple contexts in sip.conf to handle that. In any case, 'sip debug' is your friend. Or, you can combine the above into a single type=friend context like: [broadvoice] ; this is referenced for outgoing calls to Broadvoice.com type=friend username=3035551212 ; not needed as its in the Register statement secret=x65xv1234z host=sip.broadvoice.com insecure=very canreinvite=no dtmfmode=inband fromuser=3035551212 fromdomain=sip.broadvoice.com context=from-broadvoice ; in extensions.conf disallow=all allow=ulaw deny=0.0.0.0/0.0.0.0 permit=147.135.8.129/255.255.255.0 permit=147.135.0.129/255.255.255.0 permit=147.135.4.128/255.255.255.0 that includes elements from both type=user and type=friend, securing (somewhat) you inbound calls by insisting they originate from selected class-c networks owned by your itsp (permit=). There really isn't any single way (or best way) to define the above contexts as each itsp _may_ have different requirements. Keep in mind that your itsp may not be using asterisk at all. Rich
Steve
2005-Jun-23 10:42 UTC
[Asterisk-Users] Re: CLUELESS NEWBIE needs help making an outbound sip call to PSTN
Finally got it to work with my provider, The task was seemingly a simple one which was to (simply) be able to make an outbound call to the PSTN via our sip provider Unfortunately none of the information that I was given seemed to have any effect on the problems I was having... However it was helpful and provided needed insight along with the opportunity to get into CVS HEad a bit and so some compiling. I VERY much appreciate the help but I still find that I did not learn as much as would have like have but will 'keep trying'!!! Just ended up through very much tral and error pasting other people's configurations in until finally one worked. The one I got to work with Stanaphone did not work with my provider, I found one of (many) that someone had listed for broadvoice that worked with my provider (who is *NOT* broadvoice) :-) Unfortunately I am not knowledgable on what is exactly at my sip provider's end and they are not willing to disclose with me or this list what that hardware / software combo on their end (the provider) is. Here is my sip.conf that FINALLY worked after about 3 weeks of trying things. Steve ;-------------Testing------------------ [general] port = 5060 bindaddr = 0.0.0.0 allow=ulaw ; dtmfmode=info ; nat=yes ; This section is because i'm behind nat externip = x.x.x.x ;Outside address localnet = 10.73.73.133 ;Inside address localmask = 255.255.255.0 ;Inside subnet context = sip ; Default context for incoming calls register => ##########:secret@sip.stanaphone.com/1000 register => ##########:secret@sip.provider.net/4078 register => ##########:secret@sip.provider.net/4077 [stanaphone-out] ;works!!! host=sip.stanaphone.com context=sip type=friend dtmfmode=rfc2833 canredirect=no disallow=all allow=ulaw insecure=very username=secret fromuser=secret secret=secret ;more testing broadvoice examples ;THIS ONE WORKS!!! [our-sip-provider-out] type = peer host = sip.provider.net secret = secret user=phone ; I needed this to make it work (what tha ????) fromuser = secret username= secret authname= secret fromdomain = sip.provider.net context = sip insecure=very ; To allow registered hosts to call without re-authenticating canreinvite = no ; BV claims they support rfc2833, but for some reason passing digits ; after a connected call only works with inband dtmfmode = rfc2833 ;dtmf=inband CVS-HEAD Running Version: Asterisk CVS-HEAD built by root@Vontage on a i686 running Linux on 2005-06-06 22:32:05 *CLI> show version files File Revision ---- -------- cdr_custom.c Revision: 1.11 cdr_manager.c Revision: 1.6 cdr_csv.c Revision: 1.16 pbx_functions.c Revision: 1.3 chan_zap.c Revision: 1.458 chan_phone.c Revision: 1.52 chan_modem_i4l.c Revision: 1.27 chan_oss.c Revision: 1.49 chan_features.c Revision: 1.12 chan_skinny.c Revision: 1.78 chan_local.c Revision: 1.47 chan_iax2.c Revision: 1.303 iax2-parser.c Revision: 1.45 iax2-provision.c Revision: 1.12 chan_mgcp.c Revision: 1.123 chan_agent.c Revision: 1.136 chan_modem_bestdata.c Revision: 1.16 chan_sip.c Revision: 1.754 chan_modem_aopen.c Revision: 1.15 chan_modem.c Revision: 1.40 io.c Revision: 1.10 sched.c Revision: 1.19 logger.c Revision: 1.74 frame.c Revision: 1.57 loader.c Revision: 1.45 config.c Revision: 1.66 channel.c Revision: 1.202 translate.c Revision: 1.37 file.c Revision: 1.68 say.c Revision: 1.60 pbx.c Revision: 1.254 cli.c Revision: 1.86 md5.c Revision: 1.14 term.c Revision: 1.10 ulaw.c Revision: 1.4 alaw.c Revision: 1.3 callerid.c Revision: 1.32 fskmodem.c Revision: 1.7 image.c Revision: 1.15 app.c Revision: 1.66 cdr.c Revision: 1.40 tdd.c Revision: 1.6 acl.c Revision: 1.45 rtp.c Revision: 1.133 manager.c Revision: 1.99 asterisk.c Revision: 1.162 dsp.c Revision: 1.43 chanvars.c Revision: 1.8 indications.c Revision: 1.25 autoservice.c Revision: 1.12 db.c Revision: 1.18 privacy.c Revision: 1.5 enum.c Revision: 1.26 srv.c Revision: 1.13 dns.c Revision: 1.14 utils.c Revision: 1.47 config_old.c Revision: 1.4 plc.c Revision: 1.5 jitterbuf.c Revision: 1.15 dnsmgr.c Revision: 1.5 Sorry for the LONG delay on this wrap up. Take care! Steve
Reasonably Related Threads
- Sip.conf problems
- CLUELESS NEWBIE needs help making an outboundsip call to PSTN
- Newbie Question: HOWTO make outgoing call on SIP account from internal extensions?
- multiples broadvoice lines
- Asterisk 'losing' upstream provider registration state during small network outages.