[OpenSIPS-Users] Relay Subscribe/Notify for MWI

Bogdan-Andrei Iancu bogdan at opensips.org
Fri Aug 22 08:43:28 CEST 2014


Hi David,

Can you post somewhere the sip capture (ngrep or pcap) of a whole 
SUBSCRIBE/NOTIFY session showing (from opensips perspective) both in and 
out pacakges (inital, sequential , the whole dialog) ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 21.08.2014 19:44, Sidwell, David wrote:
>
> Bogdan,
>
> Yes we do.
>
> We first set the packet forward destination using the drouting module:
>
> route_to_carrier("MGC", "$var(gateway_attrs)", "$var(carrier_attrs)")
>
> Then modify the TO and FROM using the uac module:
>
> construct_uri("sip", "$tU", "$avp(mgc_domain)", "", "", $avp(uri));
>
> uac_replace_to("$avp(uri)");
>
> construct_uri("sip", "$fU", "$avp(mgc_domain)", "", "", $avp(uri));
>
> uac_replace_from("$avp(uri)");
>
> We also replace the contact header, however for that we use the 
> textops module:
>
> subst('/^Contact: ([^@]*@)[a-zA-Z_0-9.:-]+(.*)$/Contact: 
> \1$var(contact)\2/ig');
>
> And finally we forward the packet using tm:
>
> if (!t_relay())
>
> {
>
> sl_reply_error();
>
> }
>
> Thanks,
>
> Dave
>
> _______________________________________ _______
>
> **
>
> *Dave Sidwell *| *NEC Enterprise Communication Technologies | Senior 
> Manager - SW Development*
>
> 4 Forest Parkway  |  Shelton, CT 06484|((O) (203) 926-5424  |((M) 
> (203) 513-1677  | *_david.sidwell at necect.com_
>
> *From:*Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]
> *Sent:* Thursday, August 21, 2014 10:41 AM
> *To:* Sidwell, David; OpenSIPS users mailling list
> *Subject:* Re: [OpenSIPS-Users] Relay Subscribe/Notify for MWI
>
> David,
>
> Do you use the "uac" module to do the changes over the TO/FROM headers 
> or ??
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
> On 21.08.2014 16:31, Sidwell, David wrote:
>
>     Hi Bogdan,
>
>     Currently the SUBSCRIBE is not handled locally, but forwarded to a
>     server which implements RFC 3842.
>
>     In my application, the UAC’s register with OpenSIPS (Registrar
>     module) which in turn registers them with the external server
>     (Registrant module).
>
>     The TO/FROM headers of further requests are modified to reflect
>     the domain of the server and the requests are forwarded to the server.
>
>     In-dialog responses are automatically modified with the reverse
>     modifications and forwarded back to the UAC.
>
>     This works fine for all requests except the SUBSCRIBE/NOTIFY.
>
>     Ideally the re-SUBSCRIBE would contain the same modifications, and
>     the NOTIFY’s would have the reverse modifications.
>
>     (I am OK with manually making the transformations, but the
>     re-SUBSCRIBE’s do not seem to be processed via the route script)
>
>     I am open to a solution where opensips handles the subscribes
>     (presence_mwi?), but I don’t see any way I could retrieve the MWI
>     indication from the server.
>
>     Thanks,
>
>     Dave
>
>     *From:*Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]
>     *Sent:* Thursday, August 21, 2014 3:54 AM
>     *To:* OpenSIPS users mailling list; Sidwell, David
>     *Subject:* Re: [OpenSIPS-Users] Relay Subscribe/Notify for MWI
>
>     Hi David,
>
>     How do you change the TO / FROM hdrs in initial SUBSCRIBE ?? Is
>     the SUBSCRIBE handled locally (opensips as presence server) or you
>     forward it further ?
>
>     Regards,
>
>
>     Bogdan-Andrei Iancu
>
>     OpenSIPS Founder and Developer
>
>     http://www.opensips-solutions.com
>
>     On 16.08.2014 00:07, Sidwell, David wrote:
>
>         Hello,
>
>         I am using OpenSIPS in an application relaying SIP messaging
>         between clients and server with modifications to the “To”,
>         “From” and “Contact” headers.
>
>         This is working well for call control,  however the server
>         also provides MWI via Subscribe/Notify, and unfortunately this
>         does not work properly.
>
>         There are two basic issues:
>
>         1.Although the initial SUBSCRIBE can be modified and relayed
>         successfully, it cannot create a dialog. Any subsequent
>         “in-dialog” re-subscription messages seem to be automatically
>         relayed but the “To”, “From” and “Contact” modifications are
>         not included. These re-subscribes do NOT go through the
>         configuration file route script so there is no opportunity to
>         make any additional modifications.
>
>         2.“In-dialog” NOTIFY messages from the server do not get
>         routed back to the client, but appear in the configuration
>         file route script with “totags”. These can be manually routed
>         back to the subscriber but any attempt to modify the To and
>         From headers fails (due to the presence of the totags).
>
>         Questions:
>
>         -Is there any way to configure OpenSIPS to allow for automatic
>         relaying of the Subscribe/Notify messages in an application
>         such as this?
>
>         -Is there a way to make use of the Presence modules to achieve
>         the same function (The server will not issue PUBLISH commands).
>
>         Thanks,
>
>         Dave
>
>
>
>
>
>         _______________________________________________
>
>         Users mailing list
>
>         Users at lists.opensips.org  <mailto: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/20140822/7df0ef0b/attachment-0001.htm>


More information about the Users mailing list