[AsteriskBrasil] Pegar numero discado pela outra ponta

Fabiano (BiGu) bigu em grupoheringer.com.br
Terça Julho 10 23:23:09 BRT 2007


opa, acho q eh essa, mesmo assim nao tem :(

<--- SIP read from 200.176.128.177:5060 --->
INVITE sip:s em 189.3.221.4 SIP/2.0
Via: SIP/2.0/UDP 200.176.128.177:5060;branch=z9hG4bK4b18d719;rport
From: "09981116269" <sip:09981116269 em 200.176.128.177>;tag=as649b623b
To: <sip:s em 189.3.221.4>
Contact: <sip:09981116269 em 200.176.128.177>
Call-ID: 01d0492a32bd77e9652d7bd620bb009a em 200.176.128.177
CSeq: 102 INVITE
User-Agent: Plataforma Tellfree
Max-Forwards: 70
Date: Wed, 11 Jul 2007 02:16:56 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Type: application/sdp
Content-Length: 271

v=0
o=root 12109 12109 IN IP4 200.176.128.177
s=session
c=IN IP4 200.176.128.177
t=0 0
m=audio 12560 RTP/AVP 97 18 101
a=rtpmap:97 iLBC/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

<------------->
--- (13 headers 12 lines) ---
Sending to 200.176.128.177 : 5060 (NAT)
Using INVITE request as basis request - 
01d0492a32bd77e9652d7bd620bb009a em 200.176.128.177
Found peer 'tellfree'
Found RTP audio format 97
Found RTP audio format 18
Found RTP audio format 101
Peer audio RTP is at port 200.176.128.177:12560
Found description format iLBC for ID 97
Found description format G729 for ID 18
Found description format telephone-event for ID 101
Capabilities: us - 0x100 (g729), peer - audio=0x500 
(g729|ilbc)/video=0x0 (nothing), combined - 0x100 (g729)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 
(telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 200.176.128.177:12560
Looking for s in numero_remoto (domain 189.3.221.4)
list_route: hop: <sip:09981116269 em 200.176.128.177>

<--- Transmitting (no NAT) to 200.176.128.177:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 
200.176.128.177:5060;branch=z9hG4bK4b18d719;received=200.176.128.177;rport=5060
From: "09981116269" <sip:09981116269 em 200.176.128.177>;tag=as649b623b
To: <sip:s em 189.3.221.4>
Call-ID: 01d0492a32bd77e9652d7bd620bb009a em 200.176.128.177
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:s em 189.3.221.4>
Content-Length: 0


<------------>
    -- Executing [s em numero_remoto:1] Answer("SIP/5517842100-084d3818", 
"") in new stack
Audio is at 189.3.221.4 port 13312
Adding codec 0x100 (g729) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
asterisk*CLI>
<--- Reliably Transmitting (no NAT) to 200.176.128.177:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 
200.176.128.177:5060;branch=z9hG4bK4b18d719;received=200.176.128.177;rport=5060
From: "09981116269" <sip:09981116269 em 200.176.128.177>;tag=as649b623b
To: <sip:s em 189.3.221.4>;tag=as58b78979
Call-ID: 01d0492a32bd77e9652d7bd620bb009a em 200.176.128.177
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:s em 189.3.221.4>
Content-Type: application/sdp
Content-Length: 261

v=0
o=root 22193 22193 IN IP4 189.3.221.4
s=session
c=IN IP4 189.3.221.4
t=0 0
m=audio 13312 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------>
    -- Executing [s em numero_remoto:2] Dial("SIP/5517842100-084d3818", 
"SIP/fabiano||tT") in new stack
    -- Called fabiano
    -- SIP/fabiano-084defa8 is ringing
asterisk*CLI>
<--- SIP read from 200.176.128.177:5060 --->
ACK sip:s em 189.3.221.4 SIP/2.0
Via: SIP/2.0/UDP 200.176.128.177:5060;branch=z9hG4bK200074b3;rport
From: "09981116269" <sip:09981116269 em 200.176.128.177>;tag=as649b623b
To: <sip:s em 189.3.221.4>;tag=as58b78979
Contact: <sip:09981116269 em 200.176.128.177>
Call-ID: 01d0492a32bd77e9652d7bd620bb009a em 200.176.128.177
CSeq: 102 ACK
User-Agent: Plataforma Tellfree
Max-Forwards: 70
Content-Length: 0


<------------->
--- (10 headers 0 lines) ---
asterisk*CLI>
<--- SIP read from 200.176.128.177:5060 --->
NOTIFY sip:s em 189.3.221.4 SIP/2.0
Via: SIP/2.0/UDP 200.176.128.177:5060;branch=z9hG4bK0a2475e1;rport
From: "asterisk" <sip:asterisk em 200.176.128.177>;tag=as191c9bb7
To: <sip:s em 189.3.221.4>
Contact: <sip:asterisk em 200.176.128.177>
Call-ID: 5842ac177c9290eb3f11a426654c58e4 em 200.176.128.177
CSeq: 102 NOTIFY
User-Agent: Plataforma Tellfree
Max-Forwards: 70
Event: message-summary
Content-Type: application/simple-message-summary
Content-Length: 95

Messages-Waiting: no
Message-Account: sip:asterisk em 200.176.128.177
Voice-Message: 0/0 (0/0)

<------------->
--- (12 headers 3 lines) ---

<--- Transmitting (no NAT) to 200.176.128.177:5060 --->
SIP/2.0 489 Bad event
Via: SIP/2.0/UDP 
200.176.128.177:5060;branch=z9hG4bK0a2475e1;received=200.176.128.177;rport=5060
From: "asterisk" <sip:asterisk em 200.176.128.177>;tag=as191c9bb7
To: <sip:s em 189.3.221.4>;tag=as05f5e271
Call-ID: 5842ac177c9290eb3f11a426654c58e4 em 200.176.128.177
CSeq: 102 NOTIFY
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


<------------>


Ricardo Landim escreveu:
> Ola Fabiano,
>
> esse debug que vc mandou e a sua sinalização para a Tellfree... pegue 
> as informações que a tellfree manda pra vc no momento que vc recebe 
> uma ligação...
>
> Faça o debug e manda aqui na lista pra gente poder analisar...
>
> Att,
> Ricardo Landim
>
> Em 10/07/07, *Fabiano (BiGu)* <bigu em grupoheringer.com.br 
> <mailto:bigu em grupoheringer.com.br>> escreveu:
>
>     eh, infelizmente parece que a tellfree nao tem...
>
>     Reliably Transmitting (no NAT) to 200.176.128.177:5060
>     <http://200.176.128.177:5060>:
>     OPTIONS sip:sip2.tellfree.com.br <http://sip2.tellfree.com.br> SIP/2.0
>     Via: SIP/2.0/UDP 189.3.221.4:5060 <http://189.3.221.4:5060>
>     ;branch=z9hG4bK1687069c;rport
>     From: "asterisk" <sip:asterisk em 189.3.221.4
>     <mailto:sip:asterisk em 189.3.221.4>>;tag=as3c232ab3
>     To: <sip:sip2.tellfree.com.br <http://sip2.tellfree.com.br>>
>     Contact: <sip:asterisk em 189.3.221.4 <mailto:sip:asterisk em 189.3.221.4>>
>     Call-ID: 02d19e6b32e18a2b2f9838006d2d27bb em 189.3.221.4
>     <mailto:02d19e6b32e18a2b2f9838006d2d27bb em 189.3.221.4>
>     CSeq: 102 OPTIONS
>     User-Agent: Asterisk PBX
>     Max-Forwards: 70
>     Date: Tue, 10 Jul 2007 17:08:41 GMT
>     Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
>     Supported: replaces
>     Content-Length: 0
>
>
>     ---
>     Reliably Transmitting (no NAT) to 200.176.128.177:5060
>     <http://200.176.128.177:5060>:
>     OPTIONS sip:sip2.tellfree.com.br <http://sip2.tellfree.com.br> SIP/2.0
>     Via: SIP/2.0/UDP 189.3.221.4:5060
>     <http://189.3.221.4:5060>;branch=z9hG4bK321f5e78;rport
>     From: "asterisk" <sip:asterisk em 189.3.221.4
>     <mailto:sip:asterisk em 189.3.221.4>>;tag=as5aac7410
>     To: <sip: sip2.tellfree.com.br <http://sip2.tellfree.com.br>>
>     Contact: <sip:asterisk em 189.3.221.4 <mailto:sip:asterisk em 189.3.221.4>>
>     Call-ID: 754603dc34755d5b4fbcff7e5195db5a em 189.3.221.4
>     <mailto:754603dc34755d5b4fbcff7e5195db5a em 189.3.221.4>
>     CSeq: 102 OPTIONS
>     User-Agent: Asterisk PBX
>     Max-Forwards: 70
>     Date: Tue, 10 Jul 2007 17:08:41 GMT
>     Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
>     Supported: replaces
>     Content-Length: 0
>
>     Ricardo Landim escreveu:
>     > Amigo,
>     >
>     > para a Vono eu faço da seguinte forma.... (inclusive essa forma de
>     > fazer eu peguei aqui na lista)
>     >
>     > exten => did,1,Set(NUMENTRADA=${SIP_HEADER(X-Vono-DDR)})
>     > exten => did ,n,GotoIf($[${NUMENTRADA} = 2140639999]?6)
>     > exten => did ,n,GotoIf($[${NUMENTRADA} = 2140638888]?8)
>     > exten => did,n,GotoIf($[${NUMENTRADA} = 2135279999]?10)
>     > exten => did,n,GotoIf($[${NUMENTRADA} = 2140637777]?12)
>     > exten => did,n,Dial(SIP/554437,60)
>     > exten => did,n,Hangup
>     > exten => did,n,Dial(SIP/554438,60)
>     > exten => did,n,Hangup
>     > exten => did,n,Dial(SIP/554439,60)
>     > exten => did,n,Hangup
>     > exten => did,n,Dial(SIP/554440,60)
>     > exten => did,n,Hangup
>     >
>     > a vono envia no cabeçalho SIP o campo X-Vono-DDR... tente fazer o
>     > debug e verifique se a tellfree tem um campo semelhante...
>     >
>     > Att,
>     > Ricardo Landim
>     >
>     >
>     > Em 10/07/07, *Fabiano (BiGu) * <bigu em grupoheringer.com.br
>     <mailto:bigu em grupoheringer.com.br>
>     > <mailto:bigu em grupoheringer.com.br
>     <mailto:bigu em grupoheringer.com.br>>> escreveu:
>     >
>     >     Ae galera, seguinte
>     >
>     >     tenho 3 numeros remotos na tellfree, todos sendo
>     direcionados para a
>     >     mesma conta SIP
>     >
>     >     estou precisando tratar esses numero de maneira diferente...
>     >
>     >     ou seja, se o cara ligar no numero remoto do Rio de Janeiro por
>     >     exemplo,
>     >     eu quero ele execute um contexto, se ele ligar para o de Sao
>     Paulo,
>     >     executar outro contexto...
>     >
>     >     minha duvida é: existe uma maneira de pegar o numero que o
>     usuario da
>     >     outra ponta digitou? o CallerID dele eu ja consigo pegar
>     >     normal..mas eu
>     >     quero descobrir em qual numero remoto que ele ligou
>     >
>     >
>     >     Abracos
>     >     _______________________________________________
>     >     LIsta de discussões AsteriskBrasil.org
>     >     AsteriskBrasil em listas.asteriskbrasil.org
>     <mailto:AsteriskBrasil em listas.asteriskbrasil.org>
>     >     <mailto:AsteriskBrasil em listas.asteriskbrasil.org
>     <mailto:AsteriskBrasil em listas.asteriskbrasil.org>>
>     >     http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil
>     >
>     >     _______________________________________________
>     >     Acesse o  wiki AsteriskBrasil.org:
>     >     http://www.asteriskbrasil.org
>     >
>     >
>     >
>     ------------------------------------------------------------------------
>
>     >
>     > _______________________________________________
>     > LIsta de discussões AsteriskBrasil.org
>     > AsteriskBrasil em listas.asteriskbrasil.org
>     <mailto:AsteriskBrasil em listas.asteriskbrasil.org>
>     > http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil
>     >
>     > _______________________________________________
>     > Acesse o  wiki AsteriskBrasil.org:
>     > http://www.asteriskbrasil.org
>     >
>     >
>     > __________ NOD32 2389 (20070710) Information __________
>     >
>     > This message was checked by NOD32 antivirus system.
>     > http://www.eset.com
>     >
>
>     _______________________________________________
>     LIsta de discussões AsteriskBrasil.org
>     AsteriskBrasil em listas.asteriskbrasil.org
>     <mailto:AsteriskBrasil em listas.asteriskbrasil.org>
>     http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil
>
>     _______________________________________________
>     Acesse o  wiki AsteriskBrasil.org:
>     http://www.asteriskbrasil.org
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> LIsta de discussões AsteriskBrasil.org
> AsteriskBrasil em listas.asteriskbrasil.org
> http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil
>
> _______________________________________________
> Acesse o  wiki AsteriskBrasil.org:
> http://www.asteriskbrasil.org
>
>
> __________ NOD32 2390 (20070710) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>   



Mais detalhes sobre a lista de discussão AsteriskBrasil