[asterisk-dev] Wrong REFER handling

Martin Drasar drasar at optimsys.cz
Mon Feb 2 10:01:42 CST 2009


Hello,
I have encountered problem with REFER handling when using Asterisk. I will try
to give as much information as possible so this is going to be a bit lengthy
mail...

In my setup I have:
3 VoIP phones with numbers 3063, 3082 and 7777
1 custom telephony application that I will refer to as OptimTalk from now on.
(I keep this names so that they are the same as the names in SIP messages)

Scenario:
1) OptimTalk creates a call to number 3063 (all calls go through Asterisk)
2) OptimTalk creates a call to number 3082
3) OptimTalk internally bridges RTP streams from these calls so that numbers
   3063 and 3082 can talk together
4) Number 3063 transfers the call to 7777
5) 3082 and 7777 should talk together while the streams still flow through
   OptimTalk

Problem occurs in point 5) because number 7777 can hear 3082 but not vice versa.

Details:
I have attached captured SIP messages as they were caught by tshark on the
machine that Asterisk is running on. Each message is in separate file labeled
NUMBER_FROM_TO_MESSAGE_TARGET.txt
Not all the SIP messages are here - only the relevant ones.

Ad 1) [files 01_... - 04_...]
Two INVITEs are sent, creating two calls
- between OptimTalk and Asterisk (Call-Id:3d0c17a0-6bb5-122c-2780 at 192.168.32.55)
- between Asterisk and 3063 (Call-Id:201d66817a4b0265062a611560fbdf99 at vutbr.cz)

Ad 2) [files 05_... - 08_...]
Two INVITEs are sent, creating two calls
- between OptimTalk and Asterisk (Call-Id:3f949740-6bb5-122c-2780 at 192.168.32.55)
- between Asterisk and 3082 (Call-Id:30b6b781732060ad7bad01646556630b at vutbr.cz)

Ad 4) [rest of files]
3063 creates call to 7777 - again two invites and two calls
- between 3063 and Asterisk
                        (Call-Id:cf13916b9c856f11a0d52fa4848ff1c2 at 192.168.32.84)
- between Asterisk and 7777 (Call-Id:56e79bf513b8244b5cbda2e90cdded1a at vutbr.cz)

3063 sends reINVITE to 7777, changing SDP audio attribute from a=sendrecv to
a=sendonly. Call with id cf13916b9c856f11a0d52fa4848ff1c2 at 192.168.32.84 is
updated.

3063 sends REFER to Asterisk. Call-Id in Refer-To header is
cf13916b9c856f11a0d52fa4848ff1c2%40192.168.32.84 (call between 3063 and Asterisk
in point 4). To-tag and from-tag are tags of OptimTalk and 3063 respectively.
Asterisk responds with 202 ACCEPTED (msg. 16) and then sends NOTIFY (msg. 17)

Then there is BYE between Asterisk and 3063 - messages are not included.

********************************************************************************

To me it looks normal, but there must be some problem. I would be very grateful
if you could help me tracking down this issue.

Btw. scenario without OptimTalk is working well, but as OptimTalk does not
receive any SIP messages after the first two INVITEs and before the last BYEs so
I think it is not a problem of its code.

Asterisk version:
Asterisk 1.4.21.2.g8~dfsg-1 built by drasar @ hel on a i686 running Linux on
2008-09-18 07:23:48 UTC
OS:
Linux asterisk 2.6.25-2-686
Debian GNU/Linux lenny/sid \n \l

Thanks for any help
Martin

-- 
  Martin Drasar, Developer / Analyst
  OptimSys, s.r.o.
  drasar at optimsys.cz
  Tel: +420 541 143 065
  Fax: +420 541 143 066
  http://www.optimsys.cz
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 01_OT_AST_INVITE_3063.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090202/13782159/attachment-0017.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 02_AST_3063_INVITE_3063.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090202/13782159/attachment-0018.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 03_AST_3063_OK_3063.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090202/13782159/attachment-0019.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 04_OT_AST_OK_3063.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090202/13782159/attachment-0020.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 05_OT_AST_INVITE_3082.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090202/13782159/attachment-0021.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 06_AST_3082_INVITE_3082.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090202/13782159/attachment-0022.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 07_AST_3082_OK_3082.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090202/13782159/attachment-0023.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 08_OT_AST_OK_3082.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090202/13782159/attachment-0024.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 09_3063_AST_INVITE_7777.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090202/13782159/attachment-0025.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 10_AST_7777_INVITE_7777.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090202/13782159/attachment-0026.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 11_AST_7777_OK_7777.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090202/13782159/attachment-0027.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 12_3063_AST_OK_7777.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090202/13782159/attachment-0028.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 13_3063_AST_INVITE_7777.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090202/13782159/attachment-0029.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 14_3063_AST_OK_7777.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090202/13782159/attachment-0030.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 15_3063_AST_REFER_7777.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090202/13782159/attachment-0031.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 16_3063_AST_ACCEPTED_7777.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090202/13782159/attachment-0032.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 17_AST_3063_NOTIFY.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090202/13782159/attachment-0033.txt 


More information about the asterisk-dev mailing list