DE
Daniel Ellison
Tue, Jan 21, 2014 7:25 PM
Anyone? Don't make me invoke Bueller!
On 2014-01-20, at 4:35 PM, Daniel Ellison daniel@syrinx.net wrote:
Thanks, Dennis. I actually have a reason for that particular setup. I want to create a notification server somewhat like Acrobits' SIPIS, but I want it to be SIP client agnostic. On its own there's no utility to having a server that simply redirects both ways. I want to do some processing in the interim, necessitating custom coding and the use of something like PJSIP. Here's the scenario:
VoIP Service Provider = VSP
Client Notification Service = CNS (e.g. Apple's APNS)
User Agent Client = UAC
User Agent Server = UAS
Assumptions:
- UAS runs separately from UAC
- UAS is registered with VSP on behalf of UAC
Scenario:
- Incoming call: VSP to UAC
- UAC is not registered with UAS
Sequence:
- VSP sends INVITE to UAS
- UAS sends a notification to CNS
- CNS notifies UAC
- UAC registers to UAS
- UAS sends REDIRECT to VSP
- VSP sends INVITE to UAC
When the UAC is registered, the UAS will just do a simple redirect either way. Does that make more sense?
+Dan
On Jan 20, 2014 4:09 PM, Dennis Guse dennis.guse@alumni.tu-berlin.de wrote:
You could simply go setting up Astersk / FreeSwitch or similar and register with the remote provider.
Dennis Guse
On Mon, Jan 20, 2014 at 2:38 PM, Daniel Ellison daniel@syrinx.net wrote:
Hey all,
This is my first post to the PJSIP mailing list. Hopefully what I'm thinking of doing is possible with PJSIP, or indeed with SIP generally. I'm very new to SIP so my terminology may be off and my ideas may be wildly inappropriate.
Here's what I want to do: I want to set up a persistent SIP User Agent Server that simply redirects both ways. If a call comes in from a VoIP Service Provider, my UAS would send a redirect to the VSP pointing to a SIP User Agent Client. Similarly, if the UAC initiates a call, the UAS redirects the UAC to the VSP. This assumes that the UAC is registered with the UAS and the UAS is registered with the VSP.
Is the above scenario feasible? As I said, I'm new to SIP so I'm not sure, for example, whether the UAC needs to register with the VSP in order to receive an incoming call in this scenario. I'm hoping that I can just leave the UAC registered with the UAS and the UAS registered with the VSP and have it all magically work. :)
Thanks,
Dan
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
Anyone? Don't make me invoke Bueller!
On 2014-01-20, at 4:35 PM, Daniel Ellison <daniel@syrinx.net> wrote:
> Thanks, Dennis. I actually have a reason for that particular setup. I want to create a notification server somewhat like Acrobits' SIPIS, but I want it to be SIP client agnostic. On its own there's no utility to having a server that simply redirects both ways. I want to do some processing in the interim, necessitating custom coding and the use of something like PJSIP. Here's the scenario:
>
> VoIP Service Provider = VSP
> Client Notification Service = CNS (e.g. Apple's APNS)
> User Agent Client = UAC
> User Agent Server = UAS
>
> Assumptions:
> - UAS runs separately from UAC
> - UAS is registered with VSP on behalf of UAC
>
> Scenario:
> - Incoming call: VSP to UAC
> - UAC is not registered with UAS
>
> Sequence:
> 1. VSP sends INVITE to UAS
> 2. UAS sends a notification to CNS
> 3. CNS notifies UAC
> 4. UAC registers to UAS
> 5. UAS sends REDIRECT to VSP
> 6. VSP sends INVITE to UAC
>
> When the UAC is registered, the UAS will just do a simple redirect either way. Does that make more sense?
>
> +Dan
>
> On Jan 20, 2014 4:09 PM, Dennis Guse <dennis.guse@alumni.tu-berlin.de> wrote:
>>
>> You could simply go setting up Astersk / FreeSwitch or similar and register with the remote provider.
>>
>> ---
>> Dennis Guse
>>
>>
>> On Mon, Jan 20, 2014 at 2:38 PM, Daniel Ellison <daniel@syrinx.net> wrote:
>>>
>>> Hey all,
>>>
>>> This is my first post to the PJSIP mailing list. Hopefully what I'm thinking of doing is possible with PJSIP, or indeed with SIP generally. I'm very new to SIP so my terminology may be off and my ideas may be wildly inappropriate.
>>>
>>> Here's what I want to do: I want to set up a persistent SIP User Agent Server that simply redirects both ways. If a call comes in from a VoIP Service Provider, my UAS would send a redirect to the VSP pointing to a SIP User Agent Client. Similarly, if the UAC initiates a call, the UAS redirects the UAC to the VSP. This assumes that the UAC is registered with the UAS and the UAS is registered with the VSP.
>>>
>>> Is the above scenario feasible? As I said, I'm new to SIP so I'm not sure, for example, whether the UAC needs to register with the VSP in order to receive an incoming call in this scenario. I'm hoping that I can just leave the UAC registered with the UAS and the UAS registered with the VSP and have it all magically work. :)
>>>
>>> Thanks,
>>> Dan
>>> _______________________________________________
>>> Visit our blog: http://blog.pjsip.org
>>>
>>> pjsip mailing list
>>> pjsip@lists.pjsip.org
>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
DG
Dennis Guse
Thu, Jan 23, 2014 12:37 PM
Ok, understood.
-
But why rely on a external CNS?
I know battery consumption will be a little bit less - any other reasons?
-
I would still stick with a SIP-Relay setup using
Asterisk/FreeSwitch/whatever
One option would be to script Asterisk as follows:
on incoming call from VSP:
- Accept incoming call (actually optional, but call will drop after 32s if
not accepted + no dial tone is generated yet...)
- Inform CNS via some interface (probably http)
- Loop (until try count)
-- Try to call UAC; on fail (not available) restart loop (very strict
timeout); on busy or reject or whatever cancel call.
-- Wait if client registers (X seconds)
As Asterisk can be scripted in Lua it should not be to much to.
I would say 2 days implementing it and 1 day testing.
Dennis Guse
On Tue, Jan 21, 2014 at 8:25 PM, Daniel Ellison daniel@syrinx.net wrote:
Anyone? Don't make me invoke Bueller!
On 2014-01-20, at 4:35 PM, Daniel Ellison daniel@syrinx.net wrote:
Thanks, Dennis. I actually have a reason for that particular setup. I
want to create a notification server somewhat like Acrobits' SIPIS, but I
want it to be SIP client agnostic. On its own there's no utility to having
a server that simply redirects both ways. I want to do some processing in
the interim, necessitating custom coding and the use of something like
PJSIP. Here's the scenario:
VoIP Service Provider = VSP
Client Notification Service = CNS (e.g. Apple's APNS)
User Agent Client = UAC
User Agent Server = UAS
Assumptions:
- UAS runs separately from UAC
- UAS is registered with VSP on behalf of UAC
Scenario:
- Incoming call: VSP to UAC
- UAC is not registered with UAS
Sequence:
- VSP sends INVITE to UAS
- UAS sends a notification to CNS
- CNS notifies UAC
- UAC registers to UAS
- UAS sends REDIRECT to VSP
- VSP sends INVITE to UAC
When the UAC is registered, the UAS will just do a simple redirect
either way. Does that make more sense?
You could simply go setting up Astersk / FreeSwitch or similar and
register with the remote provider.
Hey all,
This is my first post to the PJSIP mailing list. Hopefully what I'm
thinking of doing is possible with PJSIP, or indeed with SIP generally. I'm
very new to SIP so my terminology may be off and my ideas may be wildly
inappropriate.
Here's what I want to do: I want to set up a persistent SIP User Agent
Server that simply redirects both ways. If a call comes in from a VoIP
Service Provider, my UAS would send a redirect to the VSP pointing to a SIP
User Agent Client. Similarly, if the UAC initiates a call, the UAS
redirects the UAC to the VSP. This assumes that the UAC is registered with
the UAS and the UAS is registered with the VSP.
Is the above scenario feasible? As I said, I'm new to SIP so I'm not
sure, for example, whether the UAC needs to register with the VSP in order
to receive an incoming call in this scenario. I'm hoping that I can just
leave the UAC registered with the UAS and the UAS registered with the VSP
and have it all magically work. :)
Ok, understood.
1. But why rely on a external CNS?
I know battery consumption will be a little bit less - any other reasons?
2. I would still stick with a SIP-Relay setup using
Asterisk/FreeSwitch/whatever
One option would be to script Asterisk as follows:
on incoming call from VSP:
- Accept incoming call (actually optional, but call will drop after 32s if
not accepted + no dial tone is generated yet...)
- Inform CNS via some interface (probably http)
- Loop (until try count)
-- Try to call UAC; on fail (not available) restart loop (very strict
timeout); on busy or reject or whatever cancel call.
-- Wait if client registers (X seconds)
As Asterisk can be scripted in Lua it should not be to much to.
I would say 2 days implementing it and 1 day testing.
---
Dennis Guse
On Tue, Jan 21, 2014 at 8:25 PM, Daniel Ellison <daniel@syrinx.net> wrote:
> Anyone? Don't make me invoke Bueller!
>
> On 2014-01-20, at 4:35 PM, Daniel Ellison <daniel@syrinx.net> wrote:
> > Thanks, Dennis. I actually have a reason for that particular setup. I
> want to create a notification server somewhat like Acrobits' SIPIS, but I
> want it to be SIP client agnostic. On its own there's no utility to having
> a server that simply redirects both ways. I want to do some processing in
> the interim, necessitating custom coding and the use of something like
> PJSIP. Here's the scenario:
> >
> > VoIP Service Provider = VSP
> > Client Notification Service = CNS (e.g. Apple's APNS)
> > User Agent Client = UAC
> > User Agent Server = UAS
> >
> > Assumptions:
> > - UAS runs separately from UAC
> > - UAS is registered with VSP on behalf of UAC
> >
> > Scenario:
> > - Incoming call: VSP to UAC
> > - UAC is not registered with UAS
> >
> > Sequence:
> > 1. VSP sends INVITE to UAS
> > 2. UAS sends a notification to CNS
> > 3. CNS notifies UAC
> > 4. UAC registers to UAS
> > 5. UAS sends REDIRECT to VSP
> > 6. VSP sends INVITE to UAC
> >
> > When the UAC is registered, the UAS will just do a simple redirect
> either way. Does that make more sense?
> >
> > +Dan
> >
> > On Jan 20, 2014 4:09 PM, Dennis Guse <dennis.guse@alumni.tu-berlin.de>
> wrote:
> >>
> >> You could simply go setting up Astersk / FreeSwitch or similar and
> register with the remote provider.
> >>
> >> ---
> >> Dennis Guse
> >>
> >>
> >> On Mon, Jan 20, 2014 at 2:38 PM, Daniel Ellison <daniel@syrinx.net>
> wrote:
> >>>
> >>> Hey all,
> >>>
> >>> This is my first post to the PJSIP mailing list. Hopefully what I'm
> thinking of doing is possible with PJSIP, or indeed with SIP generally. I'm
> very new to SIP so my terminology may be off and my ideas may be wildly
> inappropriate.
> >>>
> >>> Here's what I want to do: I want to set up a persistent SIP User Agent
> Server that simply redirects both ways. If a call comes in from a VoIP
> Service Provider, my UAS would send a redirect to the VSP pointing to a SIP
> User Agent Client. Similarly, if the UAC initiates a call, the UAS
> redirects the UAC to the VSP. This assumes that the UAC is registered with
> the UAS and the UAS is registered with the VSP.
> >>>
> >>> Is the above scenario feasible? As I said, I'm new to SIP so I'm not
> sure, for example, whether the UAC needs to register with the VSP in order
> to receive an incoming call in this scenario. I'm hoping that I can just
> leave the UAC registered with the UAS and the UAS registered with the VSP
> and have it all magically work. :)
> >>>
> >>> Thanks,
> >>> Dan
> >>> _______________________________________________
> >>> Visit our blog: http://blog.pjsip.org
> >>>
> >>> pjsip mailing list
> >>> pjsip@lists.pjsip.org
> >>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
> >>
> >>
> > _______________________________________________
> > Visit our blog: http://blog.pjsip.org
> >
> > pjsip mailing list
> > pjsip@lists.pjsip.org
> > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
DE
Daniel Ellison
Thu, Jan 23, 2014 1:48 PM
- But why rely on a external CNS?
I know battery consumption will be a little bit less - any other reasons?
Well most VoIP apps that I've used have to be running, or at least in the background, to function. With mobile devices there's no guarantee that an app that's been put in the background will stay in memory. I don't want to miss calls because my phone's OS decided to kill my VoIP app. And yes, there's definitely a battery use advantage as well. The VoIP app can be completely closed down while still being able to accept calls.
Acrobits is the only VoIP app vendor I know of that has a SIP/VoIP notification server. That server registers with the VSP and wakes up the UAC with a notification. In all other ways it acts as a SIP proxy server. But this is tied to Acrobits softphones. I want a solution that will work with any VoIP app.
- I would still stick with a SIP-Relay setup using Asterisk/FreeSwitch/whatever
One option would be to script Asterisk as follows:
on incoming call from VSP:
- Accept incoming call (actually optional, but call will drop after 32s if not accepted + no dial tone is generated yet...)
- Inform CNS via some interface (probably http)
- Loop (until try count)
-- Try to call UAC; on fail (not available) restart loop (very strict timeout); on busy or reject or whatever cancel call.
-- Wait if client registers (X seconds)
As Asterisk can be scripted in Lua it should not be to much to.
I would say 2 days implementing it and 1 day testing.
That estimate assumes familiarity with all the components, of course. :) For me, it would probably be less work to code something up in Python using PJSIP than installing and configuring Asterisk and then learning how to script Asterisk in Lua.
I do appreciate the feedback and suggestions, however. Do you know if my original idea would work? I know there's a lot more to it than simply redirecting, but I think this would make for the simplest solution with the fewest "moving parts".
Thanks,
Dan
On Jan 23, 2014, at 7:37 AM, Dennis Guse <dennis.guse@alumni.tu-berlin.de> wrote:
>
> 1. But why rely on a external CNS?
> I know battery consumption will be a little bit less - any other reasons?
Well most VoIP apps that I've used have to be running, or at least in the background, to function. With mobile devices there's no guarantee that an app that's been put in the background will stay in memory. I don't want to miss calls because my phone's OS decided to kill my VoIP app. And yes, there's definitely a battery use advantage as well. The VoIP app can be completely closed down while still being able to accept calls.
Acrobits is the only VoIP app vendor I know of that has a SIP/VoIP notification server. That server registers with the VSP and wakes up the UAC with a notification. In all other ways it acts as a SIP proxy server. But this is tied to Acrobits softphones. I want a solution that will work with any VoIP app.
> 2. I would still stick with a SIP-Relay setup using Asterisk/FreeSwitch/whatever
> One option would be to script Asterisk as follows:
>
> on incoming call from VSP:
> - Accept incoming call (actually optional, but call will drop after 32s if not accepted + no dial tone is generated yet...)
> - Inform CNS via some interface (probably http)
> - Loop (until try count)
> -- Try to call UAC; on fail (not available) restart loop (very strict timeout); on busy or reject or whatever cancel call.
> -- Wait if client registers (X seconds)
>
> As Asterisk can be scripted in Lua it should not be to much to.
> I would say 2 days implementing it and 1 day testing.
That estimate assumes familiarity with all the components, of course. :) For me, it would probably be less work to code something up in Python using PJSIP than installing and configuring Asterisk and then learning how to script Asterisk in Lua.
I do appreciate the feedback and suggestions, however. Do you know if my original idea would work? I know there's a lot more to it than simply redirecting, but I think this would make for the simplest solution with the fewest "moving parts".
Thanks,
Dan
DG
Dennis Guse
Thu, Jan 23, 2014 2:02 PM
I dont know the effort to implement this in PJSIP.
Just two question:
- for how many people are going to deploy this?
- how does the API to the CNS look like? (Any restrictions? is it reliable
and responsive enough for VoIP calls [limited time to setup]?)
And one minor note:
I personally would not really feel save to implement such a server based on
PJSIP on my own (especially because it is publicly reachable) and thus
might introduce some security threats. Thats my second reason, why I own
implementation should not be first choice.
Dennis Guse
On Thu, Jan 23, 2014 at 2:48 PM, Daniel Ellison daniel@syrinx.net wrote:
- But why rely on a external CNS?
I know battery consumption will be a little bit less - any other reasons?
Well most VoIP apps that I've used have to be running, or at least in the
background, to function. With mobile devices there's no guarantee that an
app that's been put in the background will stay in memory. I don't want to
miss calls because my phone's OS decided to kill my VoIP app. And yes,
there's definitely a battery use advantage as well. The VoIP app can be
completely closed down while still being able to accept calls.
Acrobits is the only VoIP app vendor I know of that has a SIP/VoIP
notification server. That server registers with the VSP and wakes up the
UAC with a notification. In all other ways it acts as a SIP proxy server.
But this is tied to Acrobits softphones. I want a solution that will work
with any VoIP app.
- I would still stick with a SIP-Relay setup using
Asterisk/FreeSwitch/whatever
One option would be to script Asterisk as follows:
on incoming call from VSP:
- Accept incoming call (actually optional, but call will drop after 32s
if not accepted + no dial tone is generated yet...)
- Inform CNS via some interface (probably http)
- Loop (until try count)
-- Try to call UAC; on fail (not available) restart loop (very strict
timeout); on busy or reject or whatever cancel call.
-- Wait if client registers (X seconds)
As Asterisk can be scripted in Lua it should not be to much to.
I would say 2 days implementing it and 1 day testing.
That estimate assumes familiarity with all the components, of course. :)
For me, it would probably be less work to code something up in Python using
PJSIP than installing and configuring Asterisk and then learning how to
script Asterisk in Lua.
I do appreciate the feedback and suggestions, however. Do you know if my
original idea would work? I know there's a lot more to it than simply
redirecting, but I think this would make for the simplest solution with the
fewest "moving parts".
Thanks,
Dan
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
I dont know the effort to implement this in PJSIP.
Just two question:
1. for how many people are going to deploy this?
2. how does the API to the CNS look like? (Any restrictions? is it reliable
and responsive enough for VoIP calls [limited time to setup]?)
And one minor note:
I personally would not really feel save to implement such a server based on
PJSIP on my own (especially because it is publicly reachable) and thus
might introduce some security threats. Thats my second reason, why I own
implementation should not be first choice.
---
Dennis Guse
On Thu, Jan 23, 2014 at 2:48 PM, Daniel Ellison <daniel@syrinx.net> wrote:
> On Jan 23, 2014, at 7:37 AM, Dennis Guse <dennis.guse@alumni.tu-berlin.de>
> wrote:
> >
> > 1. But why rely on a external CNS?
> > I know battery consumption will be a little bit less - any other reasons?
>
> Well most VoIP apps that I've used have to be running, or at least in the
> background, to function. With mobile devices there's no guarantee that an
> app that's been put in the background will stay in memory. I don't want to
> miss calls because my phone's OS decided to kill my VoIP app. And yes,
> there's definitely a battery use advantage as well. The VoIP app can be
> completely closed down while still being able to accept calls.
>
> Acrobits is the only VoIP app vendor I know of that has a SIP/VoIP
> notification server. That server registers with the VSP and wakes up the
> UAC with a notification. In all other ways it acts as a SIP proxy server.
> But this is tied to Acrobits softphones. I want a solution that will work
> with any VoIP app.
>
> > 2. I would still stick with a SIP-Relay setup using
> Asterisk/FreeSwitch/whatever
> > One option would be to script Asterisk as follows:
> >
> > on incoming call from VSP:
> > - Accept incoming call (actually optional, but call will drop after 32s
> if not accepted + no dial tone is generated yet...)
> > - Inform CNS via some interface (probably http)
> > - Loop (until try count)
> > -- Try to call UAC; on fail (not available) restart loop (very strict
> timeout); on busy or reject or whatever cancel call.
> > -- Wait if client registers (X seconds)
> >
> > As Asterisk can be scripted in Lua it should not be to much to.
> > I would say 2 days implementing it and 1 day testing.
>
> That estimate assumes familiarity with all the components, of course. :)
> For me, it would probably be less work to code something up in Python using
> PJSIP than installing and configuring Asterisk and then learning how to
> script Asterisk in Lua.
>
> I do appreciate the feedback and suggestions, however. Do you know if my
> original idea would work? I know there's a lot more to it than simply
> redirecting, but I think this would make for the simplest solution with the
> fewest "moving parts".
>
> Thanks,
> Dan
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
DE
Daniel Ellison
Thu, Jan 23, 2014 2:45 PM
Just two question:
- for how many people are going to deploy this?
- how does the API to the CNS look like? (Any restrictions? is it reliable and responsive enough for VoIP calls [limited time to setup]?)
-
At first this would only be for me. So one person. :) Eventually, after it's matured a bit, I would release it for people to use on their own servers.
-
There are a couple of solutions out there that proxy to various notification systems. Uniqush (uniqush.org) can use Android's GCM, Apple's APNS, and Amazon Kindle's ADM. Pushd (https://github.com/rs/pushd) handles APNS and GCM, and adds Microsoft's MPNS. It works through a REST API so it's easy to use from another application. I could simply send a notification to pushd, for example, and it would take care of sending to the appropriate notification service.
And one minor note:
I personally would not really feel save to implement such a server based on PJSIP on my own (especially because it is publicly reachable) and thus might introduce some security threats. Thats my second reason, why I own implementation should not be first choice.
Yes, security is definitely an issue. At first this would be just for me so I'm not as concerned while developing it. But when I start using it and releasing it, I'm going to make sure appropriate security measures are in place.
+Dan
On Jan 23, 2014, at 9:02 AM, Dennis Guse <dennis.guse@alumni.tu-berlin.de> wrote:
>
> Just two question:
> 1. for how many people are going to deploy this?
> 2. how does the API to the CNS look like? (Any restrictions? is it reliable and responsive enough for VoIP calls [limited time to setup]?)
1. At first this would only be for me. So one person. :) Eventually, after it's matured a bit, I would release it for people to use on their own servers.
2. There are a couple of solutions out there that proxy to various notification systems. Uniqush (uniqush.org) can use Android's GCM, Apple's APNS, and Amazon Kindle's ADM. Pushd (https://github.com/rs/pushd) handles APNS and GCM, and adds Microsoft's MPNS. It works through a REST API so it's easy to use from another application. I could simply send a notification to pushd, for example, and it would take care of sending to the appropriate notification service.
> And one minor note:
> I personally would not really feel save to implement such a server based on PJSIP on my own (especially because it is publicly reachable) and thus might introduce some security threats. Thats my second reason, why I own implementation should not be first choice.
Yes, security is definitely an issue. At first this would be just for me so I'm not as concerned while developing it. But when I start using it and releasing it, I'm going to make sure appropriate security measures are in place.
+Dan