[asterisk-dev] PJSIP Dialog-Info+XML enhancement

Joshua C. Colp jcolp at digium.com
Mon Oct 29 19:14:32 CDT 2018


On Mon, Oct 29, 2018, at 8:44 PM, Hans-Peter Jansen wrote:
> On Montag, 29. Oktober 2018 13:56:17 Joshua C. Colp wrote:
> > On Mon, Oct 29, 2018, at 1:47 PM, Hans-Peter Jansen wrote:
> > > Dear Asterisk developers,
> > > 
> > > in an attempt to add the missing pieces in
> > > res/res_pjsip_dialog_info_body_generator.c to provide a similar
> > > Dialog-Info+XML implementation, as what chan_sip.so provides already,
> > > I invested the better part of today, but things seem to be much more
> > > complicated in PJSIP land (at least for somebody, who started to look
> > > at this code today).
> > > 
> > > This is the only missing functionality, that keeps me from transitioning
> > > to PJSIP, and, if I read the various related complains correctly, a lot of
> > > other Asterisk users as well.
> > > 
> > > What I found out so far:
> > > 
> > > PJSIP version:
> > > 
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="3"
> > > state="full" entity="sip:62 at 192.168.23.2:15060">
> > > 
> > >   <dialog id="62" direction="recipient">
> > >   
> > >    <state>early</state>
> > >   
> > >   </dialog>
> > >  
> > >  </dialog-info>
> > 
> > The information does not currently exist in PJSIP, 'nor does it get passed
> > in. The chan_sip module has special logic (find_ringing_channel) local to
> > it to gather the information it thinks is correct which is then placed into
> > the message. The same kind of thing would need to be done in PJSIP.
> 
> First of all, thanks for your instant response, Joshua.
> 
> Here's, where I got with some hackery today (attached):
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="1" 
> state="full" entity="sip:62 at 192.168.23.2:15060">
>  <dialog id="62" direction="recipient">
>   <remote>
>    <identity display>sip:000413414123 at 192.168.23.2</identity>
>    <target uri="sip:000413414123 at 192.168.23.2" />
>   </remote>
>   <local>
>    <identity display="hp Office 2">sip:62 at 192.168.23.2:15060</identity>
>    <target uri="sip:62 at 192.168.23.2:15060" />
>   </local>
>   <state>early</state>
>  </dialog>
> </dialog-info>
> 
> Remote is still wrong, it's a local extension, and I also have no idea ATM, 
> where to fetch call-id, local-tag and remote-tag attributes. It also makes
> asterisk not to exit gracefully anymore after hitting ^C.

Channels don't have a call-id, local-tag, or remote-tag. Those are SIP constructs and an Asterisk channel may or may not be a SIP channel. I believe chan_sip synthesized/created ones.
 
> May I kindly ask you to take a look at it?

Due to the contributions and work I do with Asterisk I personally avoid looking at unlicensed code in our industry to ensure that code within Asterisk itself remains as license pure as possible I'm afraid. If you have specific questions I can answer.

-- 
Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list