[Asterisk-Users] two sip phone communication using asterisk server

Tejas Shah tejas705 at yahoo.com
Wed Nov 30 22:34:57 MST 2005


    hi,
   
            I am a newbie to asterisk. I installed a asterisk server to make communication between 2 X-Lite's SIP based phones. I made following configuration in sip.conf :
   
  [general]

port = 5060           ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0    ; Address to bind to (all addresses on machine)
allow=all             ; Allow all codecs
context = bogon-calls ; Send SIP callers that we don't know about here

[2000]

type=friend           ; This device takes and makes calls
username=2000         ; Username on device
secret=9overthruster7 ; Password for device
host=dynamic          ; This host is not on the same IP addr every time
context=from-sip      ; Inbound calls from this host go here
mailbox=100           ; Activate the message waiting light if this
                      ; voicemailbox has messages in it

[2001]                ; Duplicate of 2000, except with different auth data

type=friend
username=2001
secret=11bbanzai9
host=dynamic
context=from-sip
mailbox=101
   
  and following configuration in extension.conf :
   
  [general]

static=yes       ; These two lines prevent the command-line interface
writeprotect=yes ; from overwriting the config file. Leave them here.

[bogon-calls]

;
; Take unknown callers that may have found
; our system, and send them to a re-order tone.
; The string "_." matches any dialed sequence, so all
; calls will result in the Congestion tone application
; being called. They'll get bored and hang up eventually.
;

exten => _.,1,Congestion 

[from-sip]

;
; If the number dialed by the calling party was "2000", then
; Dial the user "2000" via the SIP channel driver. Let the number
; ring for 20 seconds, and if no answer, proceed to priority 2.
; If the number gives a "busy" result, then jump to priority 102
;

exten => 2000,1,Dial(SIP/2000,20)

;
; Priority 2 send the caller to voicemail, and gives the "u"navailable
; message f or user 2000, as recorded previously. The only way out
; of voicemail in this instance is to hang up, so we have reached
; the end of our priority list.
;

exten => 2000,2,Voicemail(u2000)

;
; If the Dialed number in priority 1 above results in
; a "busy" code, then Dial will jump to 101 + (current priority)
; which in our case will be 101+1=102. This +101 jump is built
; into Asterisk and does not need to be defined.
;

exten => 2000,102,Voicemail(b2000)
exten => 2000,103,Hangup

;
; Now, what if the number dialed was "2001"?
;

exten => 2001,1,Dial(SIP/2001,20)
exten => 2001,2,Voicemail(u2001)
exten => 2001,102,Voicemail(b2001)
exten => 2001,103,Hangup

;
; Define a way so that users can dial a number to reach
; voicemail. Call the VoicemailMain application with the
; number of the caller already passed as a variable, so
; all the user needs to do is type in the password.
;

exten => 2999,1,VoicemailMain(${CALLERIDNUM})
   
  now my problem is when i m starting asterisk server both Sip phones are showing registration. when i make call from any of PC following error occurs on the screen of asterisk server :
   
  pbx.c:1731: can not find extension context 'from-sip'
   
  when i close asterisk server communication is taking place beween both phones.
  now i m stuck with this error. can anybody give me guidance on how to solve this problem?
   
  thanks
   
  tejas



		
---------------------------------
 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20051130/a6a9a9ec/attachment.htm


More information about the asterisk-users mailing list