Asterisk (with NodePhone) - Siemens C470IP configuration


#1

Ok I’ve never used Asterisk before… but I’ve setup Asterisk following these settings: http://www.internode.on.net/pdf/products/np-business-trunks-user-manual.pdf

I’m with NodePhone so I have configured.

This is my sip.conf

[code][general]
;For registration use your Service ID and password to register on behalf of the devices.
register => 07xxxxxxxx:xxxxxxxx@sip.internode.on.net/s
registertimeout=60
context=default
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes

[nodephone]
context=nodephone
type=friend
username=07xxxxxxxx
fromuser=07xxxxxxxx
secret=xxxxxxxxxx
fromdomain=sip.internode.on.net
host=sipconnect.internode.on.net
dtmfmode=rfc2833
disallow=all
allow=alaw
allow=ulaw
nat=no
insecure=very

[1001]
;HomeLine
callerid=NodePhone Line 1
context=nodephone-outbound
type=friend
host=dynamic
secret=xxxxxxxxxxx
mailbox=1001
dtmfmode=rfc2833
nat=no
canreinvite=no
disallow=all
allow=ulaw
allow=alaw[/code]

This is my extensions.conf

[code][globals]
;-----------------------------
; Users
;-----------------------------
HomeLine=SIP/1001

[nodephone]
;send incoming calls from specified number to the appropriate extension
exten =>07xxxxxxxx,1,Dial(${HomeLine},20)
exten =>07xxxxxxxx,n,Hangup

[nodephone-outbound]

[/code]

Obviously I haven’t got xxxx where my phone number and passwords are…

I’ve got my C470IP configured… not 100% what I had wrong initially… but its registered now…

but I’m still getting the demo-congrats playing when i dial in to the home phone using my mobile…

I also don’t know how to configure the outgoing calls to use nodephone yet…

So I have:

Asterisk box <=> NodePhone - working (as I get the default asterisk demo message when i dial in from my mobile)
C470IP VoIP Phone <=> Asterisk box - working as it is now registered and logged in…

So i still need to get working:
Outgoing calls <=> NodePhone - I think this might be because its not configured in extensions.conf? but I’m not sure how to do that?
Incoming calls <=> Handset - needs to go to handset rather than playing the demo-congrats file… which i’m not sure where its coming from as i started with a blank sip.conf and extensions.conf files… so it must be coming from another conf file…

Any suggestions?

I have played using the following under the nodephone-outbound option in the extensions.conf file:

exten => _X.,1,Answer exten => _X.,2,Wait(5) exten => _X.,3,Playback(tt-monkeys) exten => _X.,4,Hangup
And that worked, I hear that when i try to dial any number… but I’m unsure how to configure it so that it uses my VoIP (NodePhone) account to make the call…


#2

First: Incoming calls from Your provider:

Change

to

and You should be done (minimum Your phone should ring) (the second 07xxx-string needs of course to be replaced with exact this 07xxx-string used in context nodephone)

Second: Outbound via the provider:

the context nodephone-outbound should at least contain something like

assuming that You dial the outbound number exactly in the way nodephone likes to get it.


#3

Thanks so much… I’ve now got outgoing working…

Incoming isn’t quite yet though…

I’m getting this error:
Call from ‘’ (xxx.xxx.xxx.xxx:5060) to extension ‘07xxxxxxxx’ rejected because extension not found in context ‘default’.

Not sure as to what that is caused by…


#4

This is really strange as You’ve defined context=nodephone in the definition of the provider-context, but the call is routed to default, where this extension (07xxx) doesn’t reside.

First thing You could try is to set type=peer instead of type=friend for [nodephone]. If this helps You’re done, otherwise please enable debugging at the asterisk cli with

make an inbound call to Your number registered at nodephone and post the debug results here.


#5

Ok I have it working but I’m not 100% sure that is correct…

This is what I have now:

sip.conf

[code][general]
;For registration use your Service ID and password to register on behalf of the devices.
register => 07xxxxxxxx:xxxxxxxxxxxx@sip.internode.on.net/07xxxxxxxx
registertimeout=60
context=nodephone-inbound
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
tcpbindaddr=0.0.0.0
tcpenable=yes
srvlookup=yes

[nodephone]
context=nodephone-inbound
type=friend
username=07xxxxxxxx
fromuser=07xxxxxxxx
secret=xxxxxxxxxxx
fromdomain=sip.internode.on.net
host=sipconnect.internode.on.net
dtmfmode=rfc2833
disallow=all
allow=alaw
allow=ulaw
nat=no
insecure=very

[1001]
;HomeLine
callerid=NodePhone Line 1
context=nodephone-outbound
type=friend
host=dynamic
secret=1001
mailbox=1001
dtmfmode=rfc2833
nat=no
canreinvite=no
disallow=all
allow=ulaw
allow=alaw[/code]

extensions.conf

[code][globals]
;-----------------------------
; Users
;-----------------------------
HomeLine=SIP/1001

[nodephone-inbound]
;send incoming calls from specified number to the appropriate extension
exten => _X.,1,Dial(${HomeLine},20)
exten => _X.,n,Hangup

[nodephone-outbound]
exten => _X.,1,Dial(SIP/nodephone/${EXTEN})[/code]

So I changed the context from global to nodephone-inbound in sip.conf… but I’ve got a funny feeling its not even using the nodephone portion of sip.conf for some reason? should the register part be all in nodephone rather than global?


#6

If it is not using the entry, you have allowguest=yes, which is usually a bad thing, for security.

Other bad things are using type=friend, rather than peer, and almost certainly using insecure=very, rather than invite.

If the register is wrong, you won’t get any incoming calls.


#7

In addition to david55 (I suggest to make all changes he described):
To dig into the problem You should enable a sip debug before trying to receive a call.
Whenever the defined context for a peer is not detected by asterisk it’s mainly a problem of a different IP-address where the INVITE comes from (Your config - defeined as a peer - would expect the INVITE to come from sip.internode.on.net or 203.2.134.1) If the INVITE comes from any other IP-adress it will be sent to default (in casae of allowguest=yes) or rejected (in case of allowguest=no)