Discussion:
[Sofia-sip-devel] How can I ignore an incoming call using Sofia SIP
Antonis Tsakiridis
2016-02-02 13:24:52 UTC
Permalink
By ignore I mean to tell the local SIP stack to remove all resources for
the incoming call, but not send any SIP message across.

I've trying do that using nua_handle_destroy() for the unanswered sofia
handle (i.e. without sending BYE, or answering with an 'error' code), but
it seems that Sofia generates a response anyway.

Is there a way to avoid this? I've been able to do that using JAIN SIP
stack but not Sofia.

Best regards,
Antonis
Saiyam Doshi
2016-02-02 17:49:40 UTC
Permalink
Hi Antonis,
You can ignore incoming invite by setting nua parameters. Just provide SIP method names which you would like to allow for your SIP client application by passing them in "SIPTAG_ALLOW_STR".
For example,
After call to nua_create call below API.
nua_set_params(ptrApp->AppCtx.Nua,                SIPTAG_ALLOW_STR("BYE,CANCEL,OPTIONS,INFO,MESSAGE"), // don't provide INVITE here                NUTAG_ENABLEMESSAGE(1),                NUTAG_ENABLEINVITE(0), // set 0 here                TAG_NULL());
By setting this Incoming INVITE is disabled and NUA answers 403 Forbidden. - saiyam

On Tuesday, February 2, 2016 7:18 PM, Antonis Tsakiridis <***@telestax.com> wrote:


By ignore I mean to tell the local SIP stack to remove all resources for the incoming call, but not send any SIP message across.

I've trying do that using nua_handle_destroy() for the unanswered sofia handle (i.e. without sending BYE, or answering with an 'error' code), but it seems that Sofia generates a response anyway.

Is there a way to avoid this? I've been able to do that using JAIN SIP stack but not Sofia.

Best regards, Antonis
Antonis Tsakiridis
2016-02-23 16:53:25 UTC
Permalink
Thanks a lot Saiyam for your reply. Sorry for taking so long to write back,
but this somehow ended up in Spam :(

Anyway, the problem with your approach is that I don't want Sofia to
respond at all. That is I don't want a 403 Forbidden to be issued.

The use case I'm trying to cover is similar to what mobile phones provide
when you want to ignore a call. In that scenario the caller thinks the call
is still ringing, but to the receiver it is ignored. The problem is that
when I tried to enforce that by just deleting the Sofia handle, I see that
Sofia internally still prepares and sends a response, which is what I'm
trying to avoid.

Any other clues?

Best regards,
Antonis
Post by Saiyam Doshi
Hi Antonis,
You can ignore incoming invite by setting nua parameters. Just provide SIP
method names which you would like to allow for your SIP client application
by passing them in "SIPTAG_ALLOW_STR".
For example,
After call to nua_create call below API.
nua_set_params(ptrApp->AppCtx.Nua,
SIPTAG_ALLOW_STR("BYE,CANCEL,OPTIONS,INFO,MESSAGE"), //
don't provide INVITE here
NUTAG_ENABLEMESSAGE(1),
NUTAG_ENABLEINVITE(0), // set 0 here
TAG_NULL());
By setting this Incoming INVITE is disabled and NUA answers 403 Forbidden.
- saiyam
On Tuesday, February 2, 2016 7:18 PM, Antonis Tsakiridis <
By ignore I mean to tell the local SIP stack to remove all resources for
the incoming call, but not send any SIP message across.
I've trying do that using nua_handle_destroy() for the unanswered sofia
handle (i.e. without sending BYE, or answering with an 'error' code), but
it seems that Sofia generates a response anyway.
Is there a way to avoid this? I've been able to do that using JAIN SIP stack but not Sofia.
Best regards,
Antonis
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Sofia-sip-devel mailing list
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
--
Antonis Tsakiridis
Lead Developer, Mobile SDKs at TeleStax
***@telestax.com
http://www.telestax.com
Loading...