[OpenSIPS-Users] uac_redirect question

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Aug 28 17:18:40 CEST 2008


Hi Zahid,

unfortunately, get_redirects() push the contacts directly into branches 
- it does not know how to use AVPS (yet ;)).

What you can do is to use onreply_route[] to catch the 3xx reply and 
store the contact hdr into an AVP (note you need to set onreply_avp_mode 
to 1 - http://www.opensips.org/html/tm.html#id2560594 ). Later, in 
failure route, use the AVP the extract (regexp based) the contacts....

A bit ugly, but it should work.

Regards,
Bogdan

zm23 wrote:
> Hi Bogdan,
>
> There are multiple contacts returned by the gateway. In this 
> particular scenario there is one user at gw_ip and the other is 
> user at proxy_ip.  The user part is same in both cases.  I want to use 
> the contact with proxy's domain and if there is no such contact, then 
> use the gateway contact.  I did end up using drop for the contacts 
> with gw_ip in the branch route but this would happen even if there was 
> no other branch.
>
> Doesn't get_redirect() add the contacts as branches already?  how can 
> I get the results from get_redirects in an avp?
>
>
> Thanks.
>




More information about the Users mailing list