X-Lite und Asterisk

dany

Neuer User
Mitglied seit
13 Nov 2005
Beiträge
103
Punkte für Reaktionen
0
Punkte
16
hallo,

habe das Problem, das ich nicht über ISDN bez. Asterisk eine Verbindung bekomme.

Asterisk zeigt mir in der Shell folgendes an:

Code:
Mar 15 09:58:26 NOTICE[6901]: chan_sip.c:7797 handle_request: Registration from 'xxxx majer <sip:dany@asterisk>' failed for '127.0.0.1'
server*


Hier noch meine Asterisk extensions.conf:


Code:
;
; Static extension configuration file, used by
; the pbx_config module. This is where you configure all your 
; inbound and outbound calls in Asterisk. 
; 
; This configuration file is reloaded 
; - With the "extensions reload" command in the CLI
; - With the "reload" command (that reloads everything) in the CLI

;
; The "General" category is for certain variables.  
;
[general]
;
; If static is set to no, or omitted, then the pbx_config will rewrite
; this file when extensions are modified.  Remember that all comments
; made in the file will be lost when that happens. 
;
; XXX Not yet implemented XXX
;
static=yes
;
; if static=yes and writeprotect=no, you can save dialplan by
; CLI command 'save dialplan' too
;
writeprotect=no

; You can include other config files, use the #include command (without the ';')
; Note that this is different from the "include" command that includes contexts within 
; other contexts. The #include command works in all asterisk configuration files.
;#include "filename.conf"

; The "Globals" category contains global variables that can be referenced
; in the dialplan with ${VARIABLE} or ${ENV(VARIABLE)} for Environmental variable
; ${${VARIABLE}} or ${text${VARIABLE}} or any hybrid
;
[globals]
CONSOLE=Console/dsp				; Console interface for demo
;CONSOLE=Zap/1
;CONSOLE=Phone/phone0
IAXINFO=guest					; IAXtel username/password
;IAXINFO=myuser:mypass
TRUNK=Zap/g2					; Trunk interface
;
; Note the 'g2' in the TRUNK variable above. It specifies which group (defined
; in zapata.conf) to dial, i.e. group 2, and how to choose a channel to use in
; the specified group. The four possible options are:
;
; g: select the lowest-numbered non-busy Zap channel (aka. ascending sequential hunt group).
; G: select the highest-numbered non-busy Zap channel (aka. descending sequential hunt group).
; r: use a round-robin search, starting at the next highest channel than last time (aka. ascending rotary hunt group).
; R: use a round-robin search, starting at the next lowest channel than last time (aka. descending rotary hunt group).
;
TRUNKMSD=1					; MSD digits to strip (usually 1 or 0)
;TRUNK=IAX2/user:pass@provider

;
; Any category other than "General" and "Globals" represent 
; extension contexts, which are collections of extensions.  
;
; Extension names may be numbers, letters, or combinations
; thereof. If an extension name is prefixed by a '_'
; character, it is interpreted as a pattern rather than a
; literal.  In patterns, some characters have special meanings:
;
;   X - any digit from 0-9
;   Z - any digit from 1-9
;   N - any digit from 2-9
;   [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9)
;   . - wildcard, matches anything remaining (e.g. _9011. matches 
;	anything starting with 9011 excluding 9011 itself)
;
; For example the extension _NXXXXXX would match normal 7 digit dialings, 
; while _1NXXNXXXXXX would represent an area code plus phone number
; preceeded by a one.
;
; Each step of an extension is ordered by priority, which must
; always start with 1 to be considered a valid extension.
;
; Contexts contain several lines, one for each step of each
; extension, which can take one of two forms as listed below,
; with the first form being preferred.  One may include another
; context in the current one as well, optionally with a
; date and time.  Included contexts are included in the order
; they are listed.
;
;[context]
;exten => someexten,priority,application(arg1,arg2,...)
;exten => someexten,priority,application,arg1|arg2...
;
; Timing list for includes is 
;
;   <time range>|<days of week>|<days of month>|<months>
;
;include => daytime|9:00-17:00|mon-fri|*|*
;
; ignorepat can be used to instruct drivers to not cancel dialtone upon
; receipt of a particular pattern.  The most commonly used example is
; of course '9' like this:
;
;ignorepat => 9
;
; so that dialtone remains even after dialing a 9.
;

;
; Here are the entries you need to participate in the IAXTEL
; call routing system.  Most IAXTEL numbers begin with 1-700, but
; there are exceptions.  For more information, and to sign
; up, please go to [url]www.gnophone.com[/url] or [url]www.iaxtel.com[/url]
;
[iaxtel700]
exten => _91700XXXXXXX,1,Dial(IAX2/${IAXINFO}@iaxtel.com/${EXTEN:1}@iaxtel)

;
; The SWITCH statement permits a server to share the dialplain with
; another server. Use with care: Reciprocal switch statements are not
; allowed (e.g. both A -> B and B -> A), and the switched server needs
; to be on-line or else dialing can be severly delayed.
;
[iaxprovider]
;switch => IAX2/user:[key]@myserver/mycontext

[trunkint]
;
; International long distance through trunk
;
exten => _9011.,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _9011.,2,Congestion

[trunkld]
;
; Long distance context accessed through trunk
;
exten => _91NXXNXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91NXXNXXXXXX,2,Congestion

[trunklocal]
;
; Local seven-digit dialing accessed through trunk interface
;
exten => _9NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _9NXXXXXX,2,Congestion

[trunktollfree]
;
; Long distance context accessed through trunk interface
;
exten => _91800NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91800NXXXXXX,2,Congestion
exten => _91888NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91888NXXXXXX,2,Congestion
exten => _91877NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91877NXXXXXX,2,Congestion
exten => _91866NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91866NXXXXXX,2,Congestion

[international]
;
; Master context for international long distance
;
ignorepat => 9
include => longdistance
include => trunkint

[longdistance]
;
; Master context for long distance
;
ignorepat => 9
include => local
include => trunkld

[local]
;
; Master context for local, toll-free, and iaxtel calls only
;
ignorepat => 9
include => default
include => parkedcalls
include => trunklocal
include => iaxtel700
include => trunktollfree
include => iaxprovider
;
; You can use an alternative switch type as well, to resolve
; extensions that are not known here, for example with remote 
; IAX switching you transparently get access to the remote
; Asterisk PBX
; 
; switch => IAX2/user:password@bigserver/local

[macro-stdexten];
;
; Standard extension macro:
;   ${ARG1} - Extension  (we could have used ${MACRO_EXTEN} here as well
;   ${ARG2} - Device(s) to ring
;
exten => s,1,Dial(${ARG2},20)					; Ring the interface, 20 seconds maximum
exten => s,2,Goto(s-${DIALSTATUS},1)				; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)

exten => s-NOANSWER,1,Voicemail(u${ARG1})		; If unavailable, send to voicemail w/ unavail announce
exten => s-NOANSWER,2,Goto(default,s,1)			; If they press #, return to start

exten => s-BUSY,1,Voicemail(b${ARG1})			; If busy, send to voicemail w/ busy announce
exten => s-BUSY,2,Goto(default,s,1)				; If they press #, return to start

exten => _s-.,1,Goto(s-NOANSWER,1)				; Treat anything else as no answer

exten => a,1,VoicemailMain(${ARG1})				; If they press *, send the user into VoicemailMain

[demo]
;
; We start with what to do when a call first comes in.
;
exten => s,1,Wait,1			; Wait a second, just for fun
exten => s,2,Answer			; Answer the line
exten => s,3,DigitTimeout,5		; Set Digit Timeout to 5 seconds
exten => s,4,ResponseTimeout,10		; Set Response Timeout to 10 seconds
exten => s,5,BackGround(demo-congrats)	; Play a congratulatory message
exten => s,6,BackGround(demo-instruct)	; Play some instructions

exten => 2,1,BackGround(demo-moreinfo)	; Give some more information.
exten => 2,2,Goto(s,6)

exten => 3,1,SetLanguage(fr)		; Set language to french
exten => 3,2,Goto(s,5)			; Start with the congratulations

exten => 1000,1,Goto(default,s,1)
;
; We also create an example user, 1234, who is on the console and has
; voicemail, etc.
;
exten => 1234,1,Playback(transfer,skip)		; "Please hold while..." 
					; (but skip if channel is not up)
exten => 1234,2,Macro(stdexten,1234,${CONSOLE})

exten => 1235,1,Voicemail(u1234)		; Right to voicemail

exten => 1236,1,Dial(Console/dsp)		; Ring forever
exten => 1236,2,Voicemail(u1234)		; Unless busy

;
; # for when they're done with the demo
;
exten => #,1,Playback(demo-thanks)		; "Thanks for trying the demo"
exten => #,2,Hangup			; Hang them up.

;
; A timeout and "invalid extension rule"
;
exten => t,1,Goto(#,1)			; If they take too long, give up
exten => i,1,Playback(invalid)		; "That's not valid, try again"

;
; Create an extension, 500, for dialing the
; Asterisk demo.
;
exten => 500,1,Playback(demo-abouttotry); Let them know what's going on
exten => 500,2,Dial(IAX2/[email protected]/s@default)	; Call the Asterisk demo
exten => 500,3,Playback(demo-nogo)	; Couldn't connect to the demo site
exten => 500,4,Goto(s,6)		; Return to the start over message.

;
; Create an extension, 600, for evaulating echo latency.
;
exten => 600,1,Playback(demo-echotest)	; Let them know what's going on
exten => 600,2,Echo			; Do the echo test
exten => 600,3,Playback(demo-echodone)	; Let them know it's over
exten => 600,4,Goto(s,6)		; Start over

;
; Give voicemail at extension 8500
;
exten => 8500,1,VoicemailMain
exten => 8500,2,Goto(s,6)
;
; Here's what a phone entry would look like (IXJ for example)
;
;exten => 1265,1,Dial(Phone/phone0,15)
;exten => 1265,2,Goto(s,5)

;[mainmenu]
;
; Example "main menu" context with submenu
;
;exten => s,1,Answer
;exten => s,2,Background(thanks)		; "Thanks for calling press 1 for sales, 2 for support, ..."
;exten => 1,1,Goto(submenu,s,1)
;exten => 2,1,Hangup
;include => default
;
;[submenu]
;exten => s,1,Ringing					; Make them comfortable with 2 seconds of ringback
;exten => s,2,Wait,2
;exten => s,3,Background(submenuopts)	; "Thanks for calling the sales department.  Press 1 for steve, 2 for..."
;exten => 1,1,Goto(default,steve,1)
;exten => 2,1,Goto(default,mark,2)

[default]
;
; By default we include the demo.  In a production system, you 
; probably don't want to have the demo there.
;
include => demo

;
; Extensions like the two below can be used for FWD, Nikotel, sipgate etc.
; Note that you must have a [sipprovider] section in sip.conf whereas
; the otherprovider.net example does not require such a peer definition
;
;exten => _41X.,1,Dial(SIP/${EXTEN:2}@sipprovider,,r)
;exten => _42X.,1,Dial(SIP/user:passwd@${EXTEN:2}@otherprovider.net,30,rT)

; Real extensions would go here. Generally you want real extensions to be 4 or 5
; digits long (although there is no such requirement) and start with a single
; digit that is fairly large (like 6 or 7) so that you have plenty of room to
; overlap extensions and menu options without conflict.  You can alias them with
; names, too and use global variables

;exten => 6245,hint,SIP/Grandstream1&SIP/Xlite1 ; Channel hints for presence
;exten => 6245,1,Dial(SIP/Grandstream1,20,rt)	; permit transfer
;exten => 6245,1,Dial(${HINT},20,rtT)		; Use hint as listed
;exten => 6361,1,Dial(IAX2/JaneDoe,,rm)		; ring without time limit
;exten => 6389,1,Dial(MGCP/aaln/[email protected])
;exten => 6394,1,Dial(Local/6275/n)		; this will dial ${MARK}

;exten => 6275,1,Macro(stdexten,6275,${MARK})	; assuming ${MARK} is something like Zap/2
;exten => mark,1,Goto(6275|1)			; alias mark to 6275
;exten => 6536,1,Macro(stdexten,6236,${WIL})	; Ditto for wil
;exten => wil,1,Goto(6236|1)
;
; Some other handy things are an extension for checking voicemail via
; voicemailmain
;
;exten => 8500,1,VoicemailMain
;exten => 8500,2,Hangup
;
; Or a conference room (you'll need to edit meetme.conf to enable this room)
;
;exten => 8600,1,Meetme(1234)
;
; Or playing an announcement to the called party, as soon it answers
;
;exten = 8700,1,Dial(${MARK},30,A(/path/to/my/announcemsg))
;
; For more information on applications, just type "show applications" at your
; friendly Asterisk CLI prompt.
;
; 'show application <command>' will show details of how you
; use that particular application in this file, the dial plan. 
;
[geromme]
exten => s,1,NoOp(=== Eingehender Anruf von: ${CALLERIDNUM} ===)
exten => s,2,GotoIf($["${CALLERIDNUM}" = "07191930808"]?200,1)
exten => s,3,GotoIf($["${CALLERIDNUM}" = "07191930809"]?200,1)
exten => s,4,Wait,20
exten => s,5,Answer
exten => s,6,SetLanguage(de)
exten => s,7,Voicemail,u930808
exten => s,8,Hangup

exten => s/930808,1,Answer
exten => s/930808,2,Wait(.5)
exten => s/930808,3,VoiceMailMain
exten => s/930808,4,HangUp

exten => 200,1,Answer
exten => 200,2,Wait(.5)
exten => 200,3,SetLanguage(de)
exten => 200,4,VoiceMailMain(930808,s)
exten => 200,5,HangUp

Weiss nicht wo ich den Fehler suchen soll, und so viel Ahnung habe ich leider auch noch nicht.

Wer hat den rat für mich.

Grüße Geromme.
 
Bitte benutze zum Posten von CLI Ausgaben
Code:
set verbose 5
sowie [C0DE][/C0DE] Tags (Symbol #).
Das gilt auch für Config files.

Es erleichtert auch ungemein, wenn man nicht unter hunderten Kommantarzeilen die relevanten Teile suchen muss.

Im vorliegenden Fall ist wohl eher die sip.conf interessant, sowie deine X-Lite Konfiguration.
 
Will mich dem Thema mal anschließen mit folgender problematik.

Versuche mit X-Lite über den Asterisk rauszutelefonieren und es sollte umgekehrt dann auch der fall sein. Hoffe das geht überhaupt.

Bei X-Lite hab ich lediglich die proxy adresse von meinem Asterisk eingetragen und halt die logindaten

Vielleicht schauts sich ja auch mal jemand meine configs an und sagt mir ob alles ok is..hab irgendwie das gefühl da stimmt was nicht....:(

sip.conf
Code:
[general] 
port = 5060 
bindaddr = 0.0.0.0 
context = default
externip= <Asterisk IP>
nat=yes
qualify=yes
disable=all 
allow=alaw 
allow=alaw 
allow=ulaw 
allow=g729 
allow=gsm 
allow=slinear 
srvlookup=yes 
register => <userID>:[email protected]/<rufnummer>

[<userID>] 
type=peer
insecure=very ; otherwise I get authentication errors 
nat=yes 
username=<userID> 
fromdomain=pbx-network.de
secret=XXXXXX
host=pbx-network.de 
qualify=yes

extension.conf
Code:
[default]

exten => _0Z.,1,SetCallerId(<rufnummer mit 49>))
exten => _0Z.,2,DIAL(IAX2/pbxnetwork/\,60,r)

[from-pbx]
exten => <rufnummer>,1,NoOp(\)

[general]
static=yes
writeprotect=no

iax.conf
Code:
[general]
bindport = 4569           ; Port to bind to (IAX is 4569)
bindaddr = 0.0.0.0    ; Address to bind to (all addresses on machine)
disallow=all
allow=ulaw
allow=alaw
allow=gsm
mailboxdetail=yes

[pbxnetwork]
type=peer
username=<userID>
secret=XXXXX
host=iax.pbx-network.de
qualify=yes
allow=alaw
allow=ulaw

register => <userID>:[email protected]

[<userID>]
type=user
allow=alaw
allow=ulaw
context=pbxnetwork

Asterisk zeigt mir folgendes auf der Shell
Code:
<-- SIP read from 217.24.217.52:5060:
NOTIFY sip:<meineRufnummer>@192.168.10.230 SIP/2.0
Via: SIP/2.0/UDP 217.24.217.52:5060;branch=z9hG4bK596c39ff;rport
From: "asterisk" <sip:[email protected]>;tag=as654e0613
To: <sip:<meineRufnummer>@192.168.10.230>
Contact: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 102 NOTIFY
User-Agent: PBX-network SERVER
Max-Forwards: 70
Event: message-summary
Content-Type: application/simple-message-summary
Content-Length: 93

Messages-Waiting: no
Message-Account: sip:[email protected]
Voice-Message: 0/0 (0/0)

--- (12 headers 3 lines)---
Transmitting (NAT) to 217.24.217.52:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 217.24.217.52:5060;branch=z9hG4bK596c39ff;received=217.24.217.52;rport=5060
From: "asterisk" <sip:[email protected]>;tag=as654e0613
To: <sip:<meineRufnummer>@192.168.10.230>;tag=as23b85937
Call-ID: [email protected]
CSeq: 102 NOTIFY
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0


---
Destroying call '[email protected]'

Anstelle von userID und XXXX stehn natürlich meine richtigen daten...
Und beim X-Lite steht halt LoginFehler

vom X-Lite
Code:
SEND TIME: 6214798
SEND >> 192.168.10.230:5060
REGISTER sip:sipgate.de SIP/2.0
Via: SIP/2.0/UDP 192.168.10.240:5060;rport;branch=z9hG4bK7961953171C84BB0956823A85357B671
From: <meinName> <sip:<userID>@sipgate.de>;tag=2119827176
To: <meinName> <sip:<userID>@sipgate.de>
Contact: "<meinName>" <sip:<userID>@192.168.10.240:5060>
Call-ID: [email protected]
CSeq: 20853 REGISTER
Expires: 1800
Max-Forwards: 70
User-Agent: sipgate X-Lite release 1105c
Content-Length: 0

RECEIVE TIME: 6154550
RECEIVE << 192.168.10.230:5060
SIP/2.0 404 Not found
Via: SIP/2.0/UDP 192.168.10.240:5060;branch=z9hG4bK5517D2BB8A734D7D859426C679D6D269;received=192.168.10.240;rport=5060
From: <meinName> <sip:<userID>@sipgate.de>;tag=2119827176
To: <meinName> <sip:<userID>@sipgate.de>;tag=as334981a3
Call-ID: [email protected]
CSeq: 20852 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:<userID>@192.168.10.230>
Content-Length: 0

Denke einfach mal wenn ich es schaffe mit X-Lite über meinem Asterisk zu Telefonieren, kann ich auch endlich versuchen meine Analogen Telefone da anzuschließen.

Die Netzwerk, ISDN Karten und Telefone stehn schon alle bereit :)


Bin nun schon soweit, das ich mit X-Lite raustelefonieren kann und bekomm ueber den Asterisk auch paar Infos darüber. Aber es wird noch kein Anruf durchgestellt. Hab den Proxy unter X-Lite auch wieder zu sip.pbx-network.de geändert.....
 
Zuletzt bearbeitet:
bitte schaut mal bitte was an meinen configs nicht stimmen soll :confused:
 

Zurzeit aktive Besucher

Statistik des Forums

Themen
246,195
Beiträge
2,247,818
Mitglieder
373,748
Neuestes Mitglied
fanti88
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.