[AsteriskBrasil] Linha Tmais - ***RESOLVIDO***

Felipe Trevisan felipe em rentaltools.com.br
Sexta Julho 27 10:11:06 BRT 2007


 So precisei mudar o context no sip.conf. Ali onde estava escrito context =
from-sip-external, mudei para from-trunk. E resolveu.



[general]

language=pt_br
bindport = 5060           ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0    ; Address to bind to (all addresses on machine)
disallow=all
allow=ulaw
allow=alaw
nat=yes
localnet=192.168.0.0/24
exterip=201.6.93.85  

; If you need to answer unauthenticated calls, you should change this
; next line to 'from-trunk', rather than 'from-sip-external'.
; You'll know this is happening if when you call in you get a message
; saying "The number you have dialed is not in service. Please check the
; number and try again."
context = from-trunk ; Send unknown SIP callers to this context
callerid = Unknown
tos=0x68



------------------------------------
Felipe Trevisan
R. Brejo Alegre, 172
Brooklin
04557-050  São Paulo, SP
tel: (55 11) 5044-2240
Skype ID:trevisa
------------------------------------

-----Original Message-----
From: asteriskbrasil-bounces em listas.asteriskbrasil.org
[mailto:asteriskbrasil-bounces em listas.asteriskbrasil.org] On Behalf Of
Felipe Trevisan
Sent: quarta-feira, 25 de julho de 2007 21:56
To: asteriskbrasil em listas.asteriskbrasil.org
Subject: Re: [AsteriskBrasil] Linha Tmais


Lista, 


Segue o log do putty, abaixo:
O peer TMAIS esta registrado.
Verbose em 3

A sequencia do log é a seguinte: 
1-Entro como root
2-Recebo uma chamada (ou tento receber uma chamada. Eu disco do meu cel, e o
dialogo dos servidores aparecem no debug, mas entao cai na msg, de que o
telefone esta fora de serviço) - Acabei de fazer um outro teste. Mudei o
language no sip.conf para ingles, e a mensagem que ouvi foi em ingles!
Ou seja, o asterisk esta atendendo a chamada, mas esta direcionando para a
mensagem ao inves do ramal.

3-Disco uma chamada para o mesmo cel, atendo por um instante e desligo em
seguida


Eu tenho uma única Inbound Route, Any DID, any CID, programada para tocar no
meu ramal.

Estou conectado via virtua, IP Dinamico, não da pra inserir o
exterip=seu.endereço.ip.externo. Tentei usar o Ipo atual, mas o problema
persiste.
O modem conecta no roteador D-link que fixou o Ip do asterisk, DHCP para a
rede, menos para o *.


Meu sip.conf

[general]

language=en
bindport = 5060           ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0    ; Address to bind to (all addresses on machine)
disallow=all
allow=ulaw
allow=alaw
nat=yes
localnet=192.168.0.0/24


Meu sip_additional.conf -


[757945701]  -  incoming
username=757945701
type=friend
secret=XXXX
qualify=no
fromuser=757945701
context=from-trunk
canreinvite=no

[tmais]  -  outgoing
username=757945701
type=friend
secret=XXXX
insecure=very
host=201.12.106.139
fromuser=757945701
disallow=all
canreinvite=no
canredirect=no
auth=md5
allow=729
allow=alaw
allow=ulaw
allow=gsm


Obrigado,

Felipe

Abaixo, debug...




=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2007.07.25 21:21:17
=~=~=~=~=~=~=~=~=~=~=~= login as: root root em 192.168.0.19's password: 
Last login: Wed Jul 25 21:18:03 2007 from 192.168.0.8 Welcome to trixbox
-------------------------------------------------

For access to the trixbox web GUI use this URL
http://192.168.0.19

For help on trixbox commands you can use from this command shell type
help-trixbox.

[root em asterisk1 ~]# asterisk -rv

Asterisk 1.2.20, Copyright (C) 1999 - 2007 Digium, Inc. and others.

Created by Mark Spencer <markster em digium.com>

Asterisk comes with ABSOLUTELY NO WARRANTY; type 'show warranty' for
details.

This is free software, with components licensed under the GNU General Public

License version 2 and other licenses; you are welcome to redistribute it
under

certain conditions. Type 'show license' for details.

=========================================================================

Connected to Asterisk 1.2.20 currently running on asterisk1 (pid = 3138)
asterisk1*CLI> Verbosity is at least 1

asterisk1*CLI> sip verbose 3 asterisk1*CLI> No such command 'sip verbose'
(type 'help' for help)

asterisk1*CLI> set verbose 3 asterisk1*CLI> Verbosity was 1 and is now 3

asterisk1*CLI> sip show registry asterisk1*CLI> 
Host                            Username       Refresh State               
201.12.106.139:5060             757945701           45 Registered          

asterisk1*CLI>
Destroying call '09ee058b451e3ced68b883323f342eec em 127.0.0.1'

asterisk1*CLI>  <-- SIP read from 201.12.106.139:5060: 
INVITE sip:757945701 em 201.6.93.85:5060 SIP/2.0 Via: SIP/2.0/UDP
201.12.106.139:5060;branch=z9hG4bK46a7e434-1508-1 To:
<sip:757945701 em 192.168.0.19:5060> From:
<sip:1178089596 em 201.12.106.139:5060>;tag=ff51869e-ensOBJ05384 Call-ID:
46a7e434000006000000080020a73cbc em ens.com CSeq: 9590 INVITE Max-Forwards: 70
Contact: <sip:1178089596 em 201.12.106.139:5060> Content-Type: application/sdp
Content-Length: 324  v=0 o=- 4283532958 4283532958 IN IP4 201.12.106.139
s=ENS Session c=IN IP4 201.12.106.141 t=0 0 m=audio 6656 RTP/AVP 18 0 4 8 3
101 a=rtpmap:18 G729/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:4 G723/8000
a=rtpmap:8 PCMA/8000 a=rtpmap:3 GSM/8000 a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15 a=ptime:20 a=sendrecv
--- (10 headers 15 lines) ---
Using INVITE request as basis request -
46a7e434000006000000080020a73cbc em ens.com
Sending to 201.12.106.139 : 5060 (NAT)
Found peer 'tmais'
Found RTP audio format 18
Found RTP audio format 0
Found RTP audio format 4
Found RTP audio format 8
Found RTP audio format 3
Found RTP audio format 101
Peer audio RTP is at port 201.12.106.141:6656 Found description format G729
Found description format PCMU Found description format G723 Found
description format PCMA Found description format GSM Found description
format telephone-event
Capabilities: us - 0xe (gsm|ulaw|alaw), peer - audio=0x10f
(g723|gsm|ulaw|alaw|g729)/video=0x0 (nothing), combined - 0xe
(gsm|ulaw|alaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1
(telephone-event), combined - 0x1 (telephone-event) Looking for 757945701 in
from-sip-external (domain 201.6.93.85)
list_route: hop: <sip:1178089596 em 201.12.106.139:5060>
Transmitting (NAT) to 201.12.106.139:5060:
SIP/2.0 100 Trying Via: SIP/2.0/UDP
201.12.106.139:5060;branch=z9hG4bK46a7e434-1508-1;received=201.12.106.139
From: <sip:1178089596 em 201.12.106.139:5060>;tag=ff51869e-ensOBJ05384 To:
<sip:757945701 em 192.168.0.19:5060> Call-ID:
46a7e434000006000000080020a73cbc em ens.com CSeq: 9590 INVITE User-Agent:
Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
NOTIFY Contact: <sip:757945701 em 192.168.0.19> Content-Length: 0
---
    -- Executing NoOp("SIP/757945701-09baab48", "Received incoming SIP
connection from unknown peer to 757945701") in new stack
    -- Executing Set("SIP/757945701-09baab48", "DID=757945701") in new stack
    -- Executing Goto("SIP/757945701-09baab48", "s|1") in new stack
    -- Goto (from-sip-external,s,1)
    -- Executing Ringing("SIP/757945701-09baab48", "") in new stack
Transmitting (NAT) to 201.12.106.139:5060:
SIP/2.0 180 Ringing Via: SIP/2.0/UDP
201.12.106.139:5060;branch=z9hG4bK46a7e434-1508-1;received=201.12.106.139
From: <sip:1178089596 em 201.12.106.139:5060>;tag=ff51869e-ensOBJ05384 To:
<sip:757945701 em 192.168.0.19:5060>;tag=as24b6c44f Call-ID:
46a7e434000006000000080020a73cbc em ens.com CSeq: 9590 INVITE User-Agent:
Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
NOTIFY Contact: <sip:757945701 em 192.168.0.19> Content-Length: 0
---
    -- Executing GotoIf("SIP/757945701-09baab48",
"0?from-trunk|757945701|1") in new stack
    -- Executing Set("SIP/757945701-09baab48", "TIMEOUT(absolute)=15") in
new stack
    -- Channel will hangup at 2007-07-26 00:22:09 UTC.
    -- Executing Answer("SIP/757945701-09baab48", "") in new stack We're at
192.168.0.19 port 11638 Adding codec 0x8 (alaw) to SDP Adding codec 0x4
(ulaw) to SDP Adding codec 0x2 (gsm) to SDP Adding non-codec 0x1
(telephone-event) to SDP Reliably Transmitting (NAT) to 201.12.106.139:5060:
SIP/2.0 200 OK Via: SIP/2.0/UDP
201.12.106.139:5060;branch=z9hG4bK46a7e434-1508-1;received=201.12.106.139
From: <sip:1178089596 em 201.12.106.139:5060>;tag=ff51869e-ensOBJ05384 To:
<sip:757945701 em 192.168.0.19:5060>;tag=as24b6c44f Call-ID:
46a7e434000006000000080020a73cbc em ens.com CSeq: 9590 INVITE User-Agent:
Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
NOTIFY Contact: <sip:757945701 em 192.168.0.19> Content-Type: application/sdp
Content-Length: 261  v=0 o=root 3138 3138 IN IP4 192.168.0.19 s=session c=IN
IP4 192.168.0.19 t=0 0 m=audio 11638 RTP/AVP 8 0 3 101 a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000 a=rtpmap:3 GSM/8000 a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16 a=silenceSupp:off - - - -
---
    -- Executing Wait("SIP/757945701-09baab48", "2") in new stack

asterisk1*CLI>  <-- SIP read from 201.12.106.139:5060: 
ACK sip:757945701 em 201.6.93.85:5060 SIP/2.0 Via: SIP/2.0/UDP
201.12.106.139:5060;branch=z9hG4bK46a7e434-1508-2 To:
<sip:757945701 em 192.168.0.19:5060>;tag=as24b6c44f From:
<sip:1178089596 em 201.12.106.139:5060>;tag=ff51869e-ensOBJ05384 Call-ID:
46a7e434000006000000080020a73cbc em ens.com CSeq: 9590 ACK Max-Forwards: 70
User-Agent: Entice_2.3__Build_11-RG1310-EP14015-COBJ5384 Content-Length: 0
--- (9 headers 0 lines) ---

asterisk1*CLI> 
    -- Executing Playback("SIP/757945701-09baab48", "ss-noservice") in new
stack
    -- Playing 'ss-noservice' (language 'pt_BR')

asterisk1*CLI>
REGISTER 12 headers, 0 lines
Reliably Transmitting (NAT) to 201.12.106.139:5060:
REGISTER sip:201.12.106.139 SIP/2.0 Via: SIP/2.0/UDP
192.168.0.19:5060;branch=z9hG4bK34d9e396;rport From:
<sip:757945701 em 201.12.106.139>;tag=as3117580c To:
<sip:757945701 em 201.12.106.139> Call-ID:
09ee058b451e3ced68b883323f342eec em 127.0.0.1 CSeq: 125 REGISTER User-Agent:
Asterisk PBX Max-Forwards: 70 Expires: 120 Contact:
<sip:757945701 em 192.168.0.19> Event: registration Content-Length: 0
---

asterisk1*CLI>  <-- SIP read from 201.12.106.139:5060: 
SIP/2.0 200 OK Via: SIP/2.0/UDP
192.168.0.19:5060;rport=5060;received=201.6.93.85;branch=z9hG4bK34d9e396 To:
<sip:757945701 em 201.12.106.139>;tag=ff744850-05886 From:
<sip:757945701 em 201.12.106.139>;tag=as3117580c Call-ID:
09ee058b451e3ced68b883323f342eec em 127.0.0.1 CSeq: 125 REGISTER Expires: 60
Contact: <sip:757945701 em 192.168.0.19:5060> User-Agent:
Entice_2.3__Build_11-RG1310-EP14015-COBJ5886 Content-Length: 0
--- (10 headers 0 lines) ---
Scheduling destruction of call '09ee058b451e3ced68b883323f342eec em 127.0.0.1'
in 32000 ms

asterisk1*CLI>  <-- SIP read from 201.12.106.139:5060: 
BYE sip:757945701 em 201.6.93.85:5060 SIP/2.0 Via: SIP/2.0/UDP
201.12.106.139:5060;branch=z9hG4bK46a7e434-1508-3 To:
<sip:757945701 em 192.168.0.19:5060>;tag=as24b6c44f From:
<sip:1178089596 em 201.12.106.139:5060>;tag=ff51869e-ensOBJ05384 Call-ID:
46a7e434000006000000080020a73cbc em ens.com CSeq: 9600 BYE Max-Forwards: 70
Content-Length: 0
--- (8 headers 0 lines) ---
Sending to 201.12.106.139 : 5060 (NAT)
Transmitting (NAT) to 201.12.106.139:5060:
SIP/2.0 200 OK Via: SIP/2.0/UDP
201.12.106.139:5060;branch=z9hG4bK46a7e434-1508-3;received=201.12.106.139
From: <sip:1178089596 em 201.12.106.139:5060>;tag=ff51869e-ensOBJ05384 To:
<sip:757945701 em 192.168.0.19:5060>;tag=as24b6c44f Call-ID:
46a7e434000006000000080020a73cbc em ens.com CSeq: 9600 BYE User-Agent: Asterisk
PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:757945701 em 192.168.0.19> Content-Length: 0
---
  == Spawn extension (from-sip-external, s, 6) exited non-zero on
'SIP/757945701-09baab48'
    -- Executing NoOp("SIP/757945701-09baab48", "Hangup") in new stack
    -- Executing Set("SIP/757945701-09baab48", "DID=s") in new stack
    -- Executing Goto("SIP/757945701-09baab48", "s|1") in new stack
    -- Goto (from-sip-external,s,1)
    -- Executing Ringing("SIP/757945701-09baab48", "") in new stack
    -- Executing GotoIf("SIP/757945701-09baab48", "0?from-trunk|s|1") in new
stack
    -- Executing Set("SIP/757945701-09baab48", "TIMEOUT(absolute)=15") in
new stack
    -- Channel will hangup at 2007-07-26 00:22:16 UTC.
    -- Executing Answer("SIP/757945701-09baab48", "") in new stack
  == Spawn extension (from-sip-external, s, 4) exited non-zero on
'SIP/757945701-09baab48'

asterisk1*CLI>
Destroying call '46a7e434000006000000080020a73cbc em ens.com'

asterisk1*CLI> 
    -- Executing Macro("SIP/16-09baab48", "dialout-trunk|2|78089596||") in
new stack
    -- Executing Set("SIP/16-09baab48", "DIAL_TRUNK=2") in new stack
    -- Executing Set("SIP/16-09baab48", "_NODEST=") in new stack
    -- Executing Set("SIP/16-09baab48", "DIAL_NUMBER=78089596") in new stack
    -- Executing Set("SIP/16-09baab48", "ROUTE_PASSWD=") in new stack
    -- Executing Set("SIP/16-09baab48", "DIAL_TRUNK_OPTIONS=tr") in new
stack
    -- Executing GotoIf("SIP/16-09baab48", "1?noauth") in new stack
    -- Goto (macro-dialout-trunk,s,8)
    -- Executing Set("SIP/16-09baab48", "GROUP()=OUT_2") in new stack
    -- Executing Macro("SIP/16-09baab48", "user-callerid|SKIPTTL") in new
stack
    -- Executing NoOp("SIP/16-09baab48", "user-callerid: device 16") in new
stack
    -- Executing GotoIf("SIP/16-09baab48", "0?report") in new stack
    -- Executing GotoIf("SIP/16-09baab48", "0?start") in new stack
    -- Executing Set("SIP/16-09baab48", "REALCALLERIDNUM=16") in new stack
    -- Executing NoOp("SIP/16-09baab48", "REALCALLERIDNUM is 16") in new
stack
    -- Executing Set("SIP/16-09baab48", "AMPUSER=16") in new stack
    -- Executing Set("SIP/16-09baab48", "AMPUSERCIDNAME=Pipo") in new stack
    -- Executing GotoIf("SIP/16-09baab48", "0?report") in new stack
    -- Executing Set("SIP/16-09baab48", "CALLERID(all)=Pipo <16>") in new
stack
    -- Executing Set("SIP/16-09baab48", "REALCALLERIDNUM=16") in new stack
    -- Executing NoOp("SIP/16-09baab48", "TTL:  ARG1: SKIPTTL") in new stack
    -- Executing GotoIf("SIP/16-09baab48", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,21)
    -- Executing NoOp("SIP/16-09baab48", "Using CallerID "Pipo" <16>") in
new stack
    -- Executing Macro("SIP/16-09baab48", "record-enable|16|OUT") in new
stack
    -- Executing GotoIf("SIP/16-09baab48", "0?2:4") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing DeadAGI("SIP/16-09baab48",
"recordingcheck|20070725-212210|1185409330.14") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck

asterisk1*CLI>
  recordingcheck|20070725-212210|1185409330.14: Outbound recording not
enabled

asterisk1*CLI> 
    -- AGI Script recordingcheck completed, returning 0
    -- Executing NoOp("SIP/16-09baab48", "No recording needed") in new stack
    -- Executing GotoIf("SIP/16-09baab48", "0?skipoutcid") in new stack
    -- Executing Set("SIP/16-09baab48", "DIAL_TRUNK_OPTIONS=") in new stack
    -- Executing Macro("SIP/16-09baab48", "outbound-callerid|2") in new
stack
    -- Executing GotoIf("SIP/16-09baab48", "1?start") in new stack
    -- Goto (macro-outbound-callerid,s,3)
    -- Executing NoOp("SIP/16-09baab48", "REALCALLERIDNUM is 16") in new
stack
    -- Executing GotoIf("SIP/16-09baab48", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,9)
    -- Executing Set("SIP/16-09baab48", "USEROUTCID=") in new stack
    -- Executing Set("SIP/16-09baab48", "EMERGENCYCID=") in new stack
    -- Executing Set("SIP/16-09baab48", "TRUNKOUTCID=1126264773") in new
stack
    -- Executing GotoIf("SIP/16-09baab48", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,16)
    -- Executing GotoIf("SIP/16-09baab48", "0?usercid") in new stack
    -- Executing Set("SIP/16-09baab48", "CALLERID(all)=1126264773") in new
stack
    -- Executing GotoIf("SIP/16-09baab48", "1?report") in new stack
    -- Goto (macro-outbound-callerid,s,22)
    -- Executing NoOp("SIP/16-09baab48", "CallerID set to "" <1126264773>")
in new stack
    -- Executing GotoIf("SIP/16-09baab48", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,16)
    -- Executing DeadAGI("SIP/16-09baab48", "fixlocalprefix") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix

asterisk1*CLI> 
    -- AGI Script fixlocalprefix completed, returning 0
    -- Executing Set("SIP/16-09baab48", "OUTNUM=78089596") in new stack
    -- Executing Set("SIP/16-09baab48", "custom=SIP/tmais") in new stack
    -- Executing GotoIf("SIP/16-09baab48", "0?customtrunk") in new stack
    -- Executing Dial("SIP/16-09baab48", "SIP/tmais/78089596|300|") in new
stack We're at 192.168.0.19 port 15398 Adding codec 0x4 (ulaw) to SDP Adding
codec 0x8 (alaw) to SDP Adding codec 0x2 (gsm) to SDP Adding non-codec 0x1
(telephone-event) to SDP
13 headers, 12 lines
Reliably Transmitting (NAT) to 201.12.106.139:5060:
INVITE sip:78089596 em 201.12.106.139 SIP/2.0 Via: SIP/2.0/UDP
192.168.0.19:5060;branch=z9hG4bK39915950;rport From: "1126264773"
<sip:757945701 em 192.168.0.19>;tag=as4cc78be8 To:
<sip:78089596 em 201.12.106.139> Contact: <sip:757945701 em 192.168.0.19> Call-ID:
5254ded758412b016be344b7473903f0 em 192.168.0.19 CSeq: 102 INVITE User-Agent:
Asterisk PBX Max-Forwards: 70 Date: Thu, 26 Jul 2007 00:22:10 GMT Allow:
INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Content-Type:
application/sdp Content-Length: 261  v=0 o=root 3138 3138 IN IP4
192.168.0.19 s=session c=IN IP4 192.168.0.19 t=0 0 m=audio 15398 RTP/AVP 0 8
3 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - -
---
    -- Called tmais/78089596

asterisk1*CLI>  <-- SIP read from 201.12.106.139:5060: 
SIP/2.0 100 Trying Via: SIP/2.0/UDP
192.168.0.19:5060;rport=5060;received=201.6.93.85;branch=z9hG4bK39915950 To:
<sip:78089596 em 201.12.106.139> From: "1126264773"
<sip:757945701 em 192.168.0.19>;tag=as4cc78be8 Call-ID:
5254ded758412b016be344b7473903f0 em 192.168.0.19 CSeq: 102 INVITE User-Agent:
Entice_2.3__Build_11-RG1310-EP14015-COBJ6757 Content-Length: 0
--- (8 headers 0 lines) ---

<-- SIP read from 201.12.106.139:5060: 
SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP
192.168.0.19:5060;rport=5060;received=201.6.93.85;branch=z9hG4bK39915950 To:
<sip:78089596 em 201.12.106.139> From: "1126264773"
<sip:757945701 em 192.168.0.19>;tag=as4cc78be8 Call-ID:
5254ded758412b016be344b7473903f0 em 192.168.0.19 CSeq: 102 INVITE User-Agent:
Entice_2.3__Build_11-RG1310-EP14015-COBJ6757 WWW-Authenticate: Digest
algorithm=MD5,nonce="ffee165a_06757",realm="emergent-netsolutions.com"
Content-Length: 0
--- (9 headers 0 lines) ---
Transmitting (NAT) to 201.12.106.139:5060:
ACK sip:78089596 em 201.12.106.139 SIP/2.0 Via: SIP/2.0/UDP
192.168.0.19:5060;branch=z9hG4bK39915950;rport From: "1126264773"
<sip:757945701 em 192.168.0.19>;tag=as4cc78be8 To:
<sip:78089596 em 201.12.106.139> Contact: <sip:757945701 em 192.168.0.19> Call-ID:
5254ded758412b016be344b7473903f0 em 192.168.0.19 CSeq: 102 ACK User-Agent:
Asterisk PBX Max-Forwards: 70 Content-Length: 0
---
We're at 192.168.0.19 port 15398
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding codec 0x2 (gsm) to SDP
Adding non-codec 0x1 (telephone-event) to SDP Reliably Transmitting (NAT) to
201.12.106.139:5060:
INVITE sip:78089596 em 201.12.106.139 SIP/2.0 Via: SIP/2.0/UDP
192.168.0.19:5060;branch=z9hG4bK4665ef34;rport From: "1126264773"
<sip:757945701 em 192.168.0.19>;tag=as4cc78be8 To:
<sip:78089596 em 201.12.106.139> Contact: <sip:757945701 em 192.168.0.19> Call-ID:
5254ded758412b016be344b7473903f0 em 192.168.0.19 CSeq: 103 INVITE User-Agent:
Asterisk PBX Max-Forwards: 70 Authorization: Digest username="757945701",
realm="emergent-netsolutions.com", algorithm=MD5,
uri="sip:78089596 em 201.12.106.139", nonce="ffee165a_06757",
response="2f94f30080dbb5ca7a63cbd48f4c6b19", opaque="" Date: Thu, 26 Jul
2007 00:22:10 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER,
SUBSCRIBE, NOTIFY Content-Type: application/sdp Content-Length: 261  v=0
o=root 3138 3139 IN IP4 192.168.0.19 s=session c=IN IP4 192.168.0.19 t=0 0
m=audio 15398 RTP/AVP 0 8 3 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16
a=silenceSupp:off - - - -
---

asterisk1*CLI>  <-- SIP read from 201.12.106.139:5060: 
SIP/2.0 100 Trying Via: SIP/2.0/UDP
192.168.0.19:5060;rport=5060;received=201.6.93.85;branch=z9hG4bK4665ef34 To:
<sip:78089596 em 201.12.106.139> From: "1126264773"
<sip:757945701 em 192.168.0.19>;tag=as4cc78be8 Call-ID:
5254ded758412b016be344b7473903f0 em 192.168.0.19 CSeq: 103 INVITE User-Agent:
Entice_2.3__Build_11-RG1310-EP14015-COBJ6763 Content-Length: 0
--- (8 headers 0 lines) ---

asterisk1*CLI>  <-- SIP read from 201.12.106.139:5060: 
SIP/2.0 183 Session Progress Via: SIP/2.0/UDP
192.168.0.19:5060;rport=5060;received=201.6.93.85;branch=z9hG4bK4665ef34 To:
<sip:78089596 em 201.12.106.139>;tag=ff4e9193-06763 From: "1126264773"
<sip:757945701 em 192.168.0.19>;tag=as4cc78be8 Call-ID:
5254ded758412b016be344b7473903f0 em 192.168.0.19 CSeq: 103 INVITE Contact:
<sip:78089596 em 201.12.106.139:5060> User-Agent:
Entice_2.3__Build_11-RG1310-EP14015-COBJ6763 Content-Type: application/sdp
Content-Length: 171
asterisk1*CLI>
v=0 o=- 4283339155 4283339155 IN IP4 201.12.106.139 s=ENS Session c=IN IP4
201.12.106.141 t=0 0 m=audio 6700 RTP/AVP 0 a=rtpmap:0 PCMU/8000 a=ptime:20
a=sendrecv
--- (10 headers 9 lines) ---
Found RTP audio format 0
Peer audio RTP is at port 201.12.106.141:6700 Found description format PCMU
Capabilities: us - 0xe (gsm|ulaw|alaw), peer - audio=0x4 (ulaw)/video=0x0
(nothing), combined - 0x4 (ulaw) Non-codec capabilities: us - 0x1
(telephone-event), peer - 0x0 (nothing), combined - 0x0 (nothing)
    -- SIP/tmais-09bc4908 is making progress passing it to SIP/16-09baab48

asterisk1*CLI>  <-- SIP read from 201.12.106.139:5060: 
SIP/2.0 200 OK Via: SIP/2.0/UDP
192.168.0.19:5060;rport=5060;received=201.6.93.85;branch=z9hG4bK4665ef34 To:
<sip:78089596 em 201.12.106.139>;tag=ff4e9193-06763 From: "1126264773"
<sip:757945701 em 192.168.0.19>;tag=as4cc78be8 Call-ID:
5254ded758412b016be344b7473903f0 em 192.168.0.19 CSeq: 103 INVITE Contact:
<sip:78089596 em 201.12.106.139:5060> User-Agent:
Entice_2.3__Build_11-RG1310-EP14015-COBJ6763 Content-Type: application/sdp
Content-Length: 227  v=0 o=- 4283339155 4283339155 IN IP4 201.12.106.139
s=ENS Session c=IN IP4 201.12.106.141 t=0 0 m=audio 6700 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16
a=ptime:20 a=sendrecv
--- (10 headers 11 lines) ---
Found RTP audio format 0
Found RTP audio format 101
Peer audio RTP is at port 201.12.106.141:6700 Found description format PCMU
Found description format telephone-event
Capabilities: us - 0xe (gsm|ulaw|alaw), peer - audio=0x4 (ulaw)/video=0x0
(nothing), combined - 0x4 (ulaw) Non-codec capabilities: us - 0x1
(telephone-event), peer - 0x1 (telephone-event), combined - 0x1
(telephone-event)
list_route: hop: <sip:78089596 em 201.12.106.139:5060>
set_destination: Parsing <sip:78089596 em 201.12.106.139:5060> for address/port
to send to
set_destination: set destination to 201.12.106.139, port 5060 Transmitting
(NAT) to 201.12.106.139:5060:
ACK sip:78089596 em 201.12.106.139:5060 SIP/2.0 Via: SIP/2.0/UDP
192.168.0.19:5060;branch=z9hG4bK63753f39;rport From: "1126264773"
<sip:757945701 em 192.168.0.19>;tag=as4cc78be8 To:
<sip:78089596 em 201.12.106.139>;tag=ff4e9193-06763 Contact:
<sip:757945701 em 192.168.0.19> Call-ID:
5254ded758412b016be344b7473903f0 em 192.168.0.19 CSeq: 103 ACK User-Agent:
Asterisk PBX Max-Forwards: 70 Content-Length: 0
---
    -- SIP/tmais-09bc4908 answered SIP/16-09baab48
    -- Attempting native bridge of SIP/16-09baab48 and SIP/tmais-09bc4908

asterisk1*CLI>  <-- SIP read from 201.12.106.139:5060: 
BYE sip:757945701 em 201.6.93.85:5060 SIP/2.0 Via: SIP/2.0/UDP
201.12.106.139:5060;branch=z9hG4bK46a7e444-1a6b-1 To: "1126264773"
<sip:757945701 em 192.168.0.19>;tag=as4cc78be8 From:
<sip:78089596 em 201.12.106.139>;tag=ff4e9193-06763 Call-ID:
5254ded758412b016be344b7473903f0 em 192.168.0.19 CSeq: 51560 BYE Max-Forwards:
70 Content-Length: 0
--- (8 headers 0 lines) ---
Sending to 201.12.106.139 : 5060 (NAT)
Transmitting (NAT) to 201.12.106.139:5060:
SIP/2.0 200 OK Via: SIP/2.0/UDP
201.12.106.139:5060;branch=z9hG4bK46a7e444-1a6b-1;received=201.12.106.139
From: <sip:78089596 em 201.12.106.139>;tag=ff4e9193-06763 To: "1126264773"
<sip:757945701 em 192.168.0.19>;tag=as4cc78be8 Call-ID:
5254ded758412b016be344b7473903f0 em 192.168.0.19 CSeq: 51560 BYE User-Agent:
Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
NOTIFY Contact: <sip:757945701 em 192.168.0.19> Content-Length: 0
X-Asterisk-HangupCause: Normal Clearing
---
  == Spawn extension (macro-dialout-trunk, s, 20) exited non-zero on
'SIP/16-09baab48' in macro 'dialout-trunk'
  == Spawn extension (macro-dialout-trunk, s, 20) exited non-zero on
'SIP/16-09baab48'
    -- Executing Macro("SIP/16-09baab48", "hangupcall") in new stack
    -- Executing ResetCDR("SIP/16-09baab48", "w") in new stack

asterisk1*CLI> 
    -- Executing NoCDR("SIP/16-09baab48", "") in new stack
    -- Executing GotoIf("SIP/16-09baab48", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,6)
    -- Executing GotoIf("SIP/16-09baab48", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Executing Wait("SIP/16-09baab48", "5") in new stack Destroying call
'5254ded758412b016be344b7473903f0 em 192.168.0.19'

asterisk1*CLI>
  == Spawn extension (macro-hangupcall, s, 9) exited non-zero on
'SIP/16-09baab48' in macro 'hangupcall'
  == Spawn extension (macro-hangupcall, s, 9) exited non-zero on
'SIP/16-09baab48'

asterisk1*CLI> exit
Executing last minute cleanups
[root em asterisk1 ~]# exit
logout


------------------------------------
Felipe Trevisan
R. Brejo Alegre, 172
Brooklin
04557-050  São Paulo, SP
tel: (55 11) 5044-2240
Skype ID:trevisa
------------------------------------

-----Original Message-----
From: asteriskbrasil-bounces em listas.asteriskbrasil.org
[mailto:asteriskbrasil-bounces em listas.asteriskbrasil.org] On Behalf Of
Bernardo Vieira
Sent: quarta-feira, 25 de julho de 2007 11:15
To: asteriskbrasil em listas.asteriskbrasil.org
Subject: Re: [AsteriskBrasil] Linha Tmais

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

CLI> sip show registry

- - sua conta da tmais aparece como registred?

- - tente debugar o canal:
CLI> set verbose 3
CLI> sip debug peer <peer tmais>
faça uma ligação e veja o que está acontecendo

- - monitore o tráfego entre você e o proxy da tmais com o tcpdump (se o seu
roteador é um linrouter, faça isso no roteador, senão vai no servidor *
mesmo)





Felipe Trevisan escreveu:
> Oi Leonardo,
> 
> Conferi o sip.conf, inseri o nat=yes no [general] e o
> localnet=192.168.0.19/24 (meu Ip do asterisk é o 192.168.0.19 - não 
> entendi esse /24 e mantive), e mesmo assim nada.
> Liberei as portas do roteador, liguei na TMAIS, e ele me pediu para 
> liberar mais as portas UDP 2048-8192.
> Fiz tudo isso e não vai.
> Faço chamadas, mas não recebo.
> 
> Obrigado,
> 
> Felipe
> 
> 
> 
> ------------------------------------
> Felipe Trevisan
> R. Brejo Alegre, 172
> Brooklin
> 04557-050  São Paulo, SP
> tel: (55 11) 5044-2240
> Skype ID:trevisa
> ------------------------------------
> 
> -----Original Message-----
> From: asteriskbrasil-bounces em listas.asteriskbrasil.org
> [mailto:asteriskbrasil-bounces em listas.asteriskbrasil.org] On Behalf Of 
> Leonardo Kamache (Gmail)
> Sent: terça-feira, 24 de julho de 2007 14:59
> To: asteriskbrasil em listas.asteriskbrasil.org
> Subject: Re: [AsteriskBrasil] Linha Tmais
> 
> Exatamente... confira se a opção nat=yes existe no sip.conf bem como a 
> opção
> localnet=192.168.0.0/24 (onde vc vai adaptar para a sua rede).
> 
> 
> Abraços;
> 
> Leo
> 
> On 7/24/07, Felipe Trevisan <felipe em rentaltools.com.br> wrote:
>> Meu servidor Asterisk esta atras do meu roteador, mas esta sob DMZ, 
>> ou seja todas as portas do roteador estao abertas para ele.
>>
>> Agora o NAT? Não sei dizer. Checo no sip.conf?
>>
>> Obrigado,
>>
>>
>>
>> ------------------------------------
>> Felipe Trevisan
>> R. Brejo Alegre, 172
>> Brooklin
>> 04557-050  São Paulo, SP
>> tel: (55 11) 5044-2240
>> Skype ID:trevisa
>> ------------------------------------
>>
>> -----Original Message-----
>> From: asteriskbrasil-bounces em listas.asteriskbrasil.org
>> [mailto:asteriskbrasil-bounces em listas.asteriskbrasil.org] On Behalf 
>> Of Leonardo Kamache (Gmail)
>> Sent: segunda-feira, 23 de julho de 2007 15:10
>> To: asteriskbrasil em listas.asteriskbrasil.org
>> Subject: Re: [AsteriskBrasil] Linha Tmais
>>
>> Felipe;
>>
>> Provavelmente você esteja tendo problemas com NAT ou com portas 
>> bloqueadas no seu firewall.
>>
>>
>> [ ]'s
>>
>> LK
>>
>>
>>
>> On 7/23/07, Felipe Trevisan <felipe em rentaltools.com.br> wrote:
>>> Estou testando fazer e receber chamadas no asterisk, e para isso 
>>> contratei uma linha da TMAIS.
>>>
>>> Consegui configurar meu softphone (eyebeam e não o da propria TMAIS) 
>>> para conectar diretamente aos servidores e foi um sucesso, fez e 
>>> recebeu chamadas.
>>> Entao tentei configurar no asterisk. Liguei no suporte e eles me 
>>> mandaram o seguinte link para registrar o asterisk no servidor.
>>> http://www.asteriskbrasil.org/tiki/tiki-index.php?page=Configurando+
>>> o+
>>> servic
>>> o+TMAIS+para+o+Asterisk
>>>
>>> Segui as instruções ali, e consegui registrar e efetuar chamadas, 
>>> mas na hora de receber, apenas ouço uma mensagem dizendo que o 
>>> numero de telefone não esta disponivel.
>>>
>>> Tenho uma inbound route que esta configurada para tocar any CID, any 
>>> DID no meu ramal. O mesmo ramal que faz a chamada.
>>>
>>>
>>> Sou novo no asterisk e não sei dizer se esta pergunta é pertinente 
>>> ao grupo ou muito amadora. Desculpem-me, mas agradeço a ajuda.
>>>
>>>
>>> Felipe
>>>
>>>
>>>
>>> ------------------------------------
>>> Felipe Trevisan
>>> R. Brejo Alegre, 172
>>> Brooklin
>>> 04557-050  São Paulo, SP
>>> tel: (55 11) 5044-2240
>>> Skype ID:trevisa
>>> ------------------------------------
>>>
>>>


_______________________________________________
Compre uma camiseta da AsteriskBrasil.org!
            http://www.voipmania.com.br
                == VoIPMania.com.br ==

_______________________________________________
LIsta de discussões AsteriskBrasil.org
AsteriskBrasil em listas.asteriskbrasil.org
http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil




Mais detalhes sobre a lista de discussão AsteriskBrasil