Re: [OpenSIPS-Users] PUA module functions and XCAP functionality

2011-05-19 Thread Saúl Ibarra Corretgé
Hi,

On May 19, 2011, at 8:13 AM, Jayesh Nambiar wrote:

 Hello all,
 I have setup an opensips with call and presence capabilities with xcap. Now 
 there are some Endpoints that does not support presence capabilities for 
 which I use PUA module. So whenever those endpoints are registered the 
 watchers for those endpoints will see them as online. And when they 
 Un-register the watchers should see them as offline.
 The question here is how to enable the xcap functionality for such endpoints. 
 How does an endpoint which does not have presence capabilites allow or 
 disallow someone to check their presence status which is generated by the PUA 
 module?
 Is it something possible to do from the web-interface? For eg. someone wants 
 to check the presence status of endpoint A which does not have presence 
 capabilites. User A logs into the web-interface, allows the watcher to view 
 its presence status which actually creates an xcap doc for that user. And 
 only then the PUBLISH from PUA gets notified to those users based upon the 
 xcap rules of that user.
 Any proper direction in this context will be really helpful.
 
 Thanks,
 

You may want to have a look at SOAP SIMPLE Proxy 
(http://openxcap.org/wiki/soap-simple-proxy) it allows you to interact with 
OpenXCAP and manage presence policy with a SOAP interface, which you can use 
from a web page.


Regards,

Saúl Ibarra Corretgé
AG Projects





___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] opensips = SEMS(voicemail)

2011-05-19 Thread Max Mühlbronner

Hi,


The sems example uses variables which are setup at serweb. 
(email/language/...)
These should be set in opensips config (maybe taken from database/ 
whatever...)



There are variables in opensips containing some of the values you could 
use like the request domain / from uri / ...


http://www.opensips.org/Resources/DocsCoreVar16


here is a simple real life example:

avp_db_query(select email_address FROM subscriber WHERE username = 
'$rU',$avp(s:677));


append_hf(P-App-Param: 
eml=$avp(s:677);mod=voicemail;lng=english;snd=$fU;dom=$Ri\r\n);





Best Regards


Max M.


Am 18.05.2011 19:19, schrieb Steven Pokrandt:
SEMS docs make it sound easy to integrate with SER (opensips?)   but 
opensips complains about the 2nd append line.  I'm new to all of this 
and as you know it's a steep learning curve.  where do i get the $t.*, 
 @from.*, @ruri.*   variables set from?  is there a module?  do I need 
to look them up and assign them from the DB in opensips?



append_hf(P-App-Name: voicemail\r\n);
append_hf(P-App-Param: 
mod=%$t.voicemail%|;eml='%$t.email%|';usr=%@ruri.user%|;snd='%@from.uri%|';dom=%@ruri.host%|;uid=%$t.uid%|;did=%$t.did%|;);



--
Steven Pokrandt  (425) 686 WABO
http://steven.pokrandt.me/Steven_Pokrandt.vcf


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] adding 1 alias to more than one subscriber

2011-05-19 Thread Toyima Dias
Hi Dave,

i've added the line modparam(alias_db, append_branches, 1), but now i'm
trying to call the alias 314001 and the INVITE is going to both users 1000
and 1001 as expected: that's nice...

 #
U 2011/05/18 13:55:52.918314 *192.168.131.129:5060 - 192.168.131.1:61052
*INVITE *sip:vipexamk@192.168.131.1:61052* SIP/2.0
Record-Route: sip:192.168.131.129;lr=on
Via: SIP/2.0/UDP 192.168.131.129;branch=z9hG4bKec48.66d63466.0
Via: SIP/2.0/UDP 192.168.131.1:5060
;branch=z9hG4bK-d8754z-801d2084170f1b21-1---d8754z-
Max-Forwards: 69
Contact: sip:1000@192.168.131.1:5060;transport=UDP
To: sip:314001@192.168.131.129;transport=UDP
From: 1000sip:1000@192.168.131.129;transport=UDP;tag=ff69d424
Call-ID: N2JiMTRhODJhNTRiNTgzNjc3NjdkZTI1NThiOWQ1MTU.
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO,
SUBSCRIBE
Content-Type: application/sdp
User-Agent: Zoiper rev.5324
Content-Length: 329

v=0
o=Zoiper_user 0 0 IN IP4 192.168.131.1
s=Zoiper_session
c=IN IP4 192.168.131.1
t=0 0
m=audio 8000 RTP/AVP 3 0 8 110 98 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:110 speex/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=30
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

#
U 2011/05/18 13:55:52.918371 *192.168.131.129:5060 - 192.168.131.129:5060
*INVITE *sip:1000@192.168.131.129* SIP/2.0
Record-Route: sip:192.168.131.129;lr=on
Via: SIP/2.0/UDP 192.168.131.129;branch=z9hG4bKec48.66d63466.1
Via: SIP/2.0/UDP 192.168.131.1:5060
;branch=z9hG4bK-d8754z-801d2084170f1b21-1---d8754z-
Max-Forwards: 69
Contact: sip:1000@192.168.131.1:5060;transport=UDP
To: sip:314001@192.168.131.129;transport=UDP
From: 1000sip:1000@192.168.131.129;transport=UDP;tag=ff69d424
Call-ID: N2JiMTRhODJhNTRiNTgzNjc3NjdkZTI1NThiOWQ1MTU.
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO,
SUBSCRIBE
Content-Type: application/sdp
User-Agent: Zoiper rev.5324
Content-Length: 329

v=0
o=Zoiper_user 0 0 IN IP4 192.168.131.1
s=Zoiper_session
c=IN IP4 192.168.131.1
t=0 0
m=audio 8000 RTP/AVP 3 0 8 110 98 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:110 speex/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=30
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

As you can see, the R-URI of the first invite is ok, but not the second, as
you can see the domain part is the ip address of the proxy and not the ip of
the location user 1000, what's happening? seems to be a loop on the second
branch* (192.168.131.129:5060 - 192.168.131.129:5060*)...as i can see, the
DB alias is correctly fetching both users from DB, but only the first one is
resolved via lookup(location) (registration search).

any suggest?

Many thanks!



2011/5/18 Dave Singer dave.dorasin...@gmail.com

 Toyima,

 check:
 http://www.opensips.org/html/docs/modules/1.6.x/alias_db.html#id250030

 Dave

 On Tue, May 17, 2011 at 6:44 AM, Toyima Dias toyim...@gmail.com wrote:
 
  Is it possible to add the same alias to more than one subscriber? for
 example, if an incoming call to the number 14882736524 is assigned to
 subscriber 1000, is it possible to assign this DID to subscriber 1001? the
 idea is to create a group of ringing or something like that, is that
 possible? i've tried to insert the data on phpmyadmin and also on
 opensips-panel, it doesn't work:
 
 
  Error
 
  consulta SQL:
 
  INSERT INTO `opensips`.`dbaliases` (
 
  `id` ,
  `alias_username` ,
  `alias_domain` ,
  `username` ,
  `domain`
  )
  VALUES (
  NULL , '314001', '192.168.131.129', '1000', '192.168.131.129'
  )
 
  MySQL ha dicho:
 
  #1062 - Duplicate entry '314001-192.168.131.129' for key 'alias_idx'
 
 
  Thanks!
 
  ___
  Users mailing list
  Users@lists.opensips.org
  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 



 --
 David Singer

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Reroute B2B call after failure

2011-05-19 Thread osiris123d
Do you have some code example of how to do this?  I am not sure what
variables need to be overwritten.

--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Reroute-B2B-call-after-failure-tp6371369p6383969.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Rewrite Username in URI when using userloc

2011-05-19 Thread Spencer Thomason
Hello all,
I'm using Opensips in between several Freeswitch and Asterisk boxes (each with 
multiple DIDs) and my ITSP's proxies.  The local IP PBXs register to Opensips 
and inbound routing is done via the userloc module.  The problem I have is that 
I need to send in incoming INVITE to the original username, not the registered 
contact so the PBXs can perform the proper routing.  Currently I set $rU=$Ou in 
the request route which works perfectly if there is only one contact 
registered.  If there is more than one contact registered, the INVITE is sent 
to the registered contact and then the PBX doesn't know how to route the call 
since it hits a default contact.  Is there a better way to do this?  I'm fairly 
new to Opensips and would appreciate any help. :-)

A snippet from my script:
route {
...
if (!lookup(location,m)) {
switch ($retcode) {
case -1:
case -3:
t_newtran();
t_reply(404, Not Found);
exit;
case -2:
sl_send_reply(405, Method Not Allowed);
exit;
}
}

$rU=$oU;
route(1);
}


route[1] {
if (is_method(INVITE)) {
t_on_branch(2);
t_on_reply(2);
t_on_failure(1);
}

if (!t_relay()) {
sl_reply_error();
};
exit;
}


branch_route[2] {
xlog(new branch at $ru\n);
}


onreply_route[2] {
xlog(incoming reply\n);
}


failure_route[1] {
if (t_was_cancelled()) {
exit;
} 

if (t_check_status(3[0-9][0-9])) {
t_reply(404,Not found);
exit;
}
}



Thanks,
Spencer



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Reroute B2B call after failure

2011-05-19 Thread Ovidiu Sas
On Thu, May 19, 2011 at 6:16 PM, osiris123d duane.lar...@gmail.com wrote:
 Do you have some code example of how to do this?  I am not sure what
 variables need to be overwritten.

destination URI and request URI::
http://www.opensips.org/Resources/DocsCoreVar#toc29
http://www.opensips.org/Resources/DocsCoreVar#toc67

Regards,
Ovidiu Sas

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Reroute B2B call after failure

2011-05-19 Thread duane . larson
Thanks Ovidiu. I was using $rd before to send it to the Proxy, but $du  
looks to be better suited for that. And then $ru works perfect for  
representing the Primary or Backup SIP Gateway.


Appreciate it!!!

On , Ovidiu Sas o...@voipembedded.com wrote:

On Thu, May 19, 2011 at 6:16 PM, osiris123d duane.lar...@gmail.com wrote:



 Do you have some code example of how to do this? I am not sure what



 variables need to be overwritten.





destination URI and request URI::



http://www.opensips.org/Resources/DocsCoreVar#toc29



http://www.opensips.org/Resources/DocsCoreVar#toc67





Regards,



Ovidiu Sas





___



Users mailing list



Users@lists.opensips.org



http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] adding 1 alias to more than one subscriber

2011-05-19 Thread Dave Singer
Toyima,
Not sure how much you know about branches, so...

With that switch branches are added for each alias. By default any
test or action in the rest of the main route script only applies to
the first branch. That is why only the first branch has the lookup
location done to it.
In order to test/act on other branches, you need to use t_on_branch()
and define a route block. When t_on_branch() is set to that route
block it will be run for all branches that were created.
Also of note is that in failure route, the vars like $ru and headers
are all set to the way they were before any branch route is run (may
have an effect on how you failover to voicemail). So consider that
when choosing to apply changes in main routing or branch routing. A
good example is uac_replace_from() which can only be run once on a
message so it is good to put it as one of the last things and if there
are branches, do it in the branch block.
What I've found to work good is to define a named route block to
handle last minute changes and test in main route block if there are
multiple branches. If only main branch, just call the
last_minute_changes from main route before exit; other wise set
t_on_branch() and call last_minute_changes from the branch route
block.

Hope that helps.

Dave

On Thu, May 19, 2011 at 2:58 AM, Toyima Dias toyim...@gmail.com wrote:
 Hi Dave,

 i've added the line modparam(alias_db, append_branches, 1), but now i'm
 trying to call the alias 314001 and the INVITE is going to both users 1000
 and 1001 as expected: that's nice...

  #
 U 2011/05/18 13:55:52.918314 192.168.131.129:5060 - 192.168.131.1:61052
 INVITE sip:vipexamk@192.168.131.1:61052 SIP/2.0
 Record-Route: sip:192.168.131.129;lr=on
 Via: SIP/2.0/UDP 192.168.131.129;branch=z9hG4bKec48.66d63466.0
 Via: SIP/2.0/UDP
 192.168.131.1:5060;branch=z9hG4bK-d8754z-801d2084170f1b21-1---d8754z-
 Max-Forwards: 69
 Contact: sip:1000@192.168.131.1:5060;transport=UDP
 To: sip:314001@192.168.131.129;transport=UDP
 From: 1000sip:1000@192.168.131.129;transport=UDP;tag=ff69d424
 Call-ID: N2JiMTRhODJhNTRiNTgzNjc3NjdkZTI1NThiOWQ1MTU.
 CSeq: 2 INVITE
 Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO,
 SUBSCRIBE
 Content-Type: application/sdp
 User-Agent: Zoiper rev.5324
 Content-Length: 329

 v=0
 o=Zoiper_user 0 0 IN IP4 192.168.131.1
 s=Zoiper_session
 c=IN IP4 192.168.131.1
 t=0 0
 m=audio 8000 RTP/AVP 3 0 8 110 98 101
 a=rtpmap:3 GSM/8000
 a=rtpmap:0 PCMU/8000
 a=rtpmap:8 PCMA/8000
 a=rtpmap:110 speex/8000
 a=rtpmap:98 iLBC/8000
 a=fmtp:98 mode=30
 a=rtpmap:101 telephone-event/8000
 a=fmtp:101 0-15
 a=sendrecv

 #
 U 2011/05/18 13:55:52.918371 192.168.131.129:5060 - 192.168.131.129:5060
 INVITE sip:1000@192.168.131.129 SIP/2.0
 Record-Route: sip:192.168.131.129;lr=on
 Via: SIP/2.0/UDP 192.168.131.129;branch=z9hG4bKec48.66d63466.1
 Via: SIP/2.0/UDP
 192.168.131.1:5060;branch=z9hG4bK-d8754z-801d2084170f1b21-1---d8754z-
 Max-Forwards: 69
 Contact: sip:1000@192.168.131.1:5060;transport=UDP
 To: sip:314001@192.168.131.129;transport=UDP
 From: 1000sip:1000@192.168.131.129;transport=UDP;tag=ff69d424
 Call-ID: N2JiMTRhODJhNTRiNTgzNjc3NjdkZTI1NThiOWQ1MTU.
 CSeq: 2 INVITE
 Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO,
 SUBSCRIBE
 Content-Type: application/sdp
 User-Agent: Zoiper rev.5324
 Content-Length: 329

 v=0
 o=Zoiper_user 0 0 IN IP4 192.168.131.1
 s=Zoiper_session
 c=IN IP4 192.168.131.1
 t=0 0
 m=audio 8000 RTP/AVP 3 0 8 110 98 101
 a=rtpmap:3 GSM/8000
 a=rtpmap:0 PCMU/8000
 a=rtpmap:8 PCMA/8000
 a=rtpmap:110 speex/8000
 a=rtpmap:98 iLBC/8000
 a=fmtp:98 mode=30
 a=rtpmap:101 telephone-event/8000
 a=fmtp:101 0-15
 a=sendrecv

 As you can see, the R-URI of the first invite is ok, but not the second, as
 you can see the domain part is the ip address of the proxy and not the ip of
 the location user 1000, what's happening? seems to be a loop on the second
 branch (192.168.131.129:5060 - 192.168.131.129:5060)...as i can see, the DB
 alias is correctly fetching both users from DB, but only the first one is
 resolved via lookup(location) (registration search).

 any suggest?

 Many thanks!

 2011/5/18 Dave Singer dave.dorasin...@gmail.com

 Toyima,

 check:
 http://www.opensips.org/html/docs/modules/1.6.x/alias_db.html#id250030

 Dave

 On Tue, May 17, 2011 at 6:44 AM, Toyima Dias toyim...@gmail.com wrote:
 
  Is it possible to add the same alias to more than one subscriber? for
  example, if an incoming call to the number 14882736524 is assigned to
  subscriber 1000, is it possible to assign this DID to subscriber 1001? the
  idea is to create a group of ringing or something like that, is that
  possible? i've tried to insert the data on phpmyadmin and also on
  opensips-panel, it doesn't work:
 
 
  Error
 
  consulta SQL:
 
  INSERT INTO `opensips`.`dbaliases` (
 
  `id` ,
  `alias_username` ,
  `alias_domain` ,
  `username` ,
  `domain`
  )
  VALUES (
  NULL , '314001', '192.168.131.129', '1000', '192.168.131.129'
  )
 
  MySQL ha 

Re: [OpenSIPS-Users] Rewrite Username in URI when using userloc

2011-05-19 Thread Dave Singer
Spencer,
Looks like you just need to move $rU=$oU; into branch_route[2]
Note that in failure route it will be reset to what it was before
changes done in branch route so you may want to do it in main route
and in branch route.

Dave

On Thu, May 19, 2011 at 4:02 PM, Spencer Thomason
spen...@5ninesolutions.com wrote:
 Hello all,
 I'm using Opensips in between several Freeswitch and Asterisk boxes (each 
 with multiple DIDs) and my ITSP's proxies.  The local IP PBXs register to 
 Opensips and inbound routing is done via the userloc module.  The problem I 
 have is that I need to send in incoming INVITE to the original username, not 
 the registered contact so the PBXs can perform the proper routing.  Currently 
 I set $rU=$Ou in the request route which works perfectly if there is only one 
 contact registered.  If there is more than one contact registered, the INVITE 
 is sent to the registered contact and then the PBX doesn't know how to route 
 the call since it hits a default contact.  Is there a better way to do this?  
 I'm fairly new to Opensips and would appreciate any help. :-)

 A snippet from my script:
 route {
        ...
        if (!lookup(location,m)) {
                switch ($retcode) {
                        case -1:
                        case -3:
                                t_newtran();
                                t_reply(404, Not Found);
                                exit;
                        case -2:
                                sl_send_reply(405, Method Not Allowed);
                                exit;
                }
        }

        $rU=$oU;
        route(1);
 }


 route[1] {
        if (is_method(INVITE)) {
                t_on_branch(2);
                t_on_reply(2);
                t_on_failure(1);
        }

        if (!t_relay()) {
                sl_reply_error();
        };
        exit;
 }


 branch_route[2] {
        xlog(new branch at $ru\n);
 }


 onreply_route[2] {
        xlog(incoming reply\n);
 }


 failure_route[1] {
        if (t_was_cancelled()) {
                exit;
        }

        if (t_check_status(3[0-9][0-9])) {
        t_reply(404,Not found);
                exit;
        }
 }



 Thanks,
 Spencer



 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users