On 05.11.18 12:07, Joshua C. Colp wrote:

Since I had no more ideas left, I then tried to hook into PJSIP directly
by providing a pjsip_module that implements the on_rx_response() callback.

That doesn't really work either, because the callback never fired.
This is because once a dialog is established only the modules attached to that dialog are 
executed, except for those executed before the transaction and dialog is found. You have 
to add your module to the dialog in some way to continue getting called.  Some of the 
modules already do this, such as res_pjsip_nat. It uses "pjsip_dlg_add_usage" 
to add itself to the dialog so it continues to get called in the future.

After I played around with module priority the callback eventually fired but I 
was unable to get the TSX and dialog references from PJ
(probably because the module got called too early?).
However I need those to get the corresponding ast_sip_session.

At this point, I don't know how to proceed.
Is there a way to hook into reINVITE responses to achieve what I'm trying to do?
The above dialog comment should allow you to continue to get callbacks and is 
the easiest way to make it work.


That was it!
Attaching the module to the dialog worked.
Thank you for the hint, I do appreciate it!

Best regards



--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to