[SIP Beyond VoIP] In-Dialog Requests

Saúl Ibarra Corretgé saul at ag-projects.com
Thu Jul 17 16:10:37 CEST 2014

Hi Yufei,

On 15 Jul 2014, at 17:15, Yufei Tao <yufei.tao at gmail.com> wrote:

> Hi Adrian
> Thanks very much for the quick reply! What I want to do is to send and process in-dialog messages like INFO, 
> nothing to do with complex call features. So I have been using Invitation from the core, not even Session from Middleware API.
> The in-dialog requests (INFO etc) need to have the same call_id, to_tag, from_tag as the dialog obviously, 
> and the BYE request that comes after these requests should have its cseq updated accordingly. 
> But since by default PJSIP sip session only handles INVITE, BYE, ACK, CANCEL, UPDATE and PRACK messages, 
> it gave me an "500 Unhandled by dialog usages" when it received in-dialog INFO message. 
> Is there any way to solve this please? Thank you!

This is part of the core Invitation API, so you’ll need to get your hands dirty ;-)

Look in _Invitation_cb_tsx_state_changed function in sip simple/core/_core.invitation.pxi, at the bottom we handle incoming REFER and OPTIONS requests.

You’ll need to add 2 things: a callback for incoming requests which post an event such as “SIPInvitationGotInDialogRequest" and a method to send such requests, something like “send_in_dialog_request”, which takes a method name, a lost of headers and an optional body.

PS: I thought I had sent this, but it ended up on my drafts folder.

Saúl Ibarra Corretgé
AG Projects

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20140717/37214cab/attachment.pgp>

More information about the SIPBeyondVoIP mailing list