[SR-Users] Re: 302 Handling issue in failure route

2023-07-04 Thread Devang Dhandhalya
Thank you Daniel and David for your Response

Yes issue with exit() function and its stopping the script execution for
302 response in failure route.

Regards
Devang Dhandhalya

On Mon, Jul 3, 2023 at 7:06 PM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> i went through this. It's not that kamailio has changed, kamailio executes
> one first, then the other. So if you now added some drop() or exit()
> somewhere on the first route, it won't execute the second.
>
> This is what i found some months ago:
> >>MMM, that's strange, I was using it on failure route and the route was
> being executed, but the data wasn't there. I put it on the onreply route and
> that one is now executed with the data correctly there...
> >>
> >>I probably did something wrong.
>
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
>
>
> On Mon, Jul 3, 2023 at 2:21 PM Daniel-Constantin Mierla 
> wrote:
>
>> Hello,
>>
>> nothing relevant happened during the past few days (in case you did a
>> kamailio upgrade), so it should be something specific to your environment.
>> I would suggest to run with debug=3 in kamailio.cfg and see what you can
>> get from the debug messages.
>>
>> Eventually, if it is production, try to add some xlog() lines in config
>> at relevant places in routing blocks to make you understand better what is
>> executed and what is not (debug=3 may become too heavy for production).
>>
>> Cheers,
>> Daniel
>> On 03.07.23 08:11, Devang Dhandhalya wrote:
>>
>> Hello All
>>
>> I am handling 302 response in the failure route and when receiving 302
>> response in kamailio, it's not going into the failure route , kamailio just
>> executing the onreply route when 302 response are received.
>> A few days ago the same code with failure route worked but now it does
>> not.
>> i dont know why kamailio is not executing a failure route from where we
>> can redirect calls to another server.
>>
>> code snippet
>>
>> route[RELAY]{
>>  t_on_reply("MANAGE_REPLY");
>> t_on_failure("MANAGE_FAILURE");
>>  t_on_branch("MANAGE_BRANCH");
>>
>>  if (!t_relay()) {
>> sl_reply_error();
>> }
>> exit;
>> }
>> failure_route[MANAGE_FAILURE] {
>> if (t_is_canceled()) {
>> exit;
>> }
>>  if (t_check_status("302")){
>>  get_redirects("*");
>>  $ru= $T_rpl($sel(contact.uri));
>>  route(RELAY);
>> }
>> }
>>
>>
>> kamailio version : 5.6.4
>> Please suggest if I am doing anything wrong.
>>
>>
>> --
>> Regards,
>> *Devang Dhandhalya*
>>
>> *Disclaimer*
>> In addition to generic Disclaimer which you have agreed on our website,
>> any views or opinions presented in this email are solely those of the
>> originator and do not necessarily represent those of the Company or its
>> sister concerns. Any liability (in negligence, contract or otherwise)
>> arising from any third party taking any action, or refraining from taking
>> any action on the basis of any of the information contained in this email
>> is hereby excluded.
>>
>> *Confidentiality*
>> This communication (including any attachment/s) is intended only for the
>> use of the addressee(s) and contains information that is PRIVILEGED AND
>> CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying
>> of this communication is prohibited. Please inform originator if you have
>> received it in error.
>>
>> *Caution for viruses, malware etc.*
>> This communication, including any attachments, may not be free of
>> viruses, trojans, similar or new contaminants/malware, interceptions or
>> interference, and may not be compatible with your systems. You shall carry
>> out virus/malware scanning on your own before opening any attachment to
>> this e-mail. The sender of this e-mail and Company including its sister
>> concerns shall not be liable for any damage that may incur to you as a
>> result of viruses, incompleteness of this message, a delay in receipt of
>> this message or any other computer problems.
>>
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do 

[SR-Users] 302 Handling issue in failure route

2023-07-03 Thread Devang Dhandhalya
Hello All

I am handling 302 response in the failure route and when receiving 302
response in kamailio, it's not going into the failure route , kamailio just
executing the onreply route when 302 response are received.
A few days ago the same code with failure route worked but now it does not.
i dont know why kamailio is not executing a failure route from where we can
redirect calls to another server.

code snippet

route[RELAY]{
t_on_reply("MANAGE_REPLY");
t_on_failure("MANAGE_FAILURE");
t_on_branch("MANAGE_BRANCH");

if (!t_relay()) {
sl_reply_error();
}
exit;
}
failure_route[MANAGE_FAILURE] {
if (t_is_canceled()) {
exit;
}
if (t_check_status("302")){
get_redirects("*");
$ru= $T_rpl($sel(contact.uri));
route(RELAY);
}
}


kamailio version : 5.6.4
Please suggest if I am doing anything wrong.


-- 
Regards,
*Devang Dhandhalya*

-- 
*Disclaimer*

In addition to generic Disclaimer which you have agreed on 
our website, any views or opinions presented in this email are solely those 
of the originator and do not necessarily represent those of the Company or 
its sister concerns. Any liability (in negligence, contract or otherwise) 
arising from any third party taking any action, or refraining from taking 
any action on the basis of any of the information contained in this email 
is hereby excluded.



*Confidentiality*
This communication (including any 
attachment/s) is intended only for the use of the addressee(s) and contains 
information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, 
dissemination, distribution, or copying of this communication is 
prohibited. Please inform originator if you have received it in error.


*Caution for viruses, malware etc.*
This communication, including any 
attachments, may not be free of viruses, trojans, similar or new 
contaminants/malware, interceptions or interference, and may not be 
compatible with your systems. You shall carry out virus/malware scanning on 
your own before opening any attachment to this e-mail. The sender of this 
e-mail and Company including its sister concerns shall not be liable for 
any damage that may incur to you as a result of viruses, incompleteness of 
this message, a delay in receipt of this message or any other computer 
problems. 
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Recover call in ringing state

2023-01-04 Thread Devang Dhandhalya
Hello Henning

Thanks for Response, When Remote Server goes down in Ringing Call state we
will not get any Negative Response from remote server and we should not
wait for transaction timeout because its to 1-2 min
so in this case there is anything that we found Remote server is down and
we can check INVITE transaction failover and we generate INVITE using that
same transaction.
Using the Dispatcher event route we will get if any of the remote servers
are down but how we can get a call transaction is failed and can generate a
call.


Regards
Devang Dhandhalya

On Tue, Dec 6, 2022 at 3:12 PM Henning Westerholt  wrote:

> Hello,
>
>
>
> you can do this by using a failure_route. There is one example for
> voicemail I think in the Kamailio default configuration.
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
>
>
> *From:* sr-users  *On Behalf Of *Devang
> Dhandhalya
> *Sent:* Wednesday, November 30, 2022 7:16 PM
> *To:* Kamailio (SER) - Users Mailing List 
> *Subject:* [SR-Users] Recover call in ringing state
>
>
>
> Hello All
>
>
>
> I have below setup :
>
> SBC -> kamailio -> Media server(remote) -> web-client
>
>
>
> Call comes from sbc to kamilio and it relays to Remote server to end user,
> In Ringing state if remote server goes down then in kamailio there is any
> way to Recover that ringing call like we can generate new invite for other
> Remote server which is active state, for relaying call i am using
> dispatcher module..
>
>
> I tried with tm.cancel RPC command but it works only if the remote server
> is running , when I crash the remote server at that time tm.cancel is not
> generating cancel to remote server.
>
>
> Please suggest if there is any other way to generate INVITE.
>
> Regards
> Devang Dhandhalya
>
>
>
> <https://www.ecosmob.com/>
>
> *Disclaimer*
>
> In addition to generic Disclaimer which you have agreed on our website,
> any views or opinions presented in this email are solely those of the
> originator and do not necessarily represent those of the Company or its
> sister concerns. Any liability (in negligence, contract or otherwise)
> arising from any third party taking any action, or refraining from taking
> any action on the basis of any of the information contained in this email
> is hereby excluded.
>
>
>
> *Confidentiality*
>
> This communication (including any attachment/s) is intended only for the
> use of the addressee(s) and contains information that is PRIVILEGED AND
> CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying
> of this communication is prohibited. Please inform originator if you have
> received it in error.
>
>
>
> *Caution for viruses, malware etc.*
>
> This communication, including any attachments, may not be free of viruses,
> trojans, similar or new contaminants/malware, interceptions or
> interference, and may not be compatible with your systems. You shall carry
> out virus/malware scanning on your own before opening any attachment to
> this e-mail. The sender of this e-mail and Company including its sister
> concerns shall not be liable for any damage that may incur to you as a
> result of viruses, incompleteness of this message, a delay in receipt of
> this message or any other computer problems.
>


-- 
Regards,
*Devang Dhandhalya*

[image: Ecosmob Technologies Pvt. Ltd.] <https://www.ecosmob.com/>

Ecosmob Technologies Pvt. Ltd.
https://www.ecosmob.com

VoIP | Web | Mobile | IoT | Big Data

-- 
* <https://www.ecosmob.com/>
*
*Disclaimer*

In addition to generic 
Disclaimer which you have agreed on our website, any views or opinions 
presented in this email are solely those of the originator and do not 
necessarily represent those of the Company or its sister concerns. Any 
liability (in negligence, contract or otherwise) arising from any third 
party taking any action, or refraining from taking any action on the basis 
of any of the information contained in this email is hereby excluded.



*Confidentiality*
This communication (including any attachment/s) is 
intended only for the use of the addressee(s) and contains information that 
is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, 
distribution, or copying of this communication is prohibited. Please inform 
originator if you have received it in error.


*Caution for viruses, 
malware etc.*
This communication, including any attachments, may not be 
free of viruses, trojans, similar or new contaminants/malware, 
interceptions or interference, and may not be compatible with your systems. 
You shall carry out virus/malware

[SR-Users] Recover call in ringing state

2022-11-30 Thread Devang Dhandhalya
Hello All

I have below setup :
SBC -> kamailio -> Media server(remote) -> web-client

Call comes from sbc to kamilio and it relays to Remote server to end user,
In Ringing state if remote server goes down then in kamailio there is any
way to Recover that ringing call like we can generate new invite for other
Remote server which is active state, for relaying call i am using
dispatcher module..

I tried with tm.cancel RPC command but it works only if the remote server
is running , when I crash the remote server at that time tm.cancel is not
generating cancel to remote server.

Please suggest if there is any other way to generate INVITE.

Regards
Devang Dhandhalya

-- 
* <https://www.ecosmob.com/>
*
*Disclaimer*

In addition to generic 
Disclaimer which you have agreed on our website, any views or opinions 
presented in this email are solely those of the originator and do not 
necessarily represent those of the Company or its sister concerns. Any 
liability (in negligence, contract or otherwise) arising from any third 
party taking any action, or refraining from taking any action on the basis 
of any of the information contained in this email is hereby excluded.



*Confidentiality*
This communication (including any attachment/s) is 
intended only for the use of the addressee(s) and contains information that 
is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, 
distribution, or copying of this communication is prohibited. Please inform 
originator if you have received it in error.


*Caution for viruses, 
malware etc.*
This communication, including any attachments, may not be 
free of viruses, trojans, similar or new contaminants/malware, 
interceptions or interference, and may not be compatible with your systems. 
You shall carry out virus/malware scanning on your own before opening any 
attachment to this e-mail. The sender of this e-mail and Company including 
its sister concerns shall not be liable for any damage that may incur to 
you as a result of viruses, incompleteness of this message, a delay in 
receipt of this message or any other computer problems. 
__
Kamailio - Users Mailing List - Non Commercial Discussions
sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] with 302 response dispatcher list .

2021-03-05 Thread Devang Dhandhalya
Thank you sir for giving this much method .

but in my case i want to take Destination address from dispatcher.list
file only . and from there when every call coming i need to send response
302 and in that contact header i need to add those destination by group id
. so any XAVP variable use in my case or any other way to solve this issue
?

Thanks in Advance
Devang

On Fri, Mar 5, 2021 at 9:34 AM Devang Dhandhalya <
devang.dhandha...@ecosmob.com> wrote:

>
>
> On Thu, Mar 4, 2021 at 6:22 PM Devang Dhandhalya <
> devang.dhandha...@ecosmob.com> wrote:
>
>> Thank you sir for giving this much method .
>>
>> but in my case i want to take Destination address from dispatcher.list
>> file only . and from there when every call coming i need to send response
>> 302 and in that contact header i need to add those destination by group id
>> . so any XAVP variable use in my case or any other way to solve this issue
>> ?
>>
>> Thanks in Advance
>> Devang
>>
>> On Thu, Mar 4, 2021 at 6:09 PM Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> then maybe you can keep the list of addresses in database and use
>>> sql_query() (from sqlops) to retrieve them and build the headers using
>>> $dbr(...).
>>>
>>> Or if you want caching, see the htable module.
>>>
>>> If you do not want to use a database system, see db_text to use with
>>> htable or just read file content with corex module.
>>>
>>> Further flexibility can be added by using other embedded scripting
>>> languages, e.g., app_lua.
>>>
>>> Cheers,
>>> Daniel
>>> On 04.03.21 12:31, Devang Dhandhalya wrote:
>>>
>>> Hello
>>>
>>> Right now i am not using dispatcher for routing purpose . but i add
>>> destination in dispatcher.list and i need to set all those list of
>>> destination addresses grouped by id  in 302 response in contact header
>>> field .
>>>   .
>>> Thanks in advanced
>>> Devang
>>>
>>> On Thu, Mar 4, 2021 at 4:43 PM Daniel-Constantin Mierla <
>>> mico...@gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> do you need dispatcher for providing something else? Or just to keep
>>>> the list of addresses grouped by id? There can be other variants if
>>>> dispatcher is not needed for something else.
>>>>
>>>> Cheers,
>>>> Daniel
>>>> On 04.03.21 09:19, Devang Dhandhalya wrote:
>>>>
>>>> my scenario is : i have dispatcher list
>>>>
>>>> # dispatcher destination sets (groups)
>>>> #
>>>>
>>>> # line format
>>>> # setid(int) destination(sip uri) flags(int,opt) priority(int,opt)
>>>> attributes(str,opt)
>>>>
>>>> # proxies
>>>> 2 sip:172.19.56.21:5060 0 1
>>>> 2 sip:172.19.56.22:5060 0 2
>>>>
>>>> # gateways
>>>> 1 sip:192.168.0.11:5060 0 1
>>>> 1 sip:192.168.0.22:5060 0 2
>>>> 1 sip:192.168.0.33:5060 0 3
>>>>
>>>> when call coming from first time client to kamailio . kamailio just
>>>> need to send 302 response to the client with all destination ip of group id
>>>> 1 priority wise  in its contact header field   . in easy way
>>>>
>>>> client --> kamailio
>>>>  30233(3) 22(2) 11(1)
>>>><---
>>>>
>>>> and when call coming second time from client to kamailio . kamailio
>>>> need to send group id 2 all destination ip in 302 response in its contact
>>>> header field .
>>>>
>>>> client --> kamailio
>>>>  30222(2) 21(1)
>>>><---
>>>>
>>>> can any one suggest me how to do this thing from kamailio side ? use of
>>>> append_branch is good option but how to configure  this scenario .
>>>>
>>>> Thanks in advance
>>>> Devang
>>>>
>>>> *Disclaimer*
>>>> In addition to generic Disclaimer which you have agreed on our website,
>>>> any views or opinions presented in this email are solely those of the
>>>> originator and do not necessarily represent those of the Company or its
>>>> sister concerns. Any liability (in negligence, contract or otherwise)
>>>> arising from any third party 

Re: [SR-Users] with 302 response dispatcher list .

2021-03-04 Thread Devang Dhandhalya
On Thu, Mar 4, 2021 at 6:22 PM Devang Dhandhalya <
devang.dhandha...@ecosmob.com> wrote:

> Thank you sir for giving this much method .
>
> but in my case i want to take Destination address from dispatcher.list
> file only . and from there when every call coming i need to send response
> 302 and in that contact header i need to add those destination by group id
> . so any XAVP variable use in my case or any other way to solve this issue
> ?
>
> Thanks in Advance
> Devang
>
> On Thu, Mar 4, 2021 at 6:09 PM Daniel-Constantin Mierla 
> wrote:
>
>> Hello,
>>
>> then maybe you can keep the list of addresses in database and use
>> sql_query() (from sqlops) to retrieve them and build the headers using
>> $dbr(...).
>>
>> Or if you want caching, see the htable module.
>>
>> If you do not want to use a database system, see db_text to use with
>> htable or just read file content with corex module.
>>
>> Further flexibility can be added by using other embedded scripting
>> languages, e.g., app_lua.
>>
>> Cheers,
>> Daniel
>> On 04.03.21 12:31, Devang Dhandhalya wrote:
>>
>> Hello
>>
>> Right now i am not using dispatcher for routing purpose . but i add
>> destination in dispatcher.list and i need to set all those list of
>> destination addresses grouped by id  in 302 response in contact header
>> field .
>>   .
>> Thanks in advanced
>> Devang
>>
>> On Thu, Mar 4, 2021 at 4:43 PM Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> do you need dispatcher for providing something else? Or just to keep the
>>> list of addresses grouped by id? There can be other variants if dispatcher
>>> is not needed for something else.
>>>
>>> Cheers,
>>> Daniel
>>> On 04.03.21 09:19, Devang Dhandhalya wrote:
>>>
>>> my scenario is : i have dispatcher list
>>>
>>> # dispatcher destination sets (groups)
>>> #
>>>
>>> # line format
>>> # setid(int) destination(sip uri) flags(int,opt) priority(int,opt)
>>> attributes(str,opt)
>>>
>>> # proxies
>>> 2 sip:172.19.56.21:5060 0 1
>>> 2 sip:172.19.56.22:5060 0 2
>>>
>>> # gateways
>>> 1 sip:192.168.0.11:5060 0 1
>>> 1 sip:192.168.0.22:5060 0 2
>>> 1 sip:192.168.0.33:5060 0 3
>>>
>>> when call coming from first time client to kamailio . kamailio just need
>>> to send 302 response to the client with all destination ip of group id 1
>>> priority wise  in its contact header field   . in easy way
>>>
>>> client --> kamailio
>>>  30233(3) 22(2) 11(1)
>>><---
>>>
>>> and when call coming second time from client to kamailio . kamailio need
>>> to send group id 2 all destination ip in 302 response in its contact header
>>> field .
>>>
>>> client --> kamailio
>>>  30222(2) 21(1)
>>><---
>>>
>>> can any one suggest me how to do this thing from kamailio side ? use of
>>> append_branch is good option but how to configure  this scenario .
>>>
>>> Thanks in advance
>>> Devang
>>>
>>> *Disclaimer*
>>> In addition to generic Disclaimer which you have agreed on our website,
>>> any views or opinions presented in this email are solely those of the
>>> originator and do not necessarily represent those of the Company or its
>>> sister concerns. Any liability (in negligence, contract or otherwise)
>>> arising from any third party taking any action, or refraining from taking
>>> any action on the basis of any of the information contained in this email
>>> is hereby excluded.
>>>
>>> *Confidentiality*
>>> This communication (including any attachment/s) is intended only for the
>>> use of the addressee(s) and contains information that is PRIVILEGED AND
>>> CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying
>>> of this communication is prohibited. Please inform originator if you have
>>> received it in error.
>>>
>>> *Caution for viruses, malware etc.*
>>> This communication, including any attachments, may not be free of
>>> viruses, trojans, similar or new contaminants/malware, interceptions or
>>> interference, and may not be compatible with your systems. You shall carry
>>>

Re: [SR-Users] with 302 response dispatcher list .

2021-03-04 Thread Devang Dhandhalya
Hello

Right now i am not using dispatcher for routing purpose . but i add
destination in dispatcher.list and i need to set all those list of
destination addresses grouped by id  in 302 response in contact header
field .
  .
Thanks in advanced
Devang

On Thu, Mar 4, 2021 at 4:43 PM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> do you need dispatcher for providing something else? Or just to keep the
> list of addresses grouped by id? There can be other variants if dispatcher
> is not needed for something else.
>
> Cheers,
> Daniel
> On 04.03.21 09:19, Devang Dhandhalya wrote:
>
> my scenario is : i have dispatcher list
>
> # dispatcher destination sets (groups)
> #
>
> # line format
> # setid(int) destination(sip uri) flags(int,opt) priority(int,opt)
> attributes(str,opt)
>
> # proxies
> 2 sip:172.19.56.21:5060 0 1
> 2 sip:172.19.56.22:5060 0 2
>
> # gateways
> 1 sip:192.168.0.11:5060 0 1
> 1 sip:192.168.0.22:5060 0 2
> 1 sip:192.168.0.33:5060 0 3
>
> when call coming from first time client to kamailio . kamailio just need
> to send 302 response to the client with all destination ip of group id 1
> priority wise  in its contact header field   . in easy way
>
> client --> kamailio
>  30233(3) 22(2) 11(1)
><---
>
> and when call coming second time from client to kamailio . kamailio need
> to send group id 2 all destination ip in 302 response in its contact header
> field .
>
> client --> kamailio
>  30222(2) 21(1)
><---
>
> can any one suggest me how to do this thing from kamailio side ? use of
> append_branch is good option but how to configure  this scenario .
>
> Thanks in advance
> Devang
>
> *Disclaimer*
> In addition to generic Disclaimer which you have agreed on our website,
> any views or opinions presented in this email are solely those of the
> originator and do not necessarily represent those of the Company or its
> sister concerns. Any liability (in negligence, contract or otherwise)
> arising from any third party taking any action, or refraining from taking
> any action on the basis of any of the information contained in this email
> is hereby excluded.
>
> *Confidentiality*
> This communication (including any attachment/s) is intended only for the
> use of the addressee(s) and contains information that is PRIVILEGED AND
> CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying
> of this communication is prohibited. Please inform originator if you have
> received it in error.
>
> *Caution for viruses, malware etc.*
> This communication, including any attachments, may not be free of viruses,
> trojans, similar or new contaminants/malware, interceptions or
> interference, and may not be compatible with your systems. You shall carry
> out virus/malware scanning on your own before opening any attachment to
> this e-mail. The sender of this e-mail and Company including its sister
> concerns shall not be liable for any damage that may incur to you as a
> result of viruses, incompleteness of this message, a delay in receipt of
> this message or any other computer problems.
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Funding: https://www.paypal.me/dcmierla
>
>

-- 
*Disclaimer*
In addition to generic Disclaimer which you have agreed on our 
website, any views or opinions presented in this email are solely those of 
the originator and do not necessarily represent those of the Company or its 
sister concerns. Any liability (in negligence, contract or otherwise) 
arising from any third party taking any action, or refraining from taking 
any action on the basis of any of the information contained in this email 
is hereby excluded.



*Confidentiality*
This communication (including any 
attachment/s) is intended only for the use of the addressee(s) and contains 
information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, 
dissemination, distribution, or copying of this communication is 
prohibited. Please inform originator if you have received it in error.


*Caution for viruses, malware etc.*
This communication, including any 
attachments, may not be free of viruses, trojans, similar or new 
contaminants/malware, interceptions or interference, and may not be 
compatible with your systems. You shall carry out virus/malware scanning on 
your own before opening any attachment to this e-mail. The sender of this 
e-mail and Company including its sister c

[SR-Users] with 302 response dispatcher list .

2021-03-04 Thread Devang Dhandhalya
my scenario is : i have dispatcher list

# dispatcher destination sets (groups)
#

# line format
# setid(int) destination(sip uri) flags(int,opt) priority(int,opt)
attributes(str,opt)

# proxies
2 sip:172.19.56.21:5060 0 1
2 sip:172.19.56.22:5060 0 2

# gateways
1 sip:192.168.0.11:5060 0 1
1 sip:192.168.0.22:5060 0 2
1 sip:192.168.0.33:5060 0 3

when call coming from first time client to kamailio . kamailio just need to
send 302 response to the client with all destination ip of group id 1
priority wise  in its contact header field   . in easy way

client --> kamailio
 30233(3) 22(2) 11(1)
   <---

and when call coming second time from client to kamailio . kamailio need to
send group id 2 all destination ip in 302 response in its contact header
field .

client --> kamailio
 30222(2) 21(1)
   <---

can any one suggest me how to do this thing from kamailio side ? use of
append_branch is good option but how to configure  this scenario .

Thanks in advance
Devang

-- 
*Disclaimer*
In addition to generic Disclaimer which you have agreed on our 
website, any views or opinions presented in this email are solely those of 
the originator and do not necessarily represent those of the Company or its 
sister concerns. Any liability (in negligence, contract or otherwise) 
arising from any third party taking any action, or refraining from taking 
any action on the basis of any of the information contained in this email 
is hereby excluded.



*Confidentiality*
This communication (including any 
attachment/s) is intended only for the use of the addressee(s) and contains 
information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, 
dissemination, distribution, or copying of this communication is 
prohibited. Please inform originator if you have received it in error.


*Caution for viruses, malware etc.*
This communication, including any 
attachments, may not be free of viruses, trojans, similar or new 
contaminants/malware, interceptions or interference, and may not be 
compatible with your systems. You shall carry out virus/malware scanning on 
your own before opening any attachment to this e-mail. The sender of this 
e-mail and Company including its sister concerns shall not be liable for 
any damage that may incur to you as a result of viruses, incompleteness of 
this message, a delay in receipt of this message or any other computer 
problems. 
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Contact header not removed properly Getting some junks

2021-01-06 Thread Devang Dhandhalya
in my scenario call coming from sbc to kamailio proxy and we route to pbx
server in that when
kamailio proxy get the call at that time i am removing Contact header using
remove_hf("Contact") and adding contact Header using
append_hf("$uac_req(hdrs)") for route to PBX server . in that signaling i
am getting modified Contact header but old contact header not removed
properly some junks are remain in the signaling

scenario :

SBC -> Kamailio proxy --> PBX

before using remove_hf("Contact")

INVITE sip:user2@ domain.org;transport=UDP SIP/2.0
Via: SIP/2.0/UDP
10.212.xxx.xxx:port;branch=z9hG4bK-524287-1---8c5ac8642f321a9e
Max-Forwards: 70
Contact: 
To: domain.org;transport=UDP>
From: domain.org
;transport=UDP>;tag=891fd646
Call-ID: t9Ff-fCrin_VN1IO9Xf1mA..
CSeq: 2 INVITE
Content-Type: application/sdp
Proxy-Authorization: Digest username="user1",realm="domain.org

",nonce="5ff5a660afc72502212b4a611bb0d689efadafab",uri="sip:us...@domain.org
;transport=UDP",response="f926e3742cbdcb8c68ea9b5
82ac2dc",cnonce="9b3276d6d37aaa6107a835df8e5b3a87",nc=0001,qop=auth,algorithm=MD5
User-Agent: Z 3.15.40006 rv2.8.20
Allow-Events: presence, kpml, talk
Content-Length: 243

v=0
o=Z 0 0 IN IP4 10.212.xxx.xxx
s=Z
c=IN IP4 10.212.xxx.xxx
t=0 0
m=audio 8000 RTP/AVP 3 110 8 0 97 101
a=rtpmap:110 speex/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv


after using remove-hf("Contact") function removing contact header but some
junks are left and that eats next To header line and breaks Invite packet

INVITE sip:us...@domain.org:;transport=UDP SIP/2.0
Record-Route:

Via: SIP/2.0/UDP
172.xx.xx.xxx;branch=z9hG4bKbe4c.9743b885ad3452287530994a2cad6e50.0
Via: SIP/2.0/UDP
10.212.xxx.xxx:39931;rport=39931;received=172.xx.xx.x;branch=z9hG4bK-524287-1---8c5ac8642f321a9e
Max-Forwards: 69
sip:us...@172.xx.xx.x:39931;transport=UDPTo: >
From: >;tag=891fd646
Call-ID: t9Ff-fCrin_VN1IO9Xf1mA..
CSeq: 2 INVITE
Content-Type: application/sdp
User-Agent: Z 3.15.40006 rv2.8.20
Allow-Events: presence, kpml, talk
Content-Length: 534
Contact: http://sip:dppatel@172.16.16.163:5060/>>

v=0
o=Z 0 0 IN IP4 10.212.xxx.xxx
s=Z
c=IN IP4 172.xx.xx.xxx
t=0 0
m=audio 11210 RTP/AVP 3 110 8 0 97 101
a=rtpmap:3 GSM/8000
a=rtpmap:110 speex/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:97 iLBC/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:97 mode=30
a=fmtp:101 0-16
a=sendrecv
a=rtcp:11211
a=ice-ufrag:lzjregPe
a=ice-pwd:RtA9x3jUWk4yNpJlzPL60nsRck
a=candidate:LhtmUSbPt9BJs4ZC 1 UDP 2130706431 172.xx.xx.xxx 11210 typ host
a=candidate:LhtmUSbPt9BJs4ZC 2 UDP 2130706430 172.xx.xx.xxx 11211 typ host


As you can see Contact header is gone but
sip:1...@172.xx.xx.x:39931;transport=UDP
part left before To header . and its breake invite packet .


Any suggestion will be highly appreciated.

-- 
*Disclaimer*
In addition to generic Disclaimer which you have agreed on our 
website, any views or opinions presented in this email are solely those of 
the originator and do not necessarily represent those of the Company or its 
sister concerns. Any liability (in negligence, contract or otherwise) 
arising from any third party taking any action, or refraining from taking 
any action on the basis of any of the information contained in this email 
is hereby excluded.



*Confidentiality*
This communication (including any 
attachment/s) is intended only for the use of the addressee(s) and contains 
information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, 
dissemination, distribution, or copying of this communication is 
prohibited. Please inform originator if you have received it in error.


*Caution for viruses, malware etc.*
This communication, including any 
attachments, may not be free of viruses, trojans, similar or new 
contaminants/malware, interceptions or interference, and may not be 
compatible with your systems. You shall carry out virus/malware scanning on 
your own before opening any attachment to this e-mail. The sender of this 
e-mail and Company including its sister concerns shall not be liable for 
any damage that may incur to you as a result of viruses, incompleteness of 
this message, a delay in receipt of this message or any other computer 
problems. 
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] about Contact Header Junks

2021-01-06 Thread Devang Dhandhalya
in my requirement call coming from sbc to kamailio proxy and we route to
pbx server in that when
kamailio proxy get the call at that time i am removing Contact header using
remove_hf("Contact") and adding contact Header using
append_hf("$uac_req(hdrs)") for route to PBX server . in that signaling i
am getting modified Contact header but old contact header not removed
properly some junks are remain in the signaling

scenario :

SBC -> Kamailio proxy --> PBX

before using remove_hf("Contact")

INVITE sip:user2@ domain.org;transport=UDP SIP/2.0
Via: SIP/2.0/UDP
10.212.xxx.xxx:port;branch=z9hG4bK-524287-1---8c5ac8642f321a9e
Max-Forwards: 70
Contact: 
To: domain.org;transport=UDP>
From: domain.org
;transport=UDP>;tag=891fd646
Call-ID: t9Ff-fCrin_VN1IO9Xf1mA..
CSeq: 2 INVITE
Content-Type: application/sdp
Proxy-Authorization: Digest username="user1",realm="domain.org

",nonce="5ff5a660afc72502212b4a611bb0d689efadafab",uri="sip:us...@domain.org
;transport=UDP",response="f926e3742cbdcb8c68ea9b5
82ac2dc",cnonce="9b3276d6d37aaa6107a835df8e5b3a87",nc=0001,qop=auth,algorithm=MD5
User-Agent: Z 3.15.40006 rv2.8.20
Allow-Events: presence, kpml, talk
Content-Length: 243

v=0
o=Z 0 0 IN IP4 10.212.xxx.xxx
s=Z
c=IN IP4 10.212.xxx.xxx
t=0 0
m=audio 8000 RTP/AVP 3 110 8 0 97 101
a=rtpmap:110 speex/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv


after using remove-hf("Contact") function removing contact header but some
junks are left and that eats next To header line and breaks Invite packet

INVITE sip:us...@domain.org:;transport=UDP SIP/2.0
Record-Route:

Via: SIP/2.0/UDP
172.xx.xx.xxx;branch=z9hG4bKbe4c.9743b885ad3452287530994a2cad6e50.0
Via: SIP/2.0/UDP
10.212.xxx.xxx:39931;rport=39931;received=172.xx.xx.x;branch=z9hG4bK-524287-1---8c5ac8642f321a9e
Max-Forwards: 69
sip:us...@172.xx.xx.x:39931;transport=UDPTo: >
From: >;tag=891fd646
Call-ID: t9Ff-fCrin_VN1IO9Xf1mA..
CSeq: 2 INVITE
Content-Type: application/sdp
User-Agent: Z 3.15.40006 rv2.8.20
Allow-Events: presence, kpml, talk
Content-Length: 534
Contact: http://sip:dppatel@172.16.16.163:5060>>

v=0
o=Z 0 0 IN IP4 10.212.xxx.xxx
s=Z
c=IN IP4 172.xx.xx.xxx
t=0 0
m=audio 11210 RTP/AVP 3 110 8 0 97 101
a=rtpmap:3 GSM/8000
a=rtpmap:110 speex/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:97 iLBC/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:97 mode=30
a=fmtp:101 0-16
a=sendrecv
a=rtcp:11211
a=ice-ufrag:lzjregPe
a=ice-pwd:RtA9x3jUWk4yNpJlzPL60nsRck
a=candidate:LhtmUSbPt9BJs4ZC 1 UDP 2130706431 172.16.16.163 11210 typ host
a=candidate:LhtmUSbPt9BJs4ZC 2 UDP 2130706430 172.16.16.163 11211 typ host


As you can see Contact header is gone but
sip:1...@172.xx.xx.x:39931;transport=UDP
part left before To header . and its breake invite packet .


Any suggestion will be highly appreciated.

-- 
*Disclaimer*
In addition to generic Disclaimer which you have agreed on our 
website, any views or opinions presented in this email are solely those of 
the originator and do not necessarily represent those of the Company or its 
sister concerns. Any liability (in negligence, contract or otherwise) 
arising from any third party taking any action, or refraining from taking 
any action on the basis of any of the information contained in this email 
is hereby excluded.



*Confidentiality*
This communication (including any 
attachment/s) is intended only for the use of the addressee(s) and contains 
information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, 
dissemination, distribution, or copying of this communication is 
prohibited. Please inform originator if you have received it in error.


*Caution for viruses, malware etc.*
This communication, including any 
attachments, may not be free of viruses, trojans, similar or new 
contaminants/malware, interceptions or interference, and may not be 
compatible with your systems. You shall carry out virus/malware scanning on 
your own before opening any attachment to this e-mail. The sender of this 
e-mail and Company including its sister concerns shall not be liable for 
any damage that may incur to you as a result of viruses, incompleteness of 
this message, a delay in receipt of this message or any other computer 
problems. 
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users