I need to rewrite the destination after I receive 302
I have this logic
Onreply
Loads in avp the information needed
I try sending to failure route and to a route in both cases the $ru become <null>
In the route and failureroute
I did try rewritehost, rewriteuri, $ru= number+ host
And append the route
But $ru is always null.
Inside the route or failure route
If there are no 302 nor the onreply involved everything works fine
Any suggestion to rewrite the ruri after a 302 is welcome
I am still using Kamailo1.4.3
Omar
Hi, I want to modify the following sip packet, I want to change the SDP IP
address by $di, which rule could filter this packet? Something like: [ if
method("OK") and $di is RFC1918 ] ??? And with which function could I change
the Ip address in the SDP content? In this case I would like to change
172.16.99.2
by 190.244.125.41.
Thanks in advance,
Lucas
T 172.16.99.2:5060 -> 190.244.125.41:9055 [AP]
SIP/2.0 200 OK.
Via: SIP/2.0/UDP
172.16.99.2;branch=z9hG4bK7c5.bfc43456.0;i=1;received=172.16.99.2;rport=5060.
Via: SIP/2.0/TCP 192.168.15.231:1952
;received=190.244.125.41;branch=z9hG4bK-d8754z-be53247ec649be5b-1---d8754z-;rport=9055.
Record-Route: <sip:172.16.99.2;r2=on;lr=on;ftag=b11c6a4e>.
Record-Route: <sip:172.16.99.2;transport=tcp;r2=on;lr=on;ftag=b11c6a4e>.
From: "Lucas"<sip:1104@67.152.18.231>;tag=b11c6a4e.
To: <sip:1101@67.152.18.231>;tag=as5356a251.
Call-ID: NzcwZWIxNGE1MDg5ZjVhZWRhYWNlM2RiNmMwM2M4MWM..
CSeq: 2 INVITE.
Server: Asterisk PBX 1.8.4.1.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH.
Supported: replaces, timer.
Contact: <sip:1101@172.16.99.2:5080>.
Remote-Party-ID: "Gus Office One" <sip:1101@67.152.18.231
>;party=called;privacy=off;screen=no.
Content-Type: application/sdp.
Content-Length: 305.
.
v=0.
o=root 1124623741 1124623741 IN IP4 172.16.99.2.
s=Asterisk PBX 1.8.4.1.
c=IN IP4 172.16.99.2.
t=0 0.
m=audio 13640 RTP/AVP 0 8 18 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.
a=sendrecv.
hello,
I wonder if anyone could help me understanding how can I use this
module in a scenario where multiple mtrees are defined behind the same
database table.
I can't guess how to speficy to 'mt_match' the mtree I want to match
against, since the 'mtree' module parameter defines a specific memory
tree based on a specific table, but not based on a specific 'tname'
value.
Any help is apreciated,
Thanks in advance.
Dear All,
I'm using the below config plan for routing my calls...The issue that
forcing rtp proxy is not working well and the rtp proxy is never
forced....Can you please provide me a guidance here?
if($rU=~"^00.*" )
{
if(!cr_route("default", "domain.com", "$rU", "$rU",
"call_id")){
sl_send_reply("403", "Not allowed");
} else {
setbflag(6);
route(1);
}
exit; ## this was missing here -bogdan!!!
}
else
{
route(LOCATION);
route(RELAY);
}
}
############# THIS IS THE GENERIC RELAY ROUTE THAT MUST BE USED ALL THE TIME
FOR RELAY
route[1]
{
# apply any NAT changes?
if(isflagset(5)||isbflagset(6)) {
route(4);
}
exit;
}
route[4]
{
if (is_method("BYE|CANCEL")) {
unforce_rtp_proxy();
} else if (is_method("INVITE")){
if (nat_uac_test("8")) {
* force_rtp_proxy();*
} else {
force_rtp_proxy();
}
xlog("L_ERR","66666666666666666666666666666666666666666");
t_on_failure("1");
t_on_reply("1");
};
The call is going through Route[1] then through Route[4], but rtp proxy is
never forced...Any tips please?
Regards
Hi,
ekiga.net registrar uses kamailio 1.5.3 (yes, a bit old...) and for
users who are not registered an empty NOTIFY body is returned when asked
by a SUBSCRIBE. What does this mean from SIP standard point of view,
and from kamailio point of view (are they identical?) I see in
RFC3265/3.1.6.2:
.... If the resource
has no meaningful state at the time that the SUBSCRIBE message is
processed, this NOTIFY message MAY contain an empty or neutral body
but is difficult for me to interpret what it means.
Example: I ask the presence for a user xyz who registered and quit
application long time ago:
SUBSCRIBE sip:xyz@ekiga.net SIP/2.0
CSeq: 1 SUBSCRIBE
Via: SIP/2.0/UDP
82.238.108.175:5060;branch=z9hG4bKdabe824f-1a8e-e011-9efc-0024d693d8e8;rport
User-Agent: Ekiga/3.3.1
From: <sip:eugen.dedu@ekiga.net>;tag=4888824f-1a8e-e011-9efc-0024d693d8e8
Call-ID: f602824f-1a8e-e011-9efc-0024d693d8e8@snoopy
Supported: eventlist
To: <sip:xyz@ekiga.net>
Accept: application/pidf+xml
Accept: multipart/related
Accept: application/rlmi+xml
Contact: <sip:eugen.dedu@82.238.108.175:5060>
Allow:
INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,MESSAGE,INFO,PING,PRACK
Expires: 300
Event: presence
Content-Length: 0
Max-Forwards: 70
I receive the following answer:
NOTIFY sip:eugen.dedu@82.238.108.175:5060 SIP/2.0
CSeq: 1 NOTIFY
Via: SIP/2.0/UDP 86.64.162.35;branch=z9hG4bK2a99.b8a72c47.0
User-Agent: Kamailio (1.5.3-notls (i386/linux))
From: sip:xyz@ekiga.net;tag=f85b0bd16aaafa8479586ac9f88b3198-10a0
Call-ID: f602824f-1a8e-e011-9efc-0024d693d8e8@snoopy
To: sip:eugen.dedu@ekiga.net;tag=4888824f-1a8e-e011-9efc-0024d693d8e8
Contact: <sip:86.64.162.35:5060>
Subscription-State: active;expires=370
Event: presence
Content-Length: 0
Max-Forwards: 70
To resume: What does SIP standard say about this NOTIFY with empty body?
Does this mean that the user xyz is offline?
Or does this mean that user's status has not changed? In fact, the
NOTIFY with empty body (as shown above) is the first one sent by
kamailio, so there is no "previous" state of that user, hence
"unchanged" status has no meaning.
Thank you,
--
Eugen
Dear All,
I'm using kamailio as Proxy server for registration with RTP proxy as relay
server for voice packets...I have an issue that when sending an Invite, the
audio address in SDP (o header)is not RTP Proxy address while if I send
another Invite to kamailio (second Invite), the RTP Proxy address will be
present in SDP sent back by Kamailio...
Anyone has a clue about what could be that matter?
Regards
Hi again,
> Then it is the time for Eugen to add it in his sip client and send
> the patch for enhancing kamailio's presence server with rfc4481, as
> well
:o)
I start my application, and make my own status be shown. I change my
status back and forth a few times between Away and DoNotDisturb (each
time a publish is sent), the status returned (in notify) is good. When
I change my status to Online/Available (and only to this), kamailio
returns a double tuple. Is it normal to have a double tuple? If yes,
which one to choose (the one with latest timestamp)? Here it is:
NOTIFY sip:eugen.dedu@82.238.108.175:5060 SIP/2.0
CSeq: 7 NOTIFY
Via: SIP/2.0/UDP 86.64.162.35;branch=z9hG4bK7634.4d863c14.0
User-Agent: Kamailio (1.5.3-notls (i386/linux))
From: sip:eugen.dedu@ekiga.net;tag=f85b0bd16aaafa8479586ac9f88b3198-29fc
Call-ID: 8a0d723b-0f8d-e011-84d7-0024d693d8e8@snoopy
To: sip:eugen.dedu@ekiga.net;tag=7c75723b-0f8d-e011-84d7-0024d693d8e8
Contact: <sip:86.64.162.35:5060>
Subscription-State: active;expires=270
Event: presence
Content-Length: 938
Content-Type: application/pidf+xml
Max-Forwards: 70
<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns:
rpid="urn:ietf:params:xml:ns:pidf:rpid" entity="pres:eugen.dedu@ekiga.net">
<tuple id="T00000002">
<status>
<basic>open</basic>
</status>
<contact priority="1">sip:eugen.dedu@ekiga.net</contact>
<note>online - </note>
<timestamp>2011-06-04T13:55:56+02:00+02:00</timestamp>
</tuple>
<tuple xmlns="urn:ietf:params:xml:ns:pidf" id="T00000001">
<status>
<basic>open</basic>
</status>
<contact priority="1">sip:eugen.dedu@ekiga.net</contact>
<note>away - jjk</note>
<timestamp>2011-06-04T13:54:37+02:00+02:00</timestamp>
</tuple>
<dm:person xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" id="pid1">
<rpid:activities>
<rpid:away/>
</rpid:activities>
</dm:person>
</presence>
--
Eugen
On 6/10/11 10:07 PM, Craig Southeren wrote:
> On 10/06/2011 1:01 PM, Daniel-Constantin Mierla wrote:..deleted
>>>
>>> So, if a client uploads a presence document that contains a
>>> <timed-status> element, that element could be sent by the PA when
>>> the client goes offline, rather than the entire document being
>>> discarded (which is what I suspect is happening now).
>>
>> we don't have this rfc implemented in kamailio at this time. Is any
>> UA you know doing this kind of thing?
>
> No
Then it is the time for Eugen to add it in his sip client and send the
patch for enhancing kamailio's presence server with rfc4481, as well ;-)
Daniel
--
Daniel-Constantin Mierla -- http://www.asipto.comhttp://linkedin.com/in/miconda -- http://twitter.com/miconda
I'm looking to build a set of contacts with q values based on SRV
records for serial/parallel forking.
I want "enum_query" (loading the contact set with a q value based on the
order,preference of the NAPTR record) but the ruri is not an e.164
number, and SRV records are used instead. Think in terms of "find all
peer proxies based on SRV lookup, and sort them for use with
t_load_contacts()/t_next_contacts()."
So far I haven't found any api that exposes the DNS lookups in sip-router.
Before rolling something custom with Lua, am I missing something that's
already documented? Or are there plans to make such a module? Sure
don't want to re-invent the wheel.
tia