[Asterisk-Users] How to configure the Asterisk server such that a FXS phone can talk to SIP client?

Tamhankar, Arundhati Arundhati.Tamhankar at t-mobile.com
Mon Nov 22 21:07:29 MST 2004


Hi,

Could you please help me!! I am trying to configure the Asterisk server.
I have a analog phone connected to a FXS port of a Cisco 3745 router. This router is connected to a Asterisk server via Fast Ethernet interface. I am trying to make a call from the analog phone to a SIP client. This SIP client is registered to the Asterisk server. 

Analog phone number: 999
SIP client : 202
Sip client IP address: 40.0.0.14

Here is a "sip debug" output for your reference: (Sorry that this email is so long. Want to give you all possible information that I have.)

Sip read:
INVITE sip:999 at 30.0.0.3 SIP/2.0
Via: SIP/2.0/UDP 40.0.0.14:5060;rport;branch=z9hG4bK11BA20110E71407DB2457DF4FD69B374
From: AsteriskConfig <sip:202 at 30.0.0.3>;tag=3715833233
To: <sip:999 at 30.0.0.3>
Contact: <sip:202 at 40.0.0.14:5060>
Call-ID: C0647F55-F883-4089-A32D-8404FA1F1AA6 at 40.0.0.14
CSeq: 31023 INVITE
Proxy-Authorization: Digest username="202",realm="asterisk",nonce="4faf1ac6",response="872c59bdaa2bda9784caef65fd2820a6",uri="sip:999 at 30.0.0.3"
Max-Forwards: 70
Content-Type: application/sdp
User-Agent: X-Lite release 1103m
Content-Length: 186

v=0
o=202 38302496 38302506 IN IP4 40.0.0.14
s=X-Lite
c=IN IP4 40.0.0.14
t=0 0
m=audio 8000 RTP/AVP 0 101
a=rtpmap:0 pcmu/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

12 headers, 9 lines
Using latest request as basis request
Sending to 40.0.0.14 : 5060 (non-NAT)
Found audio format UNKN
Found audio format UNKN
Found description format pcmu
Found description format telephone-event
Capabilities: us - 14, them - 4/0, combined - 4
Non-codec capabilities: us - 1, them - 1, combined - 1
Looking for 999 in autocontext
Transmitting (no NAT):
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 40.0.0.14:5060;rport;branch=z9hG4bK11BA20110E71407DB2457DF4FD69B374
From: AsteriskConfig <sip:202 at 30.0.0.3>;tag=3715833233
To: <sip:999 at 30.0.0.3>;tag=as72115433
Call-ID: C0647F55-F883-4089-A32D-8404FA1F1AA6 at 40.0.0.14
CSeq: 31023 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:@30.0.0.3>
Content-Length: 0


 to 40.0.0.14:5060
Sip read:
ACK sip:999 at 30.0.0.3 SIP/2.0
Via: SIP/2.0/UDP 40.0.0.14:5060;rport;branch=z9hG4bK11BA20110E71407DB2457DF4FD69B374
From: AsteriskConfig <sip:202 at 30.0.0.3>;tag=3715833233
To: <sip:999 at 30.0.0.3>;tag=as72115433
Contact: <sip:202 at 40.0.0.14:5060>
Call-ID: C0647F55-F883-4089-A32D-8404FA1F1AA6 at 40.0.0.14
CSeq: 31023 ACK
Max-Forwards: 70
Content-Length: 0

I always get a "Not Found" error. What am I doing wrong? Please let me know if I can send you my sip.conf and extensions.conf files?

Here's a snippet of the sip.conf file:
;
; SIP Configuration for Asterisk
;
[general]
port = 5060                     ; Port to bind to
bindaddr = 0.0.0.0              ; Address to bind to
context = default               ; Default for incoming calls
;srvlookup = yes                ; Enable SRV lookups on outbound calls
;pedantic = yes                 ; Enable slow, pedantic checking for Pingtel
;tos=lowdelay
;tos=184
;maxexpirey=3600                ; Max length of incoming registration we allow
;defaultexpirey=120             ; Default length of incoming/outoing registration
;notifymimetype=text/plain      ; Allow overriding of mime type in NOTIFY
;videosupport=yes               ; Turn on support for SIP video
disallow=all                    ; Disallow all codecs
;allow=ulaw                     ; Allow codecs in order of preference
;allow=ilbc
;VoWLAN testing!
allow=ulaw
allow=alaw
allow=gsm
;allow=all
;
;register => 1234 at mysipprovider.com     ; Register with a SIP provider
;register => 2345 at mysipprovider.com/1234 ; Register 2345 at sip provider as 1234 here.
;
;[snomsip]
;type=friend
;secret=blah
;host=dynamic
;dtmfmode=inband                ; Choices are inband, rfc2833, or info
;defaultip=192.168.0.59
;mailbox=1234,2345              ; Mailbox for message waiting indicator
;restrictcid=yes                ; To have the callerid restriced -> sent as ANI

[30.0.0.1]
context=pstn-incoming
type=friend
host=30.0.0.1
;dtmfmode=rfc2833
dtmfmode=info
;defaultip=30.0.0.1
disallow=all
allow=ulaw
allow=alaw
allow=gsm

[999]
context=pstn-incoming
type=friend
host=30.0.0.1
defaultip=30.0.0.1
disallow=all
allow=ulaw
allow=alaw
allow=gsm

Extensions.conf snippet

;
; Static extension configuration files, used by
; the pbx_config module.
;
; 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

;
; 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
TRUNKMSD=1                                      ; MSD digits to strip (usually 1 or 0)
;TRUNK=IAX2/user:pass at provider
;

; test setup!!
[pstn-incoming]
exten => 999,1,Dial,SIP/999 at 30.0.0.1;
exten => 201,1,Dial(SIP/201,20)
exten => 202,1,Dial(SIP/202,20)
;include=> lan-phones
;include=> pstn-outbound
include=> autocontext

[pstn-outbound]
exten=> _9XXX, 1, SIP/${EXTEN}@30.0.0.1;

[lan-phones]
exten => 201, 1, Dial(SIP/201,20)
exten => 202, 1, Dial(SIP/202,20)

;
; 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 www.gnophone.com or www.iaxtel.com
;
[iaxtel700]
exten => _91700NXXXXXX,1,Dial(IAX2/${IAXINFO}@iaxtel.com/${EXTEN:1}@iaxtel)

[iaxprovider]
;switch => IAX2/user:[key]@myserver/mycontext

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


Thanks a lot for your patience in going through the email. Look forward to hearing from you soon.
Regards,
Arun.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20041122/c285434b/attachment.htm


More information about the asterisk-users mailing list