All pastes #756542 Raw Edit

Someone

public text v1 · immutable
#756542 ·published 2007-10-31 15:51 UTC
rendered paste body
-------------------------------sip.conf

[general]
context=incoming_acanac         ; Default context for incoming calls
insecure=very
recordhistory=yes               ; Record SIP history by default 
                                ; (see sip history / sip no history)
;realm=mydomain.tld             ; Realm for digest authentication
                                ; defaults to "asterisk"
                                ; Realms MUST be globally unique according to RFC 3261
                                ; Set this to your host name or domain name
bindport=5060                   ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0                ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes                   ; Enable DNS SRV lookups on outbound calls
                                ; Note: Asterisk only uses the first host 
                                ; in SRV records
                                ; Disabling DNS SRV lookups disables the 
                                ; ability to place SIP calls based on domain 
                                ; names to some other SIP users on the Internet

dtmfmode=rfc2833                ; Choices are inband, rfc2833, or info
;dtmfmode=inband                        ; Choices are inband, rfc2833, or info

;pedantic=yes                   ; Enable slow, pedantic checking for Pingtel
                                ; and multiline formatted headers for strict
                                ; SIP compatibility (defaults to "no")
;tos=184                        ; Set IP QoS to either a keyword or numeric val
;tos=lowdelay                   ; lowdelay,throughput,reliability,mincost,none
maxexpirey=30                   ; Max length of incoming registration we allow
defaultexpirey=180              ; Default length of incoming/outoing registration
;notifymimetype=text/plain      ; Allow overriding of mime type in MWI NOTIFY
;videosupport=yes               ; Turn on support for SIP video

disallow=all                    ; First disallow all codecs
allow=ulaw                      ; Allow codecs in order of preference
allow=alaw                      ; Allow codecs in order of preference
allow=gsm                       ; Allow codecs in order of preference

;Been playing with g729, won�t work if disbabled, says, �No supported codecs�
;Otherwise it says, Can�t translate to ZAP.
;allow=g729                     ; Allow codecs in order of preference

;allow=ilbc                     ; Note: codec order is respected only in [general]
;musicclass=default             ; Sets the default music on hold class for all SIP calls
                                ; This may also be set for individual users/peers
;language=en                    ; Default language setting for all users/peers
                                ; This may also be set for individual users/peers
relaxdtmf=yes                   ; Relax dtmf handling
;rtptimeout=60                  ; Terminate call if 60 seconds of no RTP activity
                                ; when we're not on hold
;rtpholdtimeout=300             ; Terminate call if 300 seconds of no RTP activity
                                ; when we're on hold (must be > rtptimeout)
;trustrpid = no                 ; If Remote-Party-ID should be trusted
;progressinband=no              ; If we should generate in-band ringing always
useragent=Asterisk              ; Allows you to change the user agent string
canreinvite=yes
echocancel=yes
echocanelwhenbridge=yes
nat=yes                 ; NAT settings 
externip=**.***.***.***
localnet=192.168.1.130/255.255.255.0
canreinvite=no

[acanac]
type=friend
username=123456789
fromuser=123456789
secret=********
host=myhost.ca
fromdomain=myhost.ca
qualify=no
dtmfmode=rfc2833                        ; either RFC2833 or INFO for the BudgeTone
allow=ulaw                      ; Allow codecs in order of preference
allow=alaw                      ; Allow codecs in order of preference
allow=gsm                       ; Allow codecs in order of preference
;allow=g729                     ; Allow codecs in order of preference
insecure=very

[acanac_out]
type=peer
username=7806283922
secret=**********
host=myhost.ca
qualify=no
dtmfmode=rfc2833                        ; either RFC2833 or INFO for the BudgeTone
allow=ulaw                      ; Allow codecs in order of preference
allow=alaw                      ; Allow codecs in order of preference
allow=gsm                       ; Allow codecs in order of preference
;allow=g729                     ; Allow codecs in order of preference
insecure=very


----------------------------------extensions.conf
 [globals]
DYNAMIC_FEATURES=>automon

[incoming]
; incoming calls from the FXO port are directed to this context from zapata.conf
exten => s,1,Answer()
exten => s,2,Dial(Zap/1,10,r)
;exten => s,2,Echo()

[clone]
; incoming calls from the FXO port are directed to this context from zapata.conf
exten => s,1,Answer()
exten => s,2,Dial(Zap/1,10,r)

[internal]
exten => 4,1,Answer()
exten => 4,2,Dial(Zap/6)
exten => 5,1,VoiceMail(1234@default)
exten => 6,1,VoiceMailMain(1234@default)
exten => 7,1,Monitor(wav,/var/spool/asterisk/monitor/recording,m)  
exten => 8,1,Answer()
exten => 8,2,MusicOnHold()
exten => 9,1,Answer()
exten => 9,2,Dial(Zap/5)

[iaxy]
exten => 9,1,Answer()
exten => 9,2,Dial(Zap/1,10,r)
;exten => 9,1,Dial(Zap/5)

[incoming_acanac]
exten => phone,1,NoOp(--- ${CALLERID} calling on Acanac (${EXTEN}) ---)
;exten => phone,2,Dial(SIP/ZAP/1,20)
exten => phone,2,Dial(Zap/1,10,r)
exten => phone,3,Answer
exten => phone,4,Wait,1
exten => phone,5,Voicemail(u1234)
exten => phone,6,HangUp 

[outgoing_acanac]
exten => _9.,1,Dial(SIP/${EXTEN:2}@acanac,60)
exten => _9.,2,Congestion



-------------------------------zapata.conf
;
; Zapata telephony interface
;
; Configuration file

[trunkgroups]

echocancel=yes
echotraining=yes
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
group=1
callgroup=1
pickupgroup=1

; Produce a dial-tone when fxs pickup.
immediate=yes

[channels]

context=outgoing_acanac      ; Uses the [internal] context in extensions.conf
signalling=fxo_ks       ; Use FXO signalling for an FXS channel
channel => 1            ; Telephone attached to port 1

context=incoming        ; Incoming calls go to [incoming] in extensions.conf
signalling=fxs_ks       ; Use FXS signalling for an FXO channel
channel => 5            ; PSTN attached to port 2

context=clone           ; Incoming calls go to [incoming] in extensions.conf
signalling=fxs_ks       ; Use FXS signalling for an FXO channel
channel => 6            ; PSTN attached to port 2



-------------------------SIP debug with G729 DISABLED
1 active SIP channel
*CLI> sip show channels
Peer                     User/ANR    Call ID            Seq (Tx/Rx)   Form  Hold     Last Message   
**.***.***.**     123456789    3752b4801cb  00117/00000  unkn  No                      
1 active SIP channel
*CLI> 
<-- SIP read from **.***.***.**:5060: 
INVITE sip:phone@myrouter SIP/2.0
Via: SIP/2.0/UDP **.***.***.**:5060;branch=z9hG4bK6ba76221;rport
From: "123456789" <sip:123456789@**.***.***.**>;tag=as766bc73d
To: <sip:phone@myrouter>
Contact: <sip:123456789@**.***.***.**>
Call-ID: 4110cf1073d82288691e34b1723ce464@**.***.***.**
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Sat, 04 Mar 2006 02:12:56 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Content-Type: application/sdp
Content-Length: 216

v=0
o=root 1731 1731 IN IP4 **.***.***.**
s=session
c=IN IP4 **.***.***.**
t=0 0
m=audio 14856 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

--- (12 headers 10 lines)---
Using INVITE request as basis request - 4110cf1073d82288691e34b1723ce464@**.***.***.**
Sending to **.***.***.** : 5060 (NAT)
Found peer 'acanac_out'
Found RTP audio format 18
Found RTP audio format 101
Peer audio RTP is at port **.***.***.**:14856
Found description format G729
Found description format telephone-event
Capabilities: us - 0xe (gsm|ulaw|alaw), peer - audio=0x100 (g729)/video=0x0 (nothing), combined - 0x0 (nothing)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Mar  3 17:10:18 NOTICE[20044]: chan_sip.c:3588 process_sdp: No compatible codecs!
Transmitting (NAT) to **.***.***.**:5060:
SIP/2.0 488 Not acceptable here
Via: SIP/2.0/UDP **.***.***.**:5060;branch=z9hG4bK6ba76221;received=**.***.***.**;rport=5060
From: "123456789" <sip:123456789@**.***.***.**>;tag=as766bc73d
To: <sip:phone@myrouter>;tag=as46bd1a1f
Call-ID: 4110cf1073d82288691e34b1723ce464@**.***.***.**
CSeq: 102 INVITE
User-Agent: Asterisk
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Max-Forwards: 70
Contact: <sip:phone@myrouter>
Content-Length: 0


---
Destroying call '4110cf1073d82288691e34b1723ce464@**.***.***.**'

<-- SIP read from **.***.***.**:5060: 
ACK sip:phone@myrouter SIP/2.0
Via: SIP/2.0/UDP **.***.***.**:5060;branch=z9hG4bK6ba76221;rport
From: "123456789" <sip:123456789@**.***.***.**>;tag=as766bc73d
To: <sip:phone@myrouter>;tag=as46bd1a1f
Contact: <sip:123456789@**.***.***.**>
Call-ID: 4110cf1073d82288691e34b1723ce464@**.***.***.**
CSeq: 102 ACK
User-Agent: Asterisk PBX
Content-Length: 0



--------------------------------------SIP debug with G729 enabled!

<-- SIP read from myvoipprovider.ca:5060: 
INVITE sip:phone@myrouter SIP/2.0
Via: SIP/2.0/UDP myvoipprovider.ca:5060;branch=z9hG4bK0d45414f;rport
From: "123456789" <sip:123456789@myvoipprovider.ca>;tag=as2c79b5ec
To: <sip:phone@myrouter>
Contact: <sip:123456789@myvoipprovider.ca>
Call-ID: 2d862500539574a555872b7b3fae0e4a@myvoipprovider.ca
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Sat, 04 Mar 2006 02:19:45 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Content-Type: application/sdp
Content-Length: 216

v=0
o=root 1731 1731 IN IP4 myvoipprovider.ca
s=session
c=IN IP4 myvoipprovider.ca
t=0 0
m=audio 29888 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

--- (12 headers 10 lines)---
Using INVITE request as basis request - 2d862500539574a555872b7b3fae0e4a@myvoipprovider.ca
Sending to myvoipprovider.ca : 5060 (NAT)
Found peer 'acanac_out'
Found RTP audio format 18
Found RTP audio format 101
Peer audio RTP is at port myvoipprovider.ca:29888
Found description format G729
Found description format telephone-event
Capabilities: us - 0x10e (gsm|ulaw|alaw|g729), peer - audio=0x100 (g729)/video=0x0 (nothing), combined - 0x100 (g729)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Looking for phone in incoming_acanac (domain myrouter)
list_route: hop: <sip:123456789@myvoipprovider.ca>
Transmitting (NAT) to myvoipprovider.ca:5060:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP myvoipprovider.ca:5060;branch=z9hG4bK0d45414f;received=myvoipprovider.ca;rport=5060
From: "123456789" <sip:123456789@myvoipprovider.ca>;tag=as2c79b5ec
To: <sip:phone@myrouter>
Call-ID: 2d862500539574a555872b7b3fae0e4a@myvoipprovider.ca
CSeq: 102 INVITE
User-Agent: Asterisk
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Max-Forwards: 70
Contact: <sip:phone@myrouter>
Content-Length: 0


---
    -- Executing NoOp("SIP/7806283922-db29", "--- "123456789" <123456789> calling on Acanac (phone) ---") in new stack
    -- Executing Dial("SIP/7806283922-db29", "Zap/1|10|r") in new stack
Mar  3 17:17:07 WARNING[20136]: channel.c:2494 ast_request: No translator path exists for channel type Zap (native 68) to 256
Mar  3 17:17:07 NOTICE[20136]: app_dial.c:1011 dial_exec_full: Unable to create channel of type 'Zap' (cause 0 - Unknown)
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing Answer("SIP/7806283922-db29", "") in new stack
We're at myrouter port 16874
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding codec 0x2 (gsm) to SDP
Adding codec 0x100 (g729) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to myvoipprovider.ca:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP myvoipprovider.ca:5060;branch=z9hG4bK0d45414f;received=myvoipprovider.ca;rport=5060
From: "123456789" <sip:123456789@myvoipprovider.ca>;tag=as2c79b5ec
To: <sip:phone@myrouter>;tag=as3490dd4d
Call-ID: 2d862500539574a555872b7b3fae0e4a@myvoipprovider.ca
CSeq: 102 INVITE
User-Agent: Asterisk
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Max-Forwards: 70
Contact: <sip:phone@myrouter>
Content-Type: application/sdp
Content-Length: 312

v=0
o=root 20033 20033 IN IP4 myrouter
s=session
c=IN IP4 myrouter
t=0 0
m=audio 16874 RTP/AVP 0 8 3 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=noa=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

---
    -- Executing Wait("SIP/7806283922-db29", "1") in new stack

<-- SIP read from myvoipprovider.ca:5060: 
ACK sip:phone@myrouter SIP/2.0
Via: SIP/2.0/UDP myvoipprovider.ca:5060;branch=z9hG4bK1704c8d7;rport
From: "123456789" <sip:123456789@myvoipprovider.ca>;tag=as2c79b5ec
To: <sip:phone@myrouter>;tag=as3490dd4d
Contact: <sip:123456789@myvoipprovider.ca>
Call-ID: 2d862500539574a555872b7b3fae0e4a@myvoipprovider.ca
CSeq: 102 ACK
User-Agent: Asterisk PBX
Content-Length: 0


--- (9 headers 0 lines)---

Peer             User/ANR    Call ID      Seq (Tx/Rx)  Form  Hold     Last Message   
myvoipprovider.ca     7806283922  2d862500539  00101/00102  g729  No       Rx: ACK        
1 active SIP channel
*CLI> sip show channels
Peer             User/ANR    Call ID      Seq (Tx/Rx)  Form  Hold     Last Message   
myvoipprovider.ca     7806283922  2d862500539  00101/00102  g729  No       Rx: ACK        
1 active SIP channel
    -- Executing VoiceMail("SIP/7806283922-db29", "u1234") in new stack
Mar  3 17:17:08 WARNING[20136]: channel.c:2313 set_format: Unable to find a codec translation path from g729 to gsm
Mar  3 17:17:08 WARNING[20136]: file.c:820 ast_streamfile: Unable to open /var/spool/asterisk/voicemail/default/1234/unavail (format g729): No such file or directory
Mar  3 17:17:08 WARNING[20136]: channel.c:2313 set_format: Unable to find a codec translation path from g729 to gsm
Mar  3 17:17:08 WARNING[20136]: file.c:820 ast_streamfile: Unable to open vm-intro (format g729): No such file or directory
  == Spawn extension (incoming_acanac, phone, 5) exited non-zero on 'SIP/7806283922-db29'
set_destination: Parsing <sip:123456789@myvoipprovider.ca> for address/port to send to
set_destination: set destination to myvoipprovider.ca, port 5060
Reliably Transmitting (NAT) to myvoipprovider.ca:5060:
BYE sip:123456789@myvoipprovider.ca SIP/2.0
Via: SIP/2.0/UDP myrouter:5060;branch=z9hG4bK02a45ef3;rport
From: <sip:phone@myrouter>;tag=as3490dd4d
To: "123456789" <sip:123456789@myvoipprovider.ca>;tag=as2c79b5ec
Contact: <sip:phone@myrouter>
Call-ID: 2d862500539574a555872b7b3fae0e4a@myvoipprovider.ca
CSeq: 102 BYE
User-Agent: Asterisk
Max-Forwards: 70
Content-Length: 0


---

<-- SIP read from myvoipprovider.ca:5060: 
SIP/2.0 200 OK
Via: SIP/2.0/UDP myrouter:5060;branch=z9hG4bK02a45ef3;received=myrouter;rport=5060
From: <sip:phone@myrouter>;tag=as3490dd4d
To: "123456789" <sip:123456789@myvoipprovider.ca>;tag=as2c79b5ec
Call-ID: 2d862500539574a555872b7b3fae0e4a@myvoipprovider.ca
CSeq: 102 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Contact: <sip:123456789@myvoipprovider.ca>
Content-Length: 0
X-Asterisk-HangupCause:: Normal Clearing


--- (11 headers 0 lines)---
Destroying call '2d862500539574a555872b7b3fae0e4a@myvoipprovider.ca'

<-- SIP read from myvoipprovider.ca:5060: 
OPTIONS sip:phone@myrouter SIP/2.0
Via: SIP/2.0/UDP myvoipprovider.ca:5060;branch=z9hG4bK5d1ae956
From: "asterisk" <sip:asterisk@myvoipprovider.ca>;tag=as2c401340
To: <sip:phone@myrouter>
Contact: <sip:asterisk@myvoipprovider.ca>
Call-ID: 6bec3dbe41736939012177831e0505b0@myvoipprovider.ca
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Date: Sat, 04 Mar 2006 02:19:48 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Content-Length: 0


--- (11 headers 0 lines)---
Looking for phone in incoming_acanac (domain myrouter)
Transmitting (NAT) to myvoipprovider.ca:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP myvoipprovider.ca:5060;branch=z9hG4bK5d1ae956;received=myvoipprovider.ca
From: "asterisk" <sip:asterisk@myvoipprovider.ca>;tag=as2c401340
To: <sip:phone@myrouter>;tag=as7d95e89b
Call-ID: 6bec3dbe41736939012177831e0505b0@myvoipprovider.ca
CSeq: 102 OPTIONS
User-Agent: Asterisk
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Max-Forwards: 70
Contact: <sip:myrouter>
Accept: application/sdp
Content-Length: 0