[asterisk-dev] Multiple Contacts in 302 Message

Olle E. Johansson oej at edvina.net
Wed Aug 15 08:36:30 CDT 2012


15 aug 2012 kl. 15:26 skrev Matthew Jordan:

> 
> ----- Original Message ----- 
> 
>> From: "Andaleeb Roomy" <andaleebcse at gmail.com>
>> To: asterisk-dev at lists.digium.com
>> Sent: Wednesday, August 15, 2012 6:15:59 AM
>> Subject: [asterisk-dev] Multiple Contacts in 302 Message
> 
>> Hi,
> 
>> I have a question regarding multiple contacts in received 302 message
>> against INVITEs.
> 
>> When my Asterisk tries to send out an INVITE, it gets a 302 response,
>> redirecting the call to other (multiple) contacts.
>> This 302 message has multiple contacts with q-values in its Contact
>> header, like the following:
>> Contact: <sip:alice at ip1:5060>;q=0.6,<sip:bob at ip2:5060>;q=0.4
> 
>> My question is, does Asterisk try all the contacts according to the
>> q-values? Or does it try only the first contact in the list?
> 
> Asterisk does not support prioritized contacts in 3xx responses, nor - at a
> more fundamental level - does it support the concept of having multiple
> redirecting parties. As such, it will extract the first URI in the Contact header
> as the redirecting party.
The contact is the new call forward extension, not the redirecting party.

I have never seen multiple contacts in a 302. The 300 Multiple Choices is normally used for that.

RFC 3261 talks about "The contact URI" in the description of the 302 Moved Temporarily
message, assuming one contact I guess. It's very unclear.

I see that Cisco has implemented multiple contacts in a 302
http://www.cisco.com/en/US/docs/voice_ip_comm/pgw/9/feature/module/9.5_2_/FMmltIPs.html

It's an interesting challenge for Asterisk. How to we bring multiple redirects to the dialplan?
It needs to enter the FORWARD_CONTEXT.

I would guess that the SIP channel could start with the first priority and if that exists in the dialplan,
use that - otherwise move on. Doing serial forking is something we do in the dialplan. We could potentially
send secondary choices to the dialplan in a channel variable for processing.

This are just random thoughts on how to implement this. As Matt said, we have no support for it today.
/O


More information about the asterisk-dev mailing list