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

Brett Woollum brett at woollum.com
Tue Oct 12 08:53:39 CEST 2010


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 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20101011/aa663886/attachment.htm 


More information about the Users mailing list