[Asterisk-Users] SIP transfers failing

Gavin Hamill gdh at laterooms.com
Tue May 10 03:38:54 MST 2005


Hullo :)

I'm using Debian's Asterisk 1.0.7 bristuffed (though I'm only using CAPI for 
ISDN, and not HFC-S cards) and trying to transfer an incoming SIP call from 
sipgate.co.uk to any other extension.

My phones are AT-320s (PA168S 1.43 firmware) whose documentation says to blind 
transfer, simply dial the number you want to transfer to, and press 'FWD'...

This is what happens when I start the sip debug after the initial call 
setup... 

01618313800 is the callerID of the person making the call, 1301 is the 
internal SIP extension  logged in as Agent 1600 at 10.0.0.82. 

10.0.0.242 and 194.24.251.3 are the same machine, just two IPs on the same 
eth0.

All I'm doing is answering the SIP phone, tapping 500 and pressing FWD to 
transfer the incoming caller to the screaming monkeys gsm. If I dial 500 from 
the phone directly, I immediately hear the monkeys, so assumed that a 
transfer should be possible. e.g. in [from-ip] I have:
exten => 500,1,Playback(tt-monkeys)

and the sip.conf section is...
[1301]
type=friend
username=1301
secret=1301
host=dynamic
context=from-ip
nat=no
canreinvite=no

In extensions.conf's [internal] context (used by AgentCallbackLogin) I have
exten => _13XX,1,Dial(SIP/${EXTEN},20,t) 

so that the agent has the ability to transfer calls (I also tried 'Tt' for 
completeness)

    -- Executing SetCIDName("SIP/217.10.79.218-40b8edd8", "CCUK") in new stack
    -- Executing Queue("SIP/217.10.79.218-40b8edd8", "ccuk|r") in new stack
    -- outgoing agentcall, to agent '1600', on 'Local/1301 at internal-17aa,1'
    -- Called Agent/1600
    -- Executing Dial("Local/1301 at internal-17aa,2", "SIP/1301|20|t") in new 
stack
    -- Called 1301
    -- SIP/1301-9ebb is ringing
    -- Agent/1600 is ringing
    -- SIP/1301-9ebb answered Local/1301 at internal-17aa,2
    -- Agent/1600 answered SIP/217.10.79.218-40b8edd8
qax*CLI> sip debug
SIP Debugging Enabled
qax*CLI>

Sip read:
REFER sip:01618313800 at 194.24.251.3 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.82:5060;branch=z9hG4bK95BVFY7yDu90YX0A
Max-Forwards: 7
User-Agent: PA168S
From: <sip:1301 at 10.0.0.82:5060>;tag=g5VVthPSslPbjLib
To: "CCUK" <sip:01618313800 at 194.24.251.3>;tag=as0eb5392e
Call-ID: 27584e3a339e535209ea89102043184e at 194.24.251.3
Contact: <sip:1301 at 10.0.0.82:5060>
CSeq: 1 REFER
Refer-To: "500" <sip:500 at 10.0.0.242>
Referred-By: <sip:1301 at 10.0.0.242>
Content-Length: 0


12 headers, 0 lines
Looking for 500 in from-ip
Looking for 1301 in from-ip
Transmitting (no NAT):
SIP/2.0 202 Accepted
Via: SIP/2.0/UDP 10.0.0.82:5060;branch=z9hG4bK95BVFY7yDu90YX0A
From: <sip:1301 at 10.0.0.82:5060>;tag=g5VVthPSslPbjLib
To: "CCUK" <sip:01618313800 at 194.24.251.3>;tag=as0eb5392e
Call-ID: 27584e3a339e535209ea89102043184e at 194.24.251.3
CSeq: 1 REFER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:01618313800 at 194.24.251.3>
Content-Length: 0


 to 10.0.0.82:5060
set_destination: Parsing <sip:1301 at 10.0.0.82:5060> for address/port to send to
set_destination: set destination to 10.0.0.82, port 5060
Reliably Transmitting:
NOTIFY sip:1301 at 10.0.0.82:5060 SIP/2.0
Via: SIP/2.0/UDP 194.24.251.3:5060;branch=z9hG4bK08ef2ac1
From: "CCUK" <sip:01618313800 at 194.24.251.3>;tag=as0eb5392e
To: <sip:1301 at 10.0.0.82:5060>;tag=g5VVthPSslPbjLib
Contact: <sip:01618313800 at 194.24.251.3>
Call-ID: 27584e3a339e535209ea89102043184e at 194.24.251.3
CSeq: 103 NOTIFY
User-Agent: Asterisk PBX
Event: refer;id=1
Subscription-state: terminated;reason=noresource
Content-Type: message/sipfrag;version=2.0
Content-Length: 14

SIP/2.0 200 OK (no NAT) to 10.0.0.82:5060
set_destination: Parsing <sip:1301 at 10.0.0.82:5060> for address/port to send to
set_destination: set destination to 10.0.0.82, port 5060
Reliably Transmitting:
BYE sip:1301 at 10.0.0.82:5060 SIP/2.0
Via: SIP/2.0/UDP 194.24.251.3:5060;branch=z9hG4bK56da28c8
From: "CCUK" <sip:01618313800 at 194.24.251.3>;tag=as0eb5392e
To: <sip:1301 at 10.0.0.82:5060>;tag=g5VVthPSslPbjLib
Contact: <sip:01618313800 at 194.24.251.3>
Call-ID: 27584e3a339e535209ea89102043184e at 194.24.251.3
CSeq: 104 BYE
User-Agent: Asterisk PBX
Content-Length: 0

 (no NAT) to 10.0.0.82:5060
monitor executing ( nice -n 19 soxmix 
"/var/spool/asterisk/monitor/agent-1600-asterisk-3407-1115714965-75-in.wav" 
"/var/spool/asterisk/monitor/agent-1600-asterisk-3407-1115714965-75-out.wav" 
"/var/spool/asterisk/monitor/agent-1600-asterisk-3407-1115714965-75.wav"  && 
rm -f 
"/var/spool/asterisk/monitor"/agent-1600-asterisk-3407-1115714965-75-* ) &

after that it's just a series of shutdown SIP messages...

I can't understand that "Subscription-state: terminated;reason=noresource" 
message from * to the phone - any ideas would be warmly welcomed!

Oh, I've tried all combinations of nat=yes/no and canreinvite=yes/no :/

Cheers,
Gavin.



More information about the asterisk-users mailing list