Re: [Asterisk-Users] Setvar SIP_CODEC

2003-10-21 Thread Martin Pycko
 [extensions.conf]
 exten = 123456,1,SetVar,SIP_CODEC=ulaw
 exten = 123456,2,Dial(${TRUNK}/${EXTEN})

   The problem is with the SetVar function, the debug shows that the
 function is executed, but after that, * sends the media capability to
 the phone with g729 as preferred codec.
SIP_CODEC is was supposed to only change the codec of the incoming call,
eg: asterisk responds with ANSWER with ulaw codec ...

But it won't change anything with the 2nd call.

regards
Martin

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Setvar SIP_CODEC

2003-10-21 Thread Luis Benavente
Martin,
Thank you for replaying. That's exactly what I am trying to do, but the
call never gets answered because is dropped before that due codec
incompatibility.
Please see what the debug shows with my comments in line.

Regards,

Luis


==
==
INVITE from the phone with G729 as preferred codec 
==
==

Sip read: 
INVITE sip:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/UDP 192.168.1.13:5060
From: User ID
sip:[EMAIL PROTECTED];tag=000b5f800a9b010359818116-229fbd39
To: sip:[EMAIL PROTECTED]
Call-ID: [EMAIL PROTECTED]
Date: Tue, 21 Oct 2003 17:38:25 GMT
CSeq: 101 INVITE
User-Agent: CSCO/4
Contact: sip:[EMAIL PROTECTED]:5060
Expires: 180
Content-Type: application/sdp
Content-Length: 189
Accept: application/sdp

v=0
o=Cisco-SIPUA 727 26778 IN IP4 192.168.1.13
s=SIP Call
c=IN IP4 192.168.1.13
t=0 0
m=audio 22436 RTP/AVP 18 0 8
a=rtpmap:18 G729/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000

==
==
Asterisk asks for authentication 
==
==

13 headers, 9 lines
Using latest request as basis request
Sending to 192.168.1.13 : 5060 (non-NAT)
Found audio format UNKN
Found audio format UNKN
Found audio format ALAW
Found description format G729
Found description format PCMU
Found description format PCMA
Capabilities: us - 2147483647, them - 268/0, combined - 268
Non-codec capabilities: us - 1, them - 0, combined - 0
DEBUG[114696]: File chan_sip.c, Line 3854 (check_user): Setting NAT on
RTP to 0
Reliably Transmitting (no NAT):
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 192.168.1.13:5060
From: User ID
sip:[EMAIL PROTECTED];tag=000b5f800a9b010359818116-229fbd39
To: sip:[EMAIL PROTECTED];tag=as225c5d68
Call-ID: [EMAIL PROTECTED]
CSeq: 101 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: 
Proxy-Authenticate: Digest realm=asterisk, nonce=2a32fc8f
Content-Length: 0


 to 192.168.1.13:5060
Sip read: 
ACK sip:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/UDP 192.168.1.13:5060
From: User ID
sip:[EMAIL PROTECTED];tag=000b5f800a9b010359818116-229fbd39
To: sip:[EMAIL PROTECTED];tag=as225c5d68
Call-ID: [EMAIL PROTECTED]
Date: Tue, 21 Oct 2003 17:38:25 GMT
CSeq: 101 ACK
Content-Length: 0


8 headers, 0 lines
DEBUG[114696]: File chan_sip.c, Line 548 (__sip_ack): Stopping
retransmission on '[EMAIL PROTECTED]' of
Response 101: Found


==
==
Phone sends authentication 
==
==

Sip read: 
INVITE sip:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/UDP 192.168.1.13:5060
From: User ID
sip:[EMAIL PROTECTED];tag=000b5f800a9b010359818116-229fbd39
To: sip:[EMAIL PROTECTED]
Call-ID: [EMAIL PROTECTED]
Date: Tue, 21 Oct 2003 17:38:25 GMT
CSeq: 102 INVITE
User-Agent: CSCO/4
Contact: sip:[EMAIL PROTECTED]:5060
Proxy-Authorization: Digest
username=7601,realm=asterisk,uri=sip:192.168.1.111,response=f35280ce287b45e2abdcb832d7244198,nonce=2a32fc8f,algorithm=md5
Expires: 180
Content-Type: application/sdp
Content-Length: 189

v=0
o=Cisco-SIPUA 727 26778 IN IP4 192.168.1.13
s=SIP Call
c=IN IP4 192.168.1.13
t=0 0
m=audio 22436 RTP/AVP 18 0 8
a=rtpmap:18 G729/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000

13 headers, 9 lines
Using latest request as basis request
Sending to 192.168.1.13 : 5060 (non-NAT)
Found audio format UNKN
Found audio format UNKN
Found audio format ALAW
Found description format G729
Found description format PCMU
Found description format PCMA
Capabilities: us - 2147483647, them - 268/0, combined - 268
Non-codec capabilities: us - 1, them - 0, combined - 0
DEBUG[114696]: File chan_sip.c, Line 3854 (check_user): Setting NAT on
RTP to 0
DEBUG[114696]: File chan_sip.c, Line 4904 (handle_request): Check for
res for 7601
DEBUG[114696]: File chan_sip.c, Line 973 (find_user): Call from user
'7601' is 1 out of 0
Looking for 17862862705 in intern
DEBUG[114696]: File chan_sip.c, Line 3307 (build_route): build_route:
Contact hop: sip:[EMAIL PROTECTED]:5060list_route: hop:
sip:[EMAIL PROTECTED]:5060
Transmitting (no NAT):

==
==
Asterisk has authorized the call and sends the Trying to the phone
==
==

SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.13:5060
From: User ID
sip:[EMAIL PROTECTED];tag=000b5f800a9b010359818116-229fbd39
To: sip:[EMAIL PROTECTED];tag=as2ae322ec
Call-ID: [EMAIL 

[Asterisk-Users] Setvar SIP_CODEC

2003-10-20 Thread Luis Benavente
Hello,
I have 
a couple of 7960 and a quad T1 card on my asterisk box. I want to let
the phones to use g729 when they talk to each other, but to use g711
when I'm going to route the call out of my network using the T1 card. 
Everything works just fine between the phones, but in order to be able
to make calls through T1 I have to disallow the g729.

For this purpose I have the following configuration using yesterday's
cvs.

[sip.conf]
disallow=all
allow=g729
allow=ulaw

[extensions.conf]
exten = 123456,1,SetVar,SIP_CODEC=ulaw
exten = 123456,2,Dial(${TRUNK}/${EXTEN})

The problem is with the SetVar function, the debug shows that the
function is executed, but after that, * sends the media capability to
the phone with g729 as preferred codec.

Is there any work around? or simply setVar wasn't meant for this
scenario.

Thanks  

-- 
Luis Benavente [EMAIL PROTECTED]

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users