issue with my XML script, b2bua

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

issue with my XML script, b2bua

marieGre

hello,
I've written a XML script that should do that :

opensips                                  b2bua                                    AS
                                                        -----(forward INVITE)----->
                                                        <-----(200 OK) ------------
            <----(forward INVITE) -----

Here is the script :

<?xml version="1.0"?>
<scenario id="as_forward" name="MS start and end" param="0" type="script">
     <init>
         <bridge>
            <server>
                <id>server1</id>
            </server>
            <client>
                <id>client1</id>
                <type>message</type>
                <destination>
                    <value type="param">0</value>
                </destination>
            </client>
         </bridge>
         <state>1</state>
     </init>
     <rules>
         <request>
             <bye>
                 <rule id="1">
                     <condition>
                         <state>1</state>
                         <sender>
                             <type>client</type>
                             <id>client1</id>
                         </sender>
                     </condition>
                     <action>
                         <send_reply>
                             <code>200</code>
                             <reason>OK</reason>
                         </send_reply>
                         <delete_entity/>
                         <bridge>
                             <client>
                                 <type>client</type>
                                 <id>server1</id>
                             </client>
                             <client>
                                 <id>client1</id>
                                 <destination>
                                     <value type="initial">server1</value>
                                 </destination>
                             </client>
                         </bridge>
                     </action>
                 </rule>

            </bye>
        </request>
    </rules>
</scenario>




When I do the call, I can see that:
- the invite is forwarded to the AS
- the AS answer a "200 OK"
- but the phone call, but the callee doesn't receive the call

thanks !



Pieddemail
_______________________________________________
Users mailing list
Users@...
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: issue with my XML script, b2bua

Anca Vamanu-2
Hi Marie,

You are saying that the initial call setup does not happen? Are you
using the latest code? Please update from svn, branch 1.6, it contains
many fixes.
Your script has a few problems:
1.
                             <client>
                                 <type>client</type>
                                 <id>server1</id>
Don't put type client here, it is in fact of type server, but the type
is not needed here. If you put the wrong type though it will confuse the
analyzer.

2. When you create the second call - connecting the caller to its
desired destination, you specify that a new client entity must be
created but you put the same id:

                         <client>
                                 <id>client1</id>
                                 <destination>
                                     <value type="initial">server1</value>
                                 </destination>
                             </client>
Please use another id.

On the other hand, I suggest for you to start playing with the simple
topology hiding scenario and the go to more complicated scripts.

Regards,

--
Anca Vamanu
www.voice-system.ro



marie.gremillot wrote:

>
> hello,
> I've written a XML script that should do that :
>
> opensips                                  b2bua                      
>              AS
>                                                         -----(forward
> INVITE)----->
>                                                         <-----(200 OK)
> ------------
>             <----(forward INVITE) -----
>
> Here is the script :
>
> <?xml version="1.0"?>
> <scenario id="as_forward" name="MS start and end" param="0" type="script">
>      <init>
>          <bridge>
>             <server>
>                 <id>server1</id>
>             </server>
>             <client>
>                 <id>client1</id>
>                 <type>message</type>
>                 <destination>
>                     <value type="param">0</value>
>                 </destination>
>             </client>
>          </bridge>
>          <state>1</state>
>      </init>
>      <rules>
>          <request>
>              <bye>
>                  <rule id="1">
>                      <condition>
>                          <state>1</state>
>                          <sender>
>                              <type>client</type>
>                              <id>client1</id>
>                          </sender>
>                      </condition>
>                      <action>
>                          <send_reply>
>                              <code>200</code>
>                              <reason>OK</reason>
>                          </send_reply>
>                          <delete_entity/>
>                          <bridge>
>                              <client>
>                                  <type>client</type>
>                                  <id>server1</id>
>                              </client>
>                              <client>
>                                  <id>client1</id>
>                                  <destination>
>                                      <value type="initial">server1</value>
>                                  </destination>
>                              </client>
>                          </bridge>
>                      </action>
>                  </rule>
>
>             </bye>
>         </request>
>     </rules>
> </scenario>
>
>
>
>
> When I do the call, I can see that:
> - the invite is forwarded to the AS
> - the AS answer a "200 OK"
> - but the phone call, but the callee doesn't receive the call
>
> thanks !
>
>
>
> Pieddemail
> <https://compte.laposte.net/inscription/index.do?jeux=201001FOOTER>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: issue with my XML script, b2bua

opensipslist

Hello Anca,

An ven., févr 05, 2010, Anca Vamanu schrieb:
>On the other hand, I suggest for you to start playing with the
>simple topology hiding scenario and the go to more complicated
>scripts.
>
...but the topology hiding scenario has no associated XML file
which makes learning more difficult.

What I mean is, could you please post an example XML scenario
file topohide.xml:

<?xml version="1.0"?>
<scenario id="topohide" name="Example" param="0" type="script">
    <init>
    <...>

...which if called with:

  modparam("b2b_logic", "script_scenario", "/pfx/topohide.xml")
  b2b_init_request("topohide");

...would have the same effect as b2b_init_request("top hiding")

That would greatly help us learn to write new scenarios.

Regards,
Brian

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: issue with my XML script, b2bua

Anca Vamanu-2
Hi Brian,

Ok, I can write a sample scenario for the topology hiding case. It will
have no rules, because only the default pass through rule is applied. It
will only have an init section:

<?xml version="1.0"?>
<scenario id="tophiding" name="Topology hiding" 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>
     </init>
</scenario>

This scenario specifies that two entities must be created, a server on
to deal with the received INVITE and a client one to start the dialog on
the other side. The destination for this client entity is exactly the
one from the received INVITE, so we have - value type="initial" and to
be taken from entity server1.

Hope this helps.

Regards,

--
Anca Vamanu
www.voice-system.ro



[hidden email] wrote:

> Hello Anca,
>
> An ven., févr 05, 2010, Anca Vamanu schrieb:
>  
>> On the other hand, I suggest for you to start playing with the
>> simple topology hiding scenario and the go to more complicated
>> scripts.
>>
>>    
> ...but the topology hiding scenario has no associated XML file
> which makes learning more difficult.
>
> What I mean is, could you please post an example XML scenario
> file topohide.xml:
>
> <?xml version="1.0"?>
> <scenario id="topohide" name="Example" param="0" type="script">
>     <init>
>     <...>
>
> ...which if called with:
>
>   modparam("b2b_logic", "script_scenario", "/pfx/topohide.xml")
>   b2b_init_request("topohide");
>
> ...would have the same effect as b2b_init_request("top hiding")
>
> That would greatly help us learn to write new scenarios.
>
> Regards,
> Brian
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: issue with my XML script, b2bua

opensipslist

Hello Anca,

An jeu., févr 11, 2010, Anca Vamanu schrieb:

>[hidden email] wrote:
>> An ven., févr 05, 2010, Anca Vamanu schrieb:
>>> On the other hand, I suggest for you to start playing with the
>>> simple topology hiding scenario and the go to more complicated
>>> scripts.
>>>    
>> ...but the topology hiding scenario has no associated XML file
>> which makes learning more difficult.
>>
>> What I mean is, could you please post an example XML scenario
>> file topohide.xml:
>>
>> [...]
>>
>Ok, I can write a sample scenario for the topology hiding case.
>It will have no rules, because only the default pass through rule
>is applied. It will only have an init section:
>
><?xml version="1.0"?>
><scenario id="tophiding" name="Topology hiding" 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>
>     </init>
></scenario>
>
>This scenario specifies that two entities must be created, a server
>on to deal with the received INVITE and a client one to start the
>dialog on the other side. The destination for this client entity
>is exactly the one from the received INVITE, so we have - value
>type="initial" and to be taken from entity server1.
>
>Hope this helps.
>
Yes it does. Thanks alot. I noticed that there is a wiki-like 'Edit'
button on the B2BUA tutorial. Should we consider building a cookbook
of scenarios with their associated XML files there? Can anyone edit
the B2BUA totorial?

Regards,
Brian

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users