Problem with incoming lines

Comment on Asterisk settings for sipcall.ch
domi
Joined: Sat 21 of Apr, 2007

Problem with incoming lines

Posted:Sat 21 of Apr, 2007 (13:01 UTC)
Hi

I have a problem with incoming lines at sipcall.
I've got four numbers on my asterisk server. Three are free numbers (4132...) and the other one is a home number (414450025xx).
The home number also is my outgoing line.

When i have all four numbers activated and i call any of my sipcall numbers, then i see the caller ID 414450025xx.
But when i deactivate my 414450025xx account in the sip.conf, and call again any of my sipcall numbers (4132...), then I see the right caller ID of the external caller.

Now i can't find the problem in my configuraiton files:

This is my sip.conf:

[general]
context=local
port=5060
bindaddr=0.0.0.0
externip=x.x.x.x
localnet=10.0.0.0/255.255.255.0
srvlookup=no
useragent=confirmPBX
canreinvite=yes
tos=lowdelay
disallow=all
allow=ulaw
allow=alaw
allow=gsm
register => 414450025xx:PASSWORD@sip.backbone.ch/414450025xx
register => 413251025xx:PASSWORD@sip.backbone.ch/413251025xx 
register => 413251023xx:PASSWORD@sip.backbone.ch/413251023xx 
register => 413251070xx:PASSWORD@sip.backbone.ch/413251070xx

[414450025xx]
type=friend
language=de
username=414450025xx
secret=PASSWORD
callerid="confirm IT solutions" <414450025xx>
qualify=yes
nat=yes
insecure=very
host=sip.backbone.ch
fromuser=414450025xx
fromdomain=sip.backbone.ch
context=trunk
dtmfmode=info 

[413251025xx]
type=user
language=de
username=413251025xx
secret=PASSWORD
callerid="SipCall: Domi" <413251025xx>
qualify=yes
nat=yes
insecure=very
host=sip.backbone.ch
fromuser=413251025xx
fromdomain=sip.backbone.ch
context=trunk

[413251023xx]
type=user
language=de
username=413251023xx
secret=PASSWORD
callerid="SipCall: FiBi" <413251023xx>
qualify=yes
nat=yes
insecure=very
host=sip.backbone.ch
fromuser=413251023xx
fromdomain=sip.backbone.ch
context=trunk

[41325107027]
type=user
language=de
username=413251070xx
secret=PASSWORD
callerid="SipCall: Dario" <413251070xx>
qualify=yes
nat=yes
insecure=very
host=sip.backbone.ch
fromuser=413251070xx
fromdomain=sip.backbone.ch
context=trunk

[11]
type=friend
language=de
username=11
secret=PASSWORD
callerid="Int: Domi (Softphone)" <11>
host=dynamic
nat=yes
mailbox=11

[12]
type=friend
language=de
username=12
secret=PASSWORD
callerid="Int: Dario" <12>
nat=yes
qualify=yes
insecure=very
host=dynamic
mailbox=12

[13]
type=friend
language=de
username=13
secret=PASSWORD
callerid="Int: FiBi" <13>
host=dynamic
mailbox=13

[14]
type=friend
language=de
username=14
secret=PASSWORD
callerid="Int: Pascal" <14>
host=dynamic
mailbox=14

[15]
type=friend
language=de
username=15
secret=PASSWORD
callerid="Int: Debi" <15>
host=dynamic
mailbox=15

!!!END OF FILE!!!

This is my extensions.conf

[general]
        static=yes
        writeprotect=no
        firstdigittimeout = 5   ; timeout after first digit
        digittimeout = 3        ; timeout after every digit
        digittimeoutchar = #

[globals]
        TIMEOUT=10              ; timeout while calling a number (while beep)
        CONSOLE=Console/dsp     ; Console interface for demo



; ----------------------------------------------------------------------------- ;
; SECTION TO PARK AND UNPARK CALLS                                              ; 
; ----------------------------------------------------------------------------- ;

[parking]

        exten => 80,1,Park()
        exten => 80,2,Hangup()



; ----------------------------------------------------------------------------- ;
; CONTEXT WITH SERVICE NUMBERS                                                  ; 
; ----------------------------------------------------------------------------- ;

[service]

        exten => 90,1,Answer
        exten => 90,2,Playback(demo-echotest)
        exten => 90,3,Echo
        exten => 90,4,Playback(demo-echodone)
        exten => 90,5,Hangup

        exten => 91,1,Milliwatt

        exten => 92,1,Answer
        exten => 92,2,MusicOnHold

        exten => 93,1,Playback(load-average)



; ----------------------------------------------------------------------------- :
; MEET ME CONTEXT                                                               ;
; ----------------------------------------------------------------------------- ;

[meetme]

        exten => 20,1,MeetMe(21|p);


; ----------------------------------------------------------------------------- ;
; TRUNK TO SIPCALL.CH                                                           ; 
; ----------------------------------------------------------------------------- ;

[trunk]

; *** IGNORE 0 AS FIRST DIGIT *** ;

        ignorepat => 0


 ; *** INCOMING LINES *** ;

        exten => 414450025??,1,Macro(valid,SCCP,10)             ; FORWARD SIPCALL (GLOBAL) TO INTERNAL NUMBER (10/DOMI)
        exten => 413251025??,1,Macro(valid,SCCP,10)             ; FORWARD SIPCALL (DOMI) TO INTERNAL NUMBER (10/DOMI)
        exten => 413251023??,1,Macro(valid,SIP,13)              ; FORWARD SIPCALL (FIBI) TO INTERNAL NUMBER (13/FIBI)
        exten => 413251070??,1,Macro(valid,SIP,12)              ; FORWARD SIPCALL (DARIO) TO INTERNAL NUMBER (12/DARIO)

 ; *** OUTGOING LINES *** ;

        exten => _00XXXXXXXXX,1,SetCallerID("confirm IT solutions" <414450025??>)
        exten => _00XXXXXXXXX,2,Dial(SIP/${EXTEN:1}@414450025??,${TIMEOUT},Ttr)
        exten => _00XXXXXXXXX,3,Congestion
        exten => _00XXXXXXXXX,4,Busy
        exten => _00XXXXXXXXX,5,Hangup



; ----------------------------------------------------------------------------- ;
; LOCAL CALLS                                                                   ;
; ----------------------------------------------------------------------------- ;

[local]
 
; *** INCLUDE OTHER CONTEXTS *** ; 
        include => meetme                                       ; include context for the meet me application
        include => parking                                      ; include context for the call parking 
        include => service                                      ; include context for service numbers
        include => trunk                                        ; include trunk context 


 ; *** LOCAL USER LINES *** ;
 
        exten => 10,1,Macro(valid,SCCP,${EXTEN})                ; cisco ip phone with sccp channel
        exten => _1[1-5],1,Macro(valid,SIP,${EXTEN})            ; soft- and hardware phones with sip channel 


 ; *** VOICEMAIL NUMBER *** ;

        exten => 99,1,Macro(getvm,s${CALLERIDNUM})              ; CALL VOICEMAIL BOX TO GET VM-MESSAGES 


 ; *** INVALID NUMBERS *** ;
        exten => _1[6-9],1,Macro(invalid)
        exten => _[2-8],1,Macro(invalid) 
        exten => _9[4-8],1,Macro(invalid)
        exten => _0Z,1,Macro(invalid)


 ; *** TIMEOUT *** ;
 
        exten => s,1,Answer
        exten => s,2,Wait(1)
        exten => s,3,Playback(invalid)
        exten => s,4,Hangup



; ----------------------------------------------------------------------------- ;
; MACROS                                                                        ;
; ----------------------------------------------------------------------------- ;


; macro name:   valid
;
; arguments:    1: protocol to dial
;               2: number to dial 
;
; usage:        this macro will be called, when the user type in a valid 
;               local numbers.
;               the valid numbers are defined in the local-context.

[macro-valid]
        exten => s,1,Dial(${ARG1}/${ARG2},${TIMEOUT})
        exten => s,2,Macro(callvm,${ARG2})
 


; macro name:   invalid
;
; arguments:    (none)
;
; usage:        this macro will be called, when the user type in an invalid 
;               local number.
;               the invalid local numbers are defined in the local-context.

[macro-invalid]
        exten => s,1,Answer
        exten => s,2,Playback(ss-noservice)
        exten => s,3,Hangup



; macro name:   callvm
; 
; arguments:    1: number of the voicemail box
;
; usage:        this script will be called, when a local user is not available.
;               the user is not available when the timeout exceeded or if the
;               client is not connected!

[macro-callvm]
        exten => s,1,Answer
        exten => s,2,Voicemail(u${ARG1})
        exten => s,3,Hangup
 
        exten => s,102,Playback(vm-nobodyavail)
        exten => s,103,Wait(1)
        exten => s,104,Hangup
 
        exten => a,1,Macro(getvm,${ARG2})



; macro name:   getvm
; 
; arguments:    1: number of the voicemail box
;
; usage:        this script will be called, when a local user will listen to
;               his voicemail messages. 

[macro-getvm]
        exten => s,1,Wait(1) 
        exten => s,2,Answer
        exten => s,3,VoicemailMain(${ARG1})
        exten => s,4,Hangup