Go Back   Wireless and Wifi Forums > News > Newsgroups > uk.telecom.voip
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-15-2007, 09:16 PM
Steve
Guest
 
Posts: n/a
Default Asterisk conf for Sipgate.co.uk

Hi,

I tryed to receive phone calls from Sipgate.co.uk

I am currently connected to Sipgate.co.uk
Now, into my [incoming] calls
None of the Sipgate phone received seemed to match this !! :-(

--------------------
[globals]

INCOMING=1009326 ; with phone number : +44 1234 1009326

[incoming]
Exten => ${INCOMING1},1,answer()
Exten => ${INCOMING1},2,Set(TRIES=0)
Exten => ${INCOMING1},3,ringing(3)
............
............

--------------

Now, I found on their website :
Asterisk PBX
IP: sip:sipgate-uk@<My-IP_Address>:5060

- Any ideas what's wrong ?

I am not sure to understand how to integrate this ?!?

With Voipfone, if I replace INCOMING=<UserID> => work fine

Thanks for your help


Reply With Quote
  #2 (permalink)  
Old 05-15-2007, 09:50 PM
Gordon Henderson
Guest
 
Posts: n/a
Default Re: Asterisk conf for Sipgate.co.uk

In article <f2d804$m3m$1$8300dec7@news.demon.co.uk>,
Steve <user@mail.com> wrote:
>Hi,
>
>I tryed to receive phone calls from Sipgate.co.uk
>
>I am currently connected to Sipgate.co.uk
>Now, into my [incoming] calls
>None of the Sipgate phone received seemed to match this !! :-(
>
>--------------------
>[globals]
>
>INCOMING=1009326 ; with phone number : +44 1234 1009326
>
>[incoming]
>Exten => ${INCOMING1},1,answer()
>Exten => ${INCOMING1},2,Set(TRIES=0)
>Exten => ${INCOMING1},3,ringing(3)
>...........
>...........
>
>--------------
>
>Now, I found on their website :
> Asterisk PBX
> IP: sip:sipgate-uk@<My-IP_Address>:5060
>
>- Any ideas what's wrong ?
>
>I am not sure to understand how to integrate this ?!?


There is a page on their site which has details, however, try this:

In sip.conf:

; SIP Trunk to sipgate [sipgate.co.uk]
register => 1009326:xxxxxxx@sipgate.co.uk/1009326

; SIP Trunk to sipgate [sipgate.co.uk]
[sipgate-out]
context=from-sipgate
type=friend
nat=no
host=sipgate.co.uk
insecure=port,invite
username=1009326
fromuser=1009326
secret=xxxx
fromdomain=sipgate.co.uk
qualify=yes
disallow=all
allow=alaw
allow=g726
allow=gsm


in extensions.conf:

; Trunk from sipgate [sipgate.co.uk]
[from-sipgate]
exten => 1009326,1,Noop(Incoming SIP call from ${CALLERID(all)} @ sipgate calling ${EXTEN})
exten => 1009326,n,SetCallerID(Via SipGate <${CALLERID(num)}>)
exten => 1009326,n,Dial(SIP/101)

that last dial line will need to be change to whatever you're using to ring your phone

And somewhere else in extensions.conf, in a contect you can dial-out on:

exten => _70.,1,Noop(Making SIP Call to ${EXTEN:2}@sipgate)
exten => _70.,n,SetCallerID(1009326)
exten => _70.,n,Dial(SIP/sipgate-out/${EXTEN:2})
exten => _70.,n,Hangup()

That's a prefix of 70, then a number. Change it to suit.

Gordon

Reply With Quote
  #3 (permalink)  
Old 05-16-2007, 06:32 AM
Steve
Guest
 
Posts: n/a
Default Re: Asterisk conf for Sipgate.co.uk

Gordon Henderson wrote:
> In article <f2d804$m3m$1$8300dec7@news.demon.co.uk>,
> Steve <user@mail.com> wrote:
>> Hi,
>>
>> I tryed to receive phone calls from Sipgate.co.uk
>>
>> I am currently connected to Sipgate.co.uk
>> Now, into my [incoming] calls
>> None of the Sipgate phone received seemed to match this !! :-(
>>
>> --------------------
>> [globals]
>>
>> INCOMING=1009326 ; with phone number : +44 1234 1009326
>>
>> [incoming]
>> Exten => ${INCOMING1},1,answer()
>> Exten => ${INCOMING1},2,Set(TRIES=0)
>> Exten => ${INCOMING1},3,ringing(3)
>> ...........
>> ...........
>>
>> --------------
>>
>> Now, I found on their website :
>> Asterisk PBX
>> IP: sip:sipgate-uk@<My-IP_Address>:5060
>>
>> - Any ideas what's wrong ?
>>
>> I am not sure to understand how to integrate this ?!?

>
> There is a page on their site which has details, however, try this:
>
> In sip.conf:
>
> ; SIP Trunk to sipgate [sipgate.co.uk]
> register => 1009326:xxxxxxx@sipgate.co.uk/1009326
>
> ; SIP Trunk to sipgate [sipgate.co.uk]
> [sipgate-out]
> context=from-sipgate
> type=friend
> nat=no
> host=sipgate.co.uk
> insecure=port,invite
> username=1009326
> fromuser=1009326
> secret=xxxx
> fromdomain=sipgate.co.uk
> qualify=yes
> disallow=all
> allow=alaw
> allow=g726
> allow=gsm
>
>
> in extensions.conf:
>
> ; Trunk from sipgate [sipgate.co.uk]
> [from-sipgate]
> exten => 1009326,1,Noop(Incoming SIP call from ${CALLERID(all)} @ sipgate calling ${EXTEN})
> exten => 1009326,n,SetCallerID(Via SipGate <${CALLERID(num)}>)
> exten => 1009326,n,Dial(SIP/101)
>
> that last dial line will need to be change to whatever you're using to ring your phone
>
> And somewhere else in extensions.conf, in a contect you can dial-out on:
>
> exten => _70.,1,Noop(Making SIP Call to ${EXTEN:2}@sipgate)
> exten => _70.,n,SetCallerID(1009326)
> exten => _70.,n,Dial(SIP/sipgate-out/${EXTEN:2})
> exten => _70.,n,Hangup()
>
> That's a prefix of 70, then a number. Change it to suit.
>
> Gordon



Hi Gordon,

Thanks these info.. however, I stil have something wrong with it.
Here is the exact config I have :
I seemed to be connected to the server...
ButNoting is incoming

If I add the line Exten => 0,1,goto(incoming,1009326,1)
and press the 0 => that's OK !!!
SO the script seems to be OK, except that it doesn't work if the phone
call is genereated by Sipgate.

--------------------------

Sip.conf

[general]

port = 5060
bindaddr = 0.0.0.0
allow=all
context=default
srvlookup=no ; could help if Phone using DNS
externip=xx.xx.xx.xx
localnet=192.168.3.0/255.255.255.0

register => 1009326:xxxx@sipgate.co.uk/1009326

[sipgate]
type=friend
secret=xxxxx
username=1009326
fromuser=1009326
fromdomain=sipgate.co.uk
host=sipgate.co.uk
insecure=port,invite
qualify=yes
nat=no
context=incoming
disallow=all
allow=alaw
allow=g726
allow=gsm

EXTENSION.CONF

[general]
;
static=yes
writeprotect=no
Static=yes ; DialPlan can't be modified by Asterisk
clearglobalvars=no
priorityjumping=no
autofallthrough=yes
[globals]

GROUP=SIP/120&SIP/121
INCOMING1=1009326

[incoming]

exten => ${INCOMING1},1,Noop(Incoming SIP call from ${CALLERID(all)} @
sipgate calling ${EXTEN})
exten => ${INCOMING1},2,SetCallerID(From SipGate <${CALLERID(num)}>)
Exten => ${INCOMING1},2,Set(TRIES=0)
Exten => ${INCOMING1},3,ringing(3)
Exten => ${INCOMING1},4,background(priv-introsaved)
Exten => ${INCOMING1},5,background(queue-thankyou)
Exten => ${INCOMING1},n,Dial(SIP/121,10,r)
Exten => ${INCOMING1},n,playback(vm-nobodyavail)
Exten => ${INCOMING1},n,Dial(${GROUP},10,mr)
Exten => ${INCOMING1},n,playback(tt-allbusy)
Exten => ${INCOMING1},n,wait(2)
Exten => ${INCOMING1},n,goto(${INCOMING1},7)
;Exten => ${INCOMING1},n,voicemail(u300@default)
Exten => ${INCOMING1},n,congestion




Reply With Quote
  #4 (permalink)  
Old 05-16-2007, 07:58 AM
Gordon Henderson
Guest
 
Posts: n/a
Default Re: Asterisk conf for Sipgate.co.uk

In article <f2e8ii$f3u$1$8300dec7@news.demon.co.uk>,
Steve <user@mail.com> wrote:

>Hi Gordon,
>
>Thanks these info.. however, I stil have something wrong with it.
>Here is the exact config I have :
>I seemed to be connected to the server...
>ButNoting is incoming
>
>If I add the line Exten => 0,1,goto(incoming,1009326,1)
>and press the 0 => that's OK !!!
>SO the script seems to be OK, except that it doesn't work if the phone
>call is genereated by Sipgate.
>
>--------------------------
>
>Sip.conf
>
>[general]
>
>port = 5060
>bindaddr = 0.0.0.0
>allow=all
>context=default
>srvlookup=no ; could help if Phone using DNS
>externip=xx.xx.xx.xx
>localnet=192.168.3.0/255.255.255.0
>
>register => 1009326:xxxx@sipgate.co.uk/1009326
>
>[sipgate]
>type=friend
>secret=xxxxx
>username=1009326
>fromuser=1009326
>fromdomain=sipgate.co.uk
>host=sipgate.co.uk
>insecure=port,invite
>qualify=yes
>nat=no
>context=incoming
>disallow=all
>allow=alaw
>allow=g726
>allow=gsm


As you have externip= and localnet= settings above, you probably
want nat=yes here. The box I cut & pasted that off isn't behind a NAT
firewall/router.

Remember to connect to asterisk and set verbose 9999 which will help
you debug.

asterisk -r
set verbose 9999

then call your sipgate number from another phone.

And you can use sip show peers to make sure you're actually peering
with Sipgate - if nothing else it'll make sure your register statement
is working OK.

>EXTENSION.CONF
>
>[general]
>;
>static=yes
>writeprotect=no
>Static=yes ; DialPlan can't be modified by Asterisk
>clearglobalvars=no
>priorityjumping=no
>autofallthrough=yes
>[globals]
>
>GROUP=SIP/120&SIP/121
>INCOMING1=1009326
>
>[incoming]
>
>exten => ${INCOMING1},1,Noop(Incoming SIP call from ${CALLERID(all)} @
>sipgate calling ${EXTEN})
>exten => ${INCOMING1},2,SetCallerID(From SipGate <${CALLERID(num)}>)
>Exten => ${INCOMING1},2,Set(TRIES=0)
>Exten => ${INCOMING1},3,ringing(3)
>Exten => ${INCOMING1},4,background(priv-introsaved)
>Exten => ${INCOMING1},5,background(queue-thankyou)
>Exten => ${INCOMING1},n,Dial(SIP/121,10,r)
>Exten => ${INCOMING1},n,playback(vm-nobodyavail)
>Exten => ${INCOMING1},n,Dial(${GROUP},10,mr)
>Exten => ${INCOMING1},n,playback(tt-allbusy)
>Exten => ${INCOMING1},n,wait(2)
>Exten => ${INCOMING1},n,goto(${INCOMING1},7)
>;Exten => ${INCOMING1},n,voicemail(u300@default)
>Exten => ${INCOMING1},n,congestion


Er - interesting call-flow there :)

You should Answer() the call at some point too, preferably before you
try to send audio back up the line (which ringing(3) will do) although
it should auto-answer the channel, I've found that it's always best to
do it explicitly.

If you start to use goto's, then you
really ought to start to use labels and the 'n' priority. Eg.

exten => 123,1,Answer()
exten => 123,n(loop),Playback(haha)
exten => 123,n,Wait(2)
exten => 123,n,Goto(loop)

It saves counting lines and re-numbering when you add/remove instructions.

Gordon

Reply With Quote
  #5 (permalink)  
Old 05-16-2007, 06:27 PM
Steve
Guest
 
Posts: n/a
Default Re: Asterisk conf for Sipgate.co.uk

Gordon Henderson wrote:
> In article <f2e8ii$f3u$1$8300dec7@news.demon.co.uk>,
> Steve <user@mail.com> wrote:
>
>> Hi Gordon,
>>
>> Thanks these info.. however, I stil have something wrong with it.
>> Here is the exact config I have :
>> I seemed to be connected to the server...
>> ButNoting is incoming
>>
>> If I add the line Exten => 0,1,goto(incoming,1009326,1)
>> and press the 0 => that's OK !!!
>> SO the script seems to be OK, except that it doesn't work if the phone
>> call is genereated by Sipgate.
>>
>> --------------------------
>>
>> Sip.conf
>>
>> [general]
>>
>> port = 5060
>> bindaddr = 0.0.0.0
>> allow=all
>> context=default
>> srvlookup=no ; could help if Phone using DNS
>> externip=xx.xx.xx.xx
>> localnet=192.168.3.0/255.255.255.0
>>
>> register => 1009326:xxxx@sipgate.co.uk/1009326
>>
>> [sipgate]
>> type=friend
>> secret=xxxxx
>> username=1009326
>> fromuser=1009326
>> fromdomain=sipgate.co.uk
>> host=sipgate.co.uk
>> insecure=port,invite
>> qualify=yes
>> nat=no
>> context=incoming
>> disallow=all
>> allow=alaw
>> allow=g726
>> allow=gsm

>
> As you have externip= and localnet= settings above, you probably
> want nat=yes here. The box I cut & pasted that off isn't behind a NAT
> firewall/router.
>
> Remember to connect to asterisk and set verbose 9999 which will help
> you debug.
>
> asterisk -r
> set verbose 9999
>
> then call your sipgate number from another phone.
>
> And you can use sip show peers to make sure you're actually peering
> with Sipgate - if nothing else it'll make sure your register statement
> is working OK.
>
>> EXTENSION.CONF
>>
>> [general]
>> ;
>> static=yes
>> writeprotect=no
>> Static=yes ; DialPlan can't be modified by Asterisk
>> clearglobalvars=no
>> priorityjumping=no
>> autofallthrough=yes
>> [globals]
>>
>> GROUP=SIP/120&SIP/121
>> INCOMING1=1009326
>>
>> [incoming]
>>
>> exten => ${INCOMING1},1,Noop(Incoming SIP call from ${CALLERID(all)} @
>> sipgate calling ${EXTEN})
>> exten => ${INCOMING1},2,SetCallerID(From SipGate <${CALLERID(num)}>)
>> Exten => ${INCOMING1},2,Set(TRIES=0)
>> Exten => ${INCOMING1},3,ringing(3)
>> Exten => ${INCOMING1},4,background(priv-introsaved)
>> Exten => ${INCOMING1},5,background(queue-thankyou)
>> Exten => ${INCOMING1},n,Dial(SIP/121,10,r)
>> Exten => ${INCOMING1},n,playback(vm-nobodyavail)
>> Exten => ${INCOMING1},n,Dial(${GROUP},10,mr)
>> Exten => ${INCOMING1},n,playback(tt-allbusy)
>> Exten => ${INCOMING1},n,wait(2)
>> Exten => ${INCOMING1},n,goto(${INCOMING1},7)
>> ;Exten => ${INCOMING1},n,voicemail(u300@default)
>> Exten => ${INCOMING1},n,congestion

>
> Er - interesting call-flow there :)
>
> You should Answer() the call at some point too, preferably before you
> try to send audio back up the line (which ringing(3) will do) although
> it should auto-answer the channel, I've found that it's always best to
> do it explicitly.
>
> If you start to use goto's, then you
> really ought to start to use labels and the 'n' priority. Eg.
>
> exten => 123,1,Answer()
> exten => 123,n(loop),Playback(haha)
> exten => 123,n,Wait(2)
> exten => 123,n,Goto(loop)
>
> It saves counting lines and re-numbering when you add/remove instructions.
>
> Gordon


Hi Gordon,

That's works now..
The probelm was modem router...
I placed the server on DMZ area, and everything is OK..

This is my main problem. I try yto be able to be connected from outsite
the house, and I can't connect...

Can you connect to your server from outside ?
If so, what Modem router do you have ??

THanks and regards,

Steve

Reply With Quote
  #6 (permalink)  
Old 05-17-2007, 04:46 PM
alexd
Guest
 
Posts: n/a
Default Re: Asterisk conf for Sipgate.co.uk

Steve wrote:

> That's works now..
> The probelm was modem router...
> I placed the server on DMZ area, and everything is OK..


Do you have multiple public addresses? Or is it DMZ as in, forward all
unrelated inbound traffic to whatever's in the "DMZ"?

> This is my main problem. I try yto be able to be connected from outsite
> the house, and I can't connect...
>
> Can you connect to your server from outside ?


What do you mean by "connect"? Are you trying to make calls to your Sipgate
number? Register handsets over the internet to your Asterisk server? SSH to
your Asterisk server from over the internet?

> If so, what Modem router do you have ??


Hopefully it should Just Work if you've got it in the DMZ. If it's Asterisk
you're trying to debug, go to the Asterisk console with 'asterisk -rc', and
do a 'sip debug ip <IP address of remote handset>' and attempt to register
the handset. If it's linux in general you're trying debug connectivity
with, run 'iptraf' on the relevant interface and you'll be able to see
everything going in and out.

--
<http://ale.cx/> (AIM:troffasky) (UnSoEsNpEaTm@ale.cx)
17:37:40 up 18 days, 19:37, 2 users, load average: 0.38, 0.34, 0.30
09 f9 11 02 9d 74 e3 5b d8 41 56 c5 63 56 88 c0


Reply With Quote
  #7 (permalink)  
Old 05-17-2007, 09:09 PM
Gordon Henderson
Guest
 
Posts: n/a
Default Re: Asterisk conf for Sipgate.co.uk

In article <f2fiei$huk$1$830fa7a5@news.demon.co.uk>,
Steve <user@mail.com> wrote:

>Hi Gordon,
>
>That's works now..
>The probelm was modem router...
>I placed the server on DMZ area, and everything is OK..
>
>This is my main problem. I try yto be able to be connected from outsite
>the house, and I can't connect...
>
>Can you connect to your server from outside ?
>If so, what Modem router do you have ??


At home/office I have a Draytek 2600 and a Linux based router. I have a
small subnet routed to me from Zen, so I have a "real" DMZ which is where
my office asterisk box is, so remote connections are only a problem for
the remote NAT firewall.

However I have setup boxes for my clients (I sell asterisk based PBX
systems) which are on the inside of their router, and then I port-forward
5060 and 10000 through 20000 to the IP address of the server on the inside
then use the nat=yes and externip= and localnet= statements in sip.conf.
(Also port forward 4569 to the internal asterisk box as that's IAX which
I use to peer boxes together)

When connecting from the outside you may need a STUN sever which will
let the external device (phone/soft phone) work out how to navigate it's
NAT firewall.

Gordon

Reply With Quote
Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
about asterisk robert uk.telecom.voip 12 03-19-2007 01:28 PM
Using Asterisk to simulate an ISDN2e line Ron Wellsted uk.telecom.voip 1 08-26-2006 08:40 AM
Asterisk and voicemail permission problem Tinus uk.telecom.voip 0 08-25-2006 02:47 PM
Asterisk... first questions of a newbie :-( Stephane M uk.telecom.voip 15 09-22-2005 09:34 AM
Sipgate and Asterisk, Calls cut if silence detected Sparks uk.telecom.voip 1 07-12-2005 09:03 AM


All times are GMT. The time now is 04:30 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45