Re: out of dialog requests
Daniel-Constantin Mierla via sr-users <[email protected]>
| Newsgroups | gmane.comp.voip.ser |
|---|---|
| Message-ID | <[email protected]> |
I think the implementation of ftag and ttag is still incomplete, I started in the summer, but I got side tracked (iirc, some missing parts inside tm module) -- I need to refresh on it. Meanwhile, there is a function exported by the tm module which can be used: - https://www.kamailio.org/docs/modules/stable/modules/tm.html#tm.f.t_uac_send On the other hand, just be careful, sending requests inside a dialog needs to update the cseq for subsequent requests on the same direction. Cheers, Daniel On 13.10.25 17:49, Sergio Charrua via sr-users wrote: > Maybe this can help, I used this in an project a few years ago, and it > worked fine. > Just replace value to some of the $vars, and you should be good to go: > > # REFER to callee (keep original dialog identifiers) > $uac_req(method) = "REFER"; > > $uac_req(ruri) = "sip:"+$var(to_uriU)+"@"+$var(SourceIP); > /* URIs WITHOUT tags */ > $uac_req(furi) = $var(from_uri); > $uac_req(turi) = $var(to_uri); > /* Tags MUST be provided via ftag/ttag */ > $uac_req(ftag) = $var(fromTAG); > $uac_req(ttag) = $var(toTAG); > > $uac_req(callid) = $var(callid); > /* optional > $uac_req(cseq) = $T_req(cseq) + 1; > */ > > /* Any extra headers + empty body */ > $uac_req(hdrs) = > "Refer-To: " + $var(conf_uri2) + "\r\n" + > "Referred-By: " + $var(to_uri) + "\r\n" + > "Content-Length: 0\r\n"; > > uac_req_send(); > > > > Atenciosamente / Kind Regards / Cordialement / Un saludo, > > * > * > > *Sérgio Charrua* > > *www.kahea.ai <http://www.kahea.ai> / www.voip.pt <http://www.voip.pt>* > > *OpenTelecom* - Consulting for Telecoms, Lda > Tel.: +351 <callto:+351+91+104+12+66>91 631 11 44 > > Email : *[email protected]* > > This message and any files or documents attached are strictly > confidential or otherwise legally protected. > > It is intended only for the individual or entity named. If you are not > the named addressee or have received this email in error, please > inform the sender immediately, delete it from your system and do not > copy or disclose it or its contents or use it for any purpose. Please > also note that transmission cannot be guaranteed to be secure or > error-free. > > > > > > > > > > On Mon, Oct 13, 2025 at 5:13 PM Henning Westerholt via sr-users > <[email protected]> wrote: > > Hello Robert, > > > > yes, I’ve got a bit confused from your message, maybe I > misunderstood it. > > > > You want to send an out of dialog message, but want to re-use the > original Call-Id, From tag and To tag, which define the dialog. > This will create an in-dialog SIP message. > > > > Cheers, > > > > Henning > > > > *From:*Robert Boardman <[email protected]> > *Sent:* Montag, 13. Oktober 2025 16:42 > *To:* Henning Westerholt <[email protected]>; Kamailio (SER) - Users > Mailing List <[email protected]> > *Subject:* Re: out of dialog requests > > > > Hi, > > Yes, I have used this when the dtmf was coming via sip info as it > was in dialog, but as it is using the rtpegngine dtmf event_route, > its not in a specific dialog, and I think I need to construct it > using something like uac_req_send. > > But I'm open to suggestions. > > Rob > > > > > > *Robert Boardman* > > > > > > Solution Architect > > > > ------------------------------------------------------------------------ > > *From:* Henning Westerholt <[email protected]> > *Sent:* Monday, October 13, 2025 15:11 > *To:* Kamailio (SER) - Users Mailing List > <[email protected]> > *Cc:* Robert Boardman <[email protected]> > *Subject:* RE: out of dialog requests > > > > Hello, > > > > have you considered using the dialog module function for that? > > > > _https://kamailio.org/docs/modules/6.0.x/modules/dialog.html#dialog.f.dlg_refer_ > > > > Cheers, > > > > Henning > > > > -- > > Henning Westerholt – _https://skalatan.de/blog/ > <https://skalatan.de/blog/>_ > > Kamailio services – _https://gilawa.com <https://gilawa.com/>_ > > > > *From:* Robert Boardman via sr-users <[email protected]> > *Sent:* Montag, 13. Oktober 2025 15:23 > *To:* Kamailio (SER) - Users Mailing List > <[email protected]> > *Cc:* Robert Boardman <[email protected]> > *Subject:* [SR-Users] out of dialog requests > > > > Hi, > > I'm trying to send a refer from a rtpengine dtmf event, its mostly > working but the uac_req_send always seems to append new tags for > the from /to even though I specify the origionals in the . > > The far end uses the tags and the callid to match the dialogs so > these need to be in the refer. > > Example > > # REFER to callee > > xlog("L_INFO", "Sending REFER using from uri $var(to_uri)\n"); > > $uac_req(method)="REFER"; > > $uac_req(ruri)="sip:"+$var(to_uriU)+"@"+$var(SourceIP); > > $uac_req(furi)=$var(from_uri)+";tag="+$var(fromTAG); > > $uac_req(turi)=$var(to_uri)+";tag="+$var(toTAG); > > $uac_req(callid)=$var(callid); > > $uac_req(hdrs)="Refer-To:" + $var(conf_uri2) + > "\r\nReferred-By: " + $var(to_uri) + "\r\nContent-Length: 0\r\n\r\n"; > > uac_req_send(); > > > > Is this possible? > > Thanks for your help > > Regards > > Rob > > *Robert Boardman* > > Solution Architect > > > > Tel: > > > > _03330147908 <tel:03330147908>_ > > Email: > > > > [email protected] <mailto:[email protected]>_ > > > > > > > > > > This is an email from Gamma Telecom Ltd, trading as “Gamma”. The > contents of this email are confidential to the ordinary user of > the email address to which it was addressed. This email is not > intended to create any legal relationship. No one else may place > any reliance upon it, or copy or forward all or any of it in any > form (unless otherwise notified). If you receive this email in > error, please accept our apologies, we would be obliged if you > would telephone our postmaster on +44 (0) 808 178 9652 or email > [email protected]_ > > Gamma Telecom Limited, a company incorporated in England and > Wales, with limited liability, with registered number 04340834, > and whose registered office is at The Scalpel, 18th Floor, 52 Lime > Street, London EC3M 7AF and whose principal place of business is > at Kings House, Kings Road West, Newbury, Berkshire, RG14 5BY. > > > > > > > > __________________________________________________________ > Kamailio - Users Mailing List - Non Commercial Discussions -- > [email protected] > To unsubscribe send an email to [email protected] > Important: keep the mailing list in the recipients, do not reply > only to the sender! > > > __________________________________________________________ > Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected] > To unsubscribe send an email to [email protected] > Important: keep the mailing list in the recipients, do not reply only to the sender! -- Daniel-Constantin Mierla (@ asipto.com) twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!