[OpenSIPS-Users] B2BUA "From" Header & Caller-ID Question

Brett Woollum brett at woollum.com
Tue Oct 12 09:24:12 CEST 2010


In addition, the uac_replace_from(display,uri); function does not seem to work either. I tested this function by putting: 

uac_replace_from("TEST", "sip:12345 at 1.2.3.4"); 

immediately above the call to B2B_INIT_REQUEST and the outbound "From:" header remains unchanged (incorrect). 


Brett Woollum 
Brett at Woollum.com 


----- Original Message ----- 
From: "Brett Woollum" <brett at woollum.com> 
To: "users-request" <users at lists.opensips.org> 
Sent: Monday, October 11, 2010 11:53:39 PM GMT -08:00 US/Canada Pacific 
Subject: [OpenSIPS-Users] B2BUA "From" Header & Caller-ID Question 


Hello, 

I have a working implementation of the B2BUA modules for OpenSIPS. One problem I am having is that the B2BUA module doesn't seem to respect the "From:" header that I updated before B2B_INIT was called (at the end of the script). Before I call B2B_INIT, my script looks up the correct caller-id from a database and replaces the "From:" header with the new information. Here is that code: 

xlog("This is an external call..."); 
avp_db_query("select id from subscriber where username=\"$fU\" AND domain=\"1.2.3.4\"", "$avp(s:subscriber_id)"); 
if(is_avp_set("$avp(s:subscriber_id)")){ 
avp_db_query("select external_cid_name,external_cid_uri,external_cid_uri_domain from cid where subscriber_id=\"$avp(s:subscriber_id)\"", "$avp(s:external_cid_name);$avp(s:external_cid_uri);$avp(s:external_cid_uri_domain)"); 
remove_hf("From"); 
append_hf("From: \"$avp(s:external_cid_name)\" <sip:$avp(s:external_cid_uri)@$avp(s:external_cid_uri_domain)>;tag=$ft\r\n"); 
} 

The resulting "From": header is perfect (it includes the new caller-id information) and works without problems when I don't use the B2BUA module. It seems as though the B2BUA module (which is called last in the script) does not respect the new header, and instead processes the call using whatever was in $fu when the script started. Unfortunately $fu is not writable, so I can't directly change it. 

What are some possible work-arounds to get the B2BUA module to create the new call but include the "From:" header that I've updated earlier in the script? 

Any ideas are greatly appreciated! 


Brett Woollum 
Brett at Woollum.com 


_______________________________________________ Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20101012/ad063d02/attachment.htm 


More information about the Users mailing list