[OpenSIPS-Users] b2bua xml files

Richard Revels rrevels at bandwidth.com
Sat Dec 4 19:35:07 CET 2010


It's possible that the b2bua doesn't yet support what I'm trying to do with
it but I find I have some basic questions about the XML layout as a result
of trying.  If I want to handle two different types of request within a
scenario does it require two <request> blocks or a single <request> block
containing the two methods?

<rules>
<request>
<invite>
<rule>
<condition/>
<action/>
</rule>
</invite>
<bye>
<rule>
<condition/>
<action/>
</rule>
</bye>
</request>
</rules>

or

<rules>
<request>
<invite>
<rule>
<condition/>
<action/>
</rule>
</invite>
</request>
<request>
<bye>
<rule>
<condition/>
<action/>
</rule>
</bye>
</request>
</rules>

Next, request blocks defined as invite seem to handle reinvite ok but I'm
having trouble getting two <bridge> sections to work in the same re<invite>
block.  I can see where that would get complicated pretty quick if it was
allowed.  Just wondering if it's possible to send both legs of a call to a
new location.  I've also tried having the b2bua send a 200 to the side that
originated the reinvite and bridging the other side to a media prompt.  That
works fine (although I'm wondering how many clients will ACK a 200 with no
SDP) but when the far side comes back from the media prompt (BYE) I am
unable to bridge the two original legs back together with my current layout.
 The BYE gets passed all the way back to the media peer and the original
side is left hanging.

Finally, is it possible to compare the contents of a message X-header as
part of the <condition> for a block?

I've pasted my xml file with that second layout.  Sorry in advance for
whatever format mangling various mail clients may do on this.

<?xml version="1.0"?>
<scenario id="catch-hold" name="when i lose the mic let caller know"
param="2" type="script">
<init>
<bridge>
<server>
<id>server1</id>
</server>
<client>
<id>client1</id>
<type>message</type>
<destination>
<value type="initial">server1</value>
</destination>
</client>
</bridge>
<state>1</state>
</init>
<rules>
<request>
<invite>
<rule id="1">
<condition>
<state>1</state>
<sender>
<type>client</type>
<id>client1</id>
</sender>
</condition>

<action>
                                                <send_reply>
                                                        <code>200</code>
                                                        <reason>Hang Out For
a While</reason>
                                                </send_reply>
<bridge>
<client>
<id>server1</id>
</client>
<client>
<id>client2</id>
<destination>
<value type="param">1</value>
</destination>
</client>
</bridge>
<state>2</state>
</action>
</rule>
</invite>
</request>
<request>
<bye>
<rule id="3">
<condition>
<sender>
<type>client</type>
<id>client2</id>
</sender>
</condition>
<action>
<send_reply>
<code>200</code>
<reason>OK</reason>
</send_reply>
<delete_entity/>
<bridge>
<client>
<id>server1</id>
</client>
<client>
<id>client1</id>
</client>
</bridge>
<state>1</state>
</action>
</rule>
</bye>
</request>
</rules>
</scenario>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20101204/31b9d893/attachment.htm>


More information about the Users mailing list