Hallo Group! My Name is Guenther Sohler and I registred to this group, because I think asterisk could be interesting for me. I have got a small server at home running linux. It does NAT and a Firewall. There is an intranet with my home PC and a hardware SIP phone. This SIP phone registers at mujtelefon.cz Now I got another account at sipgate.at My idea is following: I want to be reachable at both providers(numbers) at the same time. And If I call someone, calls to austria shall use sipgate, whereas calls to czech shall use mujtelefon. So far, i read through the tutorial at digium.com and got the impression, that asterisk might be able to do this and makes phoning very conveniant. YEsterday evening i managed to get a compiled version of asterisk running on my server. I just font yet have a complete idea, what is to be changed * get asterisk running on my server as phone central(registrar) * which firewall settings ? before/after nat * my hardware phone registers with asterisk at my server * which files to i have to change ? dialplan, sip.conf? How do I achieve this ? Thanx in advance! -- Psssst! Schon vom neuen GMX MultiMessenger geh?rt? Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
hi, and first off all ... welcome! now it would be handy if you provide us with the name of your phone for ex 'a linksys spa942' or somthing kr, Jan de Coster Guenther Sohler wrote:> Hallo Group! > > My Name is Guenther Sohler and I registred to this group, because > I think asterisk could be interesting for me. > > I have got a small server at home running linux. > It does NAT and a Firewall. There is an intranet with my home PC > and a hardware SIP phone. > > This SIP phone registers at mujtelefon.cz > > Now I got another account at sipgate.at > > My idea is following: > I want to be reachable at both providers(numbers) at the same time. > And If I call someone, calls to austria shall use sipgate, whereas > calls to czech shall use mujtelefon. > > So far, i read through the tutorial at digium.com and got the impression, > that asterisk might be able to do this and makes phoning very conveniant. > > YEsterday evening i managed to get a compiled version of asterisk running > on my server. > > I just font yet have a complete idea, what is to be changed > > * get asterisk running on my server as phone central(registrar) > * which firewall settings ? before/after nat > * my hardware phone registers with asterisk at my server > * which files to i have to change ? dialplan, sip.conf? > > > How do I achieve this ? > > Thanx in advance! > >
Am Donnerstag, den 20.09.2007, 08:30 +0200 schrieb Guenther Sohler:> Hallo Group! > > My Name is Guenther Sohler and I registred to this group, because > I think asterisk could be interesting for me.Hi Guenther, this place probably is the right one. Welcome!> I have got a small server at home running linux. > It does NAT and a Firewall. There is an intranet with my home PC > and a hardware SIP phone. > > This SIP phone registers at mujtelefon.cz > > Now I got another account at sipgate.at > > My idea is following: > I want to be reachable at both providers(numbers) at the same time. > And If I call someone, calls to austria shall use sipgate, whereas > calls to czech shall use mujtelefon.This is possible, and it does not require too difficult steps. First question though is wether your server has an external IP (e.g. does the internet routing) or there is a router in between (you wrote the server does NAT, but I already saw double- and even triple-NAT configurations - I have to mention that). Both will work, but _not_ having NAT in between might be one trouble source less - so if you run Asterisk on a machine with a globally valid and routable IP, you are better off. Your firewall should accept incoming TCP on port 5060 and incoming UDP on all the ports RTP uses (like 10000 to 20000) - I rarely bother firewalling incoming UDP packets on high ports, but you should check that. If your phone works behind the router, the UDP requirement probably is already sorted. Basically, you will have to edit a few configuration files. I will give some examples based on one of my asterisk configs, but you really should read about those files and check wether everything is OK - I will try to adapt to your situation, but do not blame me if I mistype or just mis-think something. In sip.conf, you will need to list the providers and the phones you are going to use. I assume you will have your allnet and perhaps a few softphones - you will probably want more than one phone some day ;-) 8<==== sip.conf (with example data indicated) [general] bindport=5060 bindaddr=0.0.0.0 disallow=all allow=ulaw allow=alaw allow=ilbc allow=gsm musicclass=default language=en ; well, no idea if there are czech audio files readily available. ; I personally use language=de, of course. dtmfmode=rfc2833 sipdebug=no register => 1234567:4321 at sipgate.at:5060/004311234567 ; put your sip id (1234567), password (4321) and your ; phone number (004311234567) here register => 123321321:abcd at otherprovider.example.org:5060/123333 [sipgateat] host=sipgate.at secret=4321 username=1234567 fromuser=1234567 fromdomain=sipgate.at srvlookup=yes context=sipgateat-in canreinvite=no nat=no ; perhaps this needs to be set to "yes" ; insecure=very ; perhaps this needs to be activated - try it. type=friend qualify=yes [otherprovider] host=otherprovider.example.org secret=abcd username=123321321 fromuser=123321321 fromdomain=otherprovider.example.org srvlookup=yes context=otherprovider-in canreinvite=no nat=no type=friend qualify=yes ; stanza for SIP clients [sip01] mailbox=01 callerid=11 type=friend username=sip01 secret=LaBananaLoca ; replace with the secret for your telephone, username should ; always be the same as the [stanza] name to avoid trouble context=sipclient host=dynamic nat=yes [sip02] mailbox=01 callerid=12 type=friend username=sip01 secret=AyayayDiosMio context=sipclient host=dynamic nat=yes ====>8 so much for the sip.conf. This allows for two accounts with providers, and two SIP phones (wether hard- or softphone does not matter, of course :-) You will also need to setup an extensions.conf, somehow like this 8<==== extensions.conf [general] static=yes writeprotect=no autofallthrough=yes clearglobalvars=no ;; all of those have been like this in my conf for ages, I do not ;; even know what exactly those are good for. ; context where sipclient outgoing calls are handled [sipclient] ; let "11" and "12" be internal numbers exten => 11,1,Dial(SIP/sip01,60) exten => 11,2,Hangup() exten => 12,1,Dial(SIP/sip02,60) exten => 12,2,Hangup() ; Outward calls. If a country prefix is present _and_ it is Austria, ; use sipgate.at exten => _0043.,1,Dial(SIP/${EXTEN}@sipgateat,60) exten => _0043.,2,Hangup() ; Outward calls with country prefix for Czech Republic go through ; your other provider exten => _00420.,1,Dial(SIP/${EXTEN}@otherprovider,60) exten => _00420.,2,Hangup() ; All other non-international calls go through "otherprovider" - ; three digit minimum here, shorter numbers treated as "internal" exten => _0[1-9].,1,Dial(SIP/${EXTEN}@otherprovider,60) exten => _0[1-9].,2,Hangup() exten => _[1-9][0-9].,1,Dial(SIP/${EXTEN}@otherprovider,60) exten => _[1-9][0-9].,2,Hangup ; add stuff for voicemail call-in.... here ; context for incoming calls through sipgate [sipgateat-in] exten => 004311234567,1,Dial(SIP/sip01&SIP/sip02,60) exten => 004311234567,2,Hangup() [otherprovider-in] exten => 123333,1,Dial(SIP/sip01&SIP/sip02,60) exten => 123333,2,Hangup() ====>8 This should get you started. This is a very rough example, and I might have made a mistake somewhere... beware. Quite extensive documentation is on www.voip-info.org - both for sip.conf and everything you might want to put into extensions.conf. HTH Anselm
Hallo Martin and Group! Thank you very much for your perfect introduction into asterisk. I managed to * get asterisk server running * configuring the internal numbers * registering to 2 sip gateways * outbound phoning to sipgate works perfect * outbound phoning to mujtelefon not yet tested The problem i am having now is, that i cant be reached by inbound phone calls from neither sipgate nor mujtelefon i used my mobile to call this numbers. sipgate tells me on the phone:"Das Endgeraet ist fuer diesen Service nicht konfiguriert". bei mujtelefon kommt nur die mobilbox In asterisk cli i dont see anything about that. in the sipgate login page there is neither mentioned. If this is working, I intend to have nice music played for incoming calls until the phone call is accepted. What is very confusing for sipgate is, that my number(734365) is different from my user name(1734365). Can anybopdy check, if all settings are ok according to that ? Please find below my sip.conf, only the passwords are scrambled. If you directly reply to me, also reply to guenther.sohler at wipro.com because i am afraid missing your answer in the much traffic in that mailing list. Thank you very much! [general] bindport=5060 bindaddr=0.0.0.0 disallow=all allow=ulaw allow=alaw allow=ilbc allow=gsm musicclass=default language=de dtmfmode=rfc2833 sipdebug=no register => 1734365:NMTNRMKP at sipgate.at:5060/00437201734365 register => 272048160:jcip3gb9 at sip.mujtelefon.com:5060/00420272048160 [sipgateat] host=sipgate.at secret=NMMTNMKP username=1734365 fromuser=1734365 fromdomain=sipgate.at srvlookup=yes context=sipgateat-in canreinvite=no nat=no type=friend qualify=yes [mujtelefoncz] host=sip.mujtelefon.cz secret=jcrp3vb9 username=272048160 fromuser=272048160 fromdomain=sip.mujtelefon.cz srvlookup=yes context=mujtelefoncz-in canreinvite=no nat=no type=friend qualify=yes ; stanza for SIP clients [sip01] mailbox=01 callerid=11 type=friend username=sip01 secret=pass01 context=sipclient host=dynamic nat=yes ;[sip02] ;mailbox=02 ;callerid=12 ;type=friend ;username=sip02 ;secret=pass02 ;context=sipclient ;host=dynamic ;nat=yes and here is my extensions.conf [general] static=yes writeprotect=no autofallthrough=yes clearglobalvars=no ; context where sipclient outgoing calls are handled [sipclient] ; let "11" and "12" be internal numbers exten => 11,1,Dial(SIP/sip01,60) exten => 11,2,Hangup() exten => 12,1,Dial(SIP/sip02,60) exten => 12,2,Hangup() exten => 13,1,Answer() exten => 13,2,Playback(digits/6) exten => 13,3,Playback(tt-monkeys) exten => 13,4,HangUp() ; Outward calls. If a country prefix is present _and_ it is Austria, use sipgate.at exten => _0043.,1,Dial(SIP/${EXTEN}@sipgateat,60) exten => _0043.,2,Hangup() ; Outward calls with country prefix for Czech Republic go through ; your other provider exten => _00420.,1,Dial(SIP/${EXTEN}@mujtelefoncz,60) exten => _00420.,2,Hangup() ; All other non-international calls go through "sipgate" - ; three digit minimum here, shorter numbers treated as "internal" exten => _0[1-9].,1,Dial(SIP/${EXTEN}@sipgateat,60) exten => _0[1-9].,2,Hangup() exten => _[1-9][0-9].,1,Dial(SIP/${EXTEN}@sipgateat,60) exten => _[1-9][0-9].,2,Hangup ; context for incoming calls [sipgateat-in] exten => 00437201734365,1,Dial(SIP/sip01&SIP/sip02,60) exten => 00437201734365,2,Hangup() exten => 07201734365,1,Dial(SIP/sip01&SIP/sip02,60) exten => 07201734365,2,Hangup() [mujtelefonczr-in] exten => 272048160,1,Dial(SIP/sip01&SIP/sip02,60) exten => 272048160,2,Hangup() Thank you for your replies! -- GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
Hallo Martin and Group! Thank you very much for your perfect introduction into asterisk. I managed to * get asterisk server running * configuring the internal numbers * registering to 2 sip gateways * outbound phoning to sipgate works perfect * outbound phoning to mujtelefon not yet tested The problem i am having now is, that i cant be reached by inbound phone calls from neither sipgate nor mujtelefon i used my mobile to call this numbers. sipgate tells me on the phone:"Das Endgeraet ist fuer diesen Service nicht konfiguriert". bei mujtelefon kommt nur die mobilbox In asterisk cli i dont see anything about that. in the sipgate login page there is neither mentioned. If this is working, I intend to have nice music played for incoming calls until the phone call is accepted. What is very confusing for sipgate is, that my number(734365) is different from my user name(1734365). Can anybopdy check, if all settings are ok according to that ? Please find below my sip.conf, only the passwords are scrambled. If you directly reply to me, also reply to guenther.sohler at wipro.com because i am afraid missing your answer in the much traffic in that mailing list. Thank you very much! [general] bindport=5060 bindaddr=0.0.0.0 disallow=all allow=ulaw allow=alaw allow=ilbc allow=gsm musicclass=default language=de dtmfmode=rfc2833 sipdebug=no register => 1734365:NMTNRMKP at sipgate.at:5060/00437201734365 register => 272048160:jcip3gb9 at sip.mujtelefon.com:5060/00420272048160 [sipgateat] host=sipgate.at secret=NMMTNMKP username=1734365 fromuser=1734365 fromdomain=sipgate.at srvlookup=yes context=sipgateat-in canreinvite=no nat=no type=friend qualify=yes [mujtelefoncz] host=sip.mujtelefon.cz secret=jcrp3vb9 username=272048160 fromuser=272048160 fromdomain=sip.mujtelefon.cz srvlookup=yes context=mujtelefoncz-in canreinvite=no nat=no type=friend qualify=yes ; stanza for SIP clients [sip01] mailbox=01 callerid=11 type=friend username=sip01 secret=pass01 context=sipclient host=dynamic nat=yes ;[sip02] ;mailbox=02 ;callerid=12 ;type=friend ;username=sip02 ;secret=pass02 ;context=sipclient ;host=dynamic ;nat=yes and here is my extensions.conf [general] static=yes writeprotect=no autofallthrough=yes clearglobalvars=no ; context where sipclient outgoing calls are handled [sipclient] ; let "11" and "12" be internal numbers exten => 11,1,Dial(SIP/sip01,60) exten => 11,2,Hangup() exten => 12,1,Dial(SIP/sip02,60) exten => 12,2,Hangup() exten => 13,1,Answer() exten => 13,2,Playback(digits/6) exten => 13,3,Playback(tt-monkeys) exten => 13,4,HangUp() ; Outward calls. If a country prefix is present _and_ it is Austria, use sipgate.at exten => _0043.,1,Dial(SIP/${EXTEN}@sipgateat,60) exten => _0043.,2,Hangup() ; Outward calls with country prefix for Czech Republic go through ; your other provider exten => _00420.,1,Dial(SIP/${EXTEN}@mujtelefoncz,60) exten => _00420.,2,Hangup() ; All other non-international calls go through "sipgate" - ; three digit minimum here, shorter numbers treated as "internal" exten => _0[1-9].,1,Dial(SIP/${EXTEN}@sipgateat,60) exten => _0[1-9].,2,Hangup() exten => _[1-9][0-9].,1,Dial(SIP/${EXTEN}@sipgateat,60) exten => _[1-9][0-9].,2,Hangup ; context for incoming calls [sipgateat-in] exten => 00437201734365,1,Dial(SIP/sip01&SIP/sip02,60) exten => 00437201734365,2,Hangup() exten => 07201734365,1,Dial(SIP/sip01&SIP/sip02,60) exten => 07201734365,2,Hangup() [mujtelefonczr-in] exten => 272048160,1,Dial(SIP/sip01&SIP/sip02,60) exten => 272048160,2,Hangup() Thank you for your replies! -- GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail -- GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail