[Asterisk-Users] SIP-SIP transfer via the REFER/NOTIFY method

Lea lea123 at wp.pl
Mon Jan 9 00:57:54 MST 2006


Could anyone help me set up Asterisk in such a way that it makes SIP-SIP transfers using the REFER / NOTIFY method according to RFC-3515 ?

SCANARIO:
- Asterisk registers with PSTN<->SIP VoIP provider "V" (Vonage) as a friend
- Asterisk is located in Europe, Vonage in located US.
- Asterisk acts as an autoattendant located in Europe.
- Asterisk answers and incoming call from "V"
- The caller browses the autoattendant and as a result is transferred to another number in US PSTN (also via "V")
- The autoattendant on Asterisk hangs up.

When this scenario is attempted in Europe on the excellent X-Pro Softphone (http://www.xten.net), the SIP-SIP transfer happens without any problems.

However when the same transfer is attempted by Asterisk in the dialplan by the following command:
exten => 800,1,Dial(SIP/Vonage_out/18005551212)
...the transfer does not work :(

Since the transfer done by X-Pro SoftPhone works so nicely.  I am enclosing its debug output below.  I am not enclosing the Asterisk output because it is so convoluted, I doubt anyone could make anything out of it (can oblige though).  Anyway the important difference is that X-Pro Softphone issues a REFER command to "V" but Asterisk does NOT !!!

How can I make Asterisk do the SIP-SIP transfer with the REFER / NOTIFY methods according to RFC-3515 ?


Below is X-Pro Softphone's debug output of a successful transfer according to RFC-3515 :
--------------------------------------------------------

SEND TIME: 26251796
SEND >> sphone.vopr.vonage.net:5061
REGISTER sip:sphone.vopr.vonage.net SIP/2.0
Via: SIP/2.0/UDP aster.autoattendant.eu:5060;rport;branch=z9hG4bKAD14EC1C2A2542DF877A3DF9D1358091
From: Vonage User <sip:pstn_6523567 at sphone.vopr.vonage.net>;tag=1997595095
To: Vonage User <sip:pstn_6523567 at sphone.vopr.vonage.net>
Contact: "Vonage User" <sip:pstn_6523567 at aster.autoattendant.eu:5060>
Call-ID: 49D76E20235B4E2A873C38C06B92DC17 at sphone.vopr.vonage.net
CSeq: 60444 REGISTER
Expires: 1800
Max-Forwards: 70
User-Agent: X-PRO Vonage release 1105x
Content-Length: 0


RECEIVE TIME: 26251908
RECEIVE << sphone.vopr.vonage.net:5061
SIP/2.0 200 OK
Via: SIP/2.0/UDP aster.autoattendant.eu:5060;rport;branch=z9hG4bKAD14EC1C2A2542DF877A3DF9D1358091
From: Vonage User <sip:pstn_6523567 at sphone.vopr.vonage.net>;tag=1997595095
To: Vonage User <sip:pstn_6523567 at sphone.vopr.vonage.net>
Call-ID: 49D76E20235B4E2A873C38C06B92DC17 at sphone.vopr.vonage.net
CSeq: 60444 REGISTER
Contact: "Vonage User" <sip:pstn_6523567 at aster.autoattendant.eu:5060>;expires=20
Max-Forwards: 70
Content-Length: 0


RECEIVE TIME: 26266089
RECEIVE << sphone.vopr.vonage.net:5061
INVITE sip:pstn_6523567 at aster.autoattendant.eu:5060;suppress-features=- SIP/2.0
Via: SIP/2.0/UDP sphone.vopr.vonage.net:5061
Via: SIP/2.0/UDP inbound4.vonage.net:5060
Via: SIP/2.0/UDP 63.82.77.14:5060;branch=z9hG4bK2252
Record-Route: <sip:pstn_6523567 at sphone.vopr.vonage.net:5061>
Record-Route: <sip:pstn_6523567 at inbound4.vonage.net:5060>
From: “us_pstn_caller” <sip:63.82.77.14>;tag=2112301987
To: <sip:pstn_6523567 at inbound4.vonage.net>
Call-ID: CF6FC3F9-800111DA-999DDF96-A870513F at 63.82.77.14
CSeq: 101 INVITE
Contact: <sip:63.82.77.14:5060>;rtpupdated=-
Max-Forwards: 13
Content-Type: application/sdp
Content-Length:   354

v=0
o=CiscoSystemsSIP-GW-UserAgent 5902 997 IN IP4 63.82.77.22
s=SIP Call
c=IN IP4 63.82.77.22
t=0 0
m=audio 13570 RTP/AVP 0 18 2 100 101
c=IN IP4 63.82.77.22
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:2 G726-32/8000
a=rtpmap:100 X-NSE/8000
a=fmtp:100 192-194
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16


SEND TIME: 26266093
SEND >> sphone.vopr.vonage.net:5061
SIP/2.0 100 Trying
Via: SIP/2.0/UDP sphone.vopr.vonage.net:5061
Via: SIP/2.0/UDP inbound4.vonage.net:5060
Via: SIP/2.0/UDP 63.82.77.14:5060;branch=z9hG4bK2252
From: “us_pstn_caller” <sip:63.82.77.14>;tag=2112301987
To: <sip:pstn_6523567 at inbound4.vonage.net>;tag=3655015093
Contact: <sip:pstn_6523567 at aster.autoattendant.eu:5060>
Record-Route: <sip:pstn_6523567 at sphone.vopr.vonage.net:5061>,<sip:pstn_6523567 at inbound4.vonage.net:5060>
Call-ID: CF6FC3F9-800111DA-999DDF96-A870513F at 63.82.77.14
CSeq: 101 INVITE
Server: X-PRO Vonage release 1105x
Content-Length: 0


SEND TIME: 26266126
SEND >> sphone.vopr.vonage.net:5061
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP sphone.vopr.vonage.net:5061
Via: SIP/2.0/UDP inbound4.vonage.net:5060
Via: SIP/2.0/UDP 63.82.77.14:5060;branch=z9hG4bK2252
From: “us_pstn_caller” <sip:63.82.77.14>;tag=2112301987
To: <sip:pstn_6523567 at inbound4.vonage.net>;tag=3655015093
Contact: <sip:pstn_6523567 at aster.autoattendant.eu:5060>
Record-Route: <sip:pstn_6523567 at sphone.vopr.vonage.net:5061>,<sip:pstn_6523567 at inbound4.vonage.net:5060>
Call-ID: CF6FC3F9-800111DA-999DDF96-A870513F at 63.82.77.14
CSeq: 101 INVITE
Server: X-PRO Vonage release 1105x
Content-Length: 0


SEND TIME: 26269979
SEND >> sphone.vopr.vonage.net:5061
SIP/2.0 200 Ok
Via: SIP/2.0/UDP sphone.vopr.vonage.net:5061
Via: SIP/2.0/UDP inbound4.vonage.net:5060
Via: SIP/2.0/UDP 63.82.77.14:5060;branch=z9hG4bK2252
From: “us_pstn_caller” <sip:63.82.77.14>;tag=2112301987
To: <sip:pstn_6523567 at inbound4.vonage.net>;tag=3655015093
Contact: <sip:pstn_6523567 at aster.autoattendant.eu:5060>
Record-Route: <sip:pstn_6523567 at sphone.vopr.vonage.net:5061>,<sip:pstn_6523567 at inbound4.vonage.net:5060>
Call-ID: CF6FC3F9-800111DA-999DDF96-A870513F at 63.82.77.14
CSeq: 101 INVITE
Content-Type: application/sdp
Server: X-PRO Vonage release 1105x
Content-Length: 222

v=0
o=pstn_6523567 26266091 26269978 IN IP4 aster.autoattendant.eu
s=X-PRO Vonage
c=IN IP4 aster.autoattendant.eu
t=0 0
m=audio 8000 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv


RECEIVE TIME: 26270240
RECEIVE << sphone.vopr.vonage.net:5061
ACK sip:pstn_6523567 at aster.autoattendant.eu:5060 SIP/2.0
Via: SIP/2.0/UDP sphone.vopr.vonage.net:5061
Via: SIP/2.0/UDP inbound4.vonage.net:5060
Via: SIP/2.0/UDP 63.82.77.14:5060;branch=z9hG4bK1D61
From: “us_pstn_caller” <sip:63.82.77.14>;tag=2112301987
To: <sip:pstn_6523567 at inbound4.vonage.net>;tag=3655015093
Call-ID: CF6FC3F9-800111DA-999DDF96-A870513F at 63.82.77.14
CSeq: 101 ACK
Max-Forwards: 13
Content-Length: 0


SEND TIME: 26272145
SEND >> sphone.vopr.vonage.net:5061
REGISTER sip:sphone.vopr.vonage.net SIP/2.0
Via: SIP/2.0/UDP aster.autoattendant.eu:5060;rport;branch=z9hG4bK45F66882666744DAACD5C99D4C64C6F2
From: Vonage User <sip:pstn_6523567 at sphone.vopr.vonage.net>;tag=1997595095
To: Vonage User <sip:pstn_6523567 at sphone.vopr.vonage.net>
Contact: "Vonage User" <sip:pstn_6523567 at aster.autoattendant.eu:5060>
Call-ID: 49D76E20235B4E2A873C38C06B92DC17 at sphone.vopr.vonage.net
CSeq: 60445 REGISTER
Expires: 1800
Max-Forwards: 70
User-Agent: X-PRO Vonage release 1105x
Content-Length: 0


RECEIVE TIME: 26272259
RECEIVE << sphone.vopr.vonage.net:5061
SIP/2.0 200 OK
Via: SIP/2.0/UDP aster.autoattendant.eu:5060;rport;branch=z9hG4bK45F66882666744DAACD5C99D4C64C6F2
From: Vonage User <sip:pstn_6523567 at sphone.vopr.vonage.net>;tag=1997595095
To: Vonage User <sip:pstn_6523567 at sphone.vopr.vonage.net>
Call-ID: 49D76E20235B4E2A873C38C06B92DC17 at sphone.vopr.vonage.net
CSeq: 60445 REGISTER
Contact: "Vonage User" <sip:pstn_6523567 at aster.autoattendant.eu:5060>;expires=20
Max-Forwards: 70
Content-Length: 0


SEND TIME: 26286019
SEND >> sphone.vopr.vonage.net:5061
INVITE sip:pstn_6523567 at sphone.vopr.vonage.net:5061 SIP/2.0
Via: SIP/2.0/UDP aster.autoattendant.eu:5060;rport;branch=z9hG4bK8858ECAA629C45EEBD7741C1DDDC0697
From: <sip:pstn_6523567 at inbound4.vonage.net>;tag=3655015093
To: “us_pstn_caller” <sip:63.82.77.14>;tag=2112301987
Contact: <sip:pstn_6523567 at aster.autoattendant.eu:5060>
Route: <sip:pstn_6523567 at inbound4.vonage.net:5060>,<sip:63.82.77.14:5060>
Call-ID: CF6FC3F9-800111DA-999DDF96-A870513F at 63.82.77.14
CSeq: 7235 INVITE
Proxy-Authorization: Digest username="pstn_6523567",realm="sphone.vopr.vonage.net",nonce="529605995",response="2a6966c6cefe6b31a2b517430f79c1c2",uri="sip:pstn_6523567 at sphone.vopr.vonage.net:5061",algorithm=MD5
Max-Forwards: 70
Content-Type: application/sdp
User-Agent: X-PRO Vonage release 1105x
Content-Length: 216

v=0
o=pstn_6523567 26266091 26285894 IN IP4 aster.autoattendant.eu
s=X-PRO Vonage
c=IN IP4 0.0.0.0
t=0 0
m=audio 8000 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendonly


RECEIVE TIME: 26286136
RECEIVE << sphone.vopr.vonage.net:5061
SIP/2.0 100 Trying
Via: SIP/2.0/UDP aster.autoattendant.eu:5060;rport;branch=z9hG4bK8858ECAA629C45EEBD7741C1DDDC0697
From: <sip:pstn_6523567 at inbound4.vonage.net>;tag=3655015093
To: “us_pstn_caller” <sip:63.82.77.14>;tag=2112301987
Call-ID: CF6FC3F9-800111DA-999DDF96-A870513F at 63.82.77.14
CSeq: 7235 INVITE
Max-Forwards: 15
Content-Length: 0


RECEIVE TIME: 26286352
RECEIVE << sphone.vopr.vonage.net:5061
SIP/2.0 200 OK
Via: SIP/2.0/UDP aster.autoattendant.eu:5060;rport;branch=z9hG4bK8858ECAA629C45EEBD7741C1DDDC0697
Record-Route: <sip:1 at inbound4.vonage.net:5060>
Record-Route: <sip:1 at sphone.vopr.vonage.net:5061>
From: <sip:pstn_6523567 at inbound4.vonage.net>;tag=3655015093
To: “us_pstn_caller” <sip:63.82.77.14>;tag=2112301987
Call-ID: CF6FC3F9-800111DA-999DDF96-A870513F at 63.82.77.14
CSeq: 7235 INVITE
Contact: <sip:63.82.77.14:5060>;rtpupdated=-
Max-Forwards: 14
Content-Type: application/sdp
Content-Length:   254

v=0
o=CiscoSystemsSIP-GW-UserAgent 5902 997 IN IP4 63.82.77.14
s=SIP Call
c=IN IP4 63.82.77.14
t=0 0
m=audio 18864 RTP/AVP 18 101
c=IN IP4 63.82.77.14
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15


SEND TIME: 26286385
SEND >> sphone.vopr.vonage.net:5061
ACK sip:pstn_6523567 at sphone.vopr.vonage.net:5061 SIP/2.0
Via: SIP/2.0/UDP aster.autoattendant.eu:5060;rport;branch=z9hG4bK75988DEFBA6A49CC8E348CDBBC57793F
From: <sip:pstn_6523567 at inbound4.vonage.net>;tag=3655015093
To: “us_pstn_caller” <sip:63.82.77.14>;tag=2112301987
Contact: <sip:pstn_6523567 at aster.autoattendant.eu:5060>
Route: <sip:pstn_6523567 at inbound4.vonage.net:5060>,<sip:63.82.77.14:5060>
Call-ID: CF6FC3F9-800111DA-999DDF96-A870513F at 63.82.77.14
CSeq: 7235 ACK
Max-Forwards: 70
Content-Length: 0


*******  HERE THE AUTOATTENDANT SPEAKS TO THE CALLER AND MAKES THE TRANSFER  *******


SEND TIME: 26286511
SEND >> sphone.vopr.vonage.net:5061
REFER sip:pstn_6523567 at sphone.vopr.vonage.net:5061 SIP/2.0
Via: SIP/2.0/UDP aster.autoattendant.eu:5060;rport;branch=z9hG4bK1CFB3639BC0147BE98519AA14B1FE8A1
From: <sip:pstn_6523567 at inbound4.vonage.net>;tag=3655015093
To: “us_pstn_caller” <sip:63.82.77.14>;tag=2112301987
Contact: <sip:pstn_6523567 at aster.autoattendant.eu:5060>
Route: <sip:pstn_6523567 at inbound4.vonage.net:5060>,<sip:63.82.77.14:5060>
Call-ID: CF6FC3F9-800111DA-999DDF96-A870513F at 63.82.77.14
CSeq: 7237 REFER
Refer-To: <sip:pstn_18005551212 at sphone.vopr.vonage.net;method=INVITE>
Referred-By: Vonage User <sip:pstn_6523567 at sphone.vopr.vonage.net>
Proxy-Authorization: Digest username="pstn_6523567",realm="sphone.vopr.vonage.net",nonce="529605995",response="ff4eadf3e625217233fdbff90fd67ec5",uri="sip:pstn_6523567 at sphone.vopr.vonage.net:5061",algorithm=MD5
Max-Forwards: 70
User-Agent: X-PRO Vonage release 1105x
Content-Length: 0


RECEIVE TIME: 26286704
RECEIVE << sphone.vopr.vonage.net:5061
SIP/2.0 202 Accepted
Via: SIP/2.0/UDP aster.autoattendant.eu:5060;rport;branch=z9hG4bK1CFB3639BC0147BE98519AA14B1FE8A1
From: <sip:pstn_6523567 at inbound4.vonage.net>;tag=3655015093
To: “us_pstn_caller” <sip:63.82.77.14>;tag=2112301987
Call-ID: CF6FC3F9-800111DA-999DDF96-A870513F at 63.82.77.14
CSeq: 7237 REFER
Max-Forwards: 14
Content-Length: 0


RECEIVE TIME: 26288861
RECEIVE << sphone.vopr.vonage.net:5061
NOTIFY sip:pstn_6523567 at aster.autoattendant.eu:5060 SIP/2.0
Via: SIP/2.0/UDP sphone.vopr.vonage.net:5061
Via: SIP/2.0/UDP inbound4.vonage.net:5060
Via: SIP/2.0/UDP 63.82.77.14:5060;branch=z9hG4bKC77
From: “us_pstn_caller” <sip:63.82.77.14>;tag=2112301987
To: <sip:pstn_6523567 at inbound4.vonage.net>;tag=3655015093
Call-ID: CF6FC3F9-800111DA-999DDF96-A870513F at 63.82.77.14
CSeq: 102 NOTIFY
Contact: <sip:63.82.77.14:5060>
Max-Forwards: 13
Event: refer
Content-Type: message/sipfrag
Content-Length:    18


SEND TIME: 26288881
SEND >> sphone.vopr.vonage.net:5061
SIP/2.0 200 Ok
Via: SIP/2.0/UDP sphone.vopr.vonage.net:5061
Via: SIP/2.0/UDP inbound4.vonage.net:5060
Via: SIP/2.0/UDP 63.82.77.14:5060;branch=z9hG4bKC77
From: “us_pstn_caller” <sip:63.82.77.14>;tag=2112301987
To: <sip:pstn_6523567 at inbound4.vonage.net>;tag=3655015093
Contact: <sip:pstn_6523567 at aster.autoattendant.eu:5060>
Call-ID: CF6FC3F9-800111DA-999DDF96-A870513F at 63.82.77.14
CSeq: 102 NOTIFY
Server: X-PRO Vonage release 1105x
Content-Length: 0


SEND TIME: 26289010
SEND >> sphone.vopr.vonage.net:5061
BYE sip:pstn_6523567 at sphone.vopr.vonage.net:5061 SIP/2.0
Via: SIP/2.0/UDP aster.autoattendant.eu:5060;rport;branch=z9hG4bK85F2A06975204D788FCD852FE7A86461
From: <sip:pstn_6523567 at inbound4.vonage.net>;tag=3655015093
To: “us_pstn_caller” <sip:63.82.77.14>;tag=2112301987
Contact: <sip:pstn_6523567 at aster.autoattendant.eu:5060>
Route: <sip:pstn_6523567 at inbound4.vonage.net:5060>,<sip:63.82.77.14:5060>
Call-ID: CF6FC3F9-800111DA-999DDF96-A870513F at 63.82.77.14
CSeq: 7239 BYE
Proxy-Authorization: Digest username="pstn_6523567",realm="sphone.vopr.vonage.net",nonce="529605995",response="097df2c665a900e39a7f2811cc623fec",uri="sip:pstn_6523567 at sphone.vopr.vonage.net:5061",algorithm=MD5
Max-Forwards: 70
User-Agent: X-PRO Vonage release 1105x
Content-Length: 0


RECEIVE TIME: 26289141
RECEIVE << sphone.vopr.vonage.net:5061
BYE sip:pstn_6523567 at aster.autoattendant.eu:5060 SIP/2.0
Via: SIP/2.0/UDP sphone.vopr.vonage.net:5061
Via: SIP/2.0/UDP inbound4.vonage.net:5060
Via: SIP/2.0/UDP 63.82.77.14:5060;branch=z9hG4bK17FD
From: “us_pstn_caller” <sip:63.82.77.14>;tag=2112301987
To: <sip:pstn_6523567 at inbound4.vonage.net>;tag=3655015093
Call-ID: CF6FC3F9-800111DA-999DDF96-A870513F at 63.82.77.14
CSeq: 103 BYE
Max-Forwards: 13
Content-Length: 0


SEND TIME: 26289161
SEND >> sphone.vopr.vonage.net:5061
SIP/2.0 200 Ok
Via: SIP/2.0/UDP sphone.vopr.vonage.net:5061
Via: SIP/2.0/UDP inbound4.vonage.net:5060
Via: SIP/2.0/UDP 63.82.77.14:5060;branch=z9hG4bK17FD
From: “us_pstn_caller” <sip:63.82.77.14>;tag=2112301987
To: <sip:pstn_6523567 at inbound4.vonage.net>;tag=3655015093
Contact: <sip:pstn_6523567 at aster.autoattendant.eu:5060>
Call-ID: CF6FC3F9-800111DA-999DDF96-A870513F at 63.82.77.14
CSeq: 103 BYE
Server: X-PRO Vonage release 1105x
Content-Length: 0


RECEIVE TIME: 26289285
RECEIVE << sphone.vopr.vonage.net:5061
SIP/2.0 481 Call Leg/Transaction Does Not Exist
Via: SIP/2.0/UDP aster.autoattendant.eu:5060;rport;branch=z9hG4bK85F2A06975204D788FCD852FE7A86461
From: <sip:pstn_6523567 at inbound4.vonage.net>;tag=3655015093
To: “us_pstn_caller” <sip:63.82.77.14>;tag=2112301987
Call-ID: CF6FC3F9-800111DA-999DDF96-A870513F at 63.82.77.14
CSeq: 7239 BYE
Max-Forwards: 14
Content-Length: 0


----------------------------------------------------
PIŁA 2 już w kinach!
http://klik.wp.pl/?adr=www.pila2.wp.pl&sid=631





More information about the asterisk-users mailing list