[OpenSIPS-Users] B2BUA Implementation for Transfer

Anca Vamanu anca at opensips.org
Thu Oct 28 10:39:27 CEST 2010


Hi,

Do you exit the script after calling b2b_init_request? When calling this 
function you should have the following conditions:
- it Invite - is_method("INVITE")
- it initial - !has_totag()
- does not come from the same machine ( in case you have the proxy on 
the same machine and the request generated by the B2BUA will get looped 
back into the script) !(src_ip=="MY_IP" && src_port=="MY_PORT").
Then if you have this you can call the b2b_init_request either at the 
start of the script, as you did, or somewhere lower after 
lookup("location"). You can call it after if you don't want to do any 
other change on the request generated - and it will be sent directly to 
the IP discovered in location.

Regards,

-- 
Anca Vamanu
www.voice-system.ro




On 10/26/2010 09:12 PM, osiris123d wrote:
> I have seen there are a couple of posts about this so I apologize if this
> seems redundant.
>
> I am starting to mess with the B2BUA and am having some issues.  I am trying
> to solve the transfer issue when a local OpenSIPS subcriber is on the phone
> with a PSTN user and wants to transfer the PSTN user to another OpenSIPS
> user.  I have created the refer.xml file and set up the module parameters,
> so all that is fine.  The issue I am seeing are the invites getting sent out
> from OpenSIPS.
>
> If I place my
> b2b_init_request("refer");
> at the very beginning of my route logic before consume_credentials(),
> location() and all that other junk I see that two Invites are sent
>
> Say the user is 444 at irock.com
> The B2B CALL-ID generated message gets sent to the actual IP address of
> irock.com, which it shouldn't.
> Then a correct invite gets sent to 444 at 7X.45.X.44 which is the correct info
> that is pulled from the location table, but this invite does not have the
> B2B CALL-ID info in it.  So it seems I have placed the b2b_init_request in
> the wrong spot on my script.
>
>
> Then when I place the b2b_init_request after I execute the location() in my
> route logic I see the following
> two invites
>
> The first invite is the B2B invite with the B2B CALL-ID.  It gets sent
> correctly to 444 at 7X.45.X.44 instead of to the actually IP of irock.com.  The
> only problem here is that within the actual TO: field of the sip message it
> is 444 at 7X.45.X.44 instead of 444 at irock.com.  So the phone rejects this
> invite with a "SIP/2.0 404 Not Found" since the phone only knows itself as
> 444 at irock.com.
>
> The second invite is as usual the normal invite without the B2B CALL-ID.
>
> So I guess the issue I am having is that dual invites are being sent and the
> B2B is either sending it to the wrong IP address or it is placing the wrong
> domain in the invite for the user.
>    



More information about the Users mailing list